nvim spellcheck

This commit is contained in:
Christoph J. Scherr 2023-07-05 11:28:16 +02:00
parent 903626f673
commit 332dc049f8
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 19 additions and 5 deletions

View File

@ -20,7 +20,6 @@ set ttyfast " Speed up scrolling in Vim
set fdm=indent " foldingmethod syntax set fdm=indent " foldingmethod syntax
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup. set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
set numberwidth=4 set numberwidth=4
set spell " enable spell check (may need to download language package)
set timeout timeoutlen=400 set timeout timeoutlen=400
set ttimeoutlen=0 set ttimeoutlen=0
@ -31,7 +30,6 @@ filetype plugin indent on "allow auto-indenting depending on file type
filetype plugin on filetype plugin on
" let g:indentLine_setColors = 0
let g:indentLine_char = '│' let g:indentLine_char = '│'
" add lines with double o " add lines with double o
@ -69,7 +67,7 @@ let mapleader=" "
map <leader>t :echo "leader tested!"<CR> map <leader>t :echo "leader tested!"<CR>
map <leader>h :noh<CR> map <leader>h :noh<CR>
" copy to wayland clipboard when leader is used. (note, install gvim for this) " copy to Wayland clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>wy y :call system("wl-copy", @")<CR> vnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wY Y :call system("wl-copy", @")<CR> nnoremap <leader>wY Y :call system("wl-copy", @")<CR>
nnoremap <leader>wy y :call system("wl-copy", @")<CR> nnoremap <leader>wy y :call system("wl-copy", @")<CR>
@ -98,3 +96,19 @@ nnoremap <C-Left> :vertical resize +1<CR>
nnoremap <C-Right> :vertical resize -1<CR> nnoremap <C-Right> :vertical resize -1<CR>
nnoremap <C-Up> :resize -1<CR> nnoremap <C-Up> :resize -1<CR>
nnoremap <C-Down> :resize +1<CR> nnoremap <C-Down> :resize +1<CR>
" spell checking
set spell spelllang=en
" go to last or next misspelled word
nnoremap zn ]s
nnoremap zN [s
" same as above but only with bad words (unrecognized)
nnoremap Zn ]S
nnoremap ZN [S
" mark correct with zg, mark bad with zw, undo with zug/zuw
" correct with zc, default is z= but that sucks for qwertz keyboards
nnoremap zc z=