Set Syntax Highlighting Manually
If you've opened a file with Vim and it has a weird extension (or you've just pasted code into a new file with no extension yet), you might need to set your highlighting manually. Just use :set syntax:[language]
, for example:
:set syntax:javascript
Tweet