au FileType php call PHPFuncList()
function PHPFuncList()
set dictionary-=/etc/vim/php_funclist.txt dictionary+=/etc/vim/php_funclist.txt
set complete-=k complete+=k
endfunction
For the PHPFunctionList above, two lines in function body confused me.
set dictionary-=/etc/vim/php_funclist.txt dictionary+=/etc/vim/php_funclist.txt
set complete-=k complete+=k
For the two lines ,first -=
to remove it and then +=
to add it again.
Why can't write the two lines just +=
in them?
set dictionary+=/etc/vim/php_funclist.txt
set complete+=k
Are there any differences between them?
:h set-=
point out that When the option is a list of flags, {value}
must be exactly as they appear in the option. Remove flags one by one to avoid problems.
To avoid which problem?