diff --git a/nvim/.config/nvim/plugin/personal/spellsuggest.vim b/nvim/.config/nvim/plugin/personal/spellsuggest.vim new file mode 100644 index 0000000..da90be0 --- /dev/null +++ b/nvim/.config/nvim/plugin/personal/spellsuggest.vim @@ -0,0 +1,13 @@ +function! s:fzfSpellSink(word) + exe 'normal! "_ciw'.a:word +endfunction +function! FzfSpell() + let l:spellstatus = &spell + setlocal spell + let suggestions = spellsuggest(expand("")) + if l:spellstatus + return fzf#run({'source': suggestions, 'sink': function("s:fzfSpellSink"), 'right': "20%" }) + +endfunction + +command FzfSpellSuggest :call FzfSpell()