created 2005 · complexity basic · author hari_vim · version 6.0
If you are using command line completion while showing matches (^D etc), often, the display scrolls in such a way that at least part of the text in the buffers is not visible anymore. If you want to redraw the screen, you have the option of switching to the command-window, which will refresh the screen anyway, but the following shows a way to redraw the screen without needing to do that.
Install the genutils.vim script#1062 plugin or just copy paste the GetVimCmdOutput() function into your vimrc, and create the following cmap:
cnoremap <C-X><C-L> <C-R>=GetVimCmdOutput('redraw')<CR>
You can now type
^X^L anytime on the command-line even in the middle of typing a new command. In normal mode you can always use
^L directly so this is not needed, if you enter Ex mode through
gQ command (:help gQ), you can use this to quickly redraw the screen.