Skip to content

Commit 2d160ed

Browse files
committed
Syntax highlight Rails functions in CoffeeScript
1 parent 99d42c7 commit 2d160ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ function! s:BufSyntax()
36643664
set isk+=$
36653665
exe "syn keyword javascriptRailsFunction contained ".s:javascript_functions
36663666
syn cluster htmlJavaScript add=javascriptRailsFunction
3667-
elseif &syntax == "javascript"
3667+
elseif &syntax == "javascript" || &syntax == "coffee"
36683668
" The syntax file included with Vim incorrectly sets syn case ignore.
36693669
syn case match
36703670
set isk+=$
@@ -4729,7 +4729,7 @@ augroup railsPluginAuto
47294729
autocmd BufWritePost */tasks/**.rake call rails#cache_clear("rake_tasks")
47304730
autocmd BufWritePost */generators/** call rails#cache_clear("generators")
47314731
autocmd FileType * if exists("b:rails_root") | call s:BufSettings() | endif
4732-
autocmd Syntax ruby,eruby,yaml,haml,javascript,railslog if exists("b:rails_root") | call s:BufSyntax() | endif
4732+
autocmd Syntax ruby,eruby,yaml,haml,javascript,coffee,railslog if exists("b:rails_root") | call s:BufSyntax() | endif
47334733
autocmd QuickFixCmdPre make* call s:push_chdir()
47344734
autocmd QuickFixCmdPost make* call s:pop_command()
47354735
augroup END

0 commit comments

Comments
 (0)