Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions syntax/litcoffee.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ if exists('b:current_syntax') && b:current_syntax == 'litcoffee'
finish
endif

runtime! syntax/markdown.vim
unlet b:current_syntax

syn clear markdownCode

syn include @markdown syntax/markdown.vim
syn include @coffee syntax/coffee.vim

" Partition the file into notCoffee and inlineCoffee. Each line will match
" exactly one of these regions. notCoffee matches with a zero-width
" look-behind.
syn region notCoffee start='^\%( \|\t\)\@<!' end='$' contains=@markdown
syn region inlineCoffee start='^ \|\t' end='$' contains=@coffee

let b:current_syntax = "litcoffee"
" We defined notCoffee as a region so we can highlight every element in it
" that doesn't have it's own explicit rule.
highlight default link notCoffee Comment

let b:current_syntax = "litcoffee"