For example, if I want to have a file with the name gitconfig (no leading .) be recognised by vim as being of filetype=gitconfig, is there a means of indicating this in a comment or something similar within the file itself? Note, I want this to work across systems, so modifying vim's startup files is not preferred.
|
|
|||
|
|
|
This sounds like the
This requires modelines to be enabled and since they can be a security hazard they are disabled by default on many systems though. Another approach which might be slightly more work is to make a
and drop it in |
|||||||||
|
|
You can create a syntax file and put it in vim's Documentation on Vim's syntax format is here: http://vimdoc.sourceforge.net/htmldoc/syntax.html You may be able to find a ready syntax file on the Internet somewhere, but I'll leave that as an exercise for you. |
|||
|
|