I have added the coffee syntax and indent plugin for vim. Here is my ~/.vimrc:
colorscheme peachpuff
syntax on
filetype on
source /Users/(myusername)/.vim/vim-coffee-script-master/indent/coffee.vim
source /Users/(myusername)/.vim/vim-coffee-script-master/syntax/coffee.vim
au BufNewFile,BufRead *.js set filetype=javascript
au BufNewFile,BufRead *.coffee set filetype=coffee
au BufNewFile,BufRead *.rake set filetype=ruby
au BufNewFile,BufRead *.rb set filetype=ruby
au BufNewFile,BufRead Gemfile set filetype=ruby
au BufNewFile,BufRead Guardfile set filetype=ruby
au BufNewFile,BufRead *.less set filetype=scss
set autoindent
set expandtab
set softtabstop=2
set shiftwidth=2
This doesn't have the syntax highlighting when I open a .coffee file. I then run :so ~/.vimrc
while I am in the file and the syntax highlighting appears. Also, when I split the screen and run :so ~/.vimrc
in one window it disappears in the other. Any ideas?