Recent Posts

syntax highlighting

Ubuntu + VIM + CakePHP 1.2 + .ctp syntax highlighting

Found this blog post concerning setting up the Cakephp view extension (.ctp) to use the same highlighting as (.php).


I didn’t find his solution that helpful, but one of the comments said to add this to my ‘.vimrc’ file in my home directory.

if has(”autocmd”)
autocmd BufEnter *.ctp set syn=php

And since we are on the topic here is how my .vimrc is setup

set tabstop=2
set shiftwidth=2
set expandtab

if has("autocmd")
autocmd BufEnter *.ctp set syn=php

syn on