Sunday, October 4, 2009

Cg syntax highlighting in vim


  1. Download cg.vim to ~/.vim/syntax/. (more info here. Note: the file on that page is DOS formatted; my link is to a converted version)

  2. Enable automatic highlighting by adding this to ~/.vimrc:
    au BufNewFile,BufRead *.cg setf cg