yitnwa
Last Updated: February 25, 2016
·
1.083K
· jcmuller
2d20d0edc591c7e4524dd7e2e1a91b96

VIM's Command Line Window. And Search Window.

For many years I've been using VIM as my text editor, be it command line, gVim or MacVim.app.

Once in a while I would end up in this alien 5 line high window while trying to execute an ex command. Until I finally learned what it is and what it does. AND IT'S AMAZING. And how to bring it up at will: q: from normal mode (That's a q key press before typing : to enter ex mode).

First, it is a fully editable (using all your vim-foo!) buffer that holds your previously used commands and you can either highlight one and press enter, or edit it in place. Command line expansion works, file name completion, you can use C-N, if you have any plugins that help you auto complete they will work in there. (I use YouCompleteMe).

It also exists for your search history, which you can access with q/ or q?

From that info, I added the following lines to my .vimrc file:

noremap : q:I

Happy Vimming!

PS: :help command-line-window

Say Thanks
Respond