Fandom

Vim Tips Wiki

Automatic scrolling of text

Redirected from VimTip1198

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Tip 1198 Printable Monobook Previous Next

created 2006 · complexity basic · version 5.7


Many times you would be happy with the text scrolling automatically at a convenient speed. This helps in places where the text is for reading only (like an ebook), where our only interaction will be scrolling the text. I believe, this might help in speed-reading habits also.

To enable automatic scrolling:

:map <F8> <C-E>:sleep 3500m<CR>j<F8>

Press <F8> to start auto scrolling. Adjust the speed in the sleep argument. Press Ctrl-C to stop scrolling.

ReferencesEdit

CommentsEdit

This would be a great feature if added to Vim itself. Imagine a key, such as SHIFT-K, which when pressed starts scrolling the text upwards. Pressing it again, increases the speed. Pressing SPACE stops the scrolling. A SHIFT-J would do the reverse, that is scroll downwards.


I couldn't see any reason for the ^[ so I deleted it. If anyone can think of why the original was
map <F8> <C-E>:sleep 3500m<CR>^[j<F8> please say so (^[ is <Esc>).

Of course Shift-K and Shift-J (K and J) have useful meanings already, so you would probably want to use different keys.

Also on Fandom

Random Wiki