Skip to content

Commit

Permalink
Merge pull request #116 from gleachkr/iteration-syntax
Browse files Browse the repository at this point in the history
this highlights 'each' as a keyword for iteration. 'for' is supposed to be an alias of 'each', so they should be highlighted the same.
  • Loading branch information
acidjazz authored Mar 5, 2019
2 parents ce65804 + 8623141 commit e83c81f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax/pug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ syn region pugPlainFilter matchgroup=pugFilter start="^\z(\s*\):\%(sass\|less\|

syn match pugScriptConditional "^\s*\<\%(if\|else\|else if\|elif\|unless\|while\|until\|case\|when\|default\)\>[?!]\@!"
syn match pugScriptStatement "^\s*\<\%(each\|for\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!"
syn region pugScriptLoopRegion start="^\s*\(for \)" end="$" contains=pugScriptLoopKeywords
syn keyword pugScriptLoopKeywords for in
syn region pugScriptLoopRegion start="^\s*\(for\|each\)" end="$" contains=pugScriptLoopKeywords
syn keyword pugScriptLoopKeywords contained for each in

syn region pugJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,pugJavascriptTag,pugCoffeescriptFilter keepend
syn region javascriptInterpolation start=/${/ end=/}/ contained
Expand Down

0 comments on commit e83c81f

Please sign in to comment.