Created
December 10, 2016 21:39
-
-
Save brooth/0404932dd450c5734b847e8823cf6657 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works well, but "Toogle"?