Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't highlight punctuation inside binaries

  • Loading branch information...
commit 508791a7787e59c02d9af06348d61a8cd2bec14e 1 parent 03aed91
Carlos Galdino carlosgaldino authored

Showing 1 changed file with 27 additions and 25 deletions. Show diff stats Hide diff stats

  1. +27 25 syntax/elixir.vim
52 syntax/elixir.vim
@@ -40,18 +40,19 @@ syn match elixirNumber '\<\d\(_\?\d\)*\(\.[^[:space:][:digit:]]\@!\(_\?\d\)*\)\?
40 40 syn match elixirNumber '\<0[xX][0-9A-Fa-f]\+\>'
41 41 syn match elixirNumber '\<0[bB][01]\+\>'
42 42
43   -syn match elixirRegexEscape "\\\\\|\\[aAbBcdDefGhHnrsStvVwW]\|\\\d\{3}\|\\x[0-9a-fA-F]\{2}" contained
44   -syn match elixirRegexEscape "?\|\.\|*\|\[\|\]\|+\|\^\|\$\||\|(\|)\|{\|}" contained
45   -syn match elixirRegexQuantifier "[*?+][?+]\=" contained display
46   -syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
47   -syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display
  43 +syn match elixirRegexEscape "\\\\\|\\[aAbBcdDefGhHnrsStvVwW]\|\\\d\{3}\|\\x[0-9a-fA-F]\{2}" contained
  44 +syn match elixirRegexEscapePunctuation "?\|\.\|*\|\[\|\]\|+\|\^\|\$\||\|(\|)\|{\|}" contained
  45 +syn match elixirRegexQuantifier "[*?+][?+]\=" contained display
  46 +syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
  47 +syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display
48 48
49 49 syn region elixirRegex matchgroup=elixirDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
50 50
51 51 syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier
  52 +syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
52 53
53 54 syn region elixirString matchgroup=elixirDelimiter start="'" end="'"
54   -syn region elixirString matchgroup=elixirDelimiter start='"' end='"' contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
  55 +syn region elixirString matchgroup=elixirDelimiter start='"' end='"' contains=@elixirStringContained
55 56 syn region elixirInterpolation matchgroup=elixirDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment
56 57 syn region elixirDocString start=+"""+ end=+"""+
57 58 syn region elixirDocString start=+'''+ end=+'''+
@@ -59,22 +60,23 @@ syn region elixirDocString start=+'''+ end=+'''+
59 60 syn match elixirSymbolInterpolated ':\("\)\@=' contains=elixirString
60 61 syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)"
61 62
62   -hi def link elixirComment Comment
63   -hi def link elixirKeyword Keyword
64   -hi def link elixirOperator Operator
65   -hi def link elixirSymbol Constant
66   -hi def link elixirPseudoVariable Constant
67   -hi def link elixirName Type
68   -hi def link elixirBoolean Boolean
69   -hi def link elixirVariable Identifier
70   -hi def link elixirNumber Number
71   -hi def link elixirDocString Comment
72   -hi def link elixirInterpolation Delimiter
73   -hi def link elixirSymbolInterpolated elixirSymbol
74   -hi def link elixirRegex elixirString
75   -hi def link elixirRegexEscape elixirSpecial
76   -hi def link elixirRegexCharClass elixirSpecial
77   -hi def link elixirRegexQuantifier elixirSpecial
78   -hi def link elixirSpecial Special
79   -hi def link elixirString String
80   -hi def link elixirDelimiter Delimiter
  63 +hi def link elixirComment Comment
  64 +hi def link elixirKeyword Keyword
  65 +hi def link elixirOperator Operator
  66 +hi def link elixirSymbol Constant
  67 +hi def link elixirPseudoVariable Constant
  68 +hi def link elixirName Type
  69 +hi def link elixirBoolean Boolean
  70 +hi def link elixirVariable Identifier
  71 +hi def link elixirNumber Number
  72 +hi def link elixirDocString Comment
  73 +hi def link elixirInterpolation Delimiter
  74 +hi def link elixirSymbolInterpolated elixirSymbol
  75 +hi def link elixirRegex elixirString
  76 +hi def link elixirRegexEscape elixirSpecial
  77 +hi def link elixirRegexEscapePunctuation elixirSpecial
  78 +hi def link elixirRegexCharClass elixirSpecial
  79 +hi def link elixirRegexQuantifier elixirSpecial
  80 +hi def link elixirSpecial Special
  81 +hi def link elixirString String
  82 +hi def link elixirDelimiter Delimiter

0 comments on commit 508791a

Please sign in to comment.
Something went wrong with that request. Please try again.