1
0
Fork 0
numbers/nvim/plugin/mappings/insert.vim

28 lines
637 B
VimL

" Ensure that ctrl+u in insert mode can be reversed
" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U
inoremap <c-u> <c-g>u<c-u>
inoremap <c-w> <c-g>u<c-w>
" Some more undo breakpoints
inoremap , ,<c-g>u
inoremap . .<c-g>u
inoremap ! !<c-g>u
inoremap ? ?<c-g>u
" Shift lines up and down
inoremap <c-j> <esc>:m .+1<cr>gi
inoremap <c-k> <esc>:m .-2<cr>gi
" Line movements
inoremap <silent> <Home> <C-o>g<Home>
inoremap <silent> <End> <C-o>g<End>
" Alt to switch between splits
inoremap <A-h> <Esc><C-w>h
inoremap <A-j> <Esc><C-w>j
inoremap <A-k> <Esc><C-w>k
inoremap <A-l> <Esc><C-w>l
" UPPERCASE
inoremap <C-F> <Esc>gUiw`]a