New answers tagged ftplugin
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 ...
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 ...
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 ...
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,...
Top 50 recent answers are included
Related Tags
ftplugin × 26vimrc × 7
filetype × 7
plugin-system × 3
vimscript × 2
neovim × 2
buffers × 2
indentation × 2
makeprg × 2
ftdetect × 2
syntax-highlighting × 1
autocmd × 1
normal-mode × 1
functions × 1
highlight × 1
split × 1
quickfix × 1
filetype-markdown × 1
bash × 1
variables × 1
filetype-c++ × 1
startup × 1
plugin-vimtex × 1
set × 1
include × 1