A blog dedicated to text editing and general exploration of computing knowledge
Wednesday, November 11, 2009
Window Scrolling
Hit ctrl-e to scroll the current window down. Hit ctrl-y to scroll the current window up. An advantage of using these commands is that the cursor stays in the current location. Try it!
8 comments:
Anonymous
said...
You can do this in insert mode also by prefixing C-e and C-y with C-x e.g. C-x C-e
It's useful if you want to refer to something that is outside of the screen without living the insert mode.
Bill probably already answered your question but just in case you're asking how to put the cursor in the middle of the current line, just hit gm in normal mode.
8 comments:
You can do this in insert mode also by prefixing C-e and C-y with C-x e.g. C-x C-e
It's useful if you want to refer to something that is outside of the screen without living the insert mode.
Is there a way to center the cursor vertically in the window, while staying on the same line?
mariuss: In Normal mode, zz will place the current line in the middle of the window without changing the cursor position within the line.
@mariuss
Bill probably already answered your question but just in case you're asking how to put the cursor in the middle of the current line, just hit gm in normal mode.
This is good, I've definitely been missing this. is there a way to scroll a half-page or so at a time, w/o changing cursor position?
Seth: Check out :help scroll-cursor for some ideas. I think zt and zb are probably what you want.
...although now that I re-read your comment, maybe not. I suggest skimming :help scroll.txt for lots of scrolling techniques.
A bit late, but thanks for the tip, yes, zz is what I was looking for :-)
And gm looks useful as well.
Post a Comment