summaryrefslogtreecommitdiffstats
path: root/syntax/cnmfmt.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/cnmfmt.vim')
-rw-r--r--syntax/cnmfmt.vim16
1 files changed, 8 insertions, 8 deletions
diff --git a/syntax/cnmfmt.vim b/syntax/cnmfmt.vim
index 8787f08..be274b4 100644
--- a/syntax/cnmfmt.vim
+++ b/syntax/cnmfmt.vim
@@ -1,8 +1,8 @@
" Vim syntax file
-" Language: CNMfmt (CNM 0.3)
+" Language: CNMfmt (CNM 0.4)
" Maintainer: <clsr@clsr.net>
-" Last Change: 2017-08-18
-" Version: 0.1.0
+" Last Change: 2017-09-01
+" Version: 0.2.0
" Bugs: expects LIFO tags
if !exists('g:main_syntax')
@@ -13,10 +13,10 @@ if !exists('g:main_syntax')
endif
let s:fmts = {
- \ 'B': {'tag': '\*', 'cterm': 'bold'},
- \ 'I': {'tag': '/', 'cterm': 'italic'},
- \ 'U': {'tag': '_', 'cterm': 'underline'},
+ \ 'A': {'tag': '_', 'cterm': 'italic'},
+ \ 'E': {'tag': '\*', 'cterm': 'bold'},
\ 'M': {'tag': '`', 'cterm': 'inverse'},
+ \ 'Q': {'tag': '\"', 'cterm': 'underline'},
\ }
let s:fmtkeepend = 1
@@ -56,14 +56,14 @@ endfor
syn cluster cnmfmt contains=@cnmfmts,@cnmfmtStyles
syn cluster cnmfmts contains=cnmfmtLink,cnmfmtEscape
-syn cluster cnmfmtStyles contains=cnmfmtB,cnmfmtI,cnmfmtU,cnmfmtM
+syn cluster cnmfmtStyles contains=cnmfmtA,cnmfmtE,cnmfmtM,cnmfmtQ
syn region cnmfmtLink matchgroup=cnmfmtLinkAt start="@@" end="@@\|\n\t*\n" skip="\\\\\|\\@" keepend contained contains=cnmfmtLinkUrl
syn match cnmfmtLinkText ".*" contained contains=@cnmfmtStyles
syn match cnmfmtLinkUrl "\(\\ \|\S\)\+" contained nextgroup=cnmfmtLinkText
-syn match cnmfmtEscape +\\[nt\\ */_`@]+
+syn match cnmfmtEscape +\\[nt\\ *_`"@]+
syn match cnmfmtEscape +\\x\x\{2\}+
syn match cnmfmtEscape +\\u\x\{4\}+
syn match cnmfmtEscape +\\U\x\{8\}+