On bash I press CTRL+R and typing vim bash return list of commands typed in past with vim string.Is possible to make something like this in vim history for commands starting with the : ?
When you type
q: Vim opens
[Command Line] window. In this window you can normally search by pressing
? (backward) or
/ or browse by arrows... You can execute selected line by pressing enter.
See chapter 20.5 of help in Vim for details. Type
:help usr_20.txt, then go to with cursor to
|20.5| and press ctrl + ]:
Open the command line window with this command: >
Vim now opens a (small) window at the bottom. It contains the command line history, and an empty line at the end:
+-------------------------------------+ |other window | |~ | |file.txt=============================| |:e c |
You may move up and down through the commands saved in Vim's command history by using the Up and Down keys after having typed :.
If you enter the start of a command and press Up, Vim will give you the most recent saved command with the same prefix string. In this respect it works in the reverse order from what Bash uses in that you first type in a bit of a command and then press Up (rather than, as in Bash, first press Ctrl+R and then type something).
This also works for search strings.