2
|
1 |
<?php
|
|
2 |
|
|
3 |
/*************************************************************************************
|
|
4 |
* vim.php
|
|
5 |
* ----------------
|
|
6 |
* Author: Swaroop C H (swaroop@swaroopch.com)
|
|
7 |
* Copyright: (c) 2008 Swaroop C H (http://www.swaroopch.com)
|
3
|
8 |
* Release Version: 1.0.8.4
|
2
|
9 |
* Date Started: 2008/10/19
|
|
10 |
*
|
|
11 |
* Vim scripting language file for GeSHi.
|
|
12 |
*
|
|
13 |
* Reference: http://qbnz.com/highlighter/geshi-doc.html#language-files
|
|
14 |
* All keywords scraped from `:help expression-commands`.
|
|
15 |
* All method names scraped from `:help function-list`.
|
|
16 |
*
|
|
17 |
* CHANGES
|
|
18 |
* -------
|
|
19 |
* 2008/10/19 (1.0.8.2)
|
|
20 |
* - Started.
|
|
21 |
*
|
|
22 |
* TODO (updated 2008/10/19)
|
|
23 |
* -------------------------
|
|
24 |
* - Fill out list of zillion commands
|
|
25 |
*
|
|
26 |
*************************************************************************************
|
|
27 |
*
|
|
28 |
* This file is part of GeSHi.
|
|
29 |
*
|
|
30 |
* GeSHi is free software; you can redistribute it and/or modify
|
|
31 |
* it under the terms of the GNU General Public License as published by
|
|
32 |
* the Free Software Foundation; either version 2 of the License, or
|
|
33 |
* (at your option) any later version.
|
|
34 |
*
|
|
35 |
* GeSHi is distributed in the hope that it will be useful,
|
|
36 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
37 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
38 |
* GNU General Public License for more details.
|
|
39 |
*
|
|
40 |
* You should have received a copy of the GNU General Public License
|
|
41 |
* along with GeSHi; if not, write to the Free Software
|
|
42 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
43 |
*
|
|
44 |
************************************************************************************/
|
|
45 |
|
|
46 |
$language_data = array(
|
|
47 |
'LANG_NAME' => 'Vim Script',
|
|
48 |
'COMMENT_SINGLE' => array(),
|
|
49 |
'COMMENT_REGEXP' => array(
|
|
50 |
1 => "/^\".*$/m"
|
|
51 |
),
|
|
52 |
'COMMENT_MULTI' => array(),
|
|
53 |
'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
|
|
54 |
'QUOTEMARKS' => array("'", '"'),
|
|
55 |
'ESCAPE_CHAR' => '\\',
|
|
56 |
'KEYWORDS' => array(
|
|
57 |
1 => array(
|
|
58 |
'brea', 'break', 'call', 'cat', 'catc',
|
|
59 |
'catch', 'con', 'cont', 'conti',
|
|
60 |
'contin', 'continu', 'continue', 'ec', 'echo',
|
|
61 |
'echoe', 'echoer', 'echoerr', 'echoh',
|
|
62 |
'echohl', 'echom', 'echoms', 'echomsg', 'echon',
|
|
63 |
'el', 'els', 'else', 'elsei', 'elseif',
|
|
64 |
'en', 'end', 'endi', 'endif', 'endfo',
|
|
65 |
'endfor', 'endt', 'endtr', 'endtry', 'endw',
|
|
66 |
'endwh', 'endwhi', 'endwhil', 'endwhile', 'exe', 'exec', 'execu',
|
|
67 |
'execut', 'execute', 'fina', 'final', 'finall', 'finally', 'for',
|
|
68 |
'fun', 'func', 'funct', 'functi', 'functio', 'function', 'if', 'in',
|
|
69 |
'let', 'lockv', 'lockva', 'lockvar', 'retu', 'retur', 'return', 'th',
|
|
70 |
'thr', 'thro', 'throw', 'try', 'unl', 'unle', 'unlet', 'unlo', 'unloc',
|
|
71 |
'unlock', 'unlockv', 'unlockva', 'unlockvar', 'wh', 'whi', 'whil',
|
|
72 |
'while'
|
|
73 |
),
|
|
74 |
2 => array(
|
|
75 |
'autocmd', 'com', 'comm', 'comma', 'comman', 'command', 'comc',
|
|
76 |
'comcl', 'comcle', 'comclea', 'comclear', 'delc', 'delco',
|
|
77 |
'delcom', 'delcomm', 'delcomma', 'delcomman', 'delcommand',
|
|
78 |
'-nargs' # TODO There are zillions of commands to be added here from http://vimdoc.sourceforge.net/htmldoc/usr_toc.html
|
|
79 |
),
|
|
80 |
3 => array(
|
|
81 |
'abs', 'add', 'append', 'argc', 'argidx', 'argv', 'atan',
|
|
82 |
'browse', 'browsedir', 'bufexists', 'buflisted', 'bufloaded',
|
|
83 |
'bufname', 'bufnr', 'bufwinnr', 'byte2line', 'byteidx',
|
|
84 |
'ceil', 'changenr', 'char2nr', 'cindent', 'clearmatches',
|
|
85 |
'col', 'complete', 'complete_add', 'complete_check', 'confirm',
|
|
86 |
'copy', 'cos', 'count', 'cscope_connection', 'cursor',
|
|
87 |
'deepcopy', 'delete', 'did_filetype', 'diff_filler',
|
|
88 |
'diff_hlID', 'empty', 'escape', 'eval', 'eventhandler',
|
|
89 |
'executable', 'exists', 'extend', 'expand', 'feedkeys',
|
|
90 |
'filereadable', 'filewritable', 'filter', 'finddir',
|
|
91 |
'findfile', 'float2nr', 'floor', 'fnameescape', 'fnamemodify',
|
|
92 |
'foldclosed', 'foldclosedend', 'foldlevel', 'foldtext',
|
|
93 |
'foldtextresult', 'foreground', 'garbagecollect',
|
|
94 |
'get', 'getbufline', 'getbufvar', 'getchar', 'getcharmod',
|
|
95 |
'getcmdline', 'getcmdpos', 'getcmdtype', 'getcwd', 'getfperm',
|
|
96 |
'getfsize', 'getfontname', 'getftime', 'getftype', 'getline',
|
|
97 |
'getloclist', 'getmatches', 'getpid', 'getpos', 'getqflist',
|
|
98 |
'getreg', 'getregtype', 'gettabwinvar', 'getwinposx',
|
|
99 |
'getwinposy', 'getwinvar', 'glob', 'globpath', 'has',
|
|
100 |
'has_key', 'haslocaldir', 'hasmapto', 'histadd', 'histdel',
|
|
101 |
'histget', 'histnr', 'hlexists', 'hlID', 'hostname', 'iconv',
|
|
102 |
'indent', 'index', 'input', 'inputdialog', 'inputlist',
|
|
103 |
'inputrestore', 'inputsave', 'inputsecret', 'insert',
|
|
104 |
'isdirectory', 'islocked', 'items', 'join', 'keys', 'len',
|
|
105 |
'libcall', 'libcallnr', 'line', 'line2byte', 'lispindent',
|
|
106 |
'localtime', 'log10', 'map', 'maparg', 'mapcheck', 'match',
|
|
107 |
'matchadd', 'matcharg', 'matchdelete', 'matchend', 'matchlist',
|
|
108 |
'matchstr', 'max', 'min', 'mkdir', 'mode', 'nextnonblank',
|
|
109 |
'nr2char', 'pathshorten', 'pow', 'prevnonblank', 'printf',
|
|
110 |
'pumvisible', 'range', 'readfile', 'reltime', 'reltimestr',
|
|
111 |
'remote_expr', 'remote_foreground', 'remote_peek',
|
|
112 |
'remote_read', 'remote_send', 'remove', 'rename', 'repeat',
|
|
113 |
'resolve', 'reverse', 'round', 'search', 'searchdecl',
|
|
114 |
'searchpair', 'searchpairpos', 'searchpos', 'server2client',
|
|
115 |
'serverlist', 'setbufvar', 'setcmdpos', 'setline',
|
|
116 |
'setloclist', 'setmatches', 'setpos', 'setqflist', 'setreg',
|
|
117 |
'settabwinvar', 'setwinvar', 'shellescape', 'simplify', 'sin',
|
|
118 |
'sort', 'soundfold', 'spellbadword', 'spellsuggest', 'split',
|
|
119 |
'sqrt', 'str2float', 'str2nr', 'strftime', 'stridx', 'string',
|
|
120 |
'strlen', 'strpart', 'strridx', 'strtrans', 'submatch',
|
|
121 |
'substitute', 'synID', 'synIDattr', 'synIDtrans', 'synstack',
|
|
122 |
'system', 'tabpagebuflist', 'tabpagenr', 'tabpagewinnr',
|
|
123 |
'taglist', 'tagfiles', 'tempname', 'tolower', 'toupper', 'tr',
|
|
124 |
'trunc', 'type', 'values', 'virtcol', 'visualmode', 'winbufnr',
|
|
125 |
'wincol', 'winheight', 'winline', 'winnr', 'winrestcmd',
|
|
126 |
'winrestview', 'winsaveview', 'winwidth', 'writefile'
|
|
127 |
)
|
|
128 |
),
|
|
129 |
'SYMBOLS' => array(
|
|
130 |
'(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>',
|
|
131 |
'^', '-', '+', '~', '?', ':', '$', '@', '.'
|
|
132 |
),
|
|
133 |
'CASE_SENSITIVE' => array(
|
|
134 |
GESHI_COMMENTS => false,
|
|
135 |
1 => true,
|
|
136 |
2 => true,
|
|
137 |
3 => true
|
|
138 |
),
|
|
139 |
'STYLES' => array(
|
|
140 |
'BRACKETS' => array(
|
|
141 |
0 => 'color: #000000;'
|
|
142 |
),
|
|
143 |
'COMMENTS' => array(
|
|
144 |
1 => 'color: #adadad; font-style: italic;'
|
|
145 |
),
|
|
146 |
'ESCAPE_CHAR' => array(
|
|
147 |
0 => ''
|
|
148 |
),
|
|
149 |
'KEYWORDS' => array(
|
|
150 |
1 => 'color: #804040;',
|
|
151 |
2 => 'color: #668080;',
|
|
152 |
3 => 'color: #25BB4D;'
|
|
153 |
),
|
|
154 |
'METHODS' => array(
|
|
155 |
0 => 'color: #000000;',
|
|
156 |
),
|
|
157 |
'NUMBERS' => array(
|
|
158 |
0 => 'color: #000000; font-weight:bold;'
|
|
159 |
),
|
|
160 |
'REGEXPS' => array(
|
|
161 |
),
|
|
162 |
'SCRIPT' => array(
|
|
163 |
),
|
|
164 |
'STRINGS' => array(
|
|
165 |
0 => 'color: #C5A22D;'
|
|
166 |
),
|
|
167 |
'SYMBOLS' => array(
|
|
168 |
0 => 'color: #000000;'
|
|
169 |
)
|
|
170 |
),
|
|
171 |
'URLS' => array(
|
|
172 |
1 => '',
|
|
173 |
2 => '',
|
|
174 |
3 => ''
|
|
175 |
),
|
|
176 |
'OOLANG' => false, //Save some time as OO identifiers aren't used
|
|
177 |
'OBJECT_SPLITTERS' => array(),
|
|
178 |
'REGEXPS' => array(
|
|
179 |
),
|
|
180 |
'STRICT_MODE_APPLIES' => GESHI_NEVER,
|
|
181 |
'SCRIPT_DELIMITERS' => array(),
|
|
182 |
'HIGHLIGHT_STRICT_BLOCK' => array()
|
|
183 |
);
|
|
184 |
|
|
185 |
?>
|