Quantcast
Channel: Louie Miranda » Linux
Viewing all articles
Browse latest Browse all 7

Add a file extension to vim syntax highlighting

$
0
0

I am trying to edit my template files containing *.ctp and on vim, you usually won’t see any syntax highlighting if it is not a known file extension.

So, to activate it for my *.ctp templates. Just add this on your ~/.vimrc file

:syntax on
:filetype on
:au BufNewFile,BufRead *.ctp set filetype=xml

Save and re-edit your *.ctp file.


Viewing all articles
Browse latest Browse all 7

Trending Articles