Skip to content

Instantly share code, notes, and snippets.

@veirus veirus/better_jk.vim
Last active Jun 27, 2018

Embed
What would you like to do?
Mappings for easier line navigation with <j> and <k> when `wrap` is on
" screen line scroll - very useful with wrap on
" https://bluz71.github.io/2017/05/15/vim-tips-tricks.html
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.