diff options
author | Teddy Wing | 2018-11-11 19:03:01 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-11 19:03:01 +0100 |
commit | e63793fbbfe5466cbbb992aa87614835e765a725 (patch) | |
tree | 7c9673fa99c89e3eddb8bc52a2849f6a3baa2697 | |
parent | d9d11b162268b384f2c3229f28b2af2f70687753 (diff) | |
download | vim-dome-key-e63793fbbfe5466cbbb992aa87614835e765a725.tar.bz2 |
syntax/dome_key.vim: Add highlighting for `\` escapes
Escapes are:
* `\<` -> literal `<`
* `\\` -> literal `\`
This highlights:
* `\<` -> `\`
* `\\` -> `\\`
-rw-r--r-- | syntax/dome_key.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/syntax/dome_key.vim b/syntax/dome_key.vim index fcbffa9..b05687f 100644 --- a/syntax/dome_key.vim +++ b/syntax/dome_key.vim @@ -5,6 +5,8 @@ endif syntax region domeKeyComment display start="#" end="$" contains=@Spell " Special keys +syntax match domeKeySpecialKeyEscape display "\\<"he=e-1 +syntax match domeKeySpecialKeyEscape display "\\\\" syntax region domeKeySpecialKey display matchgroup=domeKeySpecialKeyGroup start="[^\\]<" end=">" contained contains=domeKeySpecialKeyKeyword syntax match domeKeyDefinitionTrigger "\c\(<\(Up\|Play\|Down\)>\)\+" contained @@ -13,7 +15,7 @@ syntax match domeKeyDefinitionTrigger "\c\(<\(Up\|Play\|Down\)>\)\+" contained " Map definitions syntax match domeKeyMapDefinitionStart "^\s*map" contains=domeKeyType nextgroup=domeKeyMapDefinitionTrigger skipwhite syntax match domeKeyMapDefinitionTrigger "[^ \t]\+" contained contains=domeKeyDefinitionTrigger nextgroup=domeKeyMapDefinitionAction skipwhite -syntax match domeKeyMapDefinitionAction ".*$" contained contains=domeKeySpecialKey +syntax match domeKeyMapDefinitionAction ".*$" contained contains=domeKeySpecialKey,domeKeySpecialKeyEscape " Cmd definitions syntax match domeKeyCmdDefinitionStart "^\s*cmd" contains=domeKeyType nextgroup=domeKeyCmdDefinitionTrigger skipwhite @@ -56,6 +58,7 @@ highlight default link domeKeyType Statement highlight default link domeKeySpecialKeyGroup Special highlight default link domeKeySpecialKeyKeyword domeKeySpecialKeyGroup highlight default link domeKeyDefinitionTrigger domeKeySpecialKeyGroup +highlight default link domeKeySpecialKeyEscape Special " TODO: " - Escaping only in actions |