-
Notifications
You must be signed in to change notification settings - Fork 2
/
mayu.vim
113 lines (87 loc) · 3.75 KB
/
mayu.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
" Vim syntax file
" Language: mayu setting file
" Maintainer: janus_wel <janus.wel.3@gmail.com>
" Last Change: 2009/02/19 03:38:28.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" includes
syntax keyword mayuInclude include
" conditionals
syntax keyword mayuConditional if else endif
" operators
syntax match mayuOperator /\%(=\|:\|+=\|-=\)/
" numbers
syntax match mayuNumberDecimal /[+-]\=\<\d\+\%(\.\d\+\)\=\>/ display
syntax match mayuNumberHexadecimal /\<0x\x\+\>/ display
" strings
syntax region mayuStringDoubleQuote start=/"/ skip=/\\\\\|\\$"/ end=/"/
syntax region mayuStringSingleQuote start=/'/ skip=/\\\\\|\\$'/ end=/'/
" regular expression
syntax region mayuRegexpString start=+/\%(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gim]\{-,3}+ oneline
" functions
syntax match mayuFunction /&\a\+\>/ contains=mayuFunctionName
syntax keyword mayuFunctionName
\ WindowVMaximize WindowToggleTopMost WindowSetAlpha
\ WindowResizeTo WindowRedraw WindowRaise WindowMoveVisibly
\ WindowMoveTo WindowMove WindowMonitorTo WindowMonitor
\ WindowMinimize WindowMaximize WindowLower WindowIdentify
\ WindowHVMaximize WindowHMaximize WindowClose WindowClingToTop
\ WindowClingToRight WindowClingToLeft WindowClingToBottom Wait
\ Variable VK Undefined Toggle Sync ShellExecute SetImeStatus
\ SetForegroundWindow Repeat Recenter Prefix PostMessage PlugIn
\ OtherWindowClass MouseWheel MouseMove MayuDialog LogClear
\ LoadSetting KeymapWindow KeymapPrevPrefix KeymapParent Keymap
\ InvestigateCommand Ignore HelpVariable HelpMessage
\ EmacsEditKillLinePred EmacsEditKillLineFunc EditNextModifier
\ DirectSSTP DescribeBindings Default ClipboardUpcaseWord
\ ClipboardDowncaseWord ClipboardCopy ClipboardChangeCase
\ contained transparent
" definitions
syntax keyword mayuDefine
\ keymap keymap2 window key event mod def keyseq sync alias
\ subst define
" options
syntax keyword mayuOption option
syntax match mayuOption /\%(delay-of\s\+!!!\|sts4mayu\|cts4mayu\)/
" key sequenses
syntax match mayuKeySequense /\$\a\+/
" special keys
syntax match mayuSpecialKeys /\%([\*~]\=\u\+-\)\+\*\=\S\+/ contains=mayuSpecialKeysPrefix
syntax keyword mayuSpecialKeysPrefix
\ C M A S NL CL SL KL IL IC MAX MIN MMAX MMIN T TS
\ contained transparent
" comments
syntax keyword mayuCommentTodo TODO FIXME XXX TBD contained
syntax region mayuComment start=/\%(^\|\s\+\)#/ end=/$/ contains=mayuCommentTodo keepend oneline
" highlighting
if version >= 508 || !exists("did_mayu_syntax_inits")
if version < 508
let did_mayu_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink mayuInclude Include
HiLink mayuConditional Conditional
HiLink mayuOperator Operator
HiLink mayuNumberDecimal Number
HiLink mayuNumberHexadecimal Number
HiLink mayuStringDoubleQuote String
HiLink mayuStringSingleQuote String
HiLink mayuRegexpString String
HiLink mayuFunction Function
HiLink mayuDefine Statement
HiLink mayuOption Keyword
HiLink mayuKeySequense Identifier
HiLink mayuSpecialKeys Special
HiLink mayuComment Comment
HiLink mayuCommentTodo Todo
delcommand HiLink
endif
let b:current_syntax = "mayu"
" vim: ts=4 sts=4 sw=4 et