acloudtree

Tag syntax highlighting

(Nerd) Git Diff & Syntax Highlighting Using VIM

I wanted syntax highlight from the command line using VIM and Matthew Turland gave me the following tip.

jared@example.com$ git config color.diff auto

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).

blog

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
endif

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
endif

syn on

-later

Copyright © Jared Folkins
Programming, Computers, Writing, Economics, and Life

Powered by WordPress