fancy fzf spell correction vim

This commit is contained in:
Christoph J. Scherr 2023-07-06 10:00:36 +02:00
parent 2a17e1059b
commit dfb116b2e5
Signed by: cscherrNT
GPG Key ID: 8E2B45BC51A27EA7
1 changed files with 9 additions and 2 deletions

View File

@ -117,8 +117,15 @@ nnoremap ZN [S
" mark correct with zg, mark bad with zw, undo with zug/zuw " mark correct with zg, mark bad with zw, undo with zug/zuw
" correct with zc, default is z= but that sucks for qwertz keyboards " fancy fzf correct with zc, default is z= but that sucks for qwertz keyboards
nnoremap z<space> z= function! FzfSpellSink(word)
exe 'normal! "_ciw'.a:word
endfunction
function! FzfSpell()
let suggestions = spellsuggest(expand("<cword>"))
return fzf#run({'source': suggestions, 'sink': function("FzfSpellSink"), 'down': 10 })
endfunction
nnoremap z<space> :call FzfSpell()<CR>
" don't make things written as `something` a typo " don't make things written as `something` a typo
syntax region cBackTickNoSpell start=+`+ end=+`+ syntax region cBackTickNoSpell start=+`+ end=+`+