Skip to content

Instantly share code, notes, and snippets.

@veirus
Last active June 27, 2018 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veirus/23a0ef6f31df265454d453ad1e1fed85 to your computer and use it in GitHub Desktop.
Save veirus/23a0ef6f31df265454d453ad1e1fed85 to your computer and use it in GitHub Desktop.
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