I need to allow the user to configure the plugin parameters (for example, a list of file types that will not be processed by the plugin).
The easiest option is to set the global variable in .vimrcand check it in the plugin.
.vimrc
Is there a more elegant / acceptable way or is this the only option?
UPDATE: I am writing this plugin: https://github.com/aserebryakov/filestyle . That I do not want to force the user to create a large number of files in ftplugin, without the real need to configure the settings for these file types. The point is to configure it in only one place.
ftplugin
"", . , g:PluginName_ConfigVar. , , ('c,cpp,html,xhtml'), (['c', 'cpp', 'html', 'xhtml']) ('^\(c\|cpp\|x\?html\)$').
g:PluginName_ConfigVar
'c,cpp,html,xhtml'
['c', 'cpp', 'html', 'xhtml']
'^\(c\|cpp\|x\?html\)$'
, b:NoPluginName, , ~/.vim/ftplugin/<filetype>.vim. , . , , . , HTML A, :autocmd ftplugin , . .
b:NoPluginName
~/.vim/ftplugin/<filetype>.vim
:autocmd