Update vim movement configuration
- Ctrl+J and Ctrl+K to move lines - gj and gk to jump 10 lines up or down
This commit is contained in:
parent
50c1f72172
commit
e2892a833f
1 changed files with 6 additions and 12 deletions
|
@ -318,7 +318,7 @@ function! MatchingLinesDict(pattern)
|
||||||
return list
|
return list
|
||||||
endfunc
|
endfunc
|
||||||
com! -nargs=1 List call setloclist(0, MatchingLinesDict(<f-args>))
|
com! -nargs=1 List call setloclist(0, MatchingLinesDict(<f-args>))
|
||||||
\ | lopen
|
\ | lopen
|
||||||
|
|
||||||
function! LocationAddLineCol(filename, lnum, text, col)
|
function! LocationAddLineCol(filename, lnum, text, col)
|
||||||
call setloclist(0, [{'filename': a:filename, 'lnum': a:lnum, 'desc': a:text, 'col': a:col}], 'a')
|
call setloclist(0, [{'filename': a:filename, 'lnum': a:lnum, 'desc': a:text, 'col': a:col}], 'a')
|
||||||
|
@ -515,12 +515,13 @@ nnoremap <leader>n :next<CR>:args<CR>
|
||||||
nnoremap <leader>p :previous<CR>:args<CR>
|
nnoremap <leader>p :previous<CR>:args<CR>
|
||||||
|
|
||||||
let g:jmp_dist = 8
|
let g:jmp_dist = 8
|
||||||
map <C-j> :exec "normal ".g:jmp_dist."j"<CR>
|
exec 'noremap gj '.g:jmp_dist.'j'
|
||||||
map <C-k> :exec "normal ".g:jmp_dist."k"<CR>
|
exec 'noremap gk '.g:jmp_dist.'k'
|
||||||
|
|
||||||
|
nnoremap <C-k> ddkP
|
||||||
|
nnoremap <C-j> ddp
|
||||||
nnoremap <C-h> b
|
nnoremap <C-h> b
|
||||||
nnoremap <C-l> e
|
nnoremap <C-l> e
|
||||||
" Yes, not 'noremap', do whatever is mapped to J and K assuming
|
|
||||||
" it is some sort of custom up-down motion, but g:jmp_dist times
|
|
||||||
|
|
||||||
" --- Marks ---
|
" --- Marks ---
|
||||||
nnoremap <leader>m :marks abcdefghijklmnopqrstuvwxyz<CR>
|
nnoremap <leader>m :marks abcdefghijklmnopqrstuvwxyz<CR>
|
||||||
|
@ -542,13 +543,6 @@ nnoremap <leader>= <C-a>
|
||||||
" --- Text ---
|
" --- Text ---
|
||||||
nnoremap U ~h
|
nnoremap U ~h
|
||||||
|
|
||||||
" --- MOVEMENT ---
|
|
||||||
" noremap j gj
|
|
||||||
" noremap k gk
|
|
||||||
|
|
||||||
noremap gj j
|
|
||||||
noremap gk k
|
|
||||||
|
|
||||||
" --- CLIPBOARD ---
|
" --- CLIPBOARD ---
|
||||||
nnoremap Y y$
|
nnoremap Y y$
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue