Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function! ToogleScrollMode()
if exists("s:scroll_mode")
unmap k
unmap j
unlet s:scroll_mode
echom "scroll mode off"
else
nnoremap j <C-e>j
nnoremap k <C-y>k
let s:scroll_mode = 1
echom "scroll mode on"
endif
endfunction
@9horses
Copy link

9horses commented Feb 10, 2018

Works well, but "Toogle"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment