I'm using vim to browse through some log files (the file extension is .log
) which contain a lot of XML.
How can I turn on XML syntax highlighting after opening the file? Of course, I don't actually want to associate XML syntax highlighting with all log files.
Best Answer
The command you want is "
:setfiletype
". For example:See "
:help :setfiletype
".