Created
February 2, 2015 05:02
-
-
Save DanielFGray/7b78646f90c45242af5a to your computer and use it in GitHub Desktop.
This file contains hidden or 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! Togglegjgk() | |
if !exists("g:togglegjgk") || g:togglegjgk==0 | |
let g:togglegjgk=1 | |
nnoremap j gj | |
nnoremap k gk | |
nnoremap gk k | |
nnoremap gj j | |
else | |
let g:togglegjgk=0 | |
unmap j | |
unmap k | |
unmap gk | |
unmap gj | |
endif | |
endfunction | |
nnoremap <silent> <leader>tgj <Esc>:<C-u>call Togglegjgk()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment