[vimrc] long jumps are accurate to relative numbering

This commit is contained in:
lhark 2018-08-01 16:52:59 -04:00
parent fb7e3c218c
commit 61ae4b30a3

5
vimrc
View file

@ -152,8 +152,9 @@ map <F7> :ls!<CR>:buffer<Space>
vnoremap < <gv vnoremap < <gv
vnoremap > >gv vnoremap > >gv
"[Improve up/down movement on wrapped lines]" "[Improve up/down movement on wrapped lines]"
nnoremap j gj "[If preceded by a count, jump actual lines. Also if > 5, save to jumplist]"
nnoremap k gk 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'
" nnoremap <Down> gj " nnoremap <Down> gj
" nnoremap <Up> gk " nnoremap <Up> gk
" vnoremap <Down> gj " vnoremap <Down> gj