The best way to let the user customize the Vim plugin

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.

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.

+4
source share
1

"", . , 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 , . .

+3

All Articles