-
Vim Tip: Past Commands
This week’s, how the hell did I not know about this sooner vim moment: q:.
I primarily use vim via terminal these days. One of the nice things in MacVim is the ability to arrow through previous commands (just ‘:’ then up and down arrows). Since arrows do not work (which is kind of great) navigating and reviewing recent commands didn’t appear to be easily possible….and of course, I was really wrong. :)
Summary:
- q: - brings up recent commands
- Select a line you want to run
- Remember that you can edit the line in place
- Execute the command with Control+C (capital C).
Here are some good docs on Using Command Line History.