>>107262451
>Any little keymap hacks you've put in?
Here are some that should be universal:
inoremap <esc> <esc>`^ " escape insert mode without moving cursor
nnoremap <silent> U <c-r> " U for undo
nnoremap S Xi " S for backward substitution (instead of duplicating D)
nnoremap Y y$ " Y for yank to end of line (instead of duplicating yy)
nnoremap <c-q> @@ " C-q to repeat last macro
" cw to change to next word (instead of duplicating ce)
onoremap <expr> w v:operator != 'c' ? 'w' : "\<esc>" .. 'd' .. v:count1 .. 'wi'
onoremap <expr> W v:operator != 'c' ? 'W' : "\<esc>" .. 'd' .. v:count1 .. 'Wi'
" n to search forward/N to search backward (regardless of whether last seach was done with / or ?)
nnoremap <expr> n 'Nn'[v:searchforward]
xnoremap <expr> n 'Nn'[v:searchforward]
onoremap <expr> n 'Nn'[v:searchforward]
nnoremap <expr> N 'nN'[v:searchforward]
xnoremap <expr> N 'nN'[v:searchforward]
onoremap <expr> N 'nN'[v:searchforward]
" gn to go to end of match (gN to previous match) without entering visual mode
nnoremap gn <cmd>call search(@/, 'es')<cr>
xnoremap gn <cmd>call search(@/, 'es')<cr>
nnoremap gN <cmd>call search(@/, 'bes')<cr>
xnoremap gN <cmd>call search(@/, 'bes')<cr>
" undo breakpoints
inoremap <silent> , ,<c-g>u
inoremap <silent> . .<c-g>u
inoremap <silent> ; ;<c-g>u