Vim Tips Wiki
We recommend that you log in before editing. This will allow other users to leave you a message about your edit, and will let you track edits via your Watchlist. Creating an account is quick and free.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 12: Line 12:
 
|category2=
 
|category2=
 
}}
 
}}
βˆ’
If you are using command line completion while showing matches (<kbd>^D</kbd> 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.
+
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|id=197}} plugin or just copy paste the <code>GetVimCmdOutput()</code> function into your vimrc, and create the following cmap:
+
Install the genutils.vim {{script|id=197}} plugin or just copy paste the GetVimCmdOutput() function into your vimrc, and create the following cmap:
 
<source lang="vim">
 
<source lang="vim">
 
cnoremap <C-X><C-L> <C-R>=GetVimCmdOutput('redraw')<CR>
 
cnoremap <C-X><C-L> <C-R>=GetVimCmdOutput('redraw')<CR>
 
</source>
 
</source>
   
βˆ’
You can now type <kbd>^X^L</kbd> anytime on the command-line even in the middle of typing a new command. In normal mode you can always use <kbd>^L</kbd> directly so this is not needed, if you enter Ex mode through <kbd>gQ</kbd> command ({{help|gQ}}), you can use this to quickly redraw the screen.
+
You can now type <code>^X^L</code> anytime on the command-line even in the middle of typing a new command. In normal mode you can always use <code>^L</code> directly so this is not needed, if you enter Ex mode through <code>gQ</code> command ({{help|gQ}}), you can use this to quickly redraw the screen.
  +
   
 
==GetVimCmdOutput() from genutils.vim==
 
==GetVimCmdOutput() from genutils.vim==
Please note that all contributions to the Vim Tips Wiki are considered to be released under the CC-BY-SA
Cancel Editing help (opens in new window)