Skip to content

Instantly share code, notes, and snippets.

@zorbash
Created July 20, 2018 15:24
Show Gist options
  • Save zorbash/7175e78c9d323ac02ce74308aa6e7be6 to your computer and use it in GitHub Desktop.
Save zorbash/7175e78c9d323ac02ce74308aa6e7be6 to your computer and use it in GitHub Desktop.
Moving
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment