Vim Tips Wiki
Register
No edit summary
 
(Change to TipImported template + severe manual clean)
Line 1: Line 1:
 
{{review}}
 
{{review}}
  +
{{TipImported
{{Tip
 
 
|id=952
 
|id=952
  +
|previous=951
|title=refresh screen while typing a command
 
  +
|next=953
|created=June 17, 2005 14:53
+
|created=June 17, 2005
 
|complexity=basic
 
|complexity=basic
|author=hari_vim at yahoo dot com
+
|author=hari_vim
 
|version=6.0
 
|version=6.0
 
|rating=-2/4
 
|rating=-2/4
 
}}
|text=
 
If you are using command line completion while showing matches (^D etc.), often, the display scrolls such a way that the at least part of the text in the buffers is not visible anymore. If you want to redraw 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 ([/scripts/script.php?script_id=1062 vimscript #1062]) plugin or just copy paste the GetVimCmdOutput() function into your vimrc, and create the following cmap:
+
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=1062}} plugin or just copy paste the GetVimCmdOutput() function into your vimrc, and create the following cmap:
   
  +
<pre>
 
cnoremap &lt;C-X&gt;&lt;C-L&gt; &lt;C-R&gt;=GetVimCmdOutput('redraw')&lt;CR&gt;
  +
</pre>
   
 
You can now type <tt>^X^L</tt> anytime on the command-line even in the middle of typing a new command. In normal mode you can always use <tt>^L</tt> directly so this is not needed, if you enter Ex mode through <tt>gQ</tt> command ({{help|gQ}}), you can use this to quickly redraw the screen.
cnoremap &lt;C-X&gt;&lt;C-L&gt; &lt;C-R&gt;=GetVimCmdOutput('redraw')&lt;CR&gt;
 
   
 
==Comments==
   
  +
----
 
You can now type ^X^L anytime on the command-line even in the middle of typing a new command. In the normal mode you can always use ^L directly so this is not needed, if you enter Ex mode through gQ command (h gQ), you can use this to quickly redraw screen.
 
}}
 
 
== Comments ==
 
<!-- parsed by vimtips.py in 0.527565 seconds-->
 

Revision as of 10:06, 9 December 2007

Tip 952 Printable Monobook Previous Next

created June 17, 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.

Comments