vim.vam: fix filetype detection

According to https://github.com/MarcWeber/vim-addon-manager/blob/master/doc/vim-addon-manager-additional-documentation.txt#L1310
`filetype on` must be called after all VAM plugins are initialized.
Otherwise vim set `conf` filetype for some files containing hash tags.
This commit is contained in:
Jörg Thalheim 2017-02-13 00:53:20 +01:00
parent 6b2ea7ec6e
commit b7d65f8af0
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -65,8 +65,8 @@ See vimHelpTags sample code below.
CONTRIBUTING AND CUSTOMIZING CONTRIBUTING AND CUSTOMIZING
============================ ============================
The example file pkgs/misc/vim-plugins/default.nix provides both: The example file pkgs/misc/vim-plugins/default.nix provides both:
* manually mantained plugins * manually mantained plugins
* plugins created by VAM's nix#ExportPluginsForNix implementation * plugins created by VAM's nix#ExportPluginsForNix implementation
I highly recommend to lookup vim plugin attribute names at the [vim-pi] project I highly recommend to lookup vim plugin attribute names at the [vim-pi] project
@ -105,7 +105,7 @@ Then ":source %" it.
nix#ExportPluginsForNix is provided by ./vim2nix nix#ExportPluginsForNix is provided by ./vim2nix
A buffer will open containing the plugin derivation lines as well list A buffer will open containing the plugin derivation lines as well list
fitting the vimrcConfig.vam.pluginDictionaries option. fitting the vimrcConfig.vam.pluginDictionaries option.
Thus the most simple usage would be: Thus the most simple usage would be:
@ -125,7 +125,7 @@ Thus the most simple usage would be:
vimrcConfig.vam.knownPlugins = vimPlugins; vimrcConfig.vam.knownPlugins = vimPlugins;
vimrcConfig.vam.pluginDictionaries = [ vimrcConfig.vam.pluginDictionaries = [
# the plugin list form ~/.vim-scripts turned into nix format added to # the plugin list form ~/.vim-scripts turned into nix format added to
# the buffer created by the nix#ExportPluginsForNix # the buffer created by the nix#ExportPluginsForNix
]; ];
} }
@ -262,13 +262,14 @@ let
in writeText "vimrc" '' in writeText "vimrc" ''
" minimal setup, generated by NIX " minimal setup, generated by NIX
set nocompatible set nocompatible
filetype indent plugin on | syn on
${vamImpl} ${vamImpl}
${pathogenImpl} ${pathogenImpl}
${vundleImpl} ${vundleImpl}
${neobundleImpl} ${neobundleImpl}
filetype indent plugin on | syn on
${customRC} ${customRC}
''; '';