Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I record and/or create a vim macro that includes the character 'q' in normal mode?

Tags:

vim

macros

It is well-known that q is used to begin recording and also to terminate recording a macro.

Unfortunately, I am trying to record a sequence of commands which includes the command q:, and the macro (naturally) stops recording at q.

Is there a way I can record a sequence of commands that includes q typed in normal mode?

Update: I have tried remapping q to something else and mapping another letter to q, but this seems to break the functionality of q for the actual command I am trying to record.

like image 471
merlin2011 Avatar asked Mar 24 '23 07:03

merlin2011


1 Answers

You can do :Ctrl+f to open the command history window without stopping the recording.

like image 195
perreal Avatar answered Apr 06 '23 11:04

perreal