tags:

views:

72

answers:

3

It is very inconvenient when the line I'm editing is at the bottom of the screen . Because you can't see any following lines and that prevent you from take any "eye refernce" to the content of the file following the current line .

so my question is there a vim command can refresh the display and put the current line under edit to on the top of the screen ? thanks in advance.

+5  A: 

See this reference.

z<return>
Jonathan Feinberg
+4  A: 
Alok
+7  A: 

:h scroll-cursor

Jonathan's answer is valid, however I prefer zt (as "top") that keeps the cursor where it was. In the same idea, there is zb (as "bottom") and zz (not as "middle", but that puts the current line at the center of the window).

Luc Hermitte
This answer is better than mine. I'm Jonathan Feinberg, and I approved this message.
Jonathan Feinberg