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 ~


  • No ex mode users? – Bubnoff Nov 13 '10 at 3:08

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 turned ex into a screen editor, and kept ex mode so it could be backwards compatible.

If you want to see what you're doing then use the 'p' command, so:

:p       Show current line
:.,+10p  Print lines from current line to ten lines down
:1,$p    Print all lines in the file



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.