tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Fix context-aware completion from the middle of a word #287

Closed junegunn closed 7 years ago

junegunn commented 7 years ago

Context-aware completion does not work well if it's triggered from the middle of a word.

screen shot 2017-01-12 at 11 08 03 pm screen shot 2017-01-12 at 11 08 22 pm screen shot 2017-01-12 at 11 08 56 pm screen shot 2017-01-12 at 11 09 38 pm

It is because the placeholder expression __prefix__ is not properly generated in those cases:

An easy way to fix this is to append a single space to break the word. I can confirm that the patch works pretty well.

screen shot 2017-01-12 at 11 10 07 pm screen shot 2017-01-12 at 11 26 26 pm