VIM: Adds check around clipboard mappings and auto correct spelling
This commit is contained in:
parent
fa9e7ef249
commit
2ab9b7a9b4
2 changed files with 20 additions and 4 deletions
3
nvim/.config/nvim/.netrwhist
Normal file
3
nvim/.config/nvim/.netrwhist
Normal file
|
@ -0,0 +1,3 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhistcnt =1
|
||||
let g:netrw_dirhist_1='/home/jonathan/.dotfiles/nvim/.config/nvim/plugin'
|
|
@ -15,7 +15,20 @@ nnoremap <c-j> <c-w>j
|
|||
nnoremap <c-k> <c-w>k
|
||||
nnoremap <c-l> <c-w>l
|
||||
|
||||
" Make Ctrl C and Ctrl V work on system clipboard
|
||||
" if in visual or insert mode respectively
|
||||
vnoremap <C-c> "+y
|
||||
inoremap <C-v> <Esc>"+pa
|
||||
if has('clipboard')
|
||||
" Make Ctrl C and Ctrl V work on system clipboard
|
||||
" if in visual or insert mode respectively
|
||||
vnoremap <C-c> "+y
|
||||
inoremap <C-v> <Esc>"+pa
|
||||
endif
|
||||
|
||||
" Fix previous spelling mistake in insert mode
|
||||
" Shamelessly taken from https://castel.dev/post/lecture-notes-1/
|
||||
" <c-g>u - break undo sequence (new change)
|
||||
" <Esc> - go into normal mode
|
||||
" [s - go to previous spelling mistake
|
||||
" 1z= - change to the top spelling suggestion
|
||||
" `] - go to the end of the last changed word
|
||||
" a - enter insert mode
|
||||
" <c-g>u - break undo sequence (new change)
|
||||
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue