Skip to content


Add erlangPreProc and erlangModule matchers #17

wants to merge 1 commit into from

1 participant


erlangPreProc is useful for matching on all -foo type lines.
erlangModule matches the foo in foo:bar (github applies special highlighting to that part for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 14, 2012
  1. @cloudhead
Showing with 2 additions and 0 deletions.
  1. +2 −0 syntax/erlang.vim
2 syntax/erlang.vim
@@ -57,6 +57,7 @@ syn region erlangString start=/"/ end=/"/ skip=/\\/ contain
syn match erlangVariable /\<[A-Z_]\w*\>/
syn match erlangAtom /\%(\%(^-\)\|#\)\@<!\<[a-z][A-Za-z0-9_]*\>\%(\s*[(:]\)\@!/
syn match erlangAtom /\\\@<!'[^']*\\\@<!'/
+syn match erlangModule /\%([a-z_0-9]\+\):/
syn match erlangRecord /#\w\+/
@@ -68,6 +69,7 @@ syn match erlangInclude /^-include\%(_lib\)\?\s*(\@=/
syn match erlangRecordDef /^-record\s*(\@=/
syn match erlangDefine /^-\%(define\|undef\)\s*(\@=/
syn match erlangPreCondit /^-\%(ifdef\|ifndef\|else\|endif\)\%(\s*(\@=\)\?/
+syn match erlangPreProc /^-\%([a-z_]\+\)/
syn match erlangType /^-\%(spec\|type\)[( ]\@=/
Something went wrong with that request. Please try again.