Some time ago, I added the following line to
~/.vim/after/ftplugin/sh.vim to make working with parameter expansions easier:
This is nice to be able to e.g.
yssiw" via surroud.vim to surround a parameter expansion in quotes.
However, I've noticed that when doing keyword-local completion (
$partial_var_name will not complete to
$full_var_name is also present in the file already. This I sort of expect.
I would like to fix it.
I tried the following (there is no
CompleteStart event, unfortunately):
" Fix keywords setlocal iskeyword+=$ augroup sh_ftplugin au! au MenuPopup setlocal iskeyword-=$ au CompleteDone setlocal iskeyword+=$ augroup END
It did not work.
My question is thus, how can I make insert-mode completion work the way I would like?
- by ignoring
- modifying it during completion
- defining a text object for parameter expansions—neat plugin idea, by the way
- changing how I use
iskeywordas a last resort (that is, removing