Reuse command or search from history in VIM

I just came across http://vim.wikia.com/wiki/Using_command-line_history from a tweet.

In Normal mode press q: and the command (:) history will appear.

VIM command history

VIM command history

Movement with j or k moves up and down and hitting Enter reexecutes the command where the cursor stands.
The same works with the search (/) history q/.

Advertisements

About Michal Zuber

Biker and rollerblader. Owner and developer at http://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in vim and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s