Skip to content

Commit 65ec57d

Browse files
bk2204guns
authored andcommitted
Allow highlighting string delimiters differently.
Some people prefer to highlight string delimiters in a different color than the string contents. Add a matchgroup for the delimiters and by default highlight it the same color as the string.
1 parent 78d981d commit 65ec57d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

syntax/clojure.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\
7171

7272
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
7373

74-
syntax region clojureString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell
74+
syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell
7575

7676
syntax match clojureCharacter "\\."
7777
syntax match clojureCharacter "\\o\%([0-3]\o\{2\}\|\o\{1,2\}\)"
@@ -169,6 +169,7 @@ highlight default link clojureCharacter Character
169169
highlight default link clojureKeyword Keyword
170170
highlight default link clojureNumber Number
171171
highlight default link clojureString String
172+
highlight default link clojureStringDelimiter String
172173
highlight default link clojureStringEscape Character
173174

174175
highlight default link clojureRegexp Constant

0 commit comments

Comments
 (0)