How can I stop vim from loading a syntax file automatically for certain file types? -


I am working on a project writing a GLSL piece shader, and it is just that this file extension is. Fs automatically loads further syntax when opening a vim file

This can not be a problem normally, I can just change the using syntax And BufRead but for some reason further syntax is loaded first, which completely mess up things. It adds more characters into a "word" which causes the speed to syntax highlighting and not to work as expected.

Is there any way to stop the syntax further than loading, and only load my specified syntax?

"itemprop =" text ">

Create a file in your .vim directory (or vimfiles Directory on Windows) is called filetype.vim and put this code:

  if end exists ("did_load_filetypes") endif augroup filetypedetect " * Do not ignore file types * Files autocmd .fs! BufNewFile, BufRead * .fs end augroup Ignored setfiletype  

This is a custom file type detection scripts default file Next to type autocommands To determine the file type before normal WIM scripts, your detection autocommands get the chance.

Once you restart the VIM and enter the .fs file If you try to load, it should now be the syntax highlighting, and Iskeyword should still be set to the default value. (If you have installed a syntax file for GLSL slice files, So you have the right code.

New-filetype: help: setfiletype

Comments