defaults: Enable syntax and filetype plugins.

This commit is contained in:
Felipe Morales
2015-05-16 04:10:38 -03:00
committed by Justin M. Keyes
parent 75f6817a51
commit 50e129f5a7
5 changed files with 63 additions and 15 deletions

View File

@@ -9299,6 +9299,24 @@ static void ex_filetype(exarg_T *eap)
EMSG2(_(e_invarg2), arg);
}
/// Same as :filetype plugin indent enable
/// Updates the state used for :filetype without args.
void force_enable_filetype(void)
{
if (!filetype_detect) {
source_runtime((char_u *)FILETYPE_FILE, true);
filetype_detect = true;
}
if (!filetype_plugin) {
source_runtime((char_u *)FTPLUGIN_FILE, true);
filetype_plugin = true;
}
if (!filetype_indent) {
source_runtime((char_u *)INDENT_FILE, true);
filetype_indent = true;
}
}
/*
* ":setfiletype {name}"
*/