I'm having a problem using the command-line window (help cmdwin), which is extremely useful, but it doesn't play well with macros.

cmdwin is invoked with q:, so if there is a macro being recorded, the 'q' ends the recording.

Here's the general chain of events:

qw          # start recording a macro in register w
q:          # enter cmdwin to perform a command,
            # expecting it to be recorded, but the q cancels the
            # macro

I don't think it's relevant, but I have : mapped to q:, making cmdwin the default way of invoking commands. I love cmdwin, but macros are essential.

Is there a way to make them play nicely?

1 Answer 1


You can access the command line window with the alternate command :<C-F>, i.e. press Ctrl-F when in command line mode. Eventually you can rebind : to :<C-F>.

  • Thank you, this is perfect. I updated my mappings and it works flawlessly. :<C-F> for commands, /<C-F> and ?<C-F> for search.
    – mwcz
    Feb 6, 2015 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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