2
votes

I am trying to load a better css syntax file for syntax highlighting. I created the directory inside my ~/.vim/syntax/ directory and it's named css.vim It has all the same permissions as all the other directories and files around it. Vim currently loads my plugins from this directory.

When I load a css file I do get some css syntax highlighting. When I do a :syntax enable I get nice pretty colors that appears to be the newer syntax file. When I do a :syntax off I get even less colors then when I originally loaded the file suggesting the filetype detection is working but its loading its own syntax file instead of mine.

Bonus*

I also downloaded an after script to give css colors a background highlight of their actual color. This also isn't loading. Not sure if related or not.

[1] - Syntax File

[2] - After File

1

1 Answers

1
votes

:syntax enable keeps previous setting, so you see the effect of two syntax files. That's why it's more coloured and why you get even less colours than at the beginning when you do :syntax off.

If you want to use your custom syntax only, you have to do :syntax on.

Your .vim folder is not where it's supposed to be. It should be here ~/.vim.