So I am new to Vim and I am trying to understand the language of vimrc
. I have this in my vimrc
:
map <F8> <C-E>: sleep 100m<CR>j<F8>
This would automatically move the cursor down when I press F8
. However, what if I want the cursor to move down 1 line then move up 1 line, then down 1 line again and repeat?
It's a dumb question I know, but I try to understand how the language vimscript works. Anyway, I try this:
map <F8> <C-E>: sleep 100m<CR>1j1k<F8>
That only scolls downward, not upward. I want it to move down 1 line, then up 1 line then repeat until I press Ctrl-C
to cancel.
Pleast let me know your help