I would like to have the following search in Vim too
(reverse-i-search)`':
Enter a word of your previous command, and you get the full command.
I know the chronological history tool in Vim
q:
However, it is not that useful as the fuzzy reverse search.
How can you have a similar reverse search in Vim as in the terminal?
Open a terminal application on your Linux or Unix and type history to list all commands. To search for a command in the history, press ctrl+r multiple times. For instance, you can hit the ctrl+r and type string to search.
Press Ctrl+F in command mode to open the command history window. Then, you can use / , ? , and other search commands. Press Enter to execute a command from the history.
Type q:
in the normal mode to open commands window. You can search/edit here using regular vim commands. You start in Normal mode. Press Enter
to execute a command.
This approach lets you search across whole command not just beginning of line.
Enter the first letters of your previous command and push <Up> arrow (or Ctrl+p).
:set li<up> :set lines=75
Don't forget to check history option and set it to big enough value
:set history=1000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With