Feel free to point me to the appropriate documentation for this.
When in ex mode ( Q ) and entering numerous commands, the file scrolls up to where you can't see what you're working on.
Are there key bindings for scrolling the visible file while in ex mode? Ctrl-J puts lines in the ex window - but there doesn't seem to be a way to go the other direction - Ctrl-J scrolls down by line. Maybe it's the OS or Vim version?
Is there a setting to keep ex from scrolling the file up? Very annoying.
Thanks ~
Bubnoff
Is :p command which prints current line enough?.
Try :-5,+5p for context and replace p with # go get line numbers.
Edit: Just found :z which is better, as it does not move the cursor as :p does.
And a counter-question: I wonder why using ex-mode?
I am using vim for over 10 years and so far have not found any use for it (but can imagine some like editing very long lines or working over very slow connection.)
That's the whole point of ex mode --
ex
has always been a line editor, and was never a screen editor.vi
basically turnedex
into a screen editor, and keptex
mode so it could be backwards compatible.If you want to see what you're doing then use the 'p' command, so:
[etc].