4 ms·
You have two choices: 1) Learn what's going on, press q to start macro mode, and then press a letter to name your macro. Do stuff and when you're done press q
by AndrewOMartin 8y ago
You have two choices:
1) Learn what's going on, press q to start macro mode, and then press a letter to name your macro. Do stuff and when you're done press q again. You can then repeat that macro with @x where x is whatever letter you named your macro. @@ repeats it, and 74@x does it 74 times. It's (very occasionally) awesomely powerful.
2) echo "noremap q <nop>" >> ~/.vimrc
- dhimes 8y agoI find I use it for little things. For example, for html I have macros for <li> </li> and <p> </p> I also have one for commenting out a line in css I/*<esc>A*/<esc> Little things like that help me relax :)
- spapas82 8y agoFor commenting out I recommend installing tpope/vim-commentary. Then you'll just use gcc To comment out a line!