New answers tagged

1 vote

Setting variables in file in ftplugin directory

Filetype plugins are meant to set buffer local stuff. All your variables are global. IMO, It doesn't make sense to set, and reset, and reset them again and again every time you open a new C file. Even ...
Luc Hermitte's user avatar
  • 17.4k
0 votes

Setting variables in file in ftplugin directory

Filetype plugins, whether they are from $VIMRUNTIME/ftplugin, ~/.vim/ftplugin, or ~/.vim/after/ftplugin, are sourced before any syntax script. The "options" you listed in your question are ...
romainl's user avatar
  • 40.6k
1 vote
Accepted

Setting variables in file in ftplugin directory

The ftplugin intention is to replace the autocmd FileType calls. The corresponding file is executed after the filetype is set and before the corresponding distribution file is executed. It is not too ...
Vivian De Smedt's user avatar
0 votes

Setting guard variables does not prevent default ftplugin/syntax/indent files from running

I assume the buffer is being reloaded after ftplugin, indent, syntax. So the buffer local variables aren't persistent. Splitting the files into the correct ftplugin/syntax/indent dirs fixes the issues,...
CoelinG's user avatar

Top 50 recent answers are included