I have to edit a bunch of files in a programming language that has C-like syntax (and which may or may not be used only within the confines of my university).
To get syntax highlighting without going through the hassle of creating a new syntax configuration in Vim, I just use :set syntax=c
to force the C syntax highlighting.
To get this automatically, I set syntax=c
in my .vimrc
file. The problem is, whenever I open a new file in a new window with :sp
or :vsp
, there is no syntax highlighting, which indicates that the set
command in my .vimrc
is only executed when I first open Vim itself.
How do I make it so this gets executed for every new file opened?