I am opening a file with no extension with vim
, say:
myappsetting.conf
This file is actually a *.ini
file, with following formats:
[setting_a]
yo = 1234
How can I enable vim
to correctly display this file with colour with the correct format?
I am looking for some vim
command like:
:set syntaxtype=ini
Thanks.
Best Answer
I was having the same issue on my Arch linux desktop. I found these files owned by the
vim-runtime
package.Based on that, I found I could get
dosini
highlighting either by setting the syntax (syn) or the filetype (ft).You can have this happen automatically with a vim modeline. Add this to the last line of your file.