feat(nvim): add more mappings
Add key mappings for easily moving text and some small behaviour tweaks.
This commit is contained in:
parent
b64abbfacb
commit
1fa5e57b9b
|
@ -47,6 +47,19 @@ call s:SourceConfigFilesIn('plugins')
|
||||||
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
|
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
|
||||||
nnoremap <Leader>x :!chmod +x %<CR>
|
nnoremap <Leader>x :!chmod +x %<CR>
|
||||||
|
|
||||||
|
" Yank from the current column to the end of the line
|
||||||
|
nnoremap Y yg$
|
||||||
|
|
||||||
|
" Move lines up and down
|
||||||
|
inoremap <M-j> <Esc>:m .+1<CR>==gi
|
||||||
|
inoremap <M-k> <Esc>:m .-2<CR>==gi
|
||||||
|
vnoremap <M-k> :m '<-2<CR>gv=gv
|
||||||
|
vnoremap <M-j> :m '>+1<CR>gv=gv
|
||||||
|
|
||||||
|
" Keep things centred
|
||||||
|
nnoremap n nzzzv
|
||||||
|
nnoremap N Nzzzv
|
||||||
|
|
||||||
" Remove arrow keys
|
" Remove arrow keys
|
||||||
noremap <up> <nop>
|
noremap <up> <nop>
|
||||||
noremap <down> <nop>
|
noremap <down> <nop>
|
||||||
|
|
Loading…
Reference in a new issue