[vimrc] long jumps are accurate to relative numbering
This commit is contained in:
parent
fb7e3c218c
commit
61ae4b30a3
1 changed files with 3 additions and 2 deletions
5
vimrc
5
vimrc
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue