0

I'd like to map q to :cclose in the quickfix window, but I wonder if I'd be locking myself out of a world of wonderful macros by doing so.

Are there realistic scenarios where you'd want to be able to start recording a macro from the quickfix window? The only one I can think of is:

  1. open the current error
  2. do something
  3. return to the quickfix window
  4. move down to the next error

But I think it would be more convenient to open the current error, start the macro from that buffer, do something, and use :cnext to move to the next error. That way you don't have to jump back and forth between windows.

Is there a more compelling use-case for preserving the default q keybinding in the quickfix window?

  • 1
    It all depends on your workflow: as you said you can still use :cnext in your macro (which seems more efficient than going back to the quickfix window, change line and go to the next error). So you should remap q in the quickfix window, test this config for awhile and change it if you realize that it doesn't actually fit your needs. – statox Jul 17 '17 at 9:28
0

Why not map :cclose to <Leader>q, if you want it as a shortcut? My guess is that you will inevitably need macros, and are boxing yourself into a corner by remapping q.

  • I just find q so much more satisfying on its own. – ivan Jul 16 '17 at 23:23
  • @ivan well you are going to limit your future access to recording macros. You could always map q itself to <Leader>q, so that macros are still easily accessible and then map :cclose to q. – Gleland Jul 16 '17 at 23:32
  • Yeah, that's probably the best compromise. – ivan Jul 17 '17 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.