Added better version

This commit is contained in:
Sebastian 2021-12-02 12:06:44 +01:00
parent 2d5fffcbdd
commit 2781aabb1b

View file

@ -220,9 +220,12 @@ set omnifunc=syntaxcomplete#Complete
" Keep 8 rows above and below the kk
set scrolloff=8
" Jump to wrapped line instead of next real line.
nnoremap <expr> k (v:count == 0 ? 'gk' : 'k')
nnoremap <expr> j (v:count == 0 ? 'gj' : 'j')
" Jump to wrapped line instead of next real line. But still respect the line
" numbering when doing bigger steps. Also adds jumps bigger than 5 to the jump
" list
" source: https://www.vi-improved.org/vim-tips/
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'
" Use e and E to jump to start or end of a line.