Merge pull request #170 from snaewe/sn/commit-dash-n

This pull request fixes all /src/ release.sh scripts to disregard
certain settings which would interfere with them otherwise.

It also updates our vim to version 7.4.

Thanks, Stefan Naewe!

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2014-02-23 21:15:12 +00:00
Родитель 6396cb1268 686da0bf1e
Коммит b9e5d2ac3b
1802 изменённых файлов: 63605 добавлений и 23645 удалений

Просмотреть файл

@ -1,3 +1,3 @@
#!/bin/sh
exec /share/vim/vim73/gvim "$@"
exec /share/vim/vim74/gvim "$@"

2
bin/vi
Просмотреть файл

@ -1,3 +1,3 @@
#!/bin/sh
exec /share/vim/vim73/vim "$@"
exec /share/vim/vim74/vim "$@"

Просмотреть файл

@ -1,3 +1,3 @@
#!/bin/sh
exec /share/vim/vim73/vim "$@"
exec /share/vim/vim74/vim "$@"

Просмотреть файл

@ -54,7 +54,7 @@ msys-perl5_8.dll,lib{apr,aprutil,expat,neon,z,svn}*.dll,pthreadGC2.dll,\
msys-crypto-0.9.8.dll,msys-regex-1.dll,msys-ssl-0.9.8.dll,msys-minires.dll,msys-z.dll,\
openssl.exe,vim,wc.exe,which,xargs.exe,start} lib/engines/ \
ssl/ cmd/ lib/perl5/ libexec/git-core/mergetools share/antiword/ share/bison/ share/git* \
share/vim/vimrc share/vim/vim73/{filetype.vim,ftoff.vim,menu.vim,optwin.vim,\
share/vim/vimrc share/vim/vim74/{filetype.vim,ftoff.vim,menu.vim,optwin.vim,\
scripts.vim,\
autoload/netrw.vim,autoload/netrwFileHandlers.vim,autoload/netrwSettings.vim,\
plugin/netrwPlugin.vim,\

Просмотреть файл

@ -1,450 +0,0 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 7.0
" Last Change: 2010 Jul 29
" Usage: For detailed help, ":help ft-syntax-omni"
" History
"
" Version 7.0
" Updated syntaxcomplete#OmniSyntaxList()
" - Looking up the syntax groups defined from a syntax file
" looked for only 1 format of {filetype}GroupName, but some
" syntax writers use this format as well:
" {b:current_syntax}GroupName
" OmniSyntaxList() will now check for both if the first
" method does not find a match.
"
" Version 6.0
" Added syntaxcomplete#OmniSyntaxList()
" - Allows other plugins to use this for their own
" purposes.
" - It will return a List of all syntax items for the
" syntax group name passed in.
" - XPTemplate for SQL will use this function via the
" sqlcomplete plugin to populate a Choose box.
"
" Version 5.0
" Updated SyntaxCSyntaxGroupItems()
" - When processing a list of syntax groups, the final group
" was missed in function SyntaxCSyntaxGroupItems.
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
if exists('+omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
if &omnifunc == ""
setlocal omnifunc=syntaxcomplete#Complete
endif
endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 70
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_ignorecase')
let g:omni_syntax_ignorecase = &ignorecase
endif
" Indicates whether we should use the iskeyword option to determine
" how to split words.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_use_iskeyword')
let g:omni_syntax_use_iskeyword = 1
endif
" Only display items in the completion window that are at least
" this many characters in length.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_minimum_length')
let g:omni_syntax_minimum_length = 0
endif
" This script will build a completion list based on the syntax
" elements defined by the files in $VIMRUNTIME/syntax.
let s:syn_remove_words = 'match,matchgroup=,contains,'.
\ 'links to,start=,end=,nextgroup='
let s:cache_name = []
let s:cache_list = []
let s:prepended = ''
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_ignorecase')
if exists('g:omni_syntax_ignorecase')
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
else
let b:omni_syntax_ignorecase = &ignorecase
endif
endif
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
" if line[start - 1] =~ '\S'
" let start -= 1
" elseif line[start - 1] =~ '\.'
if line[start - 1] =~ '\k'
let start -= 1
let lastword = a:findstart
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, (col('.') - 1) - start)
return start
endif
" let base = s:prepended . a:base
let base = s:prepended
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = OmniSyntaxList()
let s:cache_name = add( s:cache_name, filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
" Return list of matches.
if base != ''
" let compstr = join(compl_list, ' ')
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
" let compstr = substitute(compstr, expr, '', 'g')
" let compl_list = split(compstr, '\s\+')
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
let compl_list = filter(deepcopy(compl_list), expr)
endif
return compl_list
endfunc
function! syntaxcomplete#OmniSyntaxList(...)
if a:0 > 0
let parms = []
if 3 == type(a:1)
let parms = a:1
elseif 1 == type(a:1)
let parms = split(a:1, ',')
endif
return OmniSyntaxList( parms )
else
return OmniSyntaxList()
endif
endfunc
function! OmniSyntaxList(...)
let list_parms = []
if a:0 > 0
if 3 == type(a:1)
let list_parms = a:1
elseif 1 == type(a:1)
let list_parms = split(a:1, ',')
endif
endif
" Default to returning a dictionary, if use_dictionary is set to 0
" a list will be returned.
" let use_dictionary = 1
" if a:0 > 0 && a:1 != ''
" let use_dictionary = a:1
" endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_use_iskeyword')
if exists('g:omni_syntax_use_iskeyword')
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
else
let b:omni_syntax_use_iskeyword = 1
endif
endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_minimum_length')
if exists('g:omni_syntax_minimum_length')
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
else
let b:omni_syntax_minimum_length = 0
endif
endif
let saveL = @l
let filetype = substitute(&filetype, '\.', '_', 'g')
if empty(list_parms)
" Default the include group to include the requested syntax group
let syntax_group_include_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_include_'.filetype)
let syntax_group_include_{filetype} =
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
let list_parms = split(g:omni_syntax_group_include_{filetype}, ',')
if syntax_group_include_{filetype} =~ '\w'
let syntax_group_include_{filetype} =
\ substitute( syntax_group_include_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
else
" A specific list was provided, use it
endif
" Loop through all the syntax groupnames, and build a
" syntax file which contains these names. This can
" work generically for any filetype that does not already
" have a plugin defined.
" This ASSUMES the syntax groupname BEGINS with the name
" of the filetype. From my casual viewing of the vim7\syntax
" directory this is true for almost all syntax definitions.
" As an example, the SQL syntax groups have this pattern:
" sqlType
" sqlOperators
" sqlKeyword ...
redir @l
silent! exec 'syntax list '.join(list_parms)
redir END
let syntax_full = "\n".@l
let @l = saveL
if syntax_full =~ 'E28'
\ || syntax_full =~ 'E411'
\ || syntax_full =~ 'E415'
\ || syntax_full =~ 'No Syntax items'
return []
endif
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_exclude_groups = []
if a:0 > 0
" Do nothing since we have specific a specific list of groups
else
" Default the exclude group to nothing
let syntax_group_exclude_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_exclude_'.filetype)
let syntax_group_exclude_{filetype} =
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
if syntax_group_exclude_{filetype} =~ '\w'
let syntax_group_exclude_{filetype} =
\ substitute( syntax_group_exclude_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
endif
" Sometimes filetypes can be composite names, like c.doxygen
" Loop through each individual part looking for the syntax
" items specific to each individual filetype.
let syn_list = ''
let ftindex = 0
let ftindex = match(&filetype, '\w\+', ftindex)
while ftindex > -1
let ft_part_name = matchstr( &filetype, '\w\+', ftindex )
" Syntax rules can contain items for more than just the current
" filetype. They can contain additional items added by the user
" via autocmds or their vimrc.
" Some syntax files can be combined (html, php, jsp).
" We want only items that begin with the filetype we are interested in.
let next_group_regex = '\n' .
\ '\zs'.ft_part_name.'\w\+\ze'.
\ '\s\+xxx\s\+'
let index = 0
let index = match(syntax_full, next_group_regex, index)
if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax
" There appears to be two standards when writing syntax files.
" Either items begin as:
" syn keyword {filetype}Keyword values ...
" let b:current_syntax = "sql"
" let b:current_syntax = "sqlanywhere"
" Or
" syn keyword {syntax_filename}Keyword values ...
" let b:current_syntax = "mysql"
" So, we will make the format of finding the syntax group names
" a bit more flexible and look for both if the first fails to
" find a match.
let next_group_regex = '\n' .
\ '\zs'.b:current_syntax.'\w\+\ze'.
\ '\s\+xxx\s\+'
let index = 0
let index = match(syntax_full, next_group_regex, index)
endif
while index > -1
let group_name = matchstr( syntax_full, '\w\+', index )
let get_syn_list = 1
for exclude_group_name in list_exclude_groups
if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
let get_syn_list = 0
endif
endfor
" This code is no longer needed in version 6.0 since we have
" augmented the syntax list command to only retrieve the syntax
" groups we are interested in.
"
" if get_syn_list == 1
" if syntax_group_include_{filetype} != ''
" if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endif
" endif
if get_syn_list == 1
" Pass in the full syntax listing, plus the group name we
" are interested in.
let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
let syn_list = syn_list . extra_syn_list . "\n"
endif
let index = index + strlen(group_name)
let index = match(syntax_full, next_group_regex, index)
endwhile
let ftindex = ftindex + len(ft_part_name)
let ftindex = match( &filetype, '\w\+', ftindex )
endwhile
" Convert the string to a List and sort it.
let compl_list = sort(split(syn_list))
if &filetype == 'vim'
let short_compl_list = []
for i in range(len(compl_list))
if i == len(compl_list)-1
let next = i
else
let next = i + 1
endif
if compl_list[next] !~ '^'.compl_list[i].'.$'
let short_compl_list += [compl_list[i]]
endif
endfor
return short_compl_list
else
return compl_list
endif
endfunction
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
let syn_list = ""
" From the full syntax listing, strip out the portion for the
" request group.
" Query:
" \n - must begin with a newline
" a:group_name - the group name we are interested in
" \s\+xxx\s\+ - group names are always followed by xxx
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \( - start a group or 2 potential matches
" \n\w - at the first newline starting with a character
" \| - 2nd potential match
" \%$ - matches end of the file or string
" \) - end a group
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)'
\ )
if syntax_group != ""
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
" Tried to remove all lines that do not begin with contained
" but this does not work in all cases since you can have
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute(
\ syntax_group, '\<\('.
\ substitute(
\ escape(s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g'
\ ).
\ '\).\{-}\%($\|'."\n".'\)'
\ , "\n", 'g'
\ )
" Now strip off the newline + blank space + contained
let syn_list = substitute(
\ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\)'
\ , "", 'g'
\ )
if b:omni_syntax_use_iskeyword == 0
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
" Remove all numeric specifications
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' )
endif
if b:omni_syntax_minimum_length > 0
" If the user specified a minimum length, enforce it
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
endif
else
let syn_list = ''
endif
return syn_list
endfunction

Просмотреть файл

@ -1,378 +0,0 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2010 Aug 12
"
" Additional contributors:
"
" Original by Bram Moolenaar <Bram@vim.org>
" Diff2HTML() added by Christian Brabandt <cb@256bit.org>
"
" See Mercurial change logs for more!
" this file uses line continuations
let s:cpo_sav = &cpo
set cpo-=C
func! tohtml#Convert2HTML(line1, line2)
let s:settings = tohtml#GetUserSettings()
if !&diff || s:settings.diff_one_file
if a:line2 >= a:line1
let g:html_start_line = a:line1
let g:html_end_line = a:line2
else
let g:html_start_line = a:line2
let g:html_end_line = a:line1
endif
runtime syntax/2html.vim
else
let win_list = []
let buf_list = []
windo | if &diff | call add(win_list, winbufnr(0)) | endif
let s:settings.whole_filler = 1
let g:html_diff_win_num = 0
for window in win_list
exe ":" . bufwinnr(window) . "wincmd w"
let g:html_start_line = 1
let g:html_end_line = line('$')
let g:html_diff_win_num += 1
runtime syntax/2html.vim
call add(buf_list, bufnr('%'))
endfor
unlet g:html_diff_win_num
call tohtml#Diff2HTML(win_list, buf_list)
endif
unlet g:html_start_line
unlet g:html_end_line
unlet s:settings
endfunc
func! tohtml#Diff2HTML(win_list, buf_list)
let xml_line = ""
let tag_close = '>'
let s:old_paste = &paste
set paste
let s:old_magic = &magic
set magic
if s:settings.use_xhtml
if s:settings.encoding != ""
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
else
let xml_line = "<?xml version=\"1.0\"?>"
endif
let tag_close = ' />'
endif
let style = [s:settings.use_xhtml ? "" : '-->']
let body_line = ''
let html = []
if s:settings.use_xhtml
call add(html, xml_line)
endif
if s:settings.use_xhtml
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
elseif s:settings.use_css && !s:settings.no_pre
call add(html, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">")
call add(html, '<html>')
else
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
call add(html, '<html>')
endif
call add(html, '<head>')
" include encoding as close to the top as possible, but only if not already
" contained in XML information (to avoid haggling over content type)
if s:settings.encoding != "" && !s:settings.use_xhtml
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
endif
call add(html, '<title>diff</title>')
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
call add(html, '<meta name="settings" content="'.
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
\ '"'.tag_close)
call add(html, '</head>')
let body_line_num = len(html)
call add(html, '<body>')
call add(html, '<table border="1" width="100%">')
call add(html, '<tr>')
for buf in a:win_list
call add(html, '<th>'.bufname(buf).'</th>')
endfor
call add(html, '</tr><tr>')
let diff_style_start = 0
let insert_index = 0
for buf in a:buf_list
let temp = []
exe bufwinnr(buf) . 'wincmd w'
" If text is folded because of user foldmethod settings, etc. we don't want
" to act on everything in a fold by mistake.
setlocal nofoldenable
" When not using CSS or when using xhtml, the <body> line can be important.
" Assume it will be the same for all buffers and grab it from the first
" buffer. Similarly, need to grab the body end line as well.
if body_line == ''
1
call search('<body')
let body_line = getline('.')
$
call search('</body>', 'b')
let s:body_end_line = getline('.')
endif
" Grab the style information. Some of this will be duplicated...
1
let style_start = search('^<style type="text/css">')
1
let style_end = search('^</style>')
if style_start > 0 && style_end > 0
let buf_styles = getline(style_start + 1, style_end - 1)
for a_style in buf_styles
if index(style, a_style) == -1
if diff_style_start == 0
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
let diff_style_start = len(style)-1
endif
endif
call insert(style, a_style, insert_index)
let insert_index += 1
endif
endfor
endif
if diff_style_start != 0
let insert_index = diff_style_start
endif
" Delete those parts that are not needed so
" we can include the rest into the resulting table
1,/^<body/d_
$
?</body>?,$d_
let temp = getline(1,'$')
" undo deletion of start and end part
" so we can later save the file as valid html
" TODO: restore using grabbed lines if undolevel is 1?
normal 2u
if s:settings.use_css
call add(html, '<td valign="top"><div>')
elseif s:settings.use_xhtml
call add(html, '<td nowrap="nowrap" valign="top"><div>')
else
call add(html, '<td nowrap valign="top"><div>')
endif
let html += temp
call add(html, '</div></td>')
" Close this buffer
" TODO: the comment above says we're going to allow saving the file
" later...but here we discard it?
quit!
endfor
let html[body_line_num] = body_line
call add(html, '</tr>')
call add(html, '</table>')
call add(html, s:body_end_line)
call add(html, '</html>')
let i = 1
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
" Find an unused file name if current file name is already in use
while filereadable(name)
let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e")
let i += 1
endwhile
exe "topleft new " . name
setlocal modifiable
" just in case some user autocmd creates content in the new buffer, make sure
" it is empty before proceeding
%d
call append(0, html)
if len(style) > 0
1
let style_start = search('^</head>')-1
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
if s:settings.dynamic_folds
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : " <!--",
\ " function toggleFold(objID)",
\ " {",
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
\ " {",
\ " var fold;",
\ ' fold = document.getElementById("win"+win_num+objID);',
\ " if(fold.className == 'closed-fold')",
\ " {",
\ " fold.className = 'open-fold';",
\ " }",
\ " else if (fold.className == 'open-fold')",
\ " {",
\ " fold.className = 'closed-fold';",
\ " }",
\ " }",
\ " }",
\ s:settings.use_xhtml ? '//]]>' : " -->",
\ "</script>"
\ ])
endif
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
" up the full browser window (but not more), and be static in size,
" horizontally scrollable when the lines are too long. Otherwise, the diff
" is pretty useless for really long lines.
if s:settings.use_css
call append(style_start,
\ ['<style type="text/css">']+
\ style+
\ [ s:settings.use_xhtml ? '' : '<!--',
\ 'table { table-layout: fixed; }',
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
\ 'td div { overflow: auto; }',
\ s:settings.use_xhtml ? '' : '-->',
\ '</style>'
\ ])
endif
endif
let &paste = s:old_paste
let &magic = s:old_magic
endfunc
" Gets a single user option and sets it in the passed-in Dict, or gives it the
" default value if the option doesn't actually exist.
func! tohtml#GetOption(settings, option, default)
if exists('g:html_'.a:option)
let a:settings[a:option] = g:html_{a:option}
else
let a:settings[a:option] = a:default
endif
endfunc
" returns a Dict containing the values of all user options for 2html, including
" default values for those not given an explicit value by the user. Discards the
" html_ prefix of the option for nicer looking code.
func! tohtml#GetUserSettings()
if exists('s:settings')
" just restore the known options if we've already retrieved them
return s:settings
else
" otherwise figure out which options are set
let user_settings = {}
" Define the correct option if the old option name exists and we haven't
" already defined the correct one. Maybe I'll put out a warnig message about
" this sometime and remove the old option entirely at some even later time,
" but for now just silently accept the old option.
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")
let g:html_use_xhtml = g:use_xhtml
endif
" get current option settings with appropriate defaults
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
call tohtml#GetOption(user_settings, 'number_lines', &number )
call tohtml#GetOption(user_settings, 'use_css', 1 )
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
" override those settings that need it
" hover opening implies dynamic folding
if user_settings.hover_unfold
let user_settings.dynamic_folds = 1
endif
" ignore folding overrides dynamic folding
if user_settings.ignore_folding && user_settings.dynamic_folds
let user_settings.dynamic_folds = 0
let user_settings.hover_unfold = 0
endif
" dynamic folding with no foldcolumn implies hover opens
if user_settings.dynamic_folds && user_settings.no_foldcolumn
let user_settings.hover_unfold = 1
endif
" dynamic folding implies css
if user_settings.dynamic_folds
let user_settings.use_css = 1
endif
" if we're not using CSS we cannot use a pre section because <font> tags
" aren't allowed inside a <pre> block
if !user_settings.use_css
let user_settings.no_pre = 1
endif
" Figure out proper MIME charset from the 'encoding' option.
if exists("g:html_use_encoding")
let user_settings.encoding = g:html_use_encoding
else
let vim_encoding = &encoding
if vim_encoding =~ '^8bit\|^2byte'
let vim_encoding = substitute(vim_encoding, '^8bit-\|^2byte-', '', '')
endif
if vim_encoding == 'latin1'
let user_settings.encoding = 'iso-8859-1'
elseif vim_encoding =~ "^cp12"
let user_settings.encoding = substitute(vim_encoding, 'cp', 'windows-', '')
elseif vim_encoding == 'sjis' || vim_encoding == 'cp932'
let user_settings.encoding = 'Shift_JIS'
elseif vim_encoding == 'big5' || vim_encoding == 'cp950'
let user_settings.encoding = "Big5"
elseif vim_encoding == 'euc-cn'
let user_settings.encoding = 'GB_2312-80'
elseif vim_encoding == 'euc-tw'
let user_settings.encoding = ""
elseif vim_encoding =~ '^euc\|^iso\|^koi'
let user_settings.encoding = substitute(vim_encoding, '.*', '\U\0', '')
elseif vim_encoding == 'cp949'
let user_settings.encoding = 'KS_C_5601-1987'
elseif vim_encoding == 'cp936'
let user_settings.encoding = 'GBK'
elseif vim_encoding =~ '^ucs\|^utf'
let user_settings.encoding = 'UTF-8'
else
let user_settings.encoding = ""
endif
endif
" TODO: font
return user_settings
endif
endfunc
let &cpo = s:cpo_sav
unlet s:cpo_sav
" Make sure any patches will probably use consistent indent
" vim: ts=8 sw=2 sts=2 noet

Просмотреть файл

@ -1,19 +0,0 @@
" Vim compiler file
" Compiler: ms C#
" Maintainer: Joseph H. Yao (hyao@sina.com)
" Last Change: 2004 Mar 27
if exists("current_compiler")
finish
endif
let current_compiler = "cs"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
" default errorformat
CompilerSet errorformat&
" default make
CompilerSet makeprg=csc\ %

Просмотреть файл

@ -1,28 +0,0 @@
" Vim compiler file
" Compiler: PHP
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/php.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
endif
let current_compiler = "php"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=php\ -lq
CompilerSet errorformat=%E<b>Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%W<b>Notice</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%EParse\ error:\ %m\ in\ %f\ on\ line\ %l,
\%WNotice:\ %m\ in\ %f</b>\ on\ line\ %l,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,29 +0,0 @@
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tidy.vim
" Last Change: 2004 Nov 27
" NOTE: set 'tidy_compiler_040800' if you are using the 4th August 2000 release
" of HTML Tidy.
if exists("current_compiler")
finish
endif
let current_compiler = "tidy"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
" this is needed to work around a bug in the 04/08/00 release of tidy which
" failed to set the filename if the -quiet option was used
if exists("tidy_compiler_040800")
CompilerSet makeprg=tidy\ -errors\ --gnu-emacs\ yes\ %
else
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %
endif
" sample warning: foo.html:8:1: Warning: inserting missing 'foobar' element
" sample error: foo.html:9:2: Error: <foobar> is not recognized!
CompilerSet errorformat=%f:%l:%c:\ Error:%m,%f:%l:%c:\ Warning:%m,%-G%.%#

Просмотреть файл

@ -1,29 +0,0 @@
" Vim compiler file
" Compiler: xmllint
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish
endif
let current_compiler = "xmllint"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=xmllint\ --valid\ --noout\
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
\%W%f:%l:\ warning:\ %m,
\%E%f:%l:\ validity\ error:\ %m,
\%W%f:%l:\ validity\ warning:\ %m,
\%-Z%p^,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,350 +0,0 @@
*digraph.txt* For Vim version 7.3. Last change: 2010 Apr 11
VIM REFERENCE MANUAL by Bram Moolenaar
Digraphs *digraph* *digraphs* *Digraphs*
Digraphs are used to enter characters that normally cannot be entered by
an ordinary keyboard. These are mostly printable non-ASCII characters. The
digraphs are easier to remember than the decimal number that can be entered
with CTRL-V (see |i_CTRL-V|).
There is a brief introduction on digraphs in the user manual: |24.9|
An alternative is using the 'keymap' option.
1. Defining digraphs |digraphs-define|
2. Using digraphs |digraphs-use|
3. Default digraphs |digraphs-default|
{Vi does not have any of these commands}
==============================================================================
1. Defining digraphs *digraphs-define*
*:dig* *:digraphs*
:dig[raphs] show currently defined digraphs.
*E104* *E39*
:dig[raphs] {char1}{char2} {number} ...
Add digraph {char1}{char2} to the list. {number} is
the decimal representation of the character. Normally
it is the Unicode character, see |digraph-encoding|.
Example: >
:digr e: 235 a: 228
< Avoid defining a digraph with '_' (underscore) as the
first character, it has a special meaning in the
future.
Vim is normally compiled with the |+digraphs| feature. If the feature is
disabled, the ":digraph" command will display an error message.
Example of the output of ":digraphs": >
TH Þ 222 ss ß 223 a! à 224 a' á 225 a> â 226 a? ã 227 a: ä 228
The first two characters in each column are the characters you have to type to
enter the digraph.
In the middle of each column is the resulting character. This may be mangled
if you look at it on a system that does not support digraphs or if you print
this file.
*digraph-encoding*
The decimal number normally is the Unicode number of the character. Note that
the meaning doesn't change when 'encoding' changes. The character will be
converted from Unicode to 'encoding' when needed. This does require the
conversion to be available, it might fail. For the NUL character you will see
"10". That's because NUL characters are internally represented with a NL
character. When you write the file it will become a NUL character.
When Vim was compiled without the |+multi_byte| feature, you need to specify
the character in the encoding given with 'encoding'. You might want to use
something like this: >
if has("multi_byte")
digraph oe 339
elseif &encoding == "iso-8859-15"
digraph oe 189
endif
This defines the "oe" digraph for a character that is number 339 in Unicode
and 189 in latin9 (iso-8859-15).
==============================================================================
2. Using digraphs *digraphs-use*
There are two methods to enter digraphs: *i_digraph*
CTRL-K {char1} {char2} or
{char1} <BS> {char2}
The first is always available; the second only when the 'digraph' option is
set.
If a digraph with {char1}{char2} does not exist, Vim searches for a digraph
{char2}{char1}. This helps when you don't remember which character comes
first.
Note that when you enter CTRL-K {char1}, where {char1} is a special key, Vim
enters the code for that special key. This is not a digraph.
Once you have entered the digraph, Vim treats the character like a normal
character that occupies only one character in the file and on the screen.
Example: >
'B' <BS> 'B' will enter the broken '|' character (166)
'a' <BS> '>' will enter an 'a' with a circumflex (226)
CTRL-K '-' '-' will enter a soft hyphen (173)
The current digraphs are listed with the ":digraphs" command. Some of the
default ones are listed below |digraph-table|.
For CTRL-K, there is one general digraph: CTRL-K <Space> {char} will enter
{char} with the highest bit set. You can use this to enter meta-characters.
The <Esc> character cannot be part of a digraph. When hitting <Esc>, Vim
stops digraph entry and ends Insert mode or Command-line mode, just like
hitting an <Esc> out of digraph context. Use CTRL-V 155 to enter meta-ESC
(CSI).
If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
'e'. But that is a digraph, so you will not get what you want. To correct
this, you will have to type <BS> e again. To avoid this don't set the
'digraph' option and use CTRL-K to enter digraphs.
You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
mode. After leaving the Insert mode everything is fine. Note that fmt
removes all characters with a value above 128 from the text being formatted.
On some Unix systems this means you have to define the environment-variable
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE iso_8859_1
==============================================================================
3. Default digraphs *digraphs-default*
Vim comes with a set of default digraphs. Check the output of ":digraphs" to
see them.
On most systems Vim uses the same digraphs. They work for the Unicode and
ISO-8859-1 character sets. These default digraphs are taken from the RFC1345
mnemonics. To make it easy to remember the mnemonic, the second character has
a standard meaning:
char name char meaning ~
Exclamation mark ! Grave
Apostrophe ' Acute accent
Greater-Than sign > Circumflex accent
Question mark ? Tilde
Hyphen-Minus - Macron
Left parenthesis ( Breve
Full stop . Dot above
Colon : Diaeresis
Comma , Cedilla
Underline _ Underline
Solidus / Stroke
Quotation mark " Double acute accent
Semicolon ; Ogonek
Less-Than sign < Caron
Zero 0 Ring above
Two 2 Hook
Nine 9 Horn
Equals = Cyrillic
Asterisk * Greek
Percent sign % Greek/Cyrillic special
Plus + smalls: Arabic, capitals: Hebrew
Three 3 some Latin/Greek/Cyrillic letters
Four 4 Bopomofo
Five 5 Hiragana
Six 6 Katakana
Example: a: is ä and o: is ö
These are the RFC1345 digraphs for the one-byte characters. See the output of
":digraphs" for the others. The characters above 255 are only available when
Vim was compiled with the |+multi_byte| feature.
EURO
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
added for this. Note the difference between latin1, where the digraph Cu is
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
used for the euro sign, while both of them are the character 164, 0xa4. For
compatibility with zsh Eu can also be used for the euro sign.
*digraph-table*
char digraph hex dec official name ~
^@ NU 0x00 0 NULL (NUL)
^A SH 0x01 1 START OF HEADING (SOH)
^B SX 0x02 2 START OF TEXT (STX)
^C EX 0x03 3 END OF TEXT (ETX)
^D ET 0x04 4 END OF TRANSMISSION (EOT)
^E EQ 0x05 5 ENQUIRY (ENQ)
^F AK 0x06 6 ACKNOWLEDGE (ACK)
^G BL 0x07 7 BELL (BEL)
^H BS 0x08 8 BACKSPACE (BS)
^I HT 0x09 9 CHARACTER TABULATION (HT)
^@ LF 0x0a 10 LINE FEED (LF)
^K VT 0x0b 11 LINE TABULATION (VT)
^L FF 0x0c 12 FORM FEED (FF)
^M CR 0x0d 13 CARRIAGE RETURN (CR)
^N SO 0x0e 14 SHIFT OUT (SO)
^O SI 0x0f 15 SHIFT IN (SI)
^P DL 0x10 16 DATALINK ESCAPE (DLE)
^Q D1 0x11 17 DEVICE CONTROL ONE (DC1)
^R D2 0x12 18 DEVICE CONTROL TWO (DC2)
^S D3 0x13 19 DEVICE CONTROL THREE (DC3)
^T D4 0x14 20 DEVICE CONTROL FOUR (DC4)
^U NK 0x15 21 NEGATIVE ACKNOWLEDGE (NAK)
^V SY 0x16 22 SYNCHRONOUS IDLE (SYN)
^W EB 0x17 23 END OF TRANSMISSION BLOCK (ETB)
^X CN 0x18 24 CANCEL (CAN)
^Y EM 0x19 25 END OF MEDIUM (EM)
^Z SB 0x1a 26 SUBSTITUTE (SUB)
^[ EC 0x1b 27 ESCAPE (ESC)
^\ FS 0x1c 28 FILE SEPARATOR (IS4)
^] GS 0x1d 29 GROUP SEPARATOR (IS3)
^^ RS 0x1e 30 RECORD SEPARATOR (IS2)
^_ US 0x1f 31 UNIT SEPARATOR (IS1)
SP 0x20 32 SPACE
# Nb 0x23 35 NUMBER SIGN
$ DO 0x24 36 DOLLAR SIGN
@ At 0x40 64 COMMERCIAL AT
[ <( 0x5b 91 LEFT SQUARE BRACKET
\ // 0x5c 92 REVERSE SOLIDUS
] )> 0x5d 93 RIGHT SQUARE BRACKET
^ '> 0x5e 94 CIRCUMFLEX ACCENT
` '! 0x60 96 GRAVE ACCENT
{ (! 0x7b 123 LEFT CURLY BRACKET
| !! 0x7c 124 VERTICAL LINE
} !) 0x7d 125 RIGHT CURLY BRACKET
~ '? 0x7e 126 TILDE
^? DT 0x7f 127 DELETE (DEL)
~@ PA 0x80 128 PADDING CHARACTER (PAD)
~A HO 0x81 129 HIGH OCTET PRESET (HOP)
~B BH 0x82 130 BREAK PERMITTED HERE (BPH)
~C NH 0x83 131 NO BREAK HERE (NBH)
~D IN 0x84 132 INDEX (IND)
~E NL 0x85 133 NEXT LINE (NEL)
~F SA 0x86 134 START OF SELECTED AREA (SSA)
~G ES 0x87 135 END OF SELECTED AREA (ESA)
~H HS 0x88 136 CHARACTER TABULATION SET (HTS)
~I HJ 0x89 137 CHARACTER TABULATION WITH JUSTIFICATION (HTJ)
~J VS 0x8a 138 LINE TABULATION SET (VTS)
~K PD 0x8b 139 PARTIAL LINE FORWARD (PLD)
~L PU 0x8c 140 PARTIAL LINE BACKWARD (PLU)
~M RI 0x8d 141 REVERSE LINE FEED (RI)
~N S2 0x8e 142 SINGLE-SHIFT TWO (SS2)
~O S3 0x8f 143 SINGLE-SHIFT THREE (SS3)
~P DC 0x90 144 DEVICE CONTROL STRING (DCS)
~Q P1 0x91 145 PRIVATE USE ONE (PU1)
~R P2 0x92 146 PRIVATE USE TWO (PU2)
~S TS 0x93 147 SET TRANSMIT STATE (STS)
~T CC 0x94 148 CANCEL CHARACTER (CCH)
~U MW 0x95 149 MESSAGE WAITING (MW)
~V SG 0x96 150 START OF GUARDED AREA (SPA)
~W EG 0x97 151 END OF GUARDED AREA (EPA)
~X SS 0x98 152 START OF STRING (SOS)
~Y GC 0x99 153 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
~Z SC 0x9a 154 SINGLE CHARACTER INTRODUCER (SCI)
~[ CI 0x9b 155 CONTROL SEQUENCE INTRODUCER (CSI)
~\ ST 0x9c 156 STRING TERMINATOR (ST)
~] OC 0x9d 157 OPERATING SYSTEM COMMAND (OSC)
~^ PM 0x9e 158 PRIVACY MESSAGE (PM)
~_ AC 0x9f 159 APPLICATION PROGRAM COMMAND (APC)
| NS 0xa0 160 NO-BREAK SPACE
¡ !I 0xa1 161 INVERTED EXCLAMATION MARK
¢ Ct 0xa2 162 CENT SIGN
£ Pd 0xa3 163 POUND SIGN
¤ Cu 0xa4 164 CURRENCY SIGN
¥ Ye 0xa5 165 YEN SIGN
¦ BB 0xa6 166 BROKEN BAR
§ SE 0xa7 167 SECTION SIGN
¨ ': 0xa8 168 DIAERESIS
© Co 0xa9 169 COPYRIGHT SIGN
ª -a 0xaa 170 FEMININE ORDINAL INDICATOR
« << 0xab 171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
¬ NO 0xac 172 NOT SIGN
­ -- 0xad 173 SOFT HYPHEN
® Rg 0xae 174 REGISTERED SIGN
¯ 'm 0xaf 175 MACRON
° DG 0xb0 176 DEGREE SIGN
± +- 0xb1 177 PLUS-MINUS SIGN
² 2S 0xb2 178 SUPERSCRIPT TWO
³ 3S 0xb3 179 SUPERSCRIPT THREE
´ '' 0xb4 180 ACUTE ACCENT
µ My 0xb5 181 MICRO SIGN
¶ PI 0xb6 182 PILCROW SIGN
· .M 0xb7 183 MIDDLE DOT
¸ ', 0xb8 184 CEDILLA
¹ 1S 0xb9 185 SUPERSCRIPT ONE
º -o 0xba 186 MASCULINE ORDINAL INDICATOR
» >> 0xbb 187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
¼ 14 0xbc 188 VULGAR FRACTION ONE QUARTER
½ 12 0xbd 189 VULGAR FRACTION ONE HALF
¾ 34 0xbe 190 VULGAR FRACTION THREE QUARTERS
¿ ?I 0xbf 191 INVERTED QUESTION MARK
À A! 0xc0 192 LATIN CAPITAL LETTER A WITH GRAVE
Á A' 0xc1 193 LATIN CAPITAL LETTER A WITH ACUTE
 A> 0xc2 194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
à A? 0xc3 195 LATIN CAPITAL LETTER A WITH TILDE
Ä A: 0xc4 196 LATIN CAPITAL LETTER A WITH DIAERESIS
Å AA 0xc5 197 LATIN CAPITAL LETTER A WITH RING ABOVE
Æ AE 0xc6 198 LATIN CAPITAL LETTER AE
Ç C, 0xc7 199 LATIN CAPITAL LETTER C WITH CEDILLA
È E! 0xc8 200 LATIN CAPITAL LETTER E WITH GRAVE
É E' 0xc9 201 LATIN CAPITAL LETTER E WITH ACUTE
Ê E> 0xca 202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
Ë E: 0xcb 203 LATIN CAPITAL LETTER E WITH DIAERESIS
Ì I! 0xcc 204 LATIN CAPITAL LETTER I WITH GRAVE
Í I' 0xcd 205 LATIN CAPITAL LETTER I WITH ACUTE
Î I> 0xce 206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX
Ï I: 0xcf 207 LATIN CAPITAL LETTER I WITH DIAERESIS
Ð D- 0xd0 208 LATIN CAPITAL LETTER ETH (Icelandic)
Ñ N? 0xd1 209 LATIN CAPITAL LETTER N WITH TILDE
Ò O! 0xd2 210 LATIN CAPITAL LETTER O WITH GRAVE
Ó O' 0xd3 211 LATIN CAPITAL LETTER O WITH ACUTE
Ô O> 0xd4 212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
Õ O? 0xd5 213 LATIN CAPITAL LETTER O WITH TILDE
Ö O: 0xd6 214 LATIN CAPITAL LETTER O WITH DIAERESIS
× *X 0xd7 215 MULTIPLICATION SIGN
Ø O/ 0xd8 216 LATIN CAPITAL LETTER O WITH STROKE
Ù U! 0xd9 217 LATIN CAPITAL LETTER U WITH GRAVE
Ú U' 0xda 218 LATIN CAPITAL LETTER U WITH ACUTE
Û U> 0xdb 219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX
Ü U: 0xdc 220 LATIN CAPITAL LETTER U WITH DIAERESIS
Ý Y' 0xdd 221 LATIN CAPITAL LETTER Y WITH ACUTE
Þ TH 0xde 222 LATIN CAPITAL LETTER THORN (Icelandic)
ß ss 0xdf 223 LATIN SMALL LETTER SHARP S (German)
à a! 0xe0 224 LATIN SMALL LETTER A WITH GRAVE
á a' 0xe1 225 LATIN SMALL LETTER A WITH ACUTE
â a> 0xe2 226 LATIN SMALL LETTER A WITH CIRCUMFLEX
ã a? 0xe3 227 LATIN SMALL LETTER A WITH TILDE
ä a: 0xe4 228 LATIN SMALL LETTER A WITH DIAERESIS
å aa 0xe5 229 LATIN SMALL LETTER A WITH RING ABOVE
æ ae 0xe6 230 LATIN SMALL LETTER AE
ç c, 0xe7 231 LATIN SMALL LETTER C WITH CEDILLA
è e! 0xe8 232 LATIN SMALL LETTER E WITH GRAVE
é e' 0xe9 233 LATIN SMALL LETTER E WITH ACUTE
ê e> 0xea 234 LATIN SMALL LETTER E WITH CIRCUMFLEX
ë e: 0xeb 235 LATIN SMALL LETTER E WITH DIAERESIS
ì i! 0xec 236 LATIN SMALL LETTER I WITH GRAVE
í i' 0xed 237 LATIN SMALL LETTER I WITH ACUTE
î i> 0xee 238 LATIN SMALL LETTER I WITH CIRCUMFLEX
ï i: 0xef 239 LATIN SMALL LETTER I WITH DIAERESIS
ð d- 0xf0 240 LATIN SMALL LETTER ETH (Icelandic)
ñ n? 0xf1 241 LATIN SMALL LETTER N WITH TILDE
ò o! 0xf2 242 LATIN SMALL LETTER O WITH GRAVE
ó o' 0xf3 243 LATIN SMALL LETTER O WITH ACUTE
ô o> 0xf4 244 LATIN SMALL LETTER O WITH CIRCUMFLEX
õ o? 0xf5 245 LATIN SMALL LETTER O WITH TILDE
ö o: 0xf6 246 LATIN SMALL LETTER O WITH DIAERESIS
÷ -: 0xf7 247 DIVISION SIGN
ø o/ 0xf8 248 LATIN SMALL LETTER O WITH STROKE
ù u! 0xf9 249 LATIN SMALL LETTER U WITH GRAVE
ú u' 0xfa 250 LATIN SMALL LETTER U WITH ACUTE
û u> 0xfb 251 LATIN SMALL LETTER U WITH CIRCUMFLEX
ü u: 0xfc 252 LATIN SMALL LETTER U WITH DIAERESIS
ý y' 0xfd 253 LATIN SMALL LETTER Y WITH ACUTE
þ th 0xfe 254 LATIN SMALL LETTER THORN (Icelandic)
ÿ y: 0xff 255 LATIN SMALL LETTER Y WITH DIAERESIS
vim:tw=78:ts=8:ft=help:norl:

Просмотреть файл

@ -1,382 +0,0 @@
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Aug 13
VIM REFERENCE MANUAL by Paul Moore
The Python Interface to Vim *python* *Python*
1. Commands |python-commands|
2. The vim module |python-vim|
3. Buffer objects |python-buffer|
4. Range objects |python-range|
5. Window objects |python-window|
6. Dynamic loading |python-dynamic|
7. Python 3 |python3|
{Vi does not have any of these commands}
The Python 2.x interface is available only when Vim was compiled with the
|+python| feature.
The Python 3 interface is available only when Vim was compiled with the
|+python3| feature.
==============================================================================
1. Commands *python-commands*
*:python* *:py* *E205* *E263* *E264*
:[range]py[thon] {stmt}
Execute Python statement {stmt}.
:[range]py[thon] << {endmarker}
{script}
{endmarker}
Execute Python script {script}.
Note: This command doesn't work when the Python
feature wasn't compiled in. To avoid errors, see
|script-here|.
{endmarker} must NOT be preceded by any white space. If {endmarker} is
omitted from after the "<<", a dot '.' must be used after {script}, like
for the |:append| and |:insert| commands.
This form of the |:python| command is mainly useful for including python code
in Vim scripts.
Example: >
function! IcecreamInitialize()
python << EOF
class StrawberryIcecream:
def __call__(self):
print 'EAT ME'
EOF
endfunction
<
Note: Python is very sensitive to the indenting. Also make sure the "class"
line and "EOF" do not have any indent.
*:pyfile* *:pyf*
:[range]pyf[ile] {file}
Execute the Python script in {file}. The whole
argument is used as a single file name. {not in Vi}
Both of these commands do essentially the same thing - they execute a piece of
Python code, with the "current range" |python-range| set to the given line
range.
In the case of :python, the code to execute is in the command-line.
In the case of :pyfile, the code to execute is the contents of the given file.
Python commands cannot be used in the |sandbox|.
To pass arguments you need to set sys.argv[] explicitly. Example: >
:python import sys
:python sys.argv = ["foo", "bar"]
:pyfile myscript.py
Here are some examples *python-examples* >
:python from vim import *
:python from string import upper
:python current.line = upper(current.line)
:python print "Hello"
:python str = current.buffer[42]
(Note that changes - like the imports - persist from one command to the next,
just like in the Python interpreter.)
==============================================================================
2. The vim module *python-vim*
Python code gets all of its access to vim (with one exception - see
|python-output| below) via the "vim" module. The vim module implements two
methods, three constants, and one error object. You need to import the vim
module before using it: >
:python import vim
Overview >
:py print "Hello" # displays a message
:py vim.command(cmd) # execute an Ex command
:py w = vim.windows[n] # gets window "n"
:py cw = vim.current.window # gets the current window
:py b = vim.buffers[n] # gets buffer "n"
:py cb = vim.current.buffer # gets the current buffer
:py w.height = lines # sets the window height
:py w.cursor = (row, col) # sets the window cursor position
:py pos = w.cursor # gets a tuple (row, col)
:py name = b.name # gets the buffer file name
:py line = b[n] # gets a line from the buffer
:py lines = b[n:m] # gets a list of lines
:py num = len(b) # gets the number of lines
:py b[n] = str # sets a line in the buffer
:py b[n:m] = [str1, str2, str3] # sets a number of lines at once
:py del b[n] # deletes a line
:py del b[n:m] # deletes a number of lines
Methods of the "vim" module
vim.command(str) *python-command*
Executes the vim (ex-mode) command str. Returns None.
Examples: >
:py vim.command("set tw=72")
:py vim.command("%s/aaa/bbb/g")
< The following definition executes Normal mode commands: >
def normal(str):
vim.command("normal "+str)
# Note the use of single quotes to delimit a string containing
# double quotes
normal('"a2dd"aP')
< *E659*
The ":python" command cannot be used recursively with Python 2.2 and
older. This only works with Python 2.3 and later: >
:py vim.command("python print 'Hello again Python'")
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
evaluator (see |expression|). Returns the expression result as:
- a string if the Vim expression evaluates to a string or number
- a list if the Vim expression evaluates to a Vim list
- a dictionary if the Vim expression evaluates to a Vim dictionary
Dictionaries and lists are recursively expanded.
Examples: >
:py text_width = vim.eval("&tw")
:py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to
# a number.
:py tagList = vim.eval('taglist("eval_expr")')
< The latter will return a python list of python dicts, for instance:
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
Error object of the "vim" module
vim.error *python-error*
Upon encountering a Vim error, Python raises an exception of type
vim.error.
Example: >
try:
vim.command("put a")
except vim.error:
# nothing in register a
Constants of the "vim" module
Note that these are not actually constants - you could reassign them.
But this is silly, as you would then lose access to the vim objects
to which the variables referred.
vim.buffers *python-buffers*
A sequence object providing access to the list of vim buffers. The
object supports the following operations: >
:py b = vim.buffers[i] # Indexing (read-only)
:py b in vim.buffers # Membership test
:py n = len(vim.buffers) # Number of elements
:py for b in vim.buffers: # Sequential access
<
vim.windows *python-windows*
A sequence object providing access to the list of vim windows. The
object supports the following operations: >
:py w = vim.windows[i] # Indexing (read-only)
:py w in vim.windows # Membership test
:py n = len(vim.windows) # Number of elements
:py for w in vim.windows: # Sequential access
<
vim.current *python-current*
An object providing access (via specific attributes) to various
"current" objects available in vim:
vim.current.line The current line (RW) String
vim.current.buffer The current buffer (RO) Buffer
vim.current.window The current window (RO) Window
vim.current.range The current line range (RO) Range
The last case deserves a little explanation. When the :python or
:pyfile command specifies a range, this range of lines becomes the
"current range". A range is a bit like a buffer, but with all access
restricted to a subset of lines. See |python-range| for more details.
Output from Python *python-output*
Vim displays all Python code output in the Vim message area. Normal
output appears as information messages, and error output appears as
error messages.
In implementation terms, this means that all output to sys.stdout
(including the output from print statements) appears as information
messages, and all output to sys.stderr (including error tracebacks)
appears as error messages.
*python-input*
Input (via sys.stdin, including input() and raw_input()) is not
supported, and may cause the program to crash. This should probably be
fixed.
==============================================================================
3. Buffer objects *python-buffer*
Buffer objects represent vim buffers. You can obtain them in a number of ways:
- via vim.current.buffer (|python-current|)
- from indexing vim.buffers (|python-buffers|)
- from the "buffer" attribute of a window (|python-window|)
Buffer objects have one read-only attribute - name - the full file name for
the buffer. They also have three methods (append, mark, and range; see below).
You can also treat buffer objects as sequence objects. In this context, they
act as if they were lists (yes, they are mutable) of strings, with each
element being a line of the buffer. All of the usual sequence operations,
including indexing, index assignment, slicing and slice assignment, work as
you would expect. Note that the result of indexing (slicing) a buffer is a
string (list of strings). This has one unusual consequence - b[:] is different
from b. In particular, "b[:] = None" deletes the whole of the buffer, whereas
"b = None" merely updates the variable b, with no effect on the buffer.
Buffer indexes start at zero, as is normal in Python. This differs from vim
line numbers, which start from 1. This is particularly relevant when dealing
with marks (see below) which use vim line numbers.
The buffer object methods are:
b.append(str) Append a line to the buffer
b.append(str, nr) Idem, below line "nr"
b.append(list) Append a list of lines to the buffer
Note that the option of supplying a list of strings to
the append method differs from the equivalent method
for Python's built-in list objects.
b.append(list, nr) Idem, below line "nr"
b.mark(name) Return a tuple (row,col) representing the position
of the named mark (can also get the []"<> marks)
b.range(s,e) Return a range object (see |python-range|) which
represents the part of the given buffer between line
numbers s and e |inclusive|.
Note that when adding a line it must not contain a line break character '\n'.
A trailing '\n' is allowed and ignored, so that you can do: >
:py b.append(f.readlines())
Examples (assume b is the current buffer) >
:py print b.name # write the buffer file name
:py b[0] = "hello!!!" # replace the top line
:py b[:] = None # delete the whole buffer
:py del b[:] # delete the whole buffer
:py b[0:0] = [ "a line" ] # add a line at the top
:py del b[2] # delete a line (the third)
:py b.append("bottom") # add a line at the bottom
:py n = len(b) # number of lines
:py (row,col) = b.mark('a') # named mark
:py r = b.range(1,5) # a sub-range of the buffer
==============================================================================
4. Range objects *python-range*
Range objects represent a part of a vim buffer. You can obtain them in a
number of ways:
- via vim.current.range (|python-current|)
- from a buffer's range() method (|python-buffer|)
A range object is almost identical in operation to a buffer object. However,
all operations are restricted to the lines within the range (this line range
can, of course, change as a result of slice assignments, line deletions, or
the range.append() method).
The range object attributes are:
r.start Index of first line into the buffer
r.end Index of last line into the buffer
The range object methods are:
r.append(str) Append a line to the range
r.append(str, nr) Idem, after line "nr"
r.append(list) Append a list of lines to the range
Note that the option of supplying a list of strings to
the append method differs from the equivalent method
for Python's built-in list objects.
r.append(list, nr) Idem, after line "nr"
Example (assume r is the current range):
# Send all lines in a range to the default printer
vim.command("%d,%dhardcopy!" % (r.start+1,r.end+1))
==============================================================================
5. Window objects *python-window*
Window objects represent vim windows. You can obtain them in a number of ways:
- via vim.current.window (|python-current|)
- from indexing vim.windows (|python-windows|)
You can manipulate window objects only through their attributes. They have no
methods, and no sequence or other interface.
Window attributes are:
buffer (read-only) The buffer displayed in this window
cursor (read-write) The current cursor position in the window
This is a tuple, (row,col).
height (read-write) The window height, in rows
width (read-write) The window width, in columns
The height attribute is writable only if the screen is split horizontally.
The width attribute is writable only if the screen is split vertically.
==============================================================================
6. Dynamic loading *python-dynamic*
On MS-Windows the Python library can be loaded dynamically. The |:version|
output then includes |+python/dyn|.
This means that Vim will search for the Python DLL file only when needed.
When you don't use the Python interface you don't need it, thus you can use
Vim without this DLL file.
To use the Python interface the Python DLL must be in your search path. In a
console window type "path" to see what directories are used.
The name of the DLL must match the Python version Vim was compiled with.
Currently the name is "python24.dll". That is for Python 2.4. To know for
sure edit "gvim.exe" and search for "python\d*.dll\c".
==============================================================================
7. Python 3 *python3*
*:py3* *:python3*
The |:py3| and |:python3| commands work similar to |:python|.
*:py3file*
The |:py3file| command works similar to |:pyfile|.
Vim can be built in four ways (:version output):
1. No Python support (-python, -python3)
2. Python 2 support only (+python or +python/dyn, -python3)
3. Python 3 support only (-python, +python3 or +python3/dyn)
4. Python 2 and 3 support (+python/dyn, +python3/dyn)
Some more details on the special case 4:
When Python 2 and Python 3 are both supported they must be loaded dynamically.
When doing this on Linux/Unix systems and importing global symbols, this leads
to a crash when the second Python version is used. So either global symbols
are loaded but only one Python version is activated, or no global symbols are
loaded. The latter makes Python's "import" fail on libaries that expect the
symbols to be provided by Vim.
*E836* *E837*
Vim's configuration script makes a guess for all libraries based on one
standard Python library (termios). If importing this library succeeds for
both Python versions, then both will be made available in Vim at the same
time. If not, only the version first used in a session will be enabled.
When trying to use the other one you will get the E836 or E837 error message.
Here Vim's behavior depends on the system in which it was configured. In a
system where both versions of Python were configured with --enable-shared,
both versions of Python will be activated at the same time. There will still
be problems with other third party libraries that were not linked to
libPython.
To work around such problems there are these options:
1. The problematic library is recompiled to link to the according
libpython.so.
2. Vim is recompiled for only one Python version.
3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This
may crash Vim though.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

Просмотреть файл

@ -1,322 +0,0 @@
*os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07
VIM REFERENCE MANUAL by Thomas Leonard
*riscos* *RISCOS* *RISC-OS*
This file contains the particularities for the RISC OS version of Vim.
The RISC OS port is a completely new port and is not based on the old "archi"
port.
1. File locations |riscos-locations|
2. Filename munging |riscos-munging|
3. Command-line use |riscos-commandline|
4. Desktop (GUI) use |riscos-gui|
5. Remote use (telnet) |riscos-remote|
6. Temporary files |riscos-temp-files|
7. Interrupting |riscos-interrupt|
8. Memory usage |riscos-memory|
9. Filetypes |riscos-filetypes|
10. The shell |riscos-shell|
11. Porting new releases |riscos-porting|
If I've missed anything, email me and I'll try to fix it. In fact, even if I
haven't missed anything then email me anyway to give me some confidence that it
actually works!
Thomas Leonard <tal197@ecs.soton.ac.uk>
[these URLs no longer work...]
Port homepage: http://www.ecs.soton.ac.uk/~tal197/
or try: http://www.soton.ac.uk/~tal197/
==============================================================================
*riscos-locations*
1. File locations
The Vim executable and shared resource files are all stored inside the !Vim
application directory.
When !Vim is first seen by the filer, it aliases the *vi and *ex commands to
run the command-line versions of Vim (see |riscos-commandline|).
!Vim.Resources and !Vim.Resources2 contain the files from the standard Vim
distribution, but modified slightly to work within the limits of ADFS, plus
some extra files such as the window templates.
User choices are read from "Choices:*" and are saved to "<Choices$Write>.*".
If you have the new !Boot structure then these should be set up already. If
not, set Choices$Path to a list of directories to search when looking for
user configuration files. Set Choices$Write to the directory you want files
to be saved into (so your search patterns and marks can be remembered between
sessions).
==============================================================================
*riscos-munging*
2. Filename munging
All pathname munging is disabled by default, so Vim should behave like a
normal RISC OS application now. So, if you want to edit "doc/html" then you
actually type "*vi doc/html".
The only times munging is done is when:
- Searching included files from C programs, since these are always munged.
See |[I|.
Note: make sure you are in the right directory when you use this
command (i.e. the one with subdirectories "c" and "h").
- Sourcing files using |:so|.
Paths starting "$VIM/" are munged like this:
$VIM/syntax/help.vim -> Vim:syntax.help
Also, files ending in ".vim" have their extensions removed, and slashes
replaced with dots.
Some tag files and script files may have to be edited to work under this port.
==============================================================================
*riscos-commandline*
3. Command-line use
To use Vim from the command-line use the "*vi" command (or "*ex" for
|Ex-mode|).
Type "*vi -h" for a list of options.
Running the command-line version of Vim in a large high-color mode may cause
the scrolling to be very slow. Either change to a mode with fewer colors or
use the GUI version.
Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will
freeze it, as usual for text programs.
==============================================================================
*riscos-gui*
4. Desktop use
Limitations:
- Left scrollbars don't work properly (right and bottom are fine).
- Doesn't increase scroll speed if it gets behind.
You can resize the window by dragging the lower-right corner, even though
there is no icon shown there.
You can use the --rows and --columns arguments to specify the initial size of
the Vim window, like this: >
*Vi -g --rows 20 --columns 80
The global clipboard is supported, so you can select some text and then
paste it directly into another application (provided it supports the
clipboard too).
Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift
when clicking Menu to paste (from the global clipboard).
Dragging a file to the window replaces the CURRENT buffer (the one with the
cursor, NOT the one you dragged to) with the file.
Dragging with Ctrl held down causes a new Vim window to be opened for the
file (see |:sp|).
Dragging a file in with Shift held down in insert mode inserts the pathname of
the file.
:browse :w opens a standard RISC OS save box.
:browse :e opens a directory viewer.
For fonts, you have the choice of the system font, an outline font, the system
font via ZapRedraw and any of the Zap fonts via ZapRedraw: >
:set guifont=
< To use the system font via the VDU drivers. Supports
bold and underline.
>
:set guifont=Corpus.Medium
< Use the named outline font. You can use any font, but
only monospaced ones like Corpus look right.
>
:set guifont=Corpus.Medium:w8:h12:b:i
< As before, but with size of 8 point by 12 point, and
in bold italic.
If only one of width and height is given then that
value is used for both. If neither is given then 10
point is used.
Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name
with "!" (or "!!" for double height), like this: >
:set guifont=!!
< Use the system font, but via ZapRedraw. This gives a
faster redraw on StrongARM processors, but you can't
get bold or italic text. Double height.
>
:set guifont=!script
< Uses the named Zap font (a directory in VimFont$Path).
The redraw is the same speed as for "!!", but you get
a nicer looking font.
Only the "man+" and "script" fonts are supplied
currently, but you can use any of the Zap fonts if
they are in VimFont$Path.
Vim will try to load font files "0", "B", "I" and "IB"
from the named directory. Only "0" (normal style) MUST
be present. Link files are not currently supported.
Note that when using ZapRedraw the edit bar is drawn in front of the character
you are on rather than behind it. Also redraw is incorrect for screen modes
with eigen values of 0. If the font includes control characters then you can
get Vim to display them by changing the 'isprint' option.
If you find the scrolling is too slow on your machine, try experimenting
with the 'scrolljump' and 'ttyscroll' options.
In particular, StrongARM users may find that: >
:set ttyscroll=0
makes scrolling faster in high-color modes.
=============================================================================
*riscos-remote*
5. Remote use (telnet)
I have included a built-in termcap entry, but you can edit the termcap file to
allow other codes to be used if you want to use Vim from a remote terminal.
Although I do not have an internet connection to my Acorn, I have managed to
run Vim in a FreeTerm window using the loopback connection.
It seems to work pretty well now, using "*vi -T ansi".
==============================================================================
*riscos-temp-files*
6. Temporary files
If Vim crashes then the swap and backup files (if any) will be in the
directories set with the 'directory' and 'bdir' options. By default the swap
files are in <Wimp$ScrapDir> (i.e. inside !Scrap) and backups are in the
directory you were saving to. Vim will allow you to try and recover the file
when you next try to edit it.
To see a list of swap files, press <F12> and type "*vi -r".
Vim no longer brings up ATTENTION warnings if you try to edit two files with
the same name in different directories.
However, it also no longer warns if you try to edit the same file twice (with
two copies of Vim), though you will still be warned when you save that the
datestamp has changed.
==============================================================================
*riscos-interrupt*
7. Interrupting
To break out of a looping macro, or similar, hold down Escape in the
command-line version, or press CTRL-C in the GUI version.
==============================================================================
*riscos-memory*
8. Memory usage
Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on
older machines then edit the !RunTxt and GVim files. I don't know what UnixLib
does by default on these machines so I'm playing safe.
It doesn't work at all well without dynamic areas, since it can't change its
memory allocation once running. Hence you should edit "!Vim.GVim" and
"!Vim.!RunTxt" to choose the best size for you. You probably need at least
about 1400K.
==============================================================================
*riscos-filetypes*
9. Filetypes
You can now specify that autocommands are only executed for files of certain
types. The filetype is given in the form &xxx, when xxx is the filetype.
Filetypes must be specified by number (e.g. &fff for Text).
The system has changed from version 5.3. The new sequence of events is:
- A file is loaded. |'osfiletype'| is set to the RISC OS filetype.
- Based on the filetype and pathname, Vim will try to set |'filetype'| to the
Vim-type of the file.
- Setting this option may load syntax files and perform other actions.
- Saving the file will give it a filetype of |'osfiletype'|.
Some examples may make this clearer:
Kind of file loaded osfiletype filetype ~
C code "c.hellow" Text (&fff) C
LaTeX document LaTeX (&2a8) TeX
Draw document DrawFile (&aff) (not changed)
==============================================================================
*riscos-shell*
10. The shell
- Bangs (!s) are only replaced if they are followed by a space or end-of-line,
since many pathnames contain them.
- You can prefix the command with "~", which stops any output from being
displayed. This also means that you don't have to press <Enter> afterwards,
and stops the screen from being redrawn. {only in the GUI version}
==============================================================================
*riscos-porting*
11. Porting new releases to RISC OS
Downloading everything you need:
- Get the latest source distribution (see www.vim.org)
- Get the runtime environment files (e.g. these help files)
- Get the RISC OS binary distribution (if possible)
Unarchiving:
- Create a raFS disk and put the archives on it
- Un-gzip them
- Un-tar them (*tar xELf 50 archive/tar)
Recompiling the sources:
- Create c, s, and h directories.
- Put all the header files in "h". \
- Put all the C files in "c". | And lose the extensions
- Put the assembler file ("swis/s") in "s". /
- Rename all the files in "proto" to "h", like this:
raFS::VimSrc.source.proto.file/pro
becomes
raFS::VimSrc.source.h.file_pro
- In the files "h.proto" and "c.termlib", search and replace
.pro"
with
_pro.h"
- Create a simple Makefile if desired and do "*make -k".
Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile.
- Save the binary as !Vim.Vim in the binary distribution.
Updating the run-time environment:
- Replace old or missing files inside !Vim.Resources with the
new files.
- Remove files in "doc" not ending in "/txt", except for "tags".
- Lose the extensions from the files in "doc".
- Edit the "doc.tags" file. Remove extensions from the second column: >
:%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/
- Remove extensions from the syntax files. Split them into two directories
to avoid the 77 entry limit on old ADFS filesystems.
- Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on.
Add filetype checking too.
- Edit "Vim:Menu" and remove all the keys from the menus: >
:%s/<Tab>[^ \t]*//
<
vim:tw=78:ts=8:ft=help:norl:

Просмотреть файл

@ -1,48 +0,0 @@
" Vim filetype plugin file
" Language: Perl 6
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl/tree/master
" Last Change: 2010-08-10
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
"
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
let s:save_cpo = &cpo
set cpo-=C
setlocal formatoptions+=crq
setlocal comments=:#
setlocal commentstring=#%s
" Change the browse dialog on Win32 to show mainly Perl-related files
if has("gui_win32")
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
\ "Perl Modules (*.pm)\t*.pm\n" .
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Provided by Ned Konz <ned at bike-nomad dot com>
"---------------------------------------------
setlocal include=\\<\\(use\\\|require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
setlocal define=[^A-Za-z_]
" The following line changes a global variable but is necessary to make
" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
" the problem. If this causes a " problem for you, add an
" after/ftplugin/perl6.vim file that contains
" set isfname-=:
set isfname+=:
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.
let &cpo = s:save_cpo

Просмотреть файл

@ -1,13 +0,0 @@
" Vim filetype plugin file
" Language: XS (Perl extension interface language)
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Just use the C plugin for now.
runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim

Двоичные данные
share/vim/vim73/gvim.exe

Двоичный файл не отображается.

Просмотреть файл

@ -1,206 +0,0 @@
" Vim indent file
" Language: Erlang
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Contributor: Edwin Fine <efine145_nospam01 at usa dot net>
" Last Change: 2008 Mar 12
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=ErlangIndent()
setlocal indentkeys+==after,=end,=catch,=),=],=}
" Only define the functions once.
if exists("*ErlangIndent")
finish
endif
" The function go through the whole line, analyses it and sets the indentation
" (ind variable).
" l: the number of the line to be examined.
function s:ErlangIndentAtferLine(l)
let i = 0 " the index of the current character in the line
let length = strlen(a:l) " the length of the line
let ind = 0 " how much should be the difference between the indentation of
" the current line and the indentation of the next line?
" e.g. +1: the indentation of the next line should be equal to
" the indentation of the current line plus one shiftwidth
let lastFun = 0 " the last token was a 'fun'
let lastReceive = 0 " the last token was a 'receive'; needed for 'after'
let lastHashMark = 0 " the last token was a 'hashmark'
while 0<= i && i < length
" m: the next value of the i
if a:l[i] == '%'
break
elseif a:l[i] == '"'
let m = matchend(a:l,'"\%([^"\\]\|\\.\)*"',i)
let lastReceive = 0
elseif a:l[i] == "'"
let m = matchend(a:l,"'[^']*'",i)
let lastReceive = 0
elseif a:l[i] =~# "[a-z]"
let m = matchend(a:l,".[[:alnum:]_]*",i)
if lastFun
let ind = ind - 1
let lastFun = 0
let lastReceive = 0
elseif a:l[(i):(m-1)] =~# '^\%(case\|if\|try\)$'
let ind = ind + 1
elseif a:l[(i):(m-1)] =~# '^receive$'
let ind = ind + 1
let lastReceive = 1
elseif a:l[(i):(m-1)] =~# '^begin$'
let ind = ind + 2
let lastReceive = 0
elseif a:l[(i):(m-1)] =~# '^end$'
let ind = ind - 2
let lastReceive = 0
elseif a:l[(i):(m-1)] =~# '^after$'
if lastReceive == 0
let ind = ind - 1
else
let ind = ind + 0
end
let lastReceive = 0
elseif a:l[(i):(m-1)] =~# '^fun$'
let ind = ind + 1
let lastFun = 1
let lastReceive = 0
endif
elseif a:l[i] =~# "[A-Z_]"
let m = matchend(a:l,".[[:alnum:]_]*",i)
let lastReceive = 0
elseif a:l[i] == '$'
let m = i+2
let lastReceive = 0
elseif a:l[i] == "." && (i+1>=length || a:l[i+1]!~ "[0-9]")
let m = i+1
if lastHashMark
let lastHashMark = 0
else
let ind = ind - 1
end
let lastReceive = 0
elseif a:l[i] == '-' && (i+1<length && a:l[i+1]=='>')
let m = i+2
let ind = ind + 1
let lastReceive = 0
elseif a:l[i] == ';'
let m = i+1
let ind = ind - 1
let lastReceive = 0
elseif a:l[i] == '#'
let m = i+1
let lastHashMark = 1
elseif a:l[i] =~# '[({[]'
let m = i+1
let ind = ind + 1
let lastFun = 0
let lastReceive = 0
let lastHashMark = 0
elseif a:l[i] =~# '[)}\]]'
let m = i+1
let ind = ind - 1
let lastReceive = 0
else
let m = i+1
endif
let i = m
endwhile
return ind
endfunction
function s:FindPrevNonBlankNonComment(lnum)
let lnum = prevnonblank(a:lnum)
let line = getline(lnum)
" continue to search above if the current line begins with a '%'
while line =~# '^\s*%.*$'
let lnum = prevnonblank(lnum - 1)
if 0 == lnum
return 0
endif
let line = getline(lnum)
endwhile
return lnum
endfunction
function ErlangIndent()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" Hit the start of the file, use zero indent.
if lnum == 0
return 0
endif
let prevline = getline(lnum)
let currline = getline(v:lnum)
let ind = indent(lnum) + &sw * s:ErlangIndentAtferLine(prevline)
" special cases:
if prevline =~# '^\s*\%(after\|end\)\>'
let ind = ind + 2*&sw
endif
if currline =~# '^\s*end\>'
let ind = ind - 2*&sw
endif
if currline =~# '^\s*after\>'
let plnum = s:FindPrevNonBlankNonComment(v:lnum-1)
if getline(plnum) =~# '^[^%]*\<receive\>\s*\%(%.*\)\=$'
let ind = ind - 1*&sw
" If the 'receive' is not in the same line as the 'after'
else
let ind = ind - 2*&sw
endif
endif
if prevline =~# '^\s*[)}\]]'
let ind = ind + 1*&sw
endif
if currline =~# '^\s*[)}\]]'
let ind = ind - 1*&sw
endif
if prevline =~# '^\s*\%(catch\)\s*\%(%\|$\)'
let ind = ind + 1*&sw
endif
if currline =~# '^\s*\%(catch\)\s*\%(%\|$\)'
let ind = ind - 1*&sw
endif
if ind<0
let ind = 0
endif
return ind
endfunction
" TODO:
"
" f() ->
" x("foo
" bar")
" ,
" bad_indent.
"
" fun
" init/0,
" bad_indent
"
" #rec
" .field,
" bad_indent
"
" case X of
" 1 when A; B ->
" bad_indent

Просмотреть файл

@ -1,242 +0,0 @@
" Description: html indenter
" Author: Johannes Zellner <johannes@zellner.org>
" Last Change: Mo, 05 Jun 2006 22:32:41 CEST
" Restoring 'cpo' and 'ic' added by Bram 2006 May 5
" Globals: g:html_indent_tags -- indenting tags
" g:html_indent_strict -- inhibit 'O O' elements
" g:html_indent_strict_table -- inhibit 'O -' elements
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" [-- local settings (must come before aborting the script) --]
setlocal indentexpr=HtmlIndentGet(v:lnum)
setlocal indentkeys=o,O,*<Return>,<>>,{,}
if exists('g:html_indent_tags')
unlet g:html_indent_tags
endif
" [-- helper function to assemble tag list --]
fun! <SID>HtmlIndentPush(tag)
if exists('g:html_indent_tags')
let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
else
let g:html_indent_tags = a:tag
endif
endfun
" [-- <ELEMENT ? - - ...> --]
call <SID>HtmlIndentPush('a')
call <SID>HtmlIndentPush('abbr')
call <SID>HtmlIndentPush('acronym')
call <SID>HtmlIndentPush('address')
call <SID>HtmlIndentPush('b')
call <SID>HtmlIndentPush('bdo')
call <SID>HtmlIndentPush('big')
call <SID>HtmlIndentPush('blockquote')
call <SID>HtmlIndentPush('button')
call <SID>HtmlIndentPush('caption')
call <SID>HtmlIndentPush('center')
call <SID>HtmlIndentPush('cite')
call <SID>HtmlIndentPush('code')
call <SID>HtmlIndentPush('colgroup')
call <SID>HtmlIndentPush('del')
call <SID>HtmlIndentPush('dfn')
call <SID>HtmlIndentPush('dir')
call <SID>HtmlIndentPush('div')
call <SID>HtmlIndentPush('dl')
call <SID>HtmlIndentPush('em')
call <SID>HtmlIndentPush('fieldset')
call <SID>HtmlIndentPush('font')
call <SID>HtmlIndentPush('form')
call <SID>HtmlIndentPush('frameset')
call <SID>HtmlIndentPush('h1')
call <SID>HtmlIndentPush('h2')
call <SID>HtmlIndentPush('h3')
call <SID>HtmlIndentPush('h4')
call <SID>HtmlIndentPush('h5')
call <SID>HtmlIndentPush('h6')
call <SID>HtmlIndentPush('i')
call <SID>HtmlIndentPush('iframe')
call <SID>HtmlIndentPush('ins')
call <SID>HtmlIndentPush('kbd')
call <SID>HtmlIndentPush('label')
call <SID>HtmlIndentPush('legend')
call <SID>HtmlIndentPush('map')
call <SID>HtmlIndentPush('menu')
call <SID>HtmlIndentPush('noframes')
call <SID>HtmlIndentPush('noscript')
call <SID>HtmlIndentPush('object')
call <SID>HtmlIndentPush('ol')
call <SID>HtmlIndentPush('optgroup')
" call <SID>HtmlIndentPush('pre')
call <SID>HtmlIndentPush('q')
call <SID>HtmlIndentPush('s')
call <SID>HtmlIndentPush('samp')
call <SID>HtmlIndentPush('script')
call <SID>HtmlIndentPush('select')
call <SID>HtmlIndentPush('small')
call <SID>HtmlIndentPush('span')
call <SID>HtmlIndentPush('strong')
call <SID>HtmlIndentPush('style')
call <SID>HtmlIndentPush('sub')
call <SID>HtmlIndentPush('sup')
call <SID>HtmlIndentPush('table')
call <SID>HtmlIndentPush('textarea')
call <SID>HtmlIndentPush('title')
call <SID>HtmlIndentPush('tt')
call <SID>HtmlIndentPush('u')
call <SID>HtmlIndentPush('ul')
call <SID>HtmlIndentPush('var')
" [-- <ELEMENT ? O O ...> --]
if !exists('g:html_indent_strict')
call <SID>HtmlIndentPush('body')
call <SID>HtmlIndentPush('head')
call <SID>HtmlIndentPush('html')
call <SID>HtmlIndentPush('tbody')
endif
" [-- <ELEMENT ? O - ...> --]
if !exists('g:html_indent_strict_table')
call <SID>HtmlIndentPush('th')
call <SID>HtmlIndentPush('td')
call <SID>HtmlIndentPush('tr')
call <SID>HtmlIndentPush('tfoot')
call <SID>HtmlIndentPush('thead')
endif
delfun <SID>HtmlIndentPush
let s:cpo_save = &cpo
set cpo-=C
" [-- count indent-increasing tags of line a:lnum --]
fun! <SID>HtmlIndentOpen(lnum, pattern)
let s = substitute('x'.getline(a:lnum),
\ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
let s = substitute(s, "[^\1].*$", '', '')
return strlen(s)
endfun
" [-- count indent-decreasing tags of line a:lnum --]
fun! <SID>HtmlIndentClose(lnum, pattern)
let s = substitute('x'.getline(a:lnum),
\ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
let s = substitute(s, "[^\1].*$", '', '')
return strlen(s)
endfun
" [-- count indent-increasing '{' of (java|css) line a:lnum --]
fun! <SID>HtmlIndentOpenAlt(lnum)
return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
endfun
" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
fun! <SID>HtmlIndentCloseAlt(lnum)
return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
endfun
" [-- return the sum of indents respecting the syntax of a:lnum --]
fun! <SID>HtmlIndentSum(lnum, style)
if a:style == match(getline(a:lnum), '^\s*</')
if a:style == match(getline(a:lnum), '^\s*</\<\('.g:html_indent_tags.'\)\>')
let open = <SID>HtmlIndentOpen(a:lnum, g:html_indent_tags)
let close = <SID>HtmlIndentClose(a:lnum, g:html_indent_tags)
if 0 != open || 0 != close
return open - close
endif
endif
endif
if '' != &syntax &&
\ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
\ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
\ =~ '\(css\|java\).*'
if a:style == match(getline(a:lnum), '^\s*}')
return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
endif
endif
return 0
endfun
fun! HtmlIndentGet(lnum)
" Find a non-empty line above the current line.
let lnum = prevnonblank(a:lnum - 1)
" Hit the start of the file, use zero indent.
if lnum == 0
return 0
endif
let restore_ic = &ic
setlocal ic " ignore case
" [-- special handling for <pre>: no indenting --]
if getline(a:lnum) =~ '\c</pre>'
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
" we're in a line with </pre> or inside <pre> ... </pre>
if restore_ic == 0
setlocal noic
endif
return -1
endif
" [-- special handling for <javascript>: use cindent --]
let js = '<script.*type\s*=\s*.*java'
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006
" ZDR: This needs to be an AND (we are 'after the start of the pair' AND
" we are 'before the end of the pair'). Otherwise, indentation
" before the start of the script block will be affected; the end of
" the pair will still match if we are before the beginning of the
" pair.
"
if 0 < searchpair(js, '', '</script>', 'nWb')
\ && 0 < searchpair(js, '', '</script>', 'nW')
" we're inside javascript
if getline(lnum) !~ js && getline(a:lnum) != '</script>'
if restore_ic == 0
setlocal noic
endif
return cindent(a:lnum)
endif
endif
if getline(lnum) =~ '\c</pre>'
" line before the current line a:lnum contains
" a closing </pre>. --> search for line before
" starting <pre> to restore the indent.
let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
if preline > 0
if restore_ic == 0
setlocal noic
endif
return indent(preline)
endif
endif
let ind = <SID>HtmlIndentSum(lnum, -1)
let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
if restore_ic == 0
setlocal noic
endif
return indent(lnum) + (&sw * ind)
endfun
let &cpo = s:cpo_save
unlet s:cpo_save
" [-- EOF <runtime>/indent/html.vim --]

Просмотреть файл

@ -1,173 +0,0 @@
" Vim indent file
" Language: Pascal
" Maintainer: Neil Carter <n.carter@swansea.ac.uk>
" Created: 2004 Jul 13
" Last Change: 2005 Jul 05
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetPascalIndent(v:lnum)
setlocal indentkeys&
setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for
setlocal indentkeys+==program,==function,==procedure,==object,==private
setlocal indentkeys+==record,==if,==else,==case
if exists("*GetPascalIndent")
finish
endif
function! s:GetPrevNonCommentLineNum( line_num )
" Skip lines starting with a comment
let SKIP_LINES = '^\s*\(\((\*\)\|\(\*\ \)\|\(\*)\)\|{\|}\)'
let nline = a:line_num
while nline > 0
let nline = prevnonblank(nline-1)
if getline(nline) !~? SKIP_LINES
break
endif
endwhile
return nline
endfunction
function! GetPascalIndent( line_num )
" Line 0 always goes at column 0
if a:line_num == 0
return 0
endif
let this_codeline = getline( a:line_num )
" If in the middle of a three-part comment
if this_codeline =~ '^\s*\*'
return indent( a:line_num )
endif
let prev_codeline_num = s:GetPrevNonCommentLineNum( a:line_num )
let prev_codeline = getline( prev_codeline_num )
let indnt = indent( prev_codeline_num )
" Compiler directives should always go in column zero.
if this_codeline =~ '^\s*{\(\$IFDEF\|\$ELSE\|\$ENDIF\)'
return 0
endif
" These items have nothing before or after (not even a comment), and
" go on column 0. Make sure that the ^\s* is followed by \( to make
" ORs work properly, and not include the start of line (this must
" always appear).
" The bracketed expression with the underline is a routine
" separator. This is one case where we do indent comment lines.
if this_codeline =~ '^\s*\((\*\ _\+\ \*)\|\<\(const\|var\)\>\)$'
return 0
endif
" These items may have text after them, and go on column 0 (in most
" cases). The problem is that "function" and "procedure" keywords
" should be indented if within a class declaration.
if this_codeline =~ '^\s*\<\(program\|type\|uses\|procedure\|function\)\>'
return 0
endif
" BEGIN
" If the begin does not come after "if", "for", or "else", then it
" goes in column 0
if this_codeline =~ '^\s*begin\>' && prev_codeline !~ '^\s*\<\(if\|for\|else\)\>'
return 0
endif
" These keywords are indented once only.
if this_codeline =~ '^\s*\<\(private\)\>'
return &shiftwidth
endif
" If the PREVIOUS LINE contained these items, the current line is
" always indented once.
if prev_codeline =~ '^\s*\<\(type\|uses\)\>'
return &shiftwidth
endif
" These keywords are indented once only. Possibly surrounded by
" other chars.
if this_codeline =~ '^.\+\<\(object\|record\)\>'
return &shiftwidth
endif
" If the previous line was indenting...
if prev_codeline =~ '^\s*\<\(for\|if\|case\|else\|end\ else\)\>'
" then indent.
let indnt = indnt + &shiftwidth
" BUT... if this is the start of a multistatement block then we
" need to align the begin with the previous line.
if this_codeline =~ '^\s*begin\>'
return indnt - &shiftwidth
endif
" We also need to keep the indentation level constant if the
" whole if-then statement was on one line.
if prev_codeline =~ '\<then\>.\+'
let indnt = indnt - &shiftwidth
endif
endif
" PREVIOUS-LINE BEGIN
" If the previous line was an indenting keyword then indent once...
if prev_codeline =~ '^\s*\<\(const\|var\|begin\|repeat\|private\)\>'
" But only if this is another var in a list.
if this_codeline !~ '^\s*var\>'
return indnt + &shiftwidth
endif
endif
" PREVIOUS-LINE BEGIN
" Indent code after a case statement begin
if prev_codeline =~ '\:\ begin\>'
return indnt + &shiftwidth
endif
" These words may have text before them on the line (hence the .*)
" but are followed by nothing. Always indent once only.
if prev_codeline =~ '^\(.*\|\s*\)\<\(object\|record\)\>$'
return indnt + &shiftwidth
endif
" If we just closed a bracket that started on a previous line, then
" unindent. But don't return yet -- we need to check for further
" unindentation (for end/until/else)
if prev_codeline =~ '^[^(]*[^*])'
let indnt = indnt - &shiftwidth
endif
" At the end of a block, we have to unindent both the current line
" (the "end" for instance) and the newly-created line.
if this_codeline =~ '^\s*\<\(end\|until\|else\)\>'
return indnt - &shiftwidth
endif
" If we have opened a bracket and it continues over one line,
" then indent once.
"
" RE = an opening bracket followed by any amount of anything other
" than a closing bracket and then the end-of-line.
"
" If we didn't include the end of line, this RE would match even
" closed brackets, since it would match everything up to the closing
" bracket.
"
" This test isn't clever enough to handle brackets inside strings or
" comments.
if prev_codeline =~ '([^*]\=[^)]*$'
return indnt + &shiftwidth
endif
return indnt
endfunction

Просмотреть файл

@ -1,53 +0,0 @@
" Vim indent file
" Language: reStructuredText Documentation Format
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetRSTIndent()
setlocal indentkeys=!^F,o,O
setlocal nosmartindent
if exists("*GetRSTIndent")
finish
endif
function GetRSTIndent()
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
let ind = indent(lnum)
let line = getline(lnum)
if line =~ '^\s*[-*+]\s'
let ind = ind + 2
elseif line =~ '^\s*\d\+.\s'
let ind = ind + matchend(substitute(line, '^\s*', '', ''), '\d\+.\s\+')
endif
let line = getline(v:lnum - 1)
if line =~ '^\s*$'
execute lnum
call search('^\s*\%([-*+]\s\|\d\+.\s\|\.\.\|$\)', 'bW')
let line = getline('.')
if line =~ '^\s*[-*+]'
let ind = ind - 2
elseif line =~ '^\s*\d\+\.\s'
let ind = ind - matchend(substitute(line, '^\s*', '', ''),
\ '\d\+\.\s\+')
elseif line =~ '^\s*\.\.'
let ind = ind - 3
else
let ind = ind
endif
endif
return ind
endfunction

Просмотреть файл

@ -1,378 +0,0 @@
" Vim indent file
" Language: Ruby
" Maintainer: Nikolai Weibull <now at bitwi.se>
" Last Change: 2009 Dec 17
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" 0. Initialization {{{1
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent()
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end
" Only define the function once.
if exists("*GetRubyIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
" Regex of syntax group names that are or delimit string or are comments.
let s:syng_strcom = '\<ruby\%(String\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
let s:syng_string =
\ '\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\)\>'
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\'\<ruby\%(String\|Interpolation\|NoInterpolation\|StringEscape\|Documentation\)\>'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
\ '\|rescue\)\>' .
\ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
" Regex used for words that, at the start of a line, remove a level of indent.
let s:ruby_deindent_keywords =
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>'
" Regex that defines the start-match for the 'end' keyword.
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
\ '\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' .
\ '\|\<do\>'
" Regex that defines the middle-match for the 'end' keyword.
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue\>\|when\|elsif\)\>'
" Regex that defines the end-match for the 'end' keyword.
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end\>'
" Expression used for searchpair() call for finding match for 'end' keyword.
let s:end_skip_expr = s:skip_expr .
\ ' || (expand("<cword>") == "do"' .
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")'
" Regex that defines continuation lines, not including (, {, or [.
let s:continuation_regex = '\%([\\*+/.,:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:continuation_regex2 =
\ '\%([\\*+/.,:({[]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
" Regex that defines blocks.
let s:block_regex =
\ '\%(\<do\>\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$'
" 2. Auxiliary Functions {{{1
" ======================
" Check if the character at lnum:col is inside a string, comment, or is ascii.
function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
endfunction
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string
endfunction
" Check if the character at lnum:col is inside a string or documentation.
function s:IsInStringOrDocumentation(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
" Go in and out of blocks comments as necessary.
" If the line isn't empty (with opt. comment) or in a string, end search.
let line = getline(lnum)
if line =~ '^=begin$'
if in_block
let in_block = 0
else
break
endif
elseif !in_block && line =~ '^=end$'
let in_block = 1
elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
\ && s:IsInStringOrComment(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum)
" Start on the line we're at and use its indent.
let msl = a:lnum
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
while lnum > 0
" If we have a continuation line, or we're in a string, use line as MSL.
" Otherwise, terminate search as we have found our MSL already.
let line = getline(lnum)
let col = match(line, s:continuation_regex2) + 1
if (col > 0 && !s:IsInStringOrComment(lnum, col))
\ || s:IsInString(lnum, strlen(line))
let msl = lnum
else
break
endif
let lnum = s:PrevNonBlankNonString(lnum - 1)
endwhile
return msl
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while pos != -1
if !s:IsInStringOrComment(a:lnum, pos + 1)
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
endif
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), '\C'.a:regex) + 1
return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
endfunction
function s:MatchLast(lnum, regex)
let line = getline(a:lnum)
let col = match(line, '.*\zs' . a:regex)
while col != -1 && s:IsInStringOrComment(a:lnum, col)
let line = strpart(line, 0, col)
let col = match(line, '.*' . a:regex)
endwhile
return col + 1
endfunction
" 3. GetRubyIndent Function {{{1
" =========================
function GetRubyIndent()
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it. For parentheses we indent to its column - 1, for the
" others we indent to the containing line's MSL's level. Return -1 if fail.
let col = matchend(line, '^\s*[]})]')
if col > 0 && !s:IsInStringOrComment(v:lnum, col)
call cursor(v:lnum, col)
let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
if line[col-1]==')' && col('.') != col('$') - 1
let ind = virtcol('.')-1
else
let ind = indent(s:GetMSL(line('.')))
endif
endif
return ind
endif
" If we have a =begin or =end set indent to first column.
if match(line, '^\s*\%(=begin\|=end\)$') != -1
return 0
endif
" If we have a deindenting keyword, find its match and indent to its level.
" TODO: this is messy
if s:Match(v:lnum, s:ruby_deindent_keywords)
call cursor(v:lnum, 1)
if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let line = getline('.')
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
else
let ind = indent('.')
endif
endif
return ind
endif
" If we are in a multi-line string or line-comment, don't do anything to it.
if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
" Find a non-blank, non-multi-line string line above the current line.
let lnum = s:PrevNonBlankNonString(v:lnum - 1)
" If the line is empty and inside a string, use the previous line.
if line =~ '^\s*$' && lnum != prevnonblank(v:lnum - 1)
return indent(prevnonblank(v:lnum))
endif
" At the start of the file use zero indent.
if lnum == 0
return 0
endif
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum)) + &sw
endif
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
else
return virtcol('.')
endif
elseif counts[1] == '1' || counts[2] == '1'
return ind + &sw
else
call cursor(v:lnum, vcol)
end
endif
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
let col = s:Match(lnum, '\%(^\|[^.:@$]\)\<end\>\s*\%(#.*\)\=$')
if col > 0
call cursor(lnum, col)
if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
\ s:end_skip_expr) > 0
let n = line('.')
let ind = indent('.')
let msl = s:GetMSL(n)
if msl != n
let ind = indent(msl)
end
return ind
endif
end
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
" let ind = indent(lnum) + &sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
if s:Match(lnum, s:end_end_regex)
let ind = indent('.')
endif
return ind
endif
" 3.4. Work on the MSL line. {{{2
" --------------------------
" Set up variables to use and search for MSL to the previous line.
let p_lnum = lnum
let lnum = s:GetMSL(lnum)
" If the previous line wasn't a MSL and is continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
if p_lnum != lnum
if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
return ind
endif
endif
" Set up more variables, now that we know we wasn't continuation bound.
let line = getline(lnum)
let msl_ind = indent(lnum)
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords)
let ind = msl_ind + &sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw
endif
return ind
endif
" If the previous line ended with [*+/.-=], indent one extra level.
if s:Match(lnum, s:continuation_regex)
if lnum == p_lnum
let ind = msl_ind + &sw
else
let ind = msl_ind
endif
endif
" }}}2
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:

Просмотреть файл

@ -1,3 +0,0 @@
" Menu Translations: Czech
source <sfile>:p:h/menu_czech_czech_republic.1252.vim

Просмотреть файл

@ -1,5 +0,0 @@
" Menu Translations: Japanese (for Windows)
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
" Last Change: 29-Apr-2004.
source <sfile>:p:h/menu_japanese_japan.932.vim

Просмотреть файл

@ -1,6 +0,0 @@
" Menu Translations: Japanese (for UNIX)
" Translated By: Muraoka Taro <koron@tka.att.ne.jp>
" Last Change: 08:50:47 25-Mar-2001.
" eucjp is the same as euc-jp. Source the other one from here.
source <sfile>:p:h/menu_ja_jp.euc-jp.vim

Просмотреть файл

@ -1,6 +0,0 @@
" Menu Translations: Japanese (for UNIX)
" Translated By: Muraoka Taro <koron@tka.att.ne.jp>
" Last Change: 08:50:47 25-Mar-2001.
" eucjp is the same as euc-jp. Source the other one from here.
source <sfile>:p:h/menu_ja_jp.euc-jp.vim

Просмотреть файл

@ -1,6 +0,0 @@
" Menu Translations: Japanese (for UNIX)
" Translated By: Muraoka Taro <koron@tka.att.ne.jp>
" Last Change: 08:50:47 25-Mar-2001.
" ujis is the same as euc-jp. Source the other one from here.
source <sfile>:p:h/menu_ja_jp.euc-jp.vim

Просмотреть файл

@ -1,5 +0,0 @@
" Menu Translations: Japanese (for Windows)
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
" Last Change: 29-Apr-2004.
source <sfile>:p:h/menu_japanese_japan.932.vim

Просмотреть файл

@ -1,6 +0,0 @@
" Menu Translations: Japanese (for UNIX)
" Translated By: Muraoka Taro <koron@tka.att.ne.jp>
" Last Change: 08:50:47 25-Mar-2001.
" eucjp is the same as euc-jp. Source the other one from here.
source <sfile>:p:h/menu_ja_jp.euc-jp.vim

Просмотреть файл

@ -1,6 +0,0 @@
" Menu Translations: Japanese (for UNIX)
" Translated By: Muraoka Taro <koron@tka.att.ne.jp>
" Last Change: 08:50:47 25-Mar-2001.
" ujis is the same as euc-jp. Source the other one from here.
source <sfile>:p:h/menu_ja_jp.euc-jp.vim

Просмотреть файл

@ -1,18 +0,0 @@
#!/bin/sh
# Shell script to start Vim with less.vim.
# Read stdin if no arguments were given.
if test -t 1; then
if test $# = 0; then
vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' -
else
vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' "$@"
fi
else
# Output is not a terminal, cat arguments or stdin
if test $# = 0; then
cat
else
cat "$@"
fi
fi

Просмотреть файл

@ -1,31 +0,0 @@
" Vim plugin for converting a syntax highlighted file to HTML.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2010 Aug 12
"
" The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and
" $VIMRUNTIME/syntax/2html.vim
"
" TODO:
" * Restore open/closed folds and cursor position after processing each file
" with option not to restore for speed increase
" * Add extra meta info (generation time, etc.)
" * Tidy up so we can use strict doctype more?
" * Implementation detail: add threshold for writing the lines to the html
" buffer before we're done (5000 or so lines should do it)
" * TODO comments for code cleanup scattered throughout
if exists('g:loaded_2html_plugin')
finish
endif
let g:loaded_2html_plugin = 'vim7.3_v6'
" Define the :TOhtml command when:
" - 'compatible' is not set
" - this plugin was not already loaded
" - user commands are available.
if !&cp && !exists(":TOhtml") && has("user_commands")
command -range=% TOhtml :call tohtml#Convert2HTML(<line1>, <line2>)
endif
" Make sure any patches will probably use consistent indent
" vim: ts=8 sw=2 sts=2 noet

Просмотреть файл

@ -1,36 +0,0 @@
" vimballPlugin : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Copyright: (c) 2004-2010 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
" *** *** Use At-Your-Own-Risk! *** ***
"
" (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who
" judge. For in that which you judge another, you condemn yourself. For
" you who judge practice the same things.
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_vimballPlugin")
finish
endif
let g:loaded_vimballPlugin = "v31"
let s:keepcpo = &cpo
set cpo&vim
" ------------------------------------------------------------------------------
" Public Interface: {{{1
com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(<line1>,<line2>,<bang>0,<f-args>)
com! -na=? -complete=dir UseVimball call vimball#Vimball(1,<f-args>)
com! -na=0 VimballList call vimball#Vimball(0)
com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip call vimball#Decompress(expand("<amatch>"))|call vimball#Vimball(1)
au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'| setlocal ma ff=unix noma |endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")
" =====================================================================
" Restoration And Modelines: {{{1
" vim: fdm=marker
let &cpo= s:keepcpo
unlet s:keepcpo

Просмотреть файл

@ -1,13 +0,0 @@
*** br_FR.orig.aff 2010-04-14 18:44:36.365731271 +0200
--- br_FR.aff 2010-04-14 18:43:31.069137439 +0200
***************
*** 9,14 ****
--- 9,16 ----
SET UTF-8
TRY esiaùnñrtolcdugmphbyfvkwzESIAÙNÑRTOLCDUGMPHBYFVKWZ'
+ MIDWORD '
+
PFX m Y 1
PFX m 0 m' [aehiouy]

Просмотреть файл

@ -1,586 +0,0 @@
" Vim support file to define the syntax selection menu
" This file is normally sourced from menu.vim.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2010 Jul 26
" Define the SetSyn function, used for the Syntax menu entries.
" Set 'filetype' and also 'syntax' if it is manually selected.
fun! SetSyn(name)
if a:name == "fvwm1"
let use_fvwm_1 = 1
let use_fvwm_2 = 0
let name = "fvwm"
elseif a:name == "fvwm2"
let use_fvwm_2 = 1
let use_fvwm_1 = 0
let name = "fvwm"
else
let name = a:name
endif
if !exists("s:syntax_menu_synonly")
exe "set ft=" . name
if exists("g:syntax_manual")
exe "set syn=" . name
endif
else
exe "set syn=" . name
endif
endfun
" <> notation is used here, remove '<' from 'cpoptions'
let s:cpo_save = &cpo
set cpo&vim
" The following menu items are generated by makemenu.vim.
" The Start Of The Syntax Menu
an 50.10.100 &Syntax.AB.A2ps\ config :cal SetSyn("a2ps")<CR>
an 50.10.110 &Syntax.AB.Aap :cal SetSyn("aap")<CR>
an 50.10.120 &Syntax.AB.ABAP/4 :cal SetSyn("abap")<CR>
an 50.10.130 &Syntax.AB.Abaqus :cal SetSyn("abaqus")<CR>
an 50.10.140 &Syntax.AB.ABC\ music\ notation :cal SetSyn("abc")<CR>
an 50.10.150 &Syntax.AB.ABEL :cal SetSyn("abel")<CR>
an 50.10.160 &Syntax.AB.AceDB\ model :cal SetSyn("acedb")<CR>
an 50.10.170 &Syntax.AB.Ada :cal SetSyn("ada")<CR>
an 50.10.180 &Syntax.AB.AfLex :cal SetSyn("aflex")<CR>
an 50.10.190 &Syntax.AB.ALSA\ config :cal SetSyn("alsaconf")<CR>
an 50.10.200 &Syntax.AB.Altera\ AHDL :cal SetSyn("ahdl")<CR>
an 50.10.210 &Syntax.AB.Amiga\ DOS :cal SetSyn("amiga")<CR>
an 50.10.220 &Syntax.AB.AMPL :cal SetSyn("ampl")<CR>
an 50.10.230 &Syntax.AB.Ant\ build\ file :cal SetSyn("ant")<CR>
an 50.10.240 &Syntax.AB.ANTLR :cal SetSyn("antlr")<CR>
an 50.10.250 &Syntax.AB.Apache\ config :cal SetSyn("apache")<CR>
an 50.10.260 &Syntax.AB.Apache-style\ config :cal SetSyn("apachestyle")<CR>
an 50.10.270 &Syntax.AB.Applix\ ELF :cal SetSyn("elf")<CR>
an 50.10.280 &Syntax.AB.Arc\ Macro\ Language :cal SetSyn("aml")<CR>
an 50.10.290 &Syntax.AB.Arch\ inventory :cal SetSyn("arch")<CR>
an 50.10.300 &Syntax.AB.ART :cal SetSyn("art")<CR>
an 50.10.310 &Syntax.AB.ASP\ with\ VBScript :cal SetSyn("aspvbs")<CR>
an 50.10.320 &Syntax.AB.ASP\ with\ Perl :cal SetSyn("aspperl")<CR>
an 50.10.330 &Syntax.AB.Assembly.680x0 :cal SetSyn("asm68k")<CR>
an 50.10.340 &Syntax.AB.Assembly.Flat :cal SetSyn("fasm")<CR>
an 50.10.350 &Syntax.AB.Assembly.GNU :cal SetSyn("asm")<CR>
an 50.10.360 &Syntax.AB.Assembly.GNU\ H-8300 :cal SetSyn("asmh8300")<CR>
an 50.10.370 &Syntax.AB.Assembly.Intel\ IA-64 :cal SetSyn("ia64")<CR>
an 50.10.380 &Syntax.AB.Assembly.Microsoft :cal SetSyn("masm")<CR>
an 50.10.390 &Syntax.AB.Assembly.Netwide :cal SetSyn("nasm")<CR>
an 50.10.400 &Syntax.AB.Assembly.PIC :cal SetSyn("pic")<CR>
an 50.10.410 &Syntax.AB.Assembly.Turbo :cal SetSyn("tasm")<CR>
an 50.10.420 &Syntax.AB.Assembly.VAX\ Macro\ Assembly :cal SetSyn("vmasm")<CR>
an 50.10.430 &Syntax.AB.Assembly.Z-80 :cal SetSyn("z8a")<CR>
an 50.10.440 &Syntax.AB.Assembly.xa\ 6502\ cross\ assember :cal SetSyn("a65")<CR>
an 50.10.450 &Syntax.AB.ASN\.1 :cal SetSyn("asn")<CR>
an 50.10.460 &Syntax.AB.Asterisk\ config :cal SetSyn("asterisk")<CR>
an 50.10.470 &Syntax.AB.Asterisk\ voicemail\ config :cal SetSyn("asteriskvm")<CR>
an 50.10.480 &Syntax.AB.Atlas :cal SetSyn("atlas")<CR>
an 50.10.490 &Syntax.AB.AutoHotKey :cal SetSyn("autohotkey")<CR>
an 50.10.500 &Syntax.AB.AutoIt :cal SetSyn("autoit")<CR>
an 50.10.510 &Syntax.AB.Automake :cal SetSyn("automake")<CR>
an 50.10.520 &Syntax.AB.Avenue :cal SetSyn("ave")<CR>
an 50.10.530 &Syntax.AB.Awk :cal SetSyn("awk")<CR>
an 50.10.540 &Syntax.AB.AYacc :cal SetSyn("ayacc")<CR>
an 50.10.560 &Syntax.AB.B :cal SetSyn("b")<CR>
an 50.10.570 &Syntax.AB.Baan :cal SetSyn("baan")<CR>
an 50.10.580 &Syntax.AB.Basic.FreeBasic :cal SetSyn("freebasic")<CR>
an 50.10.590 &Syntax.AB.Basic.IBasic :cal SetSyn("ibasic")<CR>
an 50.10.600 &Syntax.AB.Basic.QBasic :cal SetSyn("basic")<CR>
an 50.10.610 &Syntax.AB.Basic.Visual\ Basic :cal SetSyn("vb")<CR>
an 50.10.620 &Syntax.AB.Bazaar\ commit\ file :cal SetSyn("bzr")<CR>
an 50.10.630 &Syntax.AB.BC\ calculator :cal SetSyn("bc")<CR>
an 50.10.640 &Syntax.AB.BDF\ font :cal SetSyn("bdf")<CR>
an 50.10.650 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib")<CR>
an 50.10.660 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst")<CR>
an 50.10.670 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named")<CR>
an 50.10.680 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone")<CR>
an 50.10.690 &Syntax.AB.Blank :cal SetSyn("blank")<CR>
an 50.20.100 &Syntax.C.C :cal SetSyn("c")<CR>
an 50.20.110 &Syntax.C.C++ :cal SetSyn("cpp")<CR>
an 50.20.120 &Syntax.C.C# :cal SetSyn("cs")<CR>
an 50.20.130 &Syntax.C.Cabal\ Haskell\ build\ file :cal SetSyn("cabal")<CR>
an 50.20.140 &Syntax.C.Calendar :cal SetSyn("calendar")<CR>
an 50.20.150 &Syntax.C.Cascading\ Style\ Sheets :cal SetSyn("css")<CR>
an 50.20.160 &Syntax.C.CDL :cal SetSyn("cdl")<CR>
an 50.20.170 &Syntax.C.Cdrdao\ TOC :cal SetSyn("cdrtoc")<CR>
an 50.20.180 &Syntax.C.Cdrdao\ config :cal SetSyn("cdrdaoconf")<CR>
an 50.20.190 &Syntax.C.Century\ Term :cal SetSyn("cterm")<CR>
an 50.20.200 &Syntax.C.CH\ script :cal SetSyn("ch")<CR>
an 50.20.210 &Syntax.C.ChaiScript :cal SetSyn("chaiscript")<CR>
an 50.20.220 &Syntax.C.ChangeLog :cal SetSyn("changelog")<CR>
an 50.20.230 &Syntax.C.Cheetah\ template :cal SetSyn("cheetah")<CR>
an 50.20.240 &Syntax.C.CHILL :cal SetSyn("chill")<CR>
an 50.20.250 &Syntax.C.ChordPro :cal SetSyn("chordpro")<CR>
an 50.20.260 &Syntax.C.Clean :cal SetSyn("clean")<CR>
an 50.20.270 &Syntax.C.Clever :cal SetSyn("cl")<CR>
an 50.20.280 &Syntax.C.Clipper :cal SetSyn("clipper")<CR>
an 50.20.290 &Syntax.C.Cmake :cal SetSyn("cmake")<CR>
an 50.20.300 &Syntax.C.Cmusrc :cal SetSyn("cmusrc")<CR>
an 50.20.310 &Syntax.C.Cobol :cal SetSyn("cobol")<CR>
an 50.20.320 &Syntax.C.Coco/R :cal SetSyn("coco")<CR>
an 50.20.330 &Syntax.C.Cold\ Fusion :cal SetSyn("cf")<CR>
an 50.20.340 &Syntax.C.Conary\ Recipe :cal SetSyn("conaryrecipe")<CR>
an 50.20.350 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg")<CR>
an 50.20.360 &Syntax.C.Config.Configure\.in :cal SetSyn("config")<CR>
an 50.20.370 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf")<CR>
an 50.20.380 &Syntax.C.CRM114 :cal SetSyn("crm")<CR>
an 50.20.390 &Syntax.C.Crontab :cal SetSyn("crontab")<CR>
an 50.20.400 &Syntax.C.CSP :cal SetSyn("csp")<CR>
an 50.20.410 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh")<CR>
an 50.20.420 &Syntax.C.Cucumber :cal SetSyn("cucumber")<CR>
an 50.20.430 &Syntax.C.CUDA :cal SetSyn("cuda")<CR>
an 50.20.440 &Syntax.C.CUPL.CUPL :cal SetSyn("cupl")<CR>
an 50.20.450 &Syntax.C.CUPL.Simulation :cal SetSyn("cuplsim")<CR>
an 50.20.460 &Syntax.C.CVS.commit\ file :cal SetSyn("cvs")<CR>
an 50.20.470 &Syntax.C.CVS.cvsrc :cal SetSyn("cvsrc")<CR>
an 50.20.480 &Syntax.C.Cyn++ :cal SetSyn("cynpp")<CR>
an 50.20.490 &Syntax.C.Cynlib :cal SetSyn("cynlib")<CR>
an 50.30.100 &Syntax.DE.D :cal SetSyn("d")<CR>
an 50.30.110 &Syntax.DE.Datascript :cal SetSyn("datascript")<CR>
an 50.30.120 &Syntax.DE.Debian.Debian\ ChangeLog :cal SetSyn("debchangelog")<CR>
an 50.30.130 &Syntax.DE.Debian.Debian\ Control :cal SetSyn("debcontrol")<CR>
an 50.30.140 &Syntax.DE.Debian.Debian\ Sources\.list :cal SetSyn("debsources")<CR>
an 50.30.150 &Syntax.DE.Denyhosts :cal SetSyn("denyhosts")<CR>
an 50.30.160 &Syntax.DE.Desktop :cal SetSyn("desktop")<CR>
an 50.30.170 &Syntax.DE.Dict\ config :cal SetSyn("dictconf")<CR>
an 50.30.180 &Syntax.DE.Dictd\ config :cal SetSyn("dictdconf")<CR>
an 50.30.190 &Syntax.DE.Diff :cal SetSyn("diff")<CR>
an 50.30.200 &Syntax.DE.Digital\ Command\ Lang :cal SetSyn("dcl")<CR>
an 50.30.210 &Syntax.DE.Dircolors :cal SetSyn("dircolors")<CR>
an 50.30.220 &Syntax.DE.Django\ template :cal SetSyn("django")<CR>
an 50.30.230 &Syntax.DE.DNS/BIND\ zone :cal SetSyn("bindzone")<CR>
an 50.30.240 &Syntax.DE.DocBook.auto-detect :cal SetSyn("docbk")<CR>
an 50.30.250 &Syntax.DE.DocBook.SGML :cal SetSyn("docbksgml")<CR>
an 50.30.260 &Syntax.DE.DocBook.XML :cal SetSyn("docbkxml")<CR>
an 50.30.270 &Syntax.DE.Dot :cal SetSyn("dot")<CR>
an 50.30.280 &Syntax.DE.Doxygen.C\ with\ doxygen :cal SetSyn("c.doxygen")<CR>
an 50.30.290 &Syntax.DE.Doxygen.C++\ with\ doxygen :cal SetSyn("cpp.doxygen")<CR>
an 50.30.300 &Syntax.DE.Doxygen.IDL\ with\ doxygen :cal SetSyn("idl.doxygen")<CR>
an 50.30.310 &Syntax.DE.Doxygen.Java\ with\ doxygen :cal SetSyn("java.doxygen")<CR>
an 50.30.320 &Syntax.DE.Dracula :cal SetSyn("dracula")<CR>
an 50.30.330 &Syntax.DE.DSSSL :cal SetSyn("dsl")<CR>
an 50.30.340 &Syntax.DE.DTD :cal SetSyn("dtd")<CR>
an 50.30.350 &Syntax.DE.DTML\ (Zope) :cal SetSyn("dtml")<CR>
an 50.30.360 &Syntax.DE.DTrace :cal SetSyn("dtrace")<CR>
an 50.30.370 &Syntax.DE.Dylan.Dylan :cal SetSyn("dylan")<CR>
an 50.30.380 &Syntax.DE.Dylan.Dylan\ interface :cal SetSyn("dylanintr")<CR>
an 50.30.390 &Syntax.DE.Dylan.Dylan\ lid :cal SetSyn("dylanlid")<CR>
an 50.30.410 &Syntax.DE.EDIF :cal SetSyn("edif")<CR>
an 50.30.420 &Syntax.DE.Eiffel :cal SetSyn("eiffel")<CR>
an 50.30.430 &Syntax.DE.Elinks\ config :cal SetSyn("elinks")<CR>
an 50.30.440 &Syntax.DE.Elm\ filter\ rules :cal SetSyn("elmfilt")<CR>
an 50.30.450 &Syntax.DE.Embedix\ Component\ Description :cal SetSyn("ecd")<CR>
an 50.30.460 &Syntax.DE.ERicsson\ LANGuage :cal SetSyn("erlang")<CR>
an 50.30.470 &Syntax.DE.ESMTP\ rc :cal SetSyn("esmtprc")<CR>
an 50.30.480 &Syntax.DE.ESQL-C :cal SetSyn("esqlc")<CR>
an 50.30.490 &Syntax.DE.Essbase\ script :cal SetSyn("csc")<CR>
an 50.30.500 &Syntax.DE.Esterel :cal SetSyn("esterel")<CR>
an 50.30.510 &Syntax.DE.Eterm\ config :cal SetSyn("eterm")<CR>
an 50.30.520 &Syntax.DE.Eviews :cal SetSyn("eviews")<CR>
an 50.30.530 &Syntax.DE.Exim\ conf :cal SetSyn("exim")<CR>
an 50.30.540 &Syntax.DE.Expect :cal SetSyn("expect")<CR>
an 50.30.550 &Syntax.DE.Exports :cal SetSyn("exports")<CR>
an 50.40.100 &Syntax.FG.Fantom :cal SetSyn("fan")<CR>
an 50.40.110 &Syntax.FG.Fetchmail :cal SetSyn("fetchmail")<CR>
an 50.40.120 &Syntax.FG.FlexWiki :cal SetSyn("flexwiki")<CR>
an 50.40.130 &Syntax.FG.Focus\ Executable :cal SetSyn("focexec")<CR>
an 50.40.140 &Syntax.FG.Focus\ Master :cal SetSyn("master")<CR>
an 50.40.150 &Syntax.FG.FORM :cal SetSyn("form")<CR>
an 50.40.160 &Syntax.FG.Forth :cal SetSyn("forth")<CR>
an 50.40.170 &Syntax.FG.Fortran :cal SetSyn("fortran")<CR>
an 50.40.180 &Syntax.FG.FoxPro :cal SetSyn("foxpro")<CR>
an 50.40.190 &Syntax.FG.FrameScript :cal SetSyn("framescript")<CR>
an 50.40.200 &Syntax.FG.Fstab :cal SetSyn("fstab")<CR>
an 50.40.210 &Syntax.FG.Fvwm.Fvwm\ configuration :cal SetSyn("fvwm1")<CR>
an 50.40.220 &Syntax.FG.Fvwm.Fvwm2\ configuration :cal SetSyn("fvwm2")<CR>
an 50.40.230 &Syntax.FG.Fvwm.Fvwm2\ configuration\ with\ M4 :cal SetSyn("fvwm2m4")<CR>
an 50.40.250 &Syntax.FG.GDB\ command\ file :cal SetSyn("gdb")<CR>
an 50.40.260 &Syntax.FG.GDMO :cal SetSyn("gdmo")<CR>
an 50.40.270 &Syntax.FG.Gedcom :cal SetSyn("gedcom")<CR>
an 50.40.280 &Syntax.FG.Git.Output :cal SetSyn("git")<CR>
an 50.40.290 &Syntax.FG.Git.Commit :cal SetSyn("gitcommit")<CR>
an 50.40.300 &Syntax.FG.Git.Config :cal SetSyn("gitconfig")<CR>
an 50.40.310 &Syntax.FG.Git.Rebase :cal SetSyn("gitrebase")<CR>
an 50.40.320 &Syntax.FG.Git.Send\ Email :cal SetSyn("gitsendemail")<CR>
an 50.40.330 &Syntax.FG.Gkrellmrc :cal SetSyn("gkrellmrc")<CR>
an 50.40.340 &Syntax.FG.GP :cal SetSyn("gp")<CR>
an 50.40.350 &Syntax.FG.GPG :cal SetSyn("gpg")<CR>
an 50.40.360 &Syntax.FG.Group\ file :cal SetSyn("group")<CR>
an 50.40.370 &Syntax.FG.Grub :cal SetSyn("grub")<CR>
an 50.40.380 &Syntax.FG.GNU\ Server\ Pages :cal SetSyn("gsp")<CR>
an 50.40.390 &Syntax.FG.GNUplot :cal SetSyn("gnuplot")<CR>
an 50.40.400 &Syntax.FG.GrADS\ scripts :cal SetSyn("grads")<CR>
an 50.40.410 &Syntax.FG.Gretl :cal SetSyn("gretl")<CR>
an 50.40.420 &Syntax.FG.Groff :cal SetSyn("groff")<CR>
an 50.40.430 &Syntax.FG.Groovy :cal SetSyn("groovy")<CR>
an 50.40.440 &Syntax.FG.GTKrc :cal SetSyn("gtkrc")<CR>
an 50.50.100 &Syntax.HIJK.Haml :cal SetSyn("haml")<CR>
an 50.50.110 &Syntax.HIJK.Hamster :cal SetSyn("hamster")<CR>
an 50.50.120 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell")<CR>
an 50.50.130 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell")<CR>
an 50.50.140 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell")<CR>
an 50.50.150 &Syntax.HIJK.HASTE :cal SetSyn("haste")<CR>
an 50.50.160 &Syntax.HIJK.HASTE\ preproc :cal SetSyn("hastepreproc")<CR>
an 50.50.170 &Syntax.HIJK.Hercules :cal SetSyn("hercules")<CR>
an 50.50.180 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd")<CR>
an 50.50.190 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex")<CR>
an 50.50.200 &Syntax.HIJK.HTML.HTML :cal SetSyn("html")<CR>
an 50.50.210 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4")<CR>
an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby")<CR>
an 50.50.230 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah")<CR>
an 50.50.240 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango")<CR>
an 50.50.250 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos")<CR>
an 50.50.260 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml")<CR>
an 50.50.270 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf")<CR>
an 50.50.280 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb")<CR>
an 50.50.300 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu")<CR>
an 50.50.310 &Syntax.HIJK.Icon :cal SetSyn("icon")<CR>
an 50.50.320 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl")<CR>
an 50.50.330 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl")<CR>
an 50.50.340 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent")<CR>
an 50.50.350 &Syntax.HIJK.Inform :cal SetSyn("inform")<CR>
an 50.50.360 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl")<CR>
an 50.50.370 &Syntax.HIJK.Initng :cal SetSyn("initng")<CR>
an 50.50.380 &Syntax.HIJK.Inittab :cal SetSyn("inittab")<CR>
an 50.50.390 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss")<CR>
an 50.50.400 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd")<CR>
an 50.50.410 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang")<CR>
an 50.50.420 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter")<CR>
an 50.50.440 &Syntax.HIJK.JAL :cal SetSyn("jal")<CR>
an 50.50.450 &Syntax.HIJK.JAM :cal SetSyn("jam")<CR>
an 50.50.460 &Syntax.HIJK.Jargon :cal SetSyn("jargon")<CR>
an 50.50.470 &Syntax.HIJK.Java.Java :cal SetSyn("java")<CR>
an 50.50.480 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc")<CR>
an 50.50.490 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp")<CR>
an 50.50.500 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties")<CR>
an 50.50.510 &Syntax.HIJK.JavaScript :cal SetSyn("javascript")<CR>
an 50.50.520 &Syntax.HIJK.Jess :cal SetSyn("jess")<CR>
an 50.50.530 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph")<CR>
an 50.50.550 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig")<CR>
an 50.50.560 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript")<CR>
an 50.50.570 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt")<CR>
an 50.50.580 &Syntax.HIJK.KixTart :cal SetSyn("kix")<CR>
an 50.60.100 &Syntax.L.Lace :cal SetSyn("lace")<CR>
an 50.60.110 &Syntax.L.LamdaProlog :cal SetSyn("lprolog")<CR>
an 50.60.120 &Syntax.L.Latte :cal SetSyn("latte")<CR>
an 50.60.130 &Syntax.L.Ld\ script :cal SetSyn("ld")<CR>
an 50.60.140 &Syntax.L.LDAP.LDIF :cal SetSyn("ldif")<CR>
an 50.60.150 &Syntax.L.LDAP.Configuration :cal SetSyn("ldapconf")<CR>
an 50.60.160 &Syntax.L.Lex :cal SetSyn("lex")<CR>
an 50.60.170 &Syntax.L.LFTP\ config :cal SetSyn("lftp")<CR>
an 50.60.180 &Syntax.L.Libao :cal SetSyn("libao")<CR>
an 50.60.190 &Syntax.L.LifeLines\ script :cal SetSyn("lifelines")<CR>
an 50.60.200 &Syntax.L.Lilo :cal SetSyn("lilo")<CR>
an 50.60.210 &Syntax.L.Limits\ config :cal SetSyn("limits")<CR>
an 50.60.220 &Syntax.L.Linden\ scripting :cal SetSyn("lsl")<CR>
an 50.60.230 &Syntax.L.Liquid :cal SetSyn("liquid")<CR>
an 50.60.240 &Syntax.L.Lisp :cal SetSyn("lisp")<CR>
an 50.60.250 &Syntax.L.Lite :cal SetSyn("lite")<CR>
an 50.60.260 &Syntax.L.LiteStep\ RC :cal SetSyn("litestep")<CR>
an 50.60.270 &Syntax.L.Locale\ Input :cal SetSyn("fdcc")<CR>
an 50.60.280 &Syntax.L.Login\.access :cal SetSyn("loginaccess")<CR>
an 50.60.290 &Syntax.L.Login\.defs :cal SetSyn("logindefs")<CR>
an 50.60.300 &Syntax.L.Logtalk :cal SetSyn("logtalk")<CR>
an 50.60.310 &Syntax.L.LOTOS :cal SetSyn("lotos")<CR>
an 50.60.320 &Syntax.L.LotusScript :cal SetSyn("lscript")<CR>
an 50.60.330 &Syntax.L.Lout :cal SetSyn("lout")<CR>
an 50.60.340 &Syntax.L.LPC :cal SetSyn("lpc")<CR>
an 50.60.350 &Syntax.L.Lua :cal SetSyn("lua")<CR>
an 50.60.360 &Syntax.L.Lynx\ Style :cal SetSyn("lss")<CR>
an 50.60.370 &Syntax.L.Lynx\ config :cal SetSyn("lynx")<CR>
an 50.70.100 &Syntax.M.M4 :cal SetSyn("m4")<CR>
an 50.70.110 &Syntax.M.MaGic\ Point :cal SetSyn("mgp")<CR>
an 50.70.120 &Syntax.M.Mail :cal SetSyn("mail")<CR>
an 50.70.130 &Syntax.M.Mail\ aliases :cal SetSyn("mailaliases")<CR>
an 50.70.140 &Syntax.M.Mailcap :cal SetSyn("mailcap")<CR>
an 50.70.150 &Syntax.M.Makefile :cal SetSyn("make")<CR>
an 50.70.160 &Syntax.M.MakeIndex :cal SetSyn("ist")<CR>
an 50.70.170 &Syntax.M.Man\ page :cal SetSyn("man")<CR>
an 50.70.180 &Syntax.M.Man\.conf :cal SetSyn("manconf")<CR>
an 50.70.190 &Syntax.M.Maple\ V :cal SetSyn("maple")<CR>
an 50.70.200 &Syntax.M.Markdown :cal SetSyn("markdown")<CR>
an 50.70.210 &Syntax.M.Mason :cal SetSyn("mason")<CR>
an 50.70.220 &Syntax.M.Mathematica :cal SetSyn("mma")<CR>
an 50.70.230 &Syntax.M.Matlab :cal SetSyn("matlab")<CR>
an 50.70.240 &Syntax.M.Maxima :cal SetSyn("maxima")<CR>
an 50.70.250 &Syntax.M.MEL\ (for\ Maya) :cal SetSyn("mel")<CR>
an 50.70.260 &Syntax.M.Messages\ (/var/log) :cal SetSyn("messages")<CR>
an 50.70.270 &Syntax.M.Metafont :cal SetSyn("mf")<CR>
an 50.70.280 &Syntax.M.MetaPost :cal SetSyn("mp")<CR>
an 50.70.290 &Syntax.M.MGL :cal SetSyn("mgl")<CR>
an 50.70.300 &Syntax.M.MMIX :cal SetSyn("mmix")<CR>
an 50.70.310 &Syntax.M.Modconf :cal SetSyn("modconf")<CR>
an 50.70.320 &Syntax.M.Model :cal SetSyn("model")<CR>
an 50.70.330 &Syntax.M.Modsim\ III :cal SetSyn("modsim3")<CR>
an 50.70.340 &Syntax.M.Modula\ 2 :cal SetSyn("modula2")<CR>
an 50.70.350 &Syntax.M.Modula\ 3 :cal SetSyn("modula3")<CR>
an 50.70.360 &Syntax.M.Monk :cal SetSyn("monk")<CR>
an 50.70.370 &Syntax.M.Mplayer\ config :cal SetSyn("mplayerconf")<CR>
an 50.70.380 &Syntax.M.MOO :cal SetSyn("moo")<CR>
an 50.70.390 &Syntax.M.Mrxvtrc :cal SetSyn("mrxvtrc")<CR>
an 50.70.400 &Syntax.M.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm")<CR>
an 50.70.410 &Syntax.M.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch")<CR>
an 50.70.420 &Syntax.M.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini")<CR>
an 50.70.430 &Syntax.M.MS-DOS/Windows.Message\ text :cal SetSyn("msmessages")<CR>
an 50.70.440 &Syntax.M.MS-DOS/Windows.Module\ Definition :cal SetSyn("def")<CR>
an 50.70.450 &Syntax.M.MS-DOS/Windows.Registry :cal SetSyn("registry")<CR>
an 50.70.460 &Syntax.M.MS-DOS/Windows.Resource\ file :cal SetSyn("rc")<CR>
an 50.70.470 &Syntax.M.Msql :cal SetSyn("msql")<CR>
an 50.70.480 &Syntax.M.MuPAD :cal SetSyn("mupad")<CR>
an 50.70.490 &Syntax.M.MUSHcode :cal SetSyn("mush")<CR>
an 50.70.500 &Syntax.M.Muttrc :cal SetSyn("muttrc")<CR>
an 50.80.100 &Syntax.NO.Nanorc :cal SetSyn("nanorc")<CR>
an 50.80.110 &Syntax.NO.Nastran\ input/DMAP :cal SetSyn("nastran")<CR>
an 50.80.120 &Syntax.NO.Natural :cal SetSyn("natural")<CR>
an 50.80.130 &Syntax.NO.Netrc :cal SetSyn("netrc")<CR>
an 50.80.140 &Syntax.NO.Novell\ NCF\ batch :cal SetSyn("ncf")<CR>
an 50.80.150 &Syntax.NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc")<CR>
an 50.80.160 &Syntax.NO.Nroff :cal SetSyn("nroff")<CR>
an 50.80.170 &Syntax.NO.NSIS\ script :cal SetSyn("nsis")<CR>
an 50.80.190 &Syntax.NO.Obj\ 3D\ wavefront :cal SetSyn("obj")<CR>
an 50.80.200 &Syntax.NO.Objective\ C :cal SetSyn("objc")<CR>
an 50.80.210 &Syntax.NO.Objective\ C++ :cal SetSyn("objcpp")<CR>
an 50.80.220 &Syntax.NO.OCAML :cal SetSyn("ocaml")<CR>
an 50.80.230 &Syntax.NO.Occam :cal SetSyn("occam")<CR>
an 50.80.240 &Syntax.NO.Omnimark :cal SetSyn("omnimark")<CR>
an 50.80.250 &Syntax.NO.OpenROAD :cal SetSyn("openroad")<CR>
an 50.80.260 &Syntax.NO.Open\ Psion\ Lang :cal SetSyn("opl")<CR>
an 50.80.270 &Syntax.NO.Oracle\ config :cal SetSyn("ora")<CR>
an 50.90.100 &Syntax.PQ.Packet\ filter\ conf :cal SetSyn("pf")<CR>
an 50.90.110 &Syntax.PQ.Palm\ resource\ compiler :cal SetSyn("pilrc")<CR>
an 50.90.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf")<CR>
an 50.90.130 &Syntax.PQ.PApp :cal SetSyn("papp")<CR>
an 50.90.140 &Syntax.PQ.Pascal :cal SetSyn("pascal")<CR>
an 50.90.150 &Syntax.PQ.Password\ file :cal SetSyn("passwd")<CR>
an 50.90.160 &Syntax.PQ.PCCTS :cal SetSyn("pccts")<CR>
an 50.90.170 &Syntax.PQ.PDF :cal SetSyn("pdf")<CR>
an 50.90.180 &Syntax.PQ.Perl.Perl :cal SetSyn("perl")<CR>
an 50.90.190 &Syntax.PQ.Perl.Perl\ 6 :cal SetSyn("perl6")<CR>
an 50.90.200 &Syntax.PQ.Perl.Perl\ POD :cal SetSyn("pod")<CR>
an 50.90.210 &Syntax.PQ.Perl.Perl\ XS :cal SetSyn("xs")<CR>
an 50.90.220 &Syntax.PQ.PHP.PHP\ 3-4 :cal SetSyn("php")<CR>
an 50.90.230 &Syntax.PQ.PHP.Phtml\ (PHP\ 2) :cal SetSyn("phtml")<CR>
an 50.90.240 &Syntax.PQ.Pike :cal SetSyn("pike")<CR>
an 50.90.250 &Syntax.PQ.Pine\ RC :cal SetSyn("pine")<CR>
an 50.90.260 &Syntax.PQ.Pinfo\ RC :cal SetSyn("pinfo")<CR>
an 50.90.270 &Syntax.PQ.PL/M :cal SetSyn("plm")<CR>
an 50.90.280 &Syntax.PQ.PL/SQL :cal SetSyn("plsql")<CR>
an 50.90.290 &Syntax.PQ.PLP :cal SetSyn("plp")<CR>
an 50.90.300 &Syntax.PQ.PO\ (GNU\ gettext) :cal SetSyn("po")<CR>
an 50.90.310 &Syntax.PQ.Postfix\ main\ config :cal SetSyn("pfmain")<CR>
an 50.90.320 &Syntax.PQ.PostScript.PostScript :cal SetSyn("postscr")<CR>
an 50.90.330 &Syntax.PQ.PostScript.PostScript\ Printer\ Description :cal SetSyn("ppd")<CR>
an 50.90.340 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov")<CR>
an 50.90.350 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini")<CR>
an 50.90.360 &Syntax.PQ.PPWizard :cal SetSyn("ppwiz")<CR>
an 50.90.370 &Syntax.PQ.Prescribe\ (Kyocera) :cal SetSyn("prescribe")<CR>
an 50.90.380 &Syntax.PQ.Printcap :cal SetSyn("pcap")<CR>
an 50.90.390 &Syntax.PQ.Privoxy :cal SetSyn("privoxy")<CR>
an 50.90.400 &Syntax.PQ.Procmail :cal SetSyn("procmail")<CR>
an 50.90.410 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf")<CR>
an 50.90.420 &Syntax.PQ.Progress :cal SetSyn("progress")<CR>
an 50.90.430 &Syntax.PQ.Prolog :cal SetSyn("prolog")<CR>
an 50.90.440 &Syntax.PQ.ProMeLa :cal SetSyn("promela")<CR>
an 50.90.450 &Syntax.PQ.Protocols :cal SetSyn("protocols")<CR>
an 50.90.460 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog")<CR>
an 50.90.470 &Syntax.PQ.Pyrex :cal SetSyn("pyrex")<CR>
an 50.90.480 &Syntax.PQ.Python :cal SetSyn("python")<CR>
an 50.90.500 &Syntax.PQ.Quake :cal SetSyn("quake")<CR>
an 50.90.510 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf")<CR>
an 50.100.100 &Syntax.R.R.R :cal SetSyn("r")<CR>
an 50.100.110 &Syntax.R.R.R\ help :cal SetSyn("rhelp")<CR>
an 50.100.120 &Syntax.R.R.R\ noweb :cal SetSyn("rnoweb")<CR>
an 50.100.130 &Syntax.R.Racc\ input :cal SetSyn("racc")<CR>
an 50.100.140 &Syntax.R.Radiance :cal SetSyn("radiance")<CR>
an 50.100.150 &Syntax.R.Ratpoison :cal SetSyn("ratpoison")<CR>
an 50.100.160 &Syntax.R.RCS.RCS\ log\ output :cal SetSyn("rcslog")<CR>
an 50.100.170 &Syntax.R.RCS.RCS\ file :cal SetSyn("rcs")<CR>
an 50.100.180 &Syntax.R.Readline\ config :cal SetSyn("readline")<CR>
an 50.100.190 &Syntax.R.Rebol :cal SetSyn("rebol")<CR>
an 50.100.200 &Syntax.R.Remind :cal SetSyn("remind")<CR>
an 50.100.210 &Syntax.R.Relax\ NG\ compact :cal SetSyn("rnc")<CR>
an 50.100.220 &Syntax.R.Renderman.Renderman\ Shader\ Lang :cal SetSyn("sl")<CR>
an 50.100.230 &Syntax.R.Renderman.Renderman\ Interface\ Bytestream :cal SetSyn("rib")<CR>
an 50.100.240 &Syntax.R.Resolv\.conf :cal SetSyn("resolv")<CR>
an 50.100.250 &Syntax.R.Reva\ Forth :cal SetSyn("reva")<CR>
an 50.100.260 &Syntax.R.Rexx :cal SetSyn("rexx")<CR>
an 50.100.270 &Syntax.R.Robots\.txt :cal SetSyn("robots")<CR>
an 50.100.280 &Syntax.R.RockLinux\ package\ desc\. :cal SetSyn("desc")<CR>
an 50.100.290 &Syntax.R.Rpcgen :cal SetSyn("rpcgen")<CR>
an 50.100.300 &Syntax.R.RPL/2 :cal SetSyn("rpl")<CR>
an 50.100.310 &Syntax.R.ReStructuredText :cal SetSyn("rst")<CR>
an 50.100.320 &Syntax.R.RTF :cal SetSyn("rtf")<CR>
an 50.100.330 &Syntax.R.Ruby :cal SetSyn("ruby")<CR>
an 50.110.100 &Syntax.S-Sm.S-Lang :cal SetSyn("slang")<CR>
an 50.110.110 &Syntax.S-Sm.Samba\ config :cal SetSyn("samba")<CR>
an 50.110.120 &Syntax.S-Sm.SAS :cal SetSyn("sas")<CR>
an 50.110.130 &Syntax.S-Sm.Sass :cal SetSyn("sass")<CR>
an 50.110.140 &Syntax.S-Sm.Sather :cal SetSyn("sather")<CR>
an 50.110.150 &Syntax.S-Sm.Scheme :cal SetSyn("scheme")<CR>
an 50.110.160 &Syntax.S-Sm.Scilab :cal SetSyn("scilab")<CR>
an 50.110.170 &Syntax.S-Sm.Screen\ RC :cal SetSyn("screen")<CR>
an 50.110.180 &Syntax.S-Sm.SCSS :cal SetSyn("scss")<CR>
an 50.110.190 &Syntax.S-Sm.SDC\ Synopsys\ Design\ Constraints :cal SetSyn("sdc")<CR>
an 50.110.200 &Syntax.S-Sm.SDL :cal SetSyn("sdl")<CR>
an 50.110.210 &Syntax.S-Sm.Sed :cal SetSyn("sed")<CR>
an 50.110.220 &Syntax.S-Sm.Sendmail\.cf :cal SetSyn("sm")<CR>
an 50.110.230 &Syntax.S-Sm.Send-pr :cal SetSyn("sendpr")<CR>
an 50.110.240 &Syntax.S-Sm.Sensors\.conf :cal SetSyn("sensors")<CR>
an 50.110.250 &Syntax.S-Sm.Service\ Location\ config :cal SetSyn("slpconf")<CR>
an 50.110.260 &Syntax.S-Sm.Service\ Location\ registration :cal SetSyn("slpreg")<CR>
an 50.110.270 &Syntax.S-Sm.Service\ Location\ SPI :cal SetSyn("slpspi")<CR>
an 50.110.280 &Syntax.S-Sm.Services :cal SetSyn("services")<CR>
an 50.110.290 &Syntax.S-Sm.Setserial\ config :cal SetSyn("setserial")<CR>
an 50.110.300 &Syntax.S-Sm.SGML.SGML\ catalog :cal SetSyn("catalog")<CR>
an 50.110.310 &Syntax.S-Sm.SGML.SGML\ DTD :cal SetSyn("sgml")<CR>
an 50.110.320 &Syntax.S-Sm.SGML.SGML\ Declaration :cal SetSyn("sgmldecl")<CR>
an 50.110.330 &Syntax.S-Sm.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx")<CR>
an 50.110.340 &Syntax.S-Sm.Shell\ script.sh\ and\ ksh :cal SetSyn("sh")<CR>
an 50.110.350 &Syntax.S-Sm.Shell\ script.csh :cal SetSyn("csh")<CR>
an 50.110.360 &Syntax.S-Sm.Shell\ script.tcsh :cal SetSyn("tcsh")<CR>
an 50.110.370 &Syntax.S-Sm.Shell\ script.zsh :cal SetSyn("zsh")<CR>
an 50.110.380 &Syntax.S-Sm.SiCAD :cal SetSyn("sicad")<CR>
an 50.110.390 &Syntax.S-Sm.Sieve :cal SetSyn("sieve")<CR>
an 50.110.400 &Syntax.S-Sm.Simula :cal SetSyn("simula")<CR>
an 50.110.410 &Syntax.S-Sm.Sinda.Sinda\ compare :cal SetSyn("sindacmp")<CR>
an 50.110.420 &Syntax.S-Sm.Sinda.Sinda\ input :cal SetSyn("sinda")<CR>
an 50.110.430 &Syntax.S-Sm.Sinda.Sinda\ output :cal SetSyn("sindaout")<CR>
an 50.110.440 &Syntax.S-Sm.SiSU :cal SetSyn("sisu")<CR>
an 50.110.450 &Syntax.S-Sm.SKILL.SKILL :cal SetSyn("skill")<CR>
an 50.110.460 &Syntax.S-Sm.SKILL.SKILL\ for\ Diva :cal SetSyn("diva")<CR>
an 50.110.470 &Syntax.S-Sm.Slice :cal SetSyn("slice")<CR>
an 50.110.480 &Syntax.S-Sm.SLRN.Slrn\ rc :cal SetSyn("slrnrc")<CR>
an 50.110.490 &Syntax.S-Sm.SLRN.Slrn\ score :cal SetSyn("slrnsc")<CR>
an 50.110.500 &Syntax.S-Sm.SmallTalk :cal SetSyn("st")<CR>
an 50.110.510 &Syntax.S-Sm.Smarty\ Templates :cal SetSyn("smarty")<CR>
an 50.110.520 &Syntax.S-Sm.SMIL :cal SetSyn("smil")<CR>
an 50.110.530 &Syntax.S-Sm.SMITH :cal SetSyn("smith")<CR>
an 50.120.100 &Syntax.Sn-Sy.SNMP\ MIB :cal SetSyn("mib")<CR>
an 50.120.110 &Syntax.Sn-Sy.SNNS.SNNS\ network :cal SetSyn("snnsnet")<CR>
an 50.120.120 &Syntax.Sn-Sy.SNNS.SNNS\ pattern :cal SetSyn("snnspat")<CR>
an 50.120.130 &Syntax.Sn-Sy.SNNS.SNNS\ result :cal SetSyn("snnsres")<CR>
an 50.120.140 &Syntax.Sn-Sy.Snobol4 :cal SetSyn("snobol4")<CR>
an 50.120.150 &Syntax.Sn-Sy.Snort\ Configuration :cal SetSyn("hog")<CR>
an 50.120.160 &Syntax.Sn-Sy.SPEC\ (Linux\ RPM) :cal SetSyn("spec")<CR>
an 50.120.170 &Syntax.Sn-Sy.Specman :cal SetSyn("specman")<CR>
an 50.120.180 &Syntax.Sn-Sy.Spice :cal SetSyn("spice")<CR>
an 50.120.190 &Syntax.Sn-Sy.Spyce :cal SetSyn("spyce")<CR>
an 50.120.200 &Syntax.Sn-Sy.Speedup :cal SetSyn("spup")<CR>
an 50.120.210 &Syntax.Sn-Sy.Splint :cal SetSyn("splint")<CR>
an 50.120.220 &Syntax.Sn-Sy.Squid\ config :cal SetSyn("squid")<CR>
an 50.120.230 &Syntax.Sn-Sy.SQL.ESQL-C :cal SetSyn("esqlc")<CR>
an 50.120.240 &Syntax.Sn-Sy.SQL.MySQL :cal SetSyn("mysql")<CR>
an 50.120.250 &Syntax.Sn-Sy.SQL.PL/SQL :cal SetSyn("plsql")<CR>
an 50.120.260 &Syntax.Sn-Sy.SQL.SQL\ Anywhere :cal SetSyn("sqlanywhere")<CR>
an 50.120.270 &Syntax.Sn-Sy.SQL.SQL\ (automatic) :cal SetSyn("sql")<CR>
an 50.120.280 &Syntax.Sn-Sy.SQL.SQL\ (Oracle) :cal SetSyn("sqloracle")<CR>
an 50.120.290 &Syntax.Sn-Sy.SQL.SQL\ Forms :cal SetSyn("sqlforms")<CR>
an 50.120.300 &Syntax.Sn-Sy.SQL.SQLJ :cal SetSyn("sqlj")<CR>
an 50.120.310 &Syntax.Sn-Sy.SQL.SQL-Informix :cal SetSyn("sqlinformix")<CR>
an 50.120.320 &Syntax.Sn-Sy.SQR :cal SetSyn("sqr")<CR>
an 50.120.330 &Syntax.Sn-Sy.Ssh.ssh_config :cal SetSyn("sshconfig")<CR>
an 50.120.340 &Syntax.Sn-Sy.Ssh.sshd_config :cal SetSyn("sshdconfig")<CR>
an 50.120.350 &Syntax.Sn-Sy.Standard\ ML :cal SetSyn("sml")<CR>
an 50.120.360 &Syntax.Sn-Sy.Stata.SMCL :cal SetSyn("smcl")<CR>
an 50.120.370 &Syntax.Sn-Sy.Stata.Stata :cal SetSyn("stata")<CR>
an 50.120.380 &Syntax.Sn-Sy.Stored\ Procedures :cal SetSyn("stp")<CR>
an 50.120.390 &Syntax.Sn-Sy.Strace :cal SetSyn("strace")<CR>
an 50.120.400 &Syntax.Sn-Sy.Streaming\ descriptor\ file :cal SetSyn("sd")<CR>
an 50.120.410 &Syntax.Sn-Sy.Subversion\ commit :cal SetSyn("svn")<CR>
an 50.120.420 &Syntax.Sn-Sy.Sudoers :cal SetSyn("sudoers")<CR>
an 50.120.430 &Syntax.Sn-Sy.SVG :cal SetSyn("svg")<CR>
an 50.120.440 &Syntax.Sn-Sy.Symbian\ meta-makefile :cal SetSyn("mmp")<CR>
an 50.120.450 &Syntax.Sn-Sy.Sysctl\.conf :cal SetSyn("sysctl")<CR>
an 50.130.100 &Syntax.T.TADS :cal SetSyn("tads")<CR>
an 50.130.110 &Syntax.T.Tags :cal SetSyn("tags")<CR>
an 50.130.120 &Syntax.T.TAK.TAK\ compare :cal SetSyn("takcmp")<CR>
an 50.130.130 &Syntax.T.TAK.TAK\ input :cal SetSyn("tak")<CR>
an 50.130.140 &Syntax.T.TAK.TAK\ output :cal SetSyn("takout")<CR>
an 50.130.150 &Syntax.T.Task\ data :cal SetSyn("taskdata")<CR>
an 50.130.160 &Syntax.T.Task\ 42\ edit :cal SetSyn("taskedit")<CR>
an 50.130.170 &Syntax.T.Tcl/Tk :cal SetSyn("tcl")<CR>
an 50.130.180 &Syntax.T.TealInfo :cal SetSyn("tli")<CR>
an 50.130.190 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt")<CR>
an 50.130.200 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap")<CR>
an 50.130.210 &Syntax.T.Terminfo :cal SetSyn("terminfo")<CR>
an 50.130.220 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")<CR>
an 50.130.230 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")<CR>
an 50.130.240 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")<CR>
an 50.130.250 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")<CR>
an 50.130.260 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")<CR>
an 50.130.270 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")<CR>
an 50.130.280 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")<CR>
an 50.130.290 &Syntax.T.Tilde :cal SetSyn("tilde")<CR>
an 50.130.300 &Syntax.T.TPP :cal SetSyn("tpp")<CR>
an 50.130.310 &Syntax.T.Trasys\ input :cal SetSyn("trasys")<CR>
an 50.130.320 &Syntax.T.Trustees :cal SetSyn("trustees")<CR>
an 50.130.330 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")<CR>
an 50.130.340 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")<CR>
an 50.130.350 &Syntax.T.TSS.Optics :cal SetSyn("tssop")<CR>
an 50.140.100 &Syntax.UV.Udev\ config :cal SetSyn("udevconf")<CR>
an 50.140.110 &Syntax.UV.Udev\ permissions :cal SetSyn("udevperm")<CR>
an 50.140.120 &Syntax.UV.Udev\ rules :cal SetSyn("udevrules")<CR>
an 50.140.130 &Syntax.UV.UIT/UIL :cal SetSyn("uil")<CR>
an 50.140.140 &Syntax.UV.UnrealScript :cal SetSyn("uc")<CR>
an 50.140.150 &Syntax.UV.Updatedb\.conf :cal SetSyn("updatedb")<CR>
an 50.140.170 &Syntax.UV.Valgrind :cal SetSyn("valgrind")<CR>
an 50.140.180 &Syntax.UV.Vera :cal SetSyn("vera")<CR>
an 50.140.190 &Syntax.UV.Verilog-AMS\ HDL :cal SetSyn("verilogams")<CR>
an 50.140.200 &Syntax.UV.Verilog\ HDL :cal SetSyn("verilog")<CR>
an 50.140.210 &Syntax.UV.Vgrindefs :cal SetSyn("vgrindefs")<CR>
an 50.140.220 &Syntax.UV.VHDL :cal SetSyn("vhdl")<CR>
an 50.140.230 &Syntax.UV.Vim.Vim\ help\ file :cal SetSyn("help")<CR>
an 50.140.240 &Syntax.UV.Vim.Vim\ script :cal SetSyn("vim")<CR>
an 50.140.250 &Syntax.UV.Vim.Viminfo\ file :cal SetSyn("viminfo")<CR>
an 50.140.260 &Syntax.UV.Virata\ config :cal SetSyn("virata")<CR>
an 50.140.270 &Syntax.UV.Visual\ Basic :cal SetSyn("vb")<CR>
an 50.140.280 &Syntax.UV.VOS\ CM\ macro :cal SetSyn("voscm")<CR>
an 50.140.290 &Syntax.UV.VRML :cal SetSyn("vrml")<CR>
an 50.140.300 &Syntax.UV.VSE\ JCL :cal SetSyn("vsejcl")<CR>
an 50.150.100 &Syntax.WXYZ.WEB.CWEB :cal SetSyn("cweb")<CR>
an 50.150.110 &Syntax.WXYZ.WEB.WEB :cal SetSyn("web")<CR>
an 50.150.120 &Syntax.WXYZ.WEB.WEB\ Changes :cal SetSyn("change")<CR>
an 50.150.130 &Syntax.WXYZ.Webmacro :cal SetSyn("webmacro")<CR>
an 50.150.140 &Syntax.WXYZ.Website\ MetaLanguage :cal SetSyn("wml")<CR>
an 50.150.160 &Syntax.WXYZ.wDiff :cal SetSyn("wdiff")<CR>
an 50.150.180 &Syntax.WXYZ.Wget\ config :cal SetSyn("wget")<CR>
an 50.150.190 &Syntax.WXYZ.Whitespace\ (add) :cal SetSyn("whitespace")<CR>
an 50.150.200 &Syntax.WXYZ.WildPackets\ EtherPeek\ Decoder :cal SetSyn("dcd")<CR>
an 50.150.210 &Syntax.WXYZ.WinBatch/Webbatch :cal SetSyn("winbatch")<CR>
an 50.150.220 &Syntax.WXYZ.Windows\ Scripting\ Host :cal SetSyn("wsh")<CR>
an 50.150.230 &Syntax.WXYZ.WSML :cal SetSyn("wsml")<CR>
an 50.150.240 &Syntax.WXYZ.WvDial :cal SetSyn("wvdial")<CR>
an 50.150.260 &Syntax.WXYZ.X\ Keyboard\ Extension :cal SetSyn("xkb")<CR>
an 50.150.270 &Syntax.WXYZ.X\ Pixmap :cal SetSyn("xpm")<CR>
an 50.150.280 &Syntax.WXYZ.X\ Pixmap\ (2) :cal SetSyn("xpm2")<CR>
an 50.150.290 &Syntax.WXYZ.X\ resources :cal SetSyn("xdefaults")<CR>
an 50.150.300 &Syntax.WXYZ.XBL :cal SetSyn("xbl")<CR>
an 50.150.310 &Syntax.WXYZ.Xinetd\.conf :cal SetSyn("xinetd")<CR>
an 50.150.320 &Syntax.WXYZ.Xmodmap :cal SetSyn("xmodmap")<CR>
an 50.150.330 &Syntax.WXYZ.Xmath :cal SetSyn("xmath")<CR>
an 50.150.340 &Syntax.WXYZ.XML :cal SetSyn("xml")<CR>
an 50.150.350 &Syntax.WXYZ.XML\ Schema\ (XSD) :cal SetSyn("xsd")<CR>
an 50.150.360 &Syntax.WXYZ.XQuery :cal SetSyn("xquery")<CR>
an 50.150.370 &Syntax.WXYZ.Xslt :cal SetSyn("xslt")<CR>
an 50.150.380 &Syntax.WXYZ.XFree86\ Config :cal SetSyn("xf86conf")<CR>
an 50.150.400 &Syntax.WXYZ.YAML :cal SetSyn("yaml")<CR>
an 50.150.410 &Syntax.WXYZ.Yacc :cal SetSyn("yacc")<CR>
" The End Of The Syntax Menu
an 50.195 &Syntax.-SEP1- <Nop>
an <silent> 50.200 &Syntax.Set\ '&syntax'\ only :call <SID>Setsynonly()<CR>
fun! s:Setsynonly()
let s:syntax_menu_synonly = 1
endfun
an <silent> 50.202 &Syntax.Set\ '&filetype'\ too :call <SID>Nosynonly()<CR>
fun! s:Nosynonly()
if exists("s:syntax_menu_synonly")
unlet s:syntax_menu_synonly
endif
endfun
" Restore 'cpoptions'
let &cpo = s:cpo_save
unlet s:cpo_save

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,153 +0,0 @@
" Vim ABAP syntax file
" Language: SAP - ABAP/R4
" Revision: 1.0
" Maintainer: Marius Piedallu van Wyk <marius@e.co.za>
" Last Change: 2006 Apr 13
" For version < 6.0: Clear all syntax items
" For version >= 6.0: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Always ignore case
syn case ignore
" Symbol Operators
syn match abapSymbolOperator "[+\-/=<>$]"
syn match abapSymbolOperator "\*"
syn match abapSymbolOperator "[<>]="
syn match abapSymbolOperator "<>"
syn match abapSymbolOperator "\*\*"
syn match abapSymbolOperator "[()]"
syn match abapSymbolOperator "[:,\.]"
" Literals
syn region abapString matchgroup=abapString start="'" end="'" contains=abapStringEscape
syn match abapStringEscape contained "''"
syn match abapNumber "-\=\<\d\+\>"
syn region abapHex matchgroup=abapHex start="X'" end="'"
if version >= 600
setlocal iskeyword=-,48-57,_,A-Z,a-z
else
set iskeyword=-,48-57,_,A-Z,a-z
endif
" ABAP statements
syn keyword abapStatement ADD ADD-CORRESPONDING ASSIGN AT AUTHORITY-CHECK
syn keyword abapStatement BACK BREAK-POINT
syn keyword abapStatement CALL CASE CHECK CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY
syn keyword abapStatement DATA DEFINE DELETE DESCRIBE DETAIL DIVIDE DIVIDE-CORRESPONDING DO
syn keyword abapStatement EDITOR-CALL ELSE ELSEIF END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENDAT ENDCASE ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDLOOP ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDWHILE EXEC EXPORT EXPORTING EXTRACT
syn keyword abapStatement FETCH FIELD-GROUPS FIELD-SYMBOLS FIELDS FORM FORMAT FREE FUNCTION FUNCTION-POOL
syn keyword abapStatement GENERATE GET
syn keyword abapStatement HIDE
syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INPUT INSERT
syn keyword abapStatement LEAVE LIKE LOAD LOCAL LOOP
syn keyword abapStatement MESSAGE MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDING
syn keyword abapStatement NEW-LINE NEW-PAGE NEW-SECTION
syn keyword abapStatement ON OVERLAY
syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PRINT-CONTROL PROGRAM PROVIDE PUT
syn keyword abapStatement RAISE RANGES READ RECEIVE REFRESH REJECT REPLACE REPORT RESERVE RESTORE ROLLBACK RP-PROVIDE-FROM-LAST
syn keyword abapStatement SCAN SCROLL SEARCH SELECT SELECT-OPTIONS SELECTION-SCREEN SET SHIFT SKIP SORT SPLIT START-OF-SELECTION STATICS STOP SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUM SUMMARY SUPPRESS SYNTAX-CHECK SYNTAX-TRACE
syn keyword abapStatement TABLES TOP-OF-PAGE TRANSFER TRANSLATE TYPE TYPE-POOL TYPE-POOLS TYPES
syn keyword abapStatement UNPACK UPDATE
syn keyword abapStatement WHEN WHILE WINDOW WRITE
" More statemets
syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY
syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR
syn keyword abapStatement LINE-SIZE LINE-COUNT MESSAGE-ID
syn keyword abapStatement CHANGING EXCEPTIONS DEFAULT CHECKBOX COMMENT
syn keyword abapStatement ID NUMBER FOR DISPLAY-MODE TITLE OUTPUT
" More multi-word statements
syn match abapStatement "\(\W\|^\)\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)NO\W\+STANDARD\W\+PAGE\W\+HEADING\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)IS\W\+INITIAL\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)NO\W\+INTERVALS\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)SEPARATED\W\+BY\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)\(USING\W\+\(EDIT\W\+MASK\)\|USING\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)\(WHERE\W\+\(LINE\)\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)RADIOBUTTON\W\+GROUP\(\W\|$\)"ms=s+1,me=e-1
syn match abapStatement "\(\W\|^\)REF\W\+TO\(\W\|$\)"ms=s+1,me=e-1
" Special ABAP specific tables:
syn match abapSpecial "\(\W\|^\)\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)\(\W\|$\)"ms=s+1,me=e-1
syn match abapSpecialTables "\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained
syn match abapSpecial "\(\W\|^\)\w\+-\(\w\+-\w\+\|\w\+\)"ms=s+1 contains=abapSpecialTables
" Pointer
syn match abapSpecial "<\w\+>"
" Abap constants:
syn keyword abapSpecial TRUE FALSE NULL SPACE
" Includes
syn region abapInclude start="include" end="." contains=abapComment
" Types
syn keyword abapTypes c n i p f d t x
" Atritmitic operators
syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan
syn keyword abapOperator cosh sinh tanh exp log log10 sqrt
" String operators
syn keyword abapOperator strlen xstrlen charlen numofchar dbmaxlen
" Table operators
syn keyword abapOperator lines
" Table operators (SELECT operators)
syn keyword abapOperator INTO FROM WHERE GROUP BY HAVING ORDER BY SINGLE
syn keyword abapOperator APPENDING CORRESPONDING FIELDS OF TABLE
syn keyword abapOperator LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING
syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN
" An error? Not strictly... but cannot think of reason this is intended.
syn match abapError "\.\."
" Comments
syn region abapComment start="^\*" end="$" contains=abapTodo
syn match abapComment "\".*" contains=abapTodo
syn keyword abapTodo contained TODO NOTE
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_abap_syntax_inits")
if version < 508
let did_abap_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink abapError Error
HiLink abapComment Comment
HiLink abapInclude Include
HiLink abapSpecial Special
HiLink abapSpecialTables PreProc
HiLink abapSymbolOperator abapOperator
HiLink abapOperator Operator
HiLink abapStatement Statement
HiLink abapString String
HiLink abapFloat Float
HiLink abapNumber Number
HiLink abapHex Number
delcommand HiLink
endif
let b:current_syntax = "abap"
" vim: ts=8 sw=2

Просмотреть файл

@ -1,282 +0,0 @@
" Vim syntax file
" Language: Cascading Style Sheets
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/css.vim
" Last Change: 2010 Jul 28
" CSS2 by Nikolai Weibull
" Full CSS2, HTML4 support by Yeti
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'css'
endif
syn case ignore
syn keyword cssTagName abbr acronym address applet area a b base
syn keyword cssTagName basefont bdo big blockquote body br button
syn keyword cssTagName caption center cite code col colgroup dd del
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
syn keyword cssTagName iframe img input ins isindex kbd label legend li
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
syn keyword cssTagName option p param pre q s samp script select small
syn keyword cssTagName span strike strong style sub sup tbody td
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
syn match cssTagName "\<table\>"
syn match cssTagName "\*"
syn match cssTagName "@page\>" nextgroup=cssDefinition
syn match cssSelectorOp "[+>.]"
syn match cssSelectorOp2 "[~|]\?=" contained
syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
try
syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
catch /^.*/
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
endtry
syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl
syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl
syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl
syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier
syn match cssValueInteger contained "[-+]\=\d\+"
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\="
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)"
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)"
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)"
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)"
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr
syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
syn keyword cssFontDescriptorAttr contained all
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
syn match cssUnicodeRange contained "U+\x\+-\x\+"
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
" FIXME: These are actually case-insentivie too, but (a) specs recommend using
" mixed-case (b) it's hard to highlight the word `Background' correctly in
" all situations
syn case match
syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
syn case ignore
syn match cssColor contained "\<transparent\>"
syn match cssColor contained "\<white\>"
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>"
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>"
"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)"
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend
syn match cssImportant contained "!\s*important\>"
syn keyword cssCommonAttr contained auto none inherit
syn keyword cssCommonAttr contained top bottom
syn keyword cssCommonAttr contained medium normal
syn match cssFontProp contained "\<font\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\)\=\>"
syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
syn match cssFontAttr contained "\<small\(-\(caps\|caption\)\)\=\>"
syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
syn match cssFontAttr contained "\<message-box\>"
syn match cssFontAttr contained "\<status-bar\>"
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>"
syn keyword cssFontAttr contained cursive fantasy monospace italic oblique
syn keyword cssFontAttr contained bold bolder lighter larger smaller
syn keyword cssFontAttr contained icon menu
syn match cssFontAttr contained "\<caption\>"
syn keyword cssFontAttr contained large smaller larger
syn keyword cssFontAttr contained narrower wider
syn keyword cssColorProp contained color
syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=\>"
syn keyword cssColorAttr contained center scroll fixed
syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
syn match cssColorAttr contained "\<no-repeat\>"
syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
syn match cssTextAttr contained "\<line-through\>"
syn match cssTextAttr contained "\<text-indent\>"
syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
syn keyword cssTextAttr contained underline overline blink sub super middle
syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super
syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>"
syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>"
syn match cssBoxProp contained "\<\(width\|z-index\)\>"
syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>"
syn keyword cssBoxProp contained width height float clear overflow clip visibility
syn keyword cssBoxAttr contained thin thick both
syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset
syn keyword cssBoxAttr contained hidden visible scroll collapse
syn keyword cssGeneratedContentProp contained content quotes
syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
syn match cssAuralAttr contained "\<lower\>"
syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian
syn keyword cssGeneratedContentAttr contained inside outside
syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
syn keyword cssPagingProp contained size marks inside orphans widows
syn keyword cssPagingAttr contained landscape portrait crop cross always avoid
syn keyword cssUIProp contained cursor
syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>"
syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>"
syn keyword cssUIAttr contained default crosshair pointer move wait help
syn keyword cssUIAttr contained thin thick
syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset
syn keyword cssUIAttr contained invert
syn match cssRenderAttr contained "\<marker\>"
syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>"
syn keyword cssRenderProp contained position top bottom direction
syn match cssRenderProp contained "\<\(left\|right\)\>"
syn keyword cssRenderAttr contained block inline compact
syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
syn keyword cssRenderAttr contained static relative absolute fixed
syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap
syn match cssRenderAttr contained "\<bidi-override\>"
syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>"
syn keyword cssAuralProp contained volume during azimuth elevation stress richness
syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
syn keyword cssAuralAttr contained silent
syn match cssAuralAttr contained "\<spell-out\>"
syn keyword cssAuralAttr contained non mix
syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
syn keyword cssAuralAttr contained leftwards rightwards behind
syn keyword cssAuralAttr contained below level above higher
syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>"
syn keyword cssAuralAttr contained faster slower
syn keyword cssAuralAttr contained male female child code digits continuous
syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>"
syn keyword cssTableAttr contained fixed collapse separate show hide once always
" FIXME: This allows cssMediaBlock before the semicolon, which is wrong.
syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
syn match cssBraces contained "[{}]"
syn match cssError contained "{@<>"
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape
syn match cssBraceError "}"
syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape
syn keyword cssPseudoClassId contained link visited active hover focus before after left right
syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>"
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline
syn region cssComment start="/\*" end="\*/" contains=@Spell
syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
syn match cssSpecialCharQQ +\\"+ contained
syn match cssSpecialCharQ +\\'+ contained
syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+"
if main_syntax == "css"
syn sync minlines=10
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_css_syn_inits")
if version < 508
let did_css_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink cssComment Comment
HiLink cssTagName Statement
HiLink cssSelectorOp Special
HiLink cssSelectorOp2 Special
HiLink cssFontProp StorageClass
HiLink cssColorProp StorageClass
HiLink cssTextProp StorageClass
HiLink cssBoxProp StorageClass
HiLink cssRenderProp StorageClass
HiLink cssAuralProp StorageClass
HiLink cssRenderProp StorageClass
HiLink cssGeneratedContentProp StorageClass
HiLink cssPagingProp StorageClass
HiLink cssTableProp StorageClass
HiLink cssUIProp StorageClass
HiLink cssFontAttr Type
HiLink cssColorAttr Type
HiLink cssTextAttr Type
HiLink cssBoxAttr Type
HiLink cssRenderAttr Type
HiLink cssAuralAttr Type
HiLink cssGeneratedContentAttr Type
HiLink cssPagingAttr Type
HiLink cssTableAttr Type
HiLink cssUIAttr Type
HiLink cssCommonAttr Type
HiLink cssPseudoClassId PreProc
HiLink cssPseudoClassLang Constant
HiLink cssValueLength Number
HiLink cssValueInteger Number
HiLink cssValueNumber Number
HiLink cssValueAngle Number
HiLink cssValueTime Number
HiLink cssValueFrequency Number
HiLink cssFunction Constant
HiLink cssURL String
HiLink cssFunctionName Function
HiLink cssColor Constant
HiLink cssIdentifier Function
HiLink cssInclude Include
HiLink cssImportant Special
HiLink cssBraces Function
HiLink cssBraceError Error
HiLink cssError Error
HiLink cssInclude Include
HiLink cssUnicodeEscape Special
HiLink cssStringQQ String
HiLink cssStringQ String
HiLink cssMedia Special
HiLink cssMediaType Special
HiLink cssMediaComma Normal
HiLink cssFontDescriptor Special
HiLink cssFontDescriptorFunction Constant
HiLink cssFontDescriptorProp StorageClass
HiLink cssFontDescriptorAttr Type
HiLink cssUnicodeRange Constant
HiLink cssClassName Function
delcommand HiLink
endif
let b:current_syntax = "css"
if main_syntax == 'css'
unlet main_syntax
endif
" vim: ts=8

Просмотреть файл

@ -1,301 +0,0 @@
" Vim syntax file for the D programming language (version 1.053 and 2.039).
"
" Language: D
" Maintainer: Jason Mills<jasonmills@nf.sympatico.ca>
" Last Change: 2010 Jan 07
" Version: 0.18
"
" Contributors:
" - Kirk McDonald: version 0.17 updates, with minor modifications
" (http://paste.dprogramming.com/dplmb7qx?view=hidelines)
" - Jesse K. Phillips: patch for some keywords and attributes (annotations), with modifications
" - Tim Keating: patch to fix a bug in highlighting the `\` literal
" - Frank Benoit: Fixed a bug that caused some identifiers and numbers to highlight as octal number errors.
"
" Please email me with bugs, comments, and suggestions.
"
" Options:
" d_comment_strings - Set to highlight strings and numbers in comments.
"
" d_hl_operator_overload - Set to highlight D's specially named functions
" that when overloaded implement unary and binary operators (e.g. opCmp).
"
" Todo:
" - Determine a better method of sync'ing than simply setting minlines
" to a large number.
"
" - Several keywords (e.g., in, out, inout) are both storage class and
" statements, depending on their context. Perhaps use pattern matching to
" figure out which and highlight appropriately. For now I have made such
" keywords storage classes so their highlighting is consistent with other
" keywords that are commonly used with them, but are true storage classes,
" such as lazy. Similarly, I made some statement keywords (e.g. body) storage
" classes.
"
" - Mark contents of the asm statement body as special
"
" - Maybe highlight the 'exit', 'failure', and 'success' parts of the
" scope() statement.
"
" - Highlighting DDoc comments.
"
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Keyword definitions
"
syn keyword dExternal import package module extern
syn keyword dConditional if else switch
syn keyword dBranch goto break continue
syn keyword dRepeat while for do foreach foreach_reverse
syn keyword dBoolean true false
syn keyword dConstant null
syn keyword dConstant __FILE__ __LINE__ __EOF__ __VERSION__
syn keyword dConstant __DATE__ __TIME__ __TIMESTAMP__ __VENDOR__
syn keyword dTypedef alias typedef
syn keyword dStructure template interface class struct union
syn keyword dEnum enum
syn keyword dOperator new delete typeof typeid cast align is
syn keyword dOperator this super
if exists("d_hl_operator_overload")
syn keyword dOpOverload opNeg opCom opPostInc opPostDec opCast opAdd opSub opSub_r
syn keyword dOpOverload opMul opDiv opDiv_r opMod opMod_r opAnd opOr opXor
syn keyword dOpOverload opShl opShl_r opShr opShr_r opUShr opUShr_r opCat
syn keyword dOpOverload opCat_r opEquals opEquals opCmp
syn keyword dOpOverload opAssign opAddAssign opSubAssign opMulAssign opDivAssign
syn keyword dOpOverload opModAssign opAndAssign opOrAssign opXorAssign
syn keyword dOpOverload opShlAssign opShrAssign opUShrAssign opCatAssign
syn keyword dOpOverload opIndex opIndexAssign opCall opSlice opSliceAssign opPos
syn keyword dOpOverload opAdd_r opMul_r opAnd_r opOr_r opXor_r opIn opIn_r
syn keyword dOpOverload opPow opDispatch opStar opDot opApply opApplyReverse
endif
syn keyword dType ushort int uint long ulong float
syn keyword dType void byte ubyte double bit char wchar ucent cent
syn keyword dType short bool dchar string wstring dstring
syn keyword dType real ireal ifloat idouble creal cfloat cdouble
syn keyword dDebug deprecated unittest
syn keyword dExceptions throw try catch finally
syn keyword dScopeDecl public protected private export
syn keyword dStatement version debug return with
syn keyword dStatement function delegate __traits asm mixin macro
syn keyword dStorageClass in out inout ref lazy scope body
syn keyword dStorageClass pure nothrow
syn keyword dStorageClass auto static override final abstract volatile __gshared __thread
syn keyword dStorageClass synchronized immutable shared const invariant lazy
syn keyword dPragma pragma
" Attributes/annotations
syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>"
" Assert is a statement and a module name.
syn match dAssert "^assert\>"
syn match dAssert "[^.]\s*\<assert\>"ms=s+1
" dTokens is used by the token string highlighting
syn cluster dTokens contains=dExternal,dConditional,dBranch,dRepeat,dBoolean
syn cluster dTokens add=dConstant,dTypedef,dStructure,dOperator,dOpOverload
syn cluster dTokens add=dType,dDebug,dExceptions,dScopeDecl,dStatement
syn cluster dTokens add=dStorageClass,dPragma,dAssert,dAnnotation
" Marks contents of the asm statment body as special
"
" TODO
"syn match dAsmStatement "\<asm\>"
"syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement
"
"hi def link dAsmBody dUnicode
"hi def link dAsmStatement dStatement
" Labels
"
" We contain dScopeDecl so public: private: etc. are not highlighted like labels
syn match dUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=dLabel,dScopeDecl,dEnum
syn keyword dLabel case default
syn cluster dTokens add=dUserLabel,dLabel
" Comments
"
syn keyword dTodo contained TODO FIXME TEMP REFACTOR REVIEW HACK BUG XXX
syn match dCommentStar contained "^\s*\*[^/]"me=e-1
syn match dCommentStar contained "^\s*\*$"
syn match dCommentPlus contained "^\s*+[^/]"me=e-1
syn match dCommentPlus contained "^\s*+$"
if exists("d_comment_strings")
syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell
syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell
syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell
syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
else
syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell
syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell
syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell
endif
hi link dLineCommentString dBlockCommentString
hi link dBlockCommentString dString
hi link dNestedCommentString dString
hi link dCommentStar dBlockComment
hi link dCommentPlus dNestedComment
syn cluster dTokens add=dBlockComment,dNestedComment,dLineComment
" /+ +/ style comments and strings that span multiple lines can cause
" problems. To play it safe, set minlines to a large number.
syn sync minlines=200
" Use ccomment for /* */ style comments
syn sync ccomment dBlockComment
" Characters
"
syn match dSpecialCharError contained "[^']"
" Escape sequences (oct,specal char,hex,wchar, character entities \&xxx;)
" These are not contained because they are considered string literals.
syn match dEscSequence "\\\(\o\{1,3}\|[\"\\'\\?ntbrfva]\|u\x\{4}\|U\x\{8}\|x\x\x\)"
syn match dEscSequence "\\&[^;& \t]\+;"
syn match dCharacter "'[^']*'" contains=dEscSequence,dSpecialCharError
syn match dCharacter "'\\''" contains=dEscSequence
syn match dCharacter "'[^\\]'"
syn cluster dTokens add=dEscSequence,dCharacter
" Unicode characters
"
syn match dUnicode "\\u\d\{4\}"
" String.
"
syn region dString start=+"+ end=+"[cwd]\=+ skip=+\\\\\|\\"+ contains=dEscSequence,@Spell
syn region dRawString start=+`+ end=+`[cwd]\=+ contains=@Spell
syn region dRawString start=+r"+ end=+"[cwd]\=+ contains=@Spell
syn region dHexString start=+x"+ end=+"[cwd]\=+ contains=@Spell
syn region dDelimString start=+q"\z(.\)+ end=+\z1"+ contains=@Spell
syn region dHereString start=+q"\z(\I\i*\)\n+ end=+\n\z1"+ contains=@Spell
" Nesting delimited string contents
"
syn region dNestParenString start=+(+ end=+)+ contained transparent contains=dNestParenString,@Spell
syn region dNestBrackString start=+\[+ end=+\]+ contained transparent contains=dNestBrackString,@Spell
syn region dNestAngleString start=+<+ end=+>+ contained transparent contains=dNestAngleString,@Spell
syn region dNestCurlyString start=+{+ end=+}+ contained transparent contains=dNestCurlyString,@Spell
" Nesting delimited strings
"
syn region dParenString matchgroup=dParenString start=+q"(+ end=+)"+ contains=dNestParenString,@Spell
syn region dBrackString matchgroup=dBrackString start=+q"\[+ end=+\]"+ contains=dNestBrackString,@Spell
syn region dAngleString matchgroup=dAngleString start=+q"<+ end=+>"+ contains=dNestAngleString,@Spell
syn region dCurlyString matchgroup=dCurlyString start=+q"{+ end=+}"+ contains=dNestCurlyString,@Spell
hi link dParenString dNestString
hi link dBrackString dNestString
hi link dAngleString dNestString
hi link dCurlyString dNestString
syn cluster dTokens add=dString,dRawString,dHexString,dDelimString,dNestString
" Token strings
"
syn region dNestTokenString start=+{+ end=+}+ contained contains=dNestTokenString,@dTokens
syn region dTokenString matchgroup=dTokenStringBrack transparent start=+q{+ end=+}+ contains=dNestTokenString,@dTokens
syn cluster dTokens add=dTokenString
" Numbers
"
syn case ignore
syn match dDec display "\<\d[0-9_]*\(u\=l\=\|l\=u\=\)\>"
" Hex number
syn match dHex display "\<0x[0-9a-f_]\+\(u\=l\=\|l\=u\=\)\>"
syn match dOctal display "\<0[0-7_]\+\(u\=l\=\|l\=u\=\)\>"
" flag an octal number with wrong digits
syn match dOctalError display "\<0[0-7_]*[89][0-9_]*"
" binary numbers
syn match dBinary display "\<0b[01_]\+\(u\=l\=\|l\=u\=\)\>"
"floating point without the dot
syn match dFloat display "\<\d[0-9_]*\(fi\=\|l\=i\)\>"
"floating point number, with dot, optional exponent
syn match dFloat display "\<\d[0-9_]*\.[0-9_]*\(e[-+]\=[0-9_]\+\)\=[fl]\=i\="
"floating point number, starting with a dot, optional exponent
syn match dFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>"
"floating point number, without dot, with exponent
"syn match dFloat display "\<\d\+e[-+]\=\d\+[fl]\=\>"
syn match dFloat display "\<\d[0-9_]*e[-+]\=[0-9_]\+[fl]\=\>"
"floating point without the dot
syn match dHexFloat display "\<0x[0-9a-f_]\+\(fi\=\|l\=i\)\>"
"floating point number, with dot, optional exponent
syn match dHexFloat display "\<0x[0-9a-f_]\+\.[0-9a-f_]*\(p[-+]\=[0-9_]\+\)\=[fl]\=i\="
"floating point number, without dot, with exponent
syn match dHexFloat display "\<0x[0-9a-f_]\+p[-+]\=[0-9_]\+[fl]\=i\=\>"
syn cluster dTokens add=dDec,dHex,dOctal,dOctalError,dBinary,dFloat,dHexFloat
syn case match
" Pragma (preprocessor) support
" TODO: Highlight following Integer and optional Filespec.
syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$"
" The default highlighting.
"
hi def link dBinary Number
hi def link dDec Number
hi def link dHex Number
hi def link dOctal Number
hi def link dFloat Float
hi def link dHexFloat Float
hi def link dDebug Debug
hi def link dBranch Conditional
hi def link dConditional Conditional
hi def link dLabel Label
hi def link dUserLabel Label
hi def link dRepeat Repeat
hi def link dExceptions Exception
hi def link dAssert Statement
hi def link dStatement Statement
hi def link dScopeDecl dStorageClass
hi def link dStorageClass StorageClass
hi def link dBoolean Boolean
hi def link dUnicode Special
hi def link dTokenStringBrack String
hi def link dHereString String
hi def link dNestString String
hi def link dDelimString String
hi def link dRawString String
hi def link dString String
hi def link dHexString String
hi def link dCharacter Character
hi def link dEscSequence SpecialChar
hi def link dSpecialCharError Error
hi def link dOctalError Error
hi def link dOperator Operator
hi def link dOpOverload Identifier
hi def link dConstant Constant
hi def link dTypedef Typedef
hi def link dEnum Structure
hi def link dStructure Structure
hi def link dTodo Todo
hi def link dType Type
hi def link dLineComment Comment
hi def link dBlockComment Comment
hi def link dNestedComment Comment
hi def link dExternal Include
hi def link dPragma PreProc
hi def link dAnnotation PreProc
let b:current_syntax = "d"
" vim: ts=8 noet

Просмотреть файл

@ -1,150 +0,0 @@
" Vim syntax file
" Language: DocBook
" Maintainer: Devin Weaver <vim@tritarget.com>
" URL: http://tritarget.com/pub/vim/syntax/docbk.vim
" Last Change: $Date: 2005/06/23 22:31:01 $
" Version: $Revision: 1.2 $
" Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML
" suggestion.
" REFERENCES:
" http://docbook.org/
" http://www.open-oasis.org/docbook/
"
" 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
" Auto detect added by Bram Moolenaar
if !exists('b:docbk_type')
if expand('%:e') == "sgml"
let b:docbk_type = 'sgml'
else
let b:docbk_type = 'xml'
endif
endif
if 'xml' == b:docbk_type
doau Syntax xml
syn cluster xmlTagHook add=docbkKeyword
syn cluster xmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite
syn case match
elseif 'sgml' == b:docbk_type
doau Syntax sgml
syn cluster sgmlTagHook add=docbkKeyword
syn cluster sgmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite
syn case ignore
endif
" <comment> has been removed and replace with <remark> in DocBook 4.0
" <comment> kept for backwards compatability.
syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained
syn keyword docbkKeyword address affiliation alt anchor answer appendix contained
syn keyword docbkKeyword application area areaset areaspec arg artheader contained
syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained
syn keyword docbkKeyword audioobject author authorblurb authorgroup contained
syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained
syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained
syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained
syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained
syn keyword docbkKeyword chapter citation citerefentry citetitle city contained
syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained
syn keyword docbkKeyword colophon colspec command comment computeroutput contained
syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained
syn keyword docbkKeyword constant contractnum contractsponsor contrib contained
syn keyword docbkKeyword copyright corpauthor corpname country database contained
syn keyword docbkKeyword date dedication docinfo edition editor email contained
syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained
syn keyword docbkKeyword errorcode errorname errortype example fax figure contained
syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained
syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained
syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained
syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained
syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained
syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained
syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained
syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained
syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained
syn keyword docbkKeyword indexterm informalequation informalexample contained
syn keyword docbkKeyword informalfigure informaltable inlineequation contained
syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained
syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained
syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained
syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained
syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained
syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained
syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained
syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained
syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained
syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained
syn keyword docbkKeyword objectinfo olink option optional orderedlist contained
syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained
syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained
syn keyword docbkKeyword phone phrase pob postcode preface primary contained
syn keyword docbkKeyword primaryie printhistory procedure productname contained
syn keyword docbkKeyword productnumber programlisting programlistingco contained
syn keyword docbkKeyword prompt property pubdate publisher publishername contained
syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained
syn keyword docbkKeyword quote refclass refdescriptor refentry contained
syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained
syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained
syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained
syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained
syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained
syn keyword docbkKeyword revision revnumber revremark row sbr screen contained
syn keyword docbkKeyword screenco screeninfo screenshot secondary contained
syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained
syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained
syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained
syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained
syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained
syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained
syn keyword docbkKeyword simplesect spanspec state step street structfield contained
syn keyword docbkKeyword structname subject subjectset subjectterm contained
syn keyword docbkKeyword subscript substeps subtitle superscript surname contained
syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained
syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained
syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained
syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained
syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained
syn keyword docbkKeyword tocpart token trademark type ulink userinput contained
syn keyword docbkKeyword varargs variablelist varlistentry varname contained
syn keyword docbkKeyword videodata videoobject void volumenum warning contained
syn keyword docbkKeyword wordasword xref year contained
" Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas.
syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
syn region docbkTitle start="<title>"lc=7 end="</title>"me=e-8 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
syn region docbkRemark start="<remark>"lc=8 end="</remark>"me=e-9 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_docbk_syn_inits")
if version < 508
let did_docbk_syn_inits = 1
command -nargs=+ HiLink hi link <args>
hi DocbkBold term=bold cterm=bold gui=bold
else
command -nargs=+ HiLink hi def link <args>
hi def DocbkBold term=bold cterm=bold gui=bold
endif
HiLink docbkKeyword Statement
HiLink docbkRegion DocbkBold
HiLink docbkTitle Title
HiLink docbkRemark Comment
HiLink docbkCite Constant
delcommand HiLink
endif
let b:current_syntax = "docbk"
" vim: ts=8

Просмотреть файл

@ -1,44 +0,0 @@
" Vim syntax file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Version Info: @(#)dosini.vim 1.6 97/12/15 08:54:12
" Author: Sean M. McKee <mckee@misslink.net>
" Maintainer: Nima Talebi <nima@it.net.au>
" Last Change: Mon, 26 Jun 2006 22:07:28 +1000
" 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
" shut case off
syn case ignore
syn match dosiniLabel "^.\{-}="
syn region dosiniHeader start="^\[" end="\]"
syn match dosiniComment "^;.*$"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_dosini_syntax_inits")
if version < 508
let did_dosini_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink dosiniHeader Special
HiLink dosiniComment Comment
HiLink dosiniLabel Type
delcommand HiLink
endif
let b:current_syntax = "dosini"
" vim:ts=8

Просмотреть файл

@ -1,229 +0,0 @@
" Vim syntax file
" Language: erlang (ERicsson LANGuage)
" http://www.erlang.se
" http://www.erlang.org
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Former Maintainer: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
" Last update: 12-Mar-2008
" Filenames: .erl
" There are three sets of highlighting in here:
" One is "erlang_characters", second is "erlang_functions" and third
" is "erlang_keywords".
" If you want to disable keywords highlighting, put in your .vimrc:
" let erlang_keywords=1
" If you want to disable erlang BIF highlighting, put in your .vimrc
" this:
" let erlang_functions=1
" If you want to disable special characters highlighting, put in
" your .vimrc:
" let erlang_characters=1
" 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
" Case sensitive
syn case match
if ! exists ("erlang_characters")
" Basic elements
syn match erlangComment "%.*$" contains=erlangAnnotation,erlangTodo
syn match erlangAnnotation " \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)" contained
syn match erlangAnnotation "`[^']*'" contained
syn keyword erlangTodo TODO FIXME XXX contained
syn match erlangModifier "\~\a\|\\\a\|\\\\" contained
syn match erlangSpecialCharacter ":\|_\|@\|\\\|\"\|\."
syn match erlangSeparator "(\|)\|{\|}\|\[\|]\||\|||\|;\|,\|?\|->\|#" contained
syn region erlangString start=+"+ skip=+\\.+ end=+"+ contains=erlangModifier
syn region erlangAtom start=+'+ skip=+\\'+ end=+'+
" Operators
syn match erlangOperator "+\|-\|\*\|\/"
syn keyword erlangOperator div rem or xor bor bxor bsl bsr
syn keyword erlangOperator and band not bnot andalso orelse
syn match erlangOperator "==\|/=\|=:=\|=/=\|<\|=<\|>\|>="
syn match erlangOperator "++\|--\|=\|!\|<-"
" Numbers
syn match erlangNumberInteger "\d\+" contains=erlangSeparator
syn match erlangNumberFloat1 "\d\+\.\d\+" contains=erlangSeparator
syn match erlangNumberFloat2 "\d\+\(\.\d\+\)\=[eE][+-]\=\d\+\(\.\d\+\)\=" contains=erlangSeparator
syn match erlangNumberFloat3 "\d\+[#]\x\+" contains=erlangSeparator
syn match erlangNumberHex "$\x\+" contains=erlangSeparator
" Ignore '_' and '-' in words
syn match erlangWord "\h\+\w*"
syn match erlangChar /\$./
endif
if ! exists ("erlang_functions")
" Functions call
syn match erlangFCall "\%(\w\+\s*\.\s*\)*\w\+\s*[:@]\s*\w\+"
" build-in-functions (BIFs)
syn keyword erlangBIF abs alive apply atom_to_list
syn keyword erlangBIF binary_to_list binary_to_term
syn keyword erlangBIF concat_binary
syn keyword erlangBIF date disconnect_node
syn keyword erlangBIF element erase exit
syn keyword erlangBIF float float_to_list
syn keyword erlangBIF get get_keys group_leader
syn keyword erlangBIF halt hd
syn keyword erlangBIF integer_to_list is_alive
syn keyword erlangBIF length link list_to_atom list_to_binary
syn keyword erlangBIF list_to_float list_to_integer list_to_pid
syn keyword erlangBIF list_to_tuple load_module
syn keyword erlangBIF make_ref monitor_node
syn keyword erlangBIF node nodes now
syn keyword erlangBIF open_port
syn keyword erlangBIF pid_to_list process_flag
syn keyword erlangBIF process_info process put
syn keyword erlangBIF register registered round
syn keyword erlangBIF self setelement size spawn
syn keyword erlangBIF spawn_link split_binary statistics
syn keyword erlangBIF term_to_binary throw time tl trunc
syn keyword erlangBIF tuple_to_list
syn keyword erlangBIF unlink unregister
syn keyword erlangBIF whereis
" Other BIFs
syn keyword erlangBIF atom binary constant function integer
syn keyword erlangBIF list number pid ports port_close port_info
syn keyword erlangBIF reference record
" erlang:BIFs
syn keyword erlangBIF check_process_code delete_module
syn keyword erlangBIF get_cookie hash math module_loaded
syn keyword erlangBIF preloaded processes purge_module set_cookie
syn keyword erlangBIF set_node
" functions of math library
syn keyword erlangFunction acos asin atan atan2 cos cosh exp
syn keyword erlangFunction log log10 pi pow power sin sinh sqrt
syn keyword erlangFunction tan tanh
" Other functions
syn keyword erlangFunction call module_info parse_transform
syn keyword erlangFunction undefined_function
" Modules
syn keyword erlangModule error_handler
endif
if ! exists ("erlang_keywords")
" Constants and Directives
syn match erlangDirective "-behaviour\|-behavior"
syn match erlangDirective "-compile\|-define\|-else\|-endif\|-export\|-file"
syn match erlangDirective "-ifdef\|-ifndef\|-import\|-include_lib\|-include"
syn match erlangDirective "-module\|-record\|-undef"
syn match erlangConstant "-author\|-copyright\|-doc\|-vsn"
" Keywords
syn keyword erlangKeyword after begin case catch
syn keyword erlangKeyword cond end fun if
syn keyword erlangKeyword let of query receive
syn keyword erlangKeyword when
syn keyword erlangKeyword try
" Processes
syn keyword erlangProcess creation current_function dictionary
syn keyword erlangProcess group_leader heap_size high initial_call
syn keyword erlangProcess linked low memory_in_use message_queue
syn keyword erlangProcess net_kernel node normal priority
syn keyword erlangProcess reductions registered_name runnable
syn keyword erlangProcess running stack_trace status timer
syn keyword erlangProcess trap_exit waiting
" Ports
syn keyword erlangPort command count_in count_out creation in
syn keyword erlangPort in_format linked node out owner packeting
" Nodes
syn keyword erlangNode atom_tables communicating creation
syn keyword erlangNode current_gc current_reductions current_runtime
syn keyword erlangNode current_wall_clock distribution_port
syn keyword erlangNode entry_points error_handler friends
syn keyword erlangNode garbage_collection magic_cookie magic_cookies
syn keyword erlangNode module_table monitored_nodes name next_ref
syn keyword erlangNode ports preloaded processes reductions
syn keyword erlangNode ref_state registry runtime wall_clock
" Reserved
syn keyword erlangReserved apply_lambda module_info module_lambdas
syn keyword erlangReserved record record_index record_info
" Extras
syn keyword erlangExtra badarg nocookie false fun true
" Signals
syn keyword erlangSignal badsig kill killed exit normal
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists ("did_erlang_inits")
if version < 508
let did_erlang_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" erlang_characters
HiLink erlangComment Comment
HiLink erlangAnnotation Special
HiLink erlangTodo Todo
HiLink erlangSpecialCharacter Special
HiLink erlangSeparator Normal
HiLink erlangModifier Special
HiLink erlangOperator Operator
HiLink erlangString String
HiLink erlangAtom Type
HiLink erlangNumberInteger Number
HiLink erlangNumberFloat1 Float
HiLink erlangNumberFloat2 Float
HiLink erlangNumberFloat3 Float
HiLink erlangNumberFloat4 Float
HiLink erlangNumberHex Number
HiLink erlangWord Normal
" erlang_functions
HiLink erlangFCall Function
HiLink erlangBIF Function
HiLink erlangFunction Function
HiLink erlangModuleFunction Function
" erlang_keywords
HiLink erlangDirective Type
HiLink erlangConstant Type
HiLink erlangKeyword Keyword
HiLink erlangProcess Special
HiLink erlangPort Special
HiLink erlangNode Special
HiLink erlangReserved Statement
HiLink erlangExtra Statement
HiLink erlangSignal Statement
delcommand HiLink
endif
let b:current_syntax = "erlang"

Просмотреть файл

@ -1,34 +0,0 @@
" Vim syntax file
" Language: Esmtp setup file (based on esmtp 0.5.0)
" Maintainer: Kornel Kielczewski <kornel@gazeta.pl>
" Last Change: 16 Feb 2005
" 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
"All options
:syntax keyword esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda
"All keywords
:syntax keyword esmtprcIdentifier default enabled disabled required
"We're trying to be smarer than /."*@.*/ :)
:syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/
:syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/
"String..
:syntax region esmtprcString start=/"/ end=/"/
:highlight link esmtprcOptions Label
:highlight link esmtprcString String
:highlight link esmtprcAddress Type
:highlight link esmtprcIdentifier Identifier
:highlight link esmtprcFulladd Include
let b:current_syntax="esmtprc"

Просмотреть файл

@ -1,540 +0,0 @@
" Vim syntax file
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
" Version: 0.89
" Last Change: 2010 July 21
" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
" Version 0.1 was based on the fortran 77 syntax file by Mario Eusebio and
" Preben Guldberg. Useful suggestions were made by: Andrej Panjkov,
" Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, and Hendrik Merx.
" For version 5.x: Clear all syntax items
" For version 6.x: Quit if a syntax file is already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" let b:fortran_dialect = fortran_dialect if set correctly by user
if exists("fortran_dialect")
if fortran_dialect =~ '\<\(f\(9[05]\|77\)\|elf\|F\)\>'
let b:fortran_dialect = matchstr(fortran_dialect,'\<\(f\(9[05]\|77\)\|elf\|F\)\>')
else
echohl WarningMsg | echo "Unknown value of fortran_dialect" | echohl None
let b:fortran_dialect = "unknown"
endif
else
let b:fortran_dialect = "unknown"
endif
" fortran_dialect not set or set incorrectly by user,
if b:fortran_dialect == "unknown"
" set b:fortran_dialect from directive in first three lines of file
let b:fortran_retype = getline(1)." ".getline(2)." ".getline(3)
if b:fortran_retype =~ '\<fortran_dialect\s*=\s*F\>'
let b:fortran_dialect = "F"
elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*elf\>'
let b:fortran_dialect = "elf"
elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f90\>'
let b:fortran_dialect = "f90"
elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f95\>'
let b:fortran_dialect = "f95"
elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f77\>'
let b:fortran_dialect = "f77"
else
" no directive found, so assume f95
let b:fortran_dialect = "f95"
endif
unlet b:fortran_retype
endif
" Choose between fixed and free source form if this hasn't been done yet
if !exists("b:fortran_fixed_source")
if b:fortran_dialect == "elf" || b:fortran_dialect == "F"
" elf and F require free source form
let b:fortran_fixed_source = 0
elseif b:fortran_dialect == "f77"
" f77 requires fixed source form
let b:fortran_fixed_source = 1
elseif exists("fortran_free_source")
" User guarantees free source form for all f90 and f95 files
let b:fortran_fixed_source = 0
elseif exists("fortran_fixed_source")
" User guarantees fixed source form for all f90 and f95 files
let b:fortran_fixed_source = 1
else
" f90 and f95 allow both fixed and free source form.
" Assume fixed source form unless signs of free source form
" are detected in the first five columns of the first s:lmax lines.
" Detection becomes more accurate and time-consuming if more lines
" are checked. Increase the limit below if you keep lots of comments at
" the very top of each file and you have a fast computer.
let s:lmax = 500
if ( s:lmax > line("$") )
let s:lmax = line("$")
endif
let b:fortran_fixed_source = 1
let s:ln=1
while s:ln <= s:lmax
let s:test = strpart(getline(s:ln),0,5)
if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t'
let b:fortran_fixed_source = 0
break
endif
let s:ln = s:ln + 1
endwhile
unlet! s:lmax s:ln s:test
endif
endif
syn case ignore
if b:fortran_dialect !=? "f77"
if version >= 600
if b:fortran_fixed_source == 1
syn match fortranConstructName "^\s\{6,}\zs\a\w*\ze\s*:"
else
syn match fortranConstructName "^\s*\zs\a\w*\ze\s*:"
endif
if exists("fortran_more_precise")
syn match fortranConstructName "\(\<end\s*do\s\+\)\@<=\a\w*"
syn match fortranConstructName "\(\<end\s*if\s\+\)\@<=\a\w*"
syn match fortranConstructName "\(\<end\s*select\s\+\)\@<=\a\w*"
endif
else
if b:fortran_fixed_source == 1
syn match fortranConstructName "^\s\{6,}\a\w*\s*:"
else
syn match fortranConstructName "^\s*\a\w*\s*:"
endif
endif
endif
syn match fortranUnitHeader "\<end\>"
syn match fortranType "\<character\>"
syn match fortranType "\<complex\>"
syn match fortranType "\<integer\>"
syn keyword fortranType intrinsic
syn match fortranType "\<implicit\>"
syn keyword fortranStructure dimension
syn keyword fortranStorageClass parameter save
syn match fortranUnitHeader "\<subroutine\>"
syn keyword fortranCall call
syn match fortranUnitHeader "\<function\>"
syn match fortranUnitHeader "\<program\>"
syn keyword fortranKeyword return stop
syn keyword fortranConditional else then
syn match fortranConditional "\<if\>"
syn match fortranRepeat "\<do\>"
syn keyword fortranTodo contained todo fixme
"Catch errors caused by too many right parentheses
syn region fortranParen transparent start="(" end=")" contains=ALLBUT,fortranParenError,@fortranCommentGroup,cIncluded,@spell
syn match fortranParenError ")"
syn match fortranOperator "\.\s*n\=eqv\s*\."
syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\."
syn match fortranOperator "\(+\|-\|/\|\*\)"
syn match fortranBoolean "\.\s*\(true\|false\)\s*\."
syn keyword fortranReadWrite backspace close endfile inquire open print read rewind write
"If tabs are allowed then the left margin checks do not work
if exists("fortran_have_tabs")
syn match fortranTab "\t" transparent
else
syn match fortranTab "\t"
endif
syn keyword fortranIO access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit
syn keyword fortran66Intrinsic alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl
" Intrinsics provided by some vendors
syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama erf erfc gamma iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh
syn keyword fortran77Intrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
syn match fortran77Intrinsic "\<len\s*[(,]"me=s+3
syn match fortran77Intrinsic "\<real\s*("me=s+4
syn match fortranType "\<implicit\s\+real"
syn match fortranType "^\s*real\>"
syn match fortran90Intrinsic "\<logical\s*("me=s+7
syn match fortranType "\<implicit\s\+logical"
syn match fortranType "^\s*logical\>"
"Numbers of various sorts
" Integers
syn match fortranNumber display "\<\d\+\(_\a\w*\)\=\>"
" floating point number, without a decimal point
syn match fortranFloatNoDec display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>"
" floating point number, starting with a decimal point
syn match fortranFloatIniDec display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" floating point number, no digits after decimal
syn match fortranFloatEndDec display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" floating point number, D or Q exponents
syn match fortranFloatDExp display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" floating point number
syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" Numbers in formats
syn match fortranFormatSpec display "\d*f\d\+\.\d\+"
syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\="
syn match fortranFormatSpec display "\d*\(d\|q\|g\)\d\+\.\d\+\(e\d+\)\="
syn match fortranFormatSpec display "\d\+x\>"
" The next match cannot be used because it would pick up identifiers as well
" syn match fortranFormatSpec display "\<\(a\|i\)\d\+"
" Numbers as labels
syn match fortranLabelNumber display "^\d\{1,5}\s"me=e-1
syn match fortranLabelNumber display "^ \d\{1,4}\s"ms=s+1,me=e-1
syn match fortranLabelNumber display "^ \d\{1,3}\s"ms=s+2,me=e-1
syn match fortranLabelNumber display "^ \d\d\=\s"ms=s+3,me=e-1
syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1
if version >= 600 && exists("fortran_more_precise")
" Numbers as targets
syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>"
syn match fortranTarget display "\(\<do\s\+\)\@<=\d\+\>"
syn match fortranTarget display "\(\<go\s*to\s*(\=\)\@<=\(\d\+\s*,\s*\)*\d\+\>"
endif
syn keyword fortranTypeEx external
syn keyword fortranIOEx format
syn match fortranKeywordEx "\<continue\>"
syn match fortranKeyword "^\s*\d\+\s\+continue\>"
syn match fortranKeywordEx "\<go\s*to\>"
syn region fortranStringEx start=+'+ end=+'+ contains=fortranContinueMark,fortranLeftMargin,fortranSerialNumber
syn keyword fortran77IntrinsicEx dim lge lgt lle llt mod
syn keyword fortranKeywordOb assign pause to
if b:fortran_dialect != "f77"
syn match fortranType "\<type\>"
syn keyword fortranType none
syn keyword fortranStructure private public intent optional
syn keyword fortranStructure pointer target allocatable
syn keyword fortranStorageClass in out
syn match fortranStorageClass "\<kind\s*="me=s+4
syn match fortranStorageClass "\<len\s*="me=s+3
syn match fortranUnitHeader "\<module\>"
syn keyword fortranUnitHeader use only contains
syn keyword fortranUnitHeader result operator assignment
syn match fortranUnitHeader "\<interface\>"
syn match fortranUnitHeader "\<recursive\>"
syn keyword fortranKeyword allocate deallocate nullify cycle exit
syn match fortranConditional "\<select\>"
syn keyword fortranConditional case default where elsewhere
syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)"
syn match fortranOperator "=>"
syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
syn keyword fortranIO pad position action delim readwrite
syn keyword fortranIO eor advance nml
syn keyword fortran90Intrinsic adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack precision present product radix random_number random_seed range repeat reshape rrspacing
syn keyword fortran90Intrinsic scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify
syn match fortran90Intrinsic "\<not\>\(\s*\.\)\@!"me=s+3
syn match fortran90Intrinsic "\<kind\>\s*[(,]"me=s+4
syn match fortranUnitHeader "\<end\s*function"
syn match fortranUnitHeader "\<end\s*interface"
syn match fortranUnitHeader "\<end\s*module"
syn match fortranUnitHeader "\<end\s*program"
syn match fortranUnitHeader "\<end\s*subroutine"
syn match fortranRepeat "\<end\s*do"
syn match fortranConditional "\<end\s*where"
syn match fortranConditional "\<select\s*case"
syn match fortranConditional "\<end\s*select"
syn match fortranType "\<end\s*type"
syn match fortranType "\<in\s*out"
syn keyword fortranUnitHeaderEx procedure
syn keyword fortranIOEx namelist
syn keyword fortranConditionalEx while
syn keyword fortran90IntrinsicEx achar iachar transfer
syn keyword fortranInclude include
syn keyword fortran90StorageClassR sequence
endif
syn match fortranConditional "\<end\s*if"
syn match fortranIO contains=fortranOperator "\<e\(nd\|rr\)\s*=\s*\d\+"
syn match fortranConditional "\<else\s*if"
syn keyword fortranUnitHeaderR entry
syn match fortranTypeR display "double\s\+precision"
syn match fortranTypeR display "double\s\+complex"
syn match fortranUnitHeaderR display "block\s\+data"
syn keyword fortranStorageClassR common equivalence data
syn keyword fortran77IntrinsicR dble dprod
syn match fortran77OperatorR "\.\s*[gl][et]\s*\."
syn match fortran77OperatorR "\.\s*\(eq\|ne\)\s*\."
if b:fortran_dialect == "f95" || b:fortran_dialect == "F"
syn keyword fortranRepeat forall
syn match fortranRepeat "\<end\s*forall"
syn keyword fortran95Intrinsic null cpu_time
syn match fortranType "\<elemental\>"
syn match fortranType "\<pure\>"
if exists("fortran_more_precise")
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@<=\a\w*\>"
endif
endif
if b:fortran_dialect == "f95"
" F2003
syn keyword fortran03Intrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of
" ISO_C_binding
syn keyword fortran03Constant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab
syn keyword fortran03Constant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr
syn keyword fortran03Intrinsic iso_c_binding c_loc c_funloc c_associated c_f_pointer c_f_procpointer
syn keyword fortran03Type c_ptr c_funptr
" ISO_Fortran_env
syn keyword fortran03Constant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit
" IEEE_arithmetic
syn keyword fortran03Intrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode
syn keyword fortran03ReadWrite flush wait
syn keyword fortran03IO decimal round iomsg
syn keyword fortran03Type asynchronous nopass non_overridable pass protected volatile abstract extends import
syn keyword fortran03Type non_intrinsic value bind deferred generic final enumerator class
syn match fortran03Type "\<associate\>"
syn match fortran03Type "\<end\s*associate"
syn match fortran03Type "\<enum\s*,\s*bind\s*(\s*c\s*)"
syn match fortran03Type "\<end\s*enum"
syn match fortran03Conditional "\<select\s*type"
syn match fortran03Conditional "\<type\s*is\>"
syn match fortran03UnitHeader "\<abstract\s*interface\>"
syn match fortran03Operator "\([\|]\)"
" F2008
syn keyword fortran08Intrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2
syn keyword fortran08Intrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits
syn keyword fortran08Intrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image
syn keyword fortran08IO newunit
syn keyword fortran08Type contiguous
endif
syn cluster fortranCommentGroup contains=fortranTodo
if (b:fortran_fixed_source == 1)
if !exists("fortran_have_tabs")
"Flag items beyond column 72
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
"Flag left margin errors
syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab
syn match fortranLabelError "^.\{4}\d\S"
endif
syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup,@spell
syn match fortranLeftMargin transparent "^ \{5}"
syn match fortranContinueMark display "^.\{5}\S"lc=5
else
syn match fortranContinueMark display "&"
endif
if b:fortran_dialect != "f77"
syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell
endif
"cpp is often used with Fortran
syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*"
syn match cPreProc "^\s*#\s*\(elif\|if\)\>.*"
syn match cPreProc "^\s*#\s*\(ifndef\|undef\)\>.*"
syn match cPreCondit "^\s*#\s*\(else\|endif\)\>.*"
syn region cIncluded contained start=+"[^(]+ skip=+\\\\\|\\"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber
syn match cIncluded contained "<[^>]*>"
syn match cInclude "^\s*#\s*include\>\s*["<]" contains=cIncluded
"Synchronising limits assume that comment and continuation lines are not mixed
if exists("fortran_fold") || exists("fortran_more_precise")
syn sync fromstart
elseif (b:fortran_fixed_source == 0)
syn sync linecont "&" minlines=30
else
syn sync minlines=30
endif
if version >= 600 && exists("fortran_fold")
if (b:fortran_fixed_source == 1)
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
else
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram
syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule
syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock
endif
if exists("fortran_fold_conditionals")
if (b:fortran_fixed_source == 1)
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
else
syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData
endif
endif
if exists("fortran_fold_multilinecomments")
if (b:fortran_fixed_source == 1)
syn match fortranMultiLineComments transparent fold "\(^[!c*].*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines
else
syn match fortranMultiLineComments transparent fold "\(^\s*!.*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines
endif
endif
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_fortran_syn_inits")
if version < 508
let did_fortran_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default highlighting differs for each dialect.
" Transparent groups:
" fortranParen, fortranLeftMargin
" fortranProgram, fortranModule, fortranSubroutine, fortranFunction,
" fortranBlockData
" fortran77Loop, fortran90Loop, fortranIfBlock, fortranCase
" fortranMultiCommentLines
HiLink fortranKeyword Keyword
HiLink fortranConstructName Identifier
HiLink fortran03Conditional fortranConditional
HiLink fortranConditional Conditional
HiLink fortranRepeat Repeat
HiLink fortranTodo Todo
if (b:fortran_fixed_source == 1)
HiLink fortranContinueMark Todo
else
HiLink fortranContinueMark Keyword
endif
HiLink fortranString String
HiLink fortranNumber Number
HiLink fortran03Operator fortranOperator
HiLink fortranOperator Operator
HiLink fortranBoolean Boolean
HiLink fortranLabelError Error
HiLink fortranObsolete Todo
HiLink fortran03Type fortranType
HiLink fortran08Type fortranType
HiLink fortranType Type
HiLink fortranStructure Type
HiLink fortranStorageClass StorageClass
HiLink fortranCall Function
HiLink fortran03UnitHeader fortranUnitHeader
HiLink fortranUnitHeader fortranPreCondit
HiLink fortran03ReadWrite fortranReadWrite
HiLink fortranReadWrite Keyword
HiLink fortran03IO fortranIO
HiLink fortran08IO fortranIO
HiLink fortranIO Keyword
HiLink fortran95Intrinsic fortran90Intrinsic
HiLink fortran77Intrinsic fortran90Intrinsic
HiLink fortran90Intrinsic Function
HiLink fortran03Intrinsic Function
HiLink fortran08Intrinsic Function
HiLink fortran03Constant Function
if ( b:fortran_dialect == "elf" || b:fortran_dialect == "F" )
HiLink fortranKeywordOb fortranObsolete
HiLink fortran66Intrinsic fortranObsolete
HiLink fortran77IntrinsicR fortranObsolete
HiLink fortranUnitHeaderR fortranObsolete
HiLink fortranTypeR fortranObsolete
HiLink fortranStorageClassR fortranObsolete
HiLink fortran90StorageClassR fortranObsolete
HiLink fortran77OperatorR fortranObsolete
HiLink fortranInclude fortranObsolete
else
HiLink fortranKeywordOb fortranKeyword
HiLink fortran66Intrinsic fortran90Intrinsic
HiLink fortran77IntrinsicR fortran90Intrinsic
HiLink fortranUnitHeaderR fortranPreCondit
HiLink fortranTypeR fortranType
HiLink fortranStorageClassR fortranStorageClass
HiLink fortran77OperatorR fortranOperator
HiLink fortranInclude Include
HiLink fortran90StorageClassR fortranStorageClass
endif
if ( b:fortran_dialect == "F" )
HiLink fortranLabelNumber fortranObsolete
HiLink fortranTarget fortranObsolete
HiLink fortranFormatSpec fortranObsolete
HiLink fortranFloatDExp fortranObsolete
HiLink fortranFloatNoDec fortranObsolete
HiLink fortranFloatIniDec fortranObsolete
HiLink fortranFloatEndDec fortranObsolete
HiLink fortranTypeEx fortranObsolete
HiLink fortranIOEx fortranObsolete
HiLink fortranKeywordEx fortranObsolete
HiLink fortranStringEx fortranObsolete
HiLink fortran77IntrinsicEx fortranObsolete
HiLink fortranUnitHeaderEx fortranObsolete
HiLink fortranConditionalEx fortranObsolete
HiLink fortran90IntrinsicEx fortranObsolete
else
HiLink fortranLabelNumber Special
HiLink fortranTarget Special
HiLink fortranFormatSpec Identifier
HiLink fortranFloatDExp fortranFloat
HiLink fortranFloatNoDec fortranFloat
HiLink fortranFloatIniDec fortranFloat
HiLink fortranFloatEndDec fortranFloat
HiLink fortranTypeEx fortranType
HiLink fortranIOEx fortranIO
HiLink fortranKeywordEx fortranKeyword
HiLink fortranStringEx fortranString
HiLink fortran77IntrinsicEx fortran90Intrinsic
HiLink fortranUnitHeaderEx fortranUnitHeader
HiLink fortranConditionalEx fortranConditional
HiLink fortran90IntrinsicEx fortran90Intrinsic
endif
HiLink fortranFloat Float
HiLink fortranPreCondit PreCondit
HiLink fortranInclude Include
HiLink cIncluded fortranString
HiLink cInclude Include
HiLink cPreProc PreProc
HiLink cPreCondit PreCondit
HiLink fortranParenError Error
HiLink fortranComment Comment
HiLink fortranSerialNumber Todo
HiLink fortranTab Error
" Vendor extensions
HiLink fortranExtraIntrinsic Function
delcommand HiLink
endif
let b:current_syntax = "fortran"
" vim: ts=8 tw=132

Просмотреть файл

@ -1,319 +0,0 @@
" Vim syntax file
" Language: IDL (Interface Description Language)
" Created By: Jody Goldberg
" Maintainer: Michael Geddes <vim@frog.wheelycreek.net>
" Last Change: Thu Apr 13 2006
" This is an experiment. IDL's structure is simple enough to permit a full
" grammar based approach to rather than using a few heuristics. The result
" is large and somewhat repetative but seems to work.
" There are some Microsoft extensions to idl files that are here. Some of
" them are disabled by defining idl_no_ms_extensions.
"
" The more complex of the extensions are disabled by defining idl_no_extensions.
"
" History:
" 2.0: Michael's new version
" 2.1: Support for Vim 7 spell (Anduin Withers)
"
if exists("b:current_syntax")
finish
endif
if exists("idlsyntax_showerror")
syn match idlError +\S+ skipwhite skipempty nextgroup=idlError
endif
syn region idlCppQuote start='\<cpp_quote\s*(' end=')' contains=idlString
" Misc basic
syn match idlId contained "[a-zA-Z][a-zA-Z0-9_]*" skipwhite skipempty nextgroup=idlEnumComma,idlEnumNumber
syn match idlEnumComma contained ","
syn match idlEnumNumber contained "=" skipwhite skipempty nextgroup=idlString,idlLiteral
syn match idlSemiColon contained ";"
syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl
syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlError,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral
syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlCommaArg,idlArraySize1
syn region idlString contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ contains=@Spell
syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\="
syn match idlLiteral contained "0"
syn match idlLiteral contained "\.\d\+"
syn match idlLiteral contained "0x[0-9A-Fa-f]\+"
syn match idlLiteral contained "0[0-7]\+"
syn keyword idlLiteral contained TRUE FALSE
" Comments
syn keyword idlTodo contained TODO FIXME XXX
syn region idlComment start="/\*" end="\*/" contains=idlTodo,@Spell
syn match idlComment "//.*" contains=idlTodo,@Spell
syn match idlCommentError "\*/"
" C style Preprocessor
syn region idlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
syn match idlIncluded contained "<[^>]*>"
syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString
syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError
syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString
" Constants
syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt
" Attribute
syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr
syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType
" Types
syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral
syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4
syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl
syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl
syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt
syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral
syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl
syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl
" Modules
syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule
syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon
syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName
" Interfaces
syn cluster idlCommentable contains=idlComment
syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections
syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable
syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom
syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent
syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom
syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon
syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName
syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError
syn match idlSectionColon contained ":"
syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon
syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName
syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface
syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg
syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket
syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName
syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon
syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon
syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute
syn keyword idlCoclassAttribute contained default source
"syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName
syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon
syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString
syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment
syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default
if !exists('idl_no_ms_extensions')
syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation
endif
syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket
" skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral
syn match idlErrorBrace contained "}"
syn match idlErrorBracket contained ")"
syn match idlErrorSquareBracket contained "\]"
syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+
" Raises
syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon
" Context
syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon
" Operation
syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms
syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral
syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize
syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName
syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt
syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral
syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName
syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName
syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName
syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType
if !exists('idl_no_ms_extensions')
syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType
syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType
syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE
syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType
endif
syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable
syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents
syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName
syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral
syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt
syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName
syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName
syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName
syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName
syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp
" Enum
syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable
syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents
syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents
" Typedef
syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError
if !exists('idl_no_extensions')
syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite
syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError
syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError
syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError
syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError
" syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4
" Enum typedef
syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents
syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl
syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes
syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon
endif
" Struct
syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion
syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent
syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName
" Exception
syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName
" Union
syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt
syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString
syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel
syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon
syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase
syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent
syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType
syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch
syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName
if !exists('idl_no_extensions')
syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable
syn sync maxlines=1000 minlines=100
else
syn sync lines=200
endif
" syn sync fromstart
if !exists("did_idl_syntax_inits")
let did_idl_syntax_inits = 1
" The default methods for highlighting. Can be overridden later
command -nargs=+ HiLink hi def link <args>
HiLink idlInclude Include
HiLink idlPreProc PreProc
HiLink idlPreCondit PreCondit
HiLink idlDefine Macro
HiLink idlIncluded String
HiLink idlString String
HiLink idlComment Comment
HiLink idlTodo Todo
HiLink idlLiteral Number
HiLink idlUuid Number
HiLink idlType Type
HiLink idlVariantType idlType
HiLink idlModule Keyword
HiLink idlInterface Keyword
HiLink idlEnum Keyword
HiLink idlStruct Keyword
HiLink idlUnion Keyword
HiLink idlTypedef Keyword
HiLink idlException Keyword
HiLink idlTypedefOtherTypeQualifier keyword
HiLink idlModuleName Typedef
HiLink idlInterfaceName Typedef
HiLink idlEnumName Typedef
HiLink idlStructName Typedef
HiLink idlUnionName Typedef
HiLink idlBaseTypeInt idlType
HiLink idlBaseType idlType
HiLink idlSeqType idlType
HiLink idlD1 Paren
HiLink idlD2 Paren
HiLink idlD3 Paren
HiLink idlD4 Paren
"HiLink idlArraySize Paren
"HiLink idlArraySize1 Paren
HiLink idlModuleContent Paren
HiLink idlUnionContent Paren
HiLink idlStructContent Paren
HiLink idlEnumContents Paren
HiLink idlInterfaceContent Paren
HiLink idlSimpDecl Identifier
HiLink idlROAttr StorageClass
HiLink idlAttr Keyword
HiLink idlConst StorageClass
HiLink idlOneWayOp StorageClass
HiLink idlOp idlType
HiLink idlParmType idlType
HiLink idlOpName Function
HiLink idlOpParms SpecialComment
HiLink idlParmName Identifier
HiLink idlInheritFrom Identifier
HiLink idlAttribute SpecialComment
HiLink idlId Constant
"HiLink idlCase Keyword
HiLink idlCaseLabel Constant
HiLink idlErrorBracket Error
HiLink idlErrorBrace Error
HiLink idlErrorSquareBracket Error
HiLink idlImport Keyword
HiLink idlImportString idlString
HiLink idlCoclassAttribute StorageClass
HiLink idlLibrary Keyword
HiLink idlImportlib Keyword
HiLink idlCoclass Keyword
HiLink idlLibraryName Typedef
HiLink idlCoclassName Typedef
" hi idlLibraryContent guifg=red
HiLink idlTypedefDecl Typedef
HiLink idlDefEnum Keyword
HiLink idlDefv1Enum Keyword
HiLink idlDefEnumName Typedef
HiLink idlDefEnumContents Paren
HiLink idlDefBaseTypeInt idlType
HiLink idlDefBaseType idlType
HiLink idlDefSeqType idlType
HiLink idlInterfaceSections Label
if exists("idlsyntax_showerror")
if exists("idlsyntax_showerror_soft")
hi default idlError guibg=#d0ffd0
else
HiLink idlError Error
endif
endif
delcommand HiLink
endif
let b:current_syntax = "idl"
" vim: sw=2 et

Просмотреть файл

@ -1,94 +0,0 @@
" Vim syntax file
" Language: login.defs(5) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword logindefsTodo contained TODO FIXME XXX NOTE
syn region logindefsComment display oneline start='^\s*#' end='$'
\ contains=logindefsTodo,@Spell
syn match logindefsString contained '[[:graph:]]\+'
syn match logindefsPath contained '[[:graph:]]\+'
syn match logindefsPaths contained '[[:graph:]]\+'
\ nextgroup=logindefsPathDelim
syn match logindefsPathDelim contained ':' nextgroup=logindefsPaths
syn keyword logindefsBoolean contained yes no
syn match logindefsDecimal contained '\<\d\+\>'
syn match logindefsOctal contained display '\<0\o\+\>'
\ contains=logindefsOctalZero
syn match logindefsOctalZero contained display '\<0'
syn match logindefsOctalError contained display '\<0\o*[89]\d*\>'
syn match logindefsHex contained display '\<0x\x\+\>'
syn cluster logindefsNumber contains=logindefsDecimal,logindefsOctal,
\ logindefsOctalError,logindefsHex
syn match logindefsBegin display '^'
\ nextgroup=logindefsKeyword,logindefsComment
\ skipwhite
syn keyword logindefsKeyword contained CHFN_AUTH CLOSE_SESSIONS CREATE_HOME
\ DEFAULT_HOME FAILLOG_ENAB LASTLOG_ENAB
\ LOG_OK_LOGINS LOG_UNKFAIL_ENAB MAIL_CHECK_ENAB
\ MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB
\ PASS_ALWAYS_WARN PORTTIME_CHECKS_ENAB
\ QUOTAS_ENAB SU_WHEEL_ONLY SYSLOG_SG_ENAB
\ SYSLOG_SU_ENAB USERGROUPS_ENAB
\ nextgroup=logindefsBoolean skipwhite
syn keyword logindefsKeyword contained CHFN_RESTRICT CONSOLE CONSOLE_GROUPS
\ ENV_TZ ENV_HZ FAKE_SHELL SU_NAME LOGIN_STRING
\ NOLOGIN_STR TTYGROUP USERDEL_CMD
\ nextgroup=logindefsString skipwhite
syn keyword logindefsKeyword contained ENVIRON_FILE FTMP_FILE HUSHLOGIN_FILE
\ ISSUE_FILE MAIL_DIR MAIL_FILE NOLOGINS_FILE
\ NOLOGINS_FILE TTYTYPE_FILE QMAIL_DIR
\ SULOG_FILE
\ nextgroup=logindefsPath skipwhite
syn keyword logindefsKeyword contained CRACKLIB_DICTPATH ENV_PATH
\ ENV_ROOTPATH ENV_SUPATH MOTD_FILE
\ nextgroup=logindefsPaths skipwhite
syn keyword logindefsKeyword contained ERASECHAR FAIL_DELAY GETPASS_ASTERISKS
\ GID_MAX GID_MIN KILLCHAR LOGIN_RETRIES
\ LOGIN_TIMEOUT PASS_CHANGE_TRIES PASS_MAX_DAYS
\ PASS_MAX_LEN PASS_MIN_DAYS PASS_MIN_LEN
\ PASS_WARN_AGE TTYPERM UID_MAX UID_MIN ULIMIT
\ UMASK
\ nextgroup=@logindefsNumber skipwhite
hi def link logindefsTodo Todo
hi def link logindefsComment Comment
hi def link logindefsString String
hi def link logindefsPath String
hi def link logindefsPaths logindefsPath
hi def link logindefsPathDelim Delimiter
hi def link logindefsBoolean Boolean
hi def link logindefsDecimal Number
hi def link logindefsOctal Number
hi def link logindefsOctalZero PreProc
hi def link logindefsOctalError Error
hi def link logindefsHex Number
hi def link logindefsKeyword Keyword
let b:current_syntax = "logindefs"
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,304 +0,0 @@
" Vim syntax file
" Language: Lua 4.0, Lua 5.0 and Lua 5.1
" Maintainer: Marcus Aurelius Farias <marcus.cf 'at' bol com br>
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
" Last Change: 2006 Aug 10
" Options: lua_version = 4 or 5
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1)
" default 5.1
" 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
if !exists("lua_version")
" Default is lua 5.1
let lua_version = 5
let lua_subversion = 1
elseif !exists("lua_subversion")
" lua_version exists, but lua_subversion doesn't. So, set it to 0
let lua_subversion = 0
endif
syn case match
" syncing method
syn sync minlines=100
" Comments
syn keyword luaTodo contained TODO FIXME XXX
syn match luaComment "--.*$" contains=luaTodo,@Spell
if lua_version == 5 && lua_subversion == 0
syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell
syn region luaInnerComment contained transparent start="\[\[" end="\]\]"
elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1)
" Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc.
syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell
endif
" First line may start with #!
syn match luaComment "\%^#!.*"
" catch errors caused by wrong parenthesis and wrong curly brackets or
" keywords placed outside their respective blocks
syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaError,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement
syn match luaError ")"
syn match luaError "}"
syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>"
" Function declaration
syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat
" if then else elseif end
syn keyword luaCond contained else
" then ... end
syn region luaCondEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaRepeat
" elseif ... then
syn region luaCondElseif contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat
" if ... then
syn region luaCondStart transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaCondEnd skipwhite skipempty
" do ... end
syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat
" repeat ... until
syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat
" while ... do
syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaBlock skipwhite skipempty
" for ... do and for ... in ... do
syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd nextgroup=luaBlock skipwhite skipempty
" Following 'else' example. This is another item to those
" contains=ALLBUT,... because only the 'for' luaRepeatBlock contains it.
syn keyword luaRepeat contained in
" other keywords
syn keyword luaStatement return local break
syn keyword luaOperator and or not
syn keyword luaConstant nil
if lua_version > 4
syn keyword luaConstant true false
endif
" Strings
if lua_version < 5
syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}"
elseif lua_version == 5 && lua_subversion == 0
syn match luaSpecial contained "\\[\\abfnrtv\'\"[\]]\|\\\d\{,3}"
syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell
elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1)
syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}"
syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell
endif
syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell
syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell
" integer number
syn match luaNumber "\<\d\+\>"
" floating point number, with dot, optional exponent
syn match luaFloat "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>"
" floating point number, starting with a dot, optional exponent
syn match luaFloat "\.\d\+\%(e[-+]\=\d\+\)\=\>"
" floating point number, without dot, with exponent
syn match luaFloat "\<\d\+e[-+]\=\d\+\>"
" hex numbers
if lua_version > 5 || (lua_version == 5 && lua_subversion >= 1)
syn match luaNumber "\<0x\x\+\>"
endif
" tables
syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement
syn keyword luaFunc assert collectgarbage dofile error next
syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION
if lua_version == 4
syn keyword luaFunc _ALERT _ERRORMESSAGE gcinfo
syn keyword luaFunc call copytagmethods dostring
syn keyword luaFunc foreach foreachi getglobal getn
syn keyword luaFunc gettagmethod globals newtag
syn keyword luaFunc setglobal settag settagmethod sort
syn keyword luaFunc tag tinsert tremove
syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR
syn keyword luaFunc openfile closefile flush seek
syn keyword luaFunc setlocale execute remove rename tmpname
syn keyword luaFunc getenv date clock exit
syn keyword luaFunc readfrom writeto appendto read write
syn keyword luaFunc PI abs sin cos tan asin
syn keyword luaFunc acos atan atan2 ceil floor
syn keyword luaFunc mod frexp ldexp sqrt min max log
syn keyword luaFunc log10 exp deg rad random
syn keyword luaFunc randomseed strlen strsub strlower strupper
syn keyword luaFunc strchar strrep ascii strbyte
syn keyword luaFunc format strfind gsub
syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook
elseif lua_version == 5
" Not sure if all these functions need to be highlighted...
syn keyword luaFunc _G getfenv getmetatable ipairs loadfile
syn keyword luaFunc loadstring pairs pcall rawequal
syn keyword luaFunc require setfenv setmetatable unpack xpcall
if lua_subversion == 0
syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME
elseif lua_subversion == 1
syn keyword luaFunc load module select
syn match luaFunc /package\.cpath/
syn match luaFunc /package\.loaded/
syn match luaFunc /package\.loadlib/
syn match luaFunc /package\.path/
syn match luaFunc /package\.preload/
syn match luaFunc /package\.seeall/
syn match luaFunc /coroutine\.running/
endif
syn match luaFunc /coroutine\.create/
syn match luaFunc /coroutine\.resume/
syn match luaFunc /coroutine\.status/
syn match luaFunc /coroutine\.wrap/
syn match luaFunc /coroutine\.yield/
syn match luaFunc /string\.byte/
syn match luaFunc /string\.char/
syn match luaFunc /string\.dump/
syn match luaFunc /string\.find/
syn match luaFunc /string\.len/
syn match luaFunc /string\.lower/
syn match luaFunc /string\.rep/
syn match luaFunc /string\.sub/
syn match luaFunc /string\.upper/
syn match luaFunc /string\.format/
syn match luaFunc /string\.gsub/
if lua_subversion == 0
syn match luaFunc /string\.gfind/
syn match luaFunc /table\.getn/
syn match luaFunc /table\.setn/
syn match luaFunc /table\.foreach/
syn match luaFunc /table\.foreachi/
elseif lua_subversion == 1
syn match luaFunc /string\.gmatch/
syn match luaFunc /string\.match/
syn match luaFunc /string\.reverse/
syn match luaFunc /table\.maxn/
endif
syn match luaFunc /table\.concat/
syn match luaFunc /table\.sort/
syn match luaFunc /table\.insert/
syn match luaFunc /table\.remove/
syn match luaFunc /math\.abs/
syn match luaFunc /math\.acos/
syn match luaFunc /math\.asin/
syn match luaFunc /math\.atan/
syn match luaFunc /math\.atan2/
syn match luaFunc /math\.ceil/
syn match luaFunc /math\.sin/
syn match luaFunc /math\.cos/
syn match luaFunc /math\.tan/
syn match luaFunc /math\.deg/
syn match luaFunc /math\.exp/
syn match luaFunc /math\.floor/
syn match luaFunc /math\.log/
syn match luaFunc /math\.log10/
syn match luaFunc /math\.max/
syn match luaFunc /math\.min/
if lua_subversion == 0
syn match luaFunc /math\.mod/
elseif lua_subversion == 1
syn match luaFunc /math\.fmod/
syn match luaFunc /math\.modf/
syn match luaFunc /math\.cosh/
syn match luaFunc /math\.sinh/
syn match luaFunc /math\.tanh/
endif
syn match luaFunc /math\.pow/
syn match luaFunc /math\.rad/
syn match luaFunc /math\.sqrt/
syn match luaFunc /math\.frexp/
syn match luaFunc /math\.ldexp/
syn match luaFunc /math\.random/
syn match luaFunc /math\.randomseed/
syn match luaFunc /math\.pi/
syn match luaFunc /io\.stdin/
syn match luaFunc /io\.stdout/
syn match luaFunc /io\.stderr/
syn match luaFunc /io\.close/
syn match luaFunc /io\.flush/
syn match luaFunc /io\.input/
syn match luaFunc /io\.lines/
syn match luaFunc /io\.open/
syn match luaFunc /io\.output/
syn match luaFunc /io\.popen/
syn match luaFunc /io\.read/
syn match luaFunc /io\.tmpfile/
syn match luaFunc /io\.type/
syn match luaFunc /io\.write/
syn match luaFunc /os\.clock/
syn match luaFunc /os\.date/
syn match luaFunc /os\.difftime/
syn match luaFunc /os\.execute/
syn match luaFunc /os\.exit/
syn match luaFunc /os\.getenv/
syn match luaFunc /os\.remove/
syn match luaFunc /os\.rename/
syn match luaFunc /os\.setlocale/
syn match luaFunc /os\.time/
syn match luaFunc /os\.tmpname/
syn match luaFunc /debug\.debug/
syn match luaFunc /debug\.gethook/
syn match luaFunc /debug\.getinfo/
syn match luaFunc /debug\.getlocal/
syn match luaFunc /debug\.getupvalue/
syn match luaFunc /debug\.setlocal/
syn match luaFunc /debug\.setupvalue/
syn match luaFunc /debug\.sethook/
syn match luaFunc /debug\.traceback/
if lua_subversion == 1
syn match luaFunc /debug\.getfenv/
syn match luaFunc /debug\.getmetatable/
syn match luaFunc /debug\.getregistry/
syn match luaFunc /debug\.setfenv/
syn match luaFunc /debug\.setmetatable/
endif
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_lua_syntax_inits")
if version < 508
let did_lua_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink luaStatement Statement
HiLink luaRepeat Repeat
HiLink luaString String
HiLink luaString2 String
HiLink luaNumber Number
HiLink luaFloat Float
HiLink luaOperator Operator
HiLink luaConstant Constant
HiLink luaCond Conditional
HiLink luaFunction Function
HiLink luaComment Comment
HiLink luaTodo Todo
HiLink luaTable Structure
HiLink luaError Error
HiLink luaSpecial SpecialChar
HiLink luaFunc Identifier
delcommand HiLink
endif
let b:current_syntax = "lua"
" vim: et ts=8

Просмотреть файл

@ -1,94 +0,0 @@
" Vim syntax file
" Language: Lynx configuration file (lynx.cfg)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/lynx.vim
" Last Change: 2007 Mar 20
" Lynx 2.8.5
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn match lynxLeadingWS "^\s*" transparent nextgroup=lynxOption
syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo
syn keyword lynxTodo TODO NOTE FIXME XXX contained
syn match lynxDelimiter ":" contained nextgroup=lynxBoolean,lynxNumber
syn case ignore
syn keyword lynxBoolean TRUE FALSE contained
syn case match
syn match lynxNumber "-\=\<\d\+\>" contained
syn case ignore
syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET
\ ASSUMED_COLOR ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_UNCACHE_DIRLISTS
\ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS
\ BOLD_NAME_ANCHORS CASE_SENSITIVE_ALWAYS_ON CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES
\ CHECKMAIL COLLAPSE_BR_TAGS COLOR CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS
\ COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE
\ COOKIE_STRICT_INVALID_DOMAINS CSO_PROXY CSWING_PATH DEBUGSECS DEFAULT_BOOKMARK_FILE
\ DEFAULT_CACHE_SIZE DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS
\ DEFAULT_USER_MODE DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE DOWNLOADER
\ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL FINGER_PROXY
\ FOCUS_WINDOW FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A FORCE_SSL_COOKIES_SECURE
\ FORCE_SSL_PROMPT FORMS_OPTIONS FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP
\ GLOBAL_MAILCAP GOPHER_PROXY GOTOBUFFER HELPFILE HIDDEN_LINK_MARKER
\ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROXY HTTPS_PROXY
\ INCLUDE INFOSECS JUMPBUFFER JUMPFILE JUMP_PROMPT
\ JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT KEYMAP LEFTARROW_IN_TEXTFIELD_PROMPT
\ LIST_FORMAT LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCAL_DOMAIN LOCALE_CHARSET
\ LOCAL_EXECUTION_LINKS_ALWAYS_ON LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST_ALIAS LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT
\ LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES
\ MAKE_PSEUDO_ALTS_FOR_INLINES MESSAGESECS MINIMAL_COMMENTS MULTI_BOOKMARK_SUPPORT NCR_IN_BOOKMARKS
\ NEWS_CHUNK_SIZE NEWS_MAX_CHUNK NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY
\ NEWSREPLY_PROXY NNTP_PROXY NNTPSERVER NO_DOT_FILES NO_FILE_REFERER
\ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NONRESTARTING_SIGWINCH NO_PROXY
\ NO_REFERER_HEADER NO_TABLE_CENTER NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET
\ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP PERSONAL_MAILCAP
\ PREFERRED_CHARSET PREFERRED_LANGUAGE PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC
\ PRETTYSRC_SPEC PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES REFERER_WITH_QUERY
\ REPLAYSECS REUSE_TEMPFILES RULE RULESFILE SAVE_SPACE
\ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR
\ SEEK_FRAG_MAP_IN_CUR SET_COOKIES SHOW_CURSOR SHOW_KB_NAME SHOW_KB_RATE
\ SNEWSPOST_PROXY SNEWS_PROXY SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE
\ SOURCE_CACHE_FOR_ABORTED STARTFILE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES SUFFIX
\ SUFFIX_ORDER SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP
\ TEXTFIELDS_NEED_ACTIVATION TIMEOUT TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI
\ UNDERLINE_LINKS UPLOADER URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USE_FIXED_RECORDS
\ USE_MOUSE USE_SELECT_POPUPS VERBOSE_IMAGES VIEWER VI_KEYS_ALWAYS_ON
\ WAIS_PROXY XLOADIMAGE_COMMAND contained nextgroup=lynxDelimiter
syn keyword lynxOption BZIP2_PATH CHMOD_PATH COMPRESS_PATH COPY_PATH GZIP_PATH
\ INSTALL_PATH MKDIR_PATH MV_PATH RLOGIN_PATH RMDIR_PATH
\ RM_PATH TAR_PATH TELNET_PATH TN3270_PATH TOUCH_PATH
\ UNCOMPRESS_PATH UNZIP_PATH UUDECODE_PATH ZCAT_PATH ZIP_PATH contained nextgroup=lynxDelimiter
syn case match
" NOTE: set this if you want the cfg2html.pl formatting directives to be highlighted
if exists("lynx_formatting_directives")
syn match lynxFormatDir "^\.\(h1\|h2\)\s.*$"
syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$"
syn match lynxFormatDir "^\.fi$"
endif
hi def link lynxBoolean Boolean
hi def link lynxComment Comment
hi def link lynxDelimiter Special
hi def link lynxFormatDir Special
hi def link lynxNumber Number
hi def link lynxOption Identifier
hi def link lynxTodo Todo
let b:current_syntax = "lynx"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8

Просмотреть файл

@ -1,54 +0,0 @@
" Vim syntax file
" Language: Mailcap configuration file
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" Last Change: 2004 Nov 27
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/mailcap.vim
" 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
syn match mailcapComment "^#.*"
syn region mailcapString start=+"+ end=+"+ contains=mailcapSpecial oneline
syn match mailcapDelimiter "\\\@<!;"
syn match mailcapSpecial "\\\@<!%[nstF]"
syn match mailcapSpecial "\\\@<!%{[^}]*}"
syn case ignore
syn match mailcapFlag "\(=\s*\)\@<!\<\(needsterminal\|copiousoutput\|x-\w\+\)\>"
syn match mailcapFieldname "\<\(compose\|composetyped\|print\|edit\|test\|x11-bitmap\|nametemplate\|textualnewlines\|description\|x-\w+\)\>\ze\s*="
syn match mailcapTypeField "^\(text\|image\|audio\|video\|application\|message\|multipart\|model\|x-[[:graph:]]\+\)\(/\(\*\|[[:graph:]]\+\)\)\=\ze\s*;"
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_mailcap_syntax_inits")
if version < 508
let did_mailcap_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink mailcapComment Comment
HiLink mailcapDelimiter Delimiter
HiLink mailcapFlag Statement
HiLink mailcapFieldname Statement
HiLink mailcapSpecial Identifier
HiLink mailcapTypeField Type
HiLink mailcapString String
delcommand HiLink
endif
let b:current_syntax = "mailcap"
" vim: tabstop=8

Просмотреть файл

@ -1,110 +0,0 @@
" Vim syntax file
" Language: Objective C
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Ex-maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm>
" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de>
" Last Change: 2007 Feb 21
" 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
if &filetype != 'objcpp'
" Read the C syntax to start with
if version < 600
source <sfile>:p:h/c.vim
else
runtime! syntax/c.vim
endif
endif
" Objective C extentions follow below
"
" NOTE: Objective C is abbreviated to ObjC/objc
" and uses *.h, *.m as file extensions!
" ObjC keywords, types, type qualifiers etc.
syn keyword objcStatement self super _cmd
syn keyword objcType id Class SEL IMP BOOL
syn keyword objcTypeModifier bycopy in out inout oneway
syn keyword objcConstant nil Nil
" Match the ObjC #import directive (like C's #include)
syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match objcImported display contained "<[-_0-9a-zA-Z.\/]*>"
syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported
" Match the important ObjC directives
syn match objcScopeDecl "@public\|@private\|@protected"
syn match objcDirective "@interface\|@implementation"
syn match objcDirective "@class\|@end\|@defs"
syn match objcDirective "@encode\|@protocol\|@selector"
syn match objcDirective "@try\|@catch\|@finally\|@throw\|@synchronized"
" Match the ObjC method types
"
" NOTE: here I match only the indicators, this looks
" much nicer and reduces cluttering color highlightings.
" However, if you prefer full method declaration matching
" append .* at the end of the next two patterns!
"
syn match objcInstMethod "^\s*-\s*"
syn match objcFactMethod "^\s*+\s*"
" To distinguish from a header inclusion from a protocol list.
syn match objcProtocol display "<[_a-zA-Z][_a-zA-Z0-9]*>" contains=objcType,cType,Type
" To distinguish labels from the keyword for a method's parameter.
syn region objcKeyForMethodParam display
\ start="^\s*[_a-zA-Z][_a-zA-Z0-9]*\s*:\s*("
\ end=")\s*[_a-zA-Z][_a-zA-Z0-9]*"
\ contains=objcType,objcTypeModifier,cType,cStructure,cStorageClass,Type
" Objective-C Constant Strings
syn match objcSpecial display "%@" contained
syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial
" Objective-C Message Expressions
syn region objcMessage display start="\[" end="\]" contains=objcMessage,objcStatement,objcType,objcTypeModifier,objcString,objcConstant,objcDirective,cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,Type
syn cluster cParenGroup add=objcMessage
syn cluster cPreProcGroup add=objcMessage
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_objc_syntax_inits")
if version < 508
let did_objc_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink objcImport Include
HiLink objcImported cString
HiLink objcTypeModifier objcType
HiLink objcType Type
HiLink objcScopeDecl Statement
HiLink objcInstMethod Function
HiLink objcFactMethod Function
HiLink objcStatement Statement
HiLink objcDirective Statement
HiLink objcKeyForMethodParam None
HiLink objcString cString
HiLink objcSpecial Special
HiLink objcProtocol None
HiLink objcConstant cConstant
delcommand HiLink
endif
let b:current_syntax = "objc"
" vim: ts=8

Просмотреть файл

@ -1,90 +0,0 @@
" Vim syntax file
" Language: Perl POD format
" Maintainer: Andy Lester <andy@petdance.com>
" Previously: Scott Bigham <dsb@killerbunnies.org>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" To add embedded POD documentation highlighting to your syntax file, add
" the commands:
"
" syn include @Pod <sfile>:p:h/pod.vim
" syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod
"
" and add myPod to the contains= list of some existing region, probably a
" comment. The "keepend" flag is needed because "=cut" is matched as a
" pattern in its own right.
" Remove any old syntax stuff hanging around (this is suppressed
" automatically by ":syn include" if necessary).
" 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
" POD commands
syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell
syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell
syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell
syn match podCommand "^=back" contains=@NoSpell
syn match podCommand "^=cut" contains=@NoSpell
syn match podCommand "^=pod" contains=@NoSpell
syn match podCommand "^=for" nextgroup=podForKeywd skipwhite contains=@NoSpell
syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite contains=@NoSpell
syn match podCommand "^=end" nextgroup=podForKeywd skipwhite contains=@NoSpell
" Text of a =head1, =head2 or =item command
syn match podCmdText ".*$" contained contains=podFormat,@NoSpell
" Indent amount of =over command
syn match podOverIndent "\d\+" contained contains=@NoSpell
" Formatter identifier keyword for =for, =begin and =end commands
syn match podForKeywd "\S\+" contained contains=@NoSpell
" An indented line, to be displayed verbatim
syn match podVerbatimLine "^\s.*$" contains=@NoSpell
" Inline textual items handled specially by POD
syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" contains=@NoSpell
syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell
" Special formatting sequences
syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell
syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell
syn match podFormat "Z<>"
syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell
syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell
syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_pod_syntax_inits")
if version < 508
let did_pod_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink podCommand Statement
HiLink podCmdText String
HiLink podOverIndent Number
HiLink podForKeywd Identifier
HiLink podFormat Identifier
HiLink podVerbatimLine PreProc
HiLink podSpecial Identifier
HiLink podEscape String
HiLink podEscape2 Number
delcommand HiLink
endif
let b:current_syntax = "pod"
" vim: ts=8

Просмотреть файл

@ -1,231 +0,0 @@
" Vim syntax file
" Language: Progress 4GL
" Filename extensions: *.p (collides with Pascal),
" *.i (collides with assembler)
" *.w (collides with cweb)
" Maintainer: Philip Uren <philuSPAX@ieee.org> Remove "SPAX" spam block
" Contributors: Chris Ruprecht <chrup@mac.com> (Chris, where are you now?)
" Mikhail Kuperblum <mikhail@whasup.com>
" John Florian <jflorian@voyager.net>
" Last Change: Wed Apr 12 08:55:35 EST 2006
" $Id: progress.vim,v 1.3 2006/04/12 21:48:47 vimboss Exp $
" 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
if version >= 600
setlocal iskeyword=@,48-57,_,-,!,#,$,%
else
set iskeyword=@,48-57,_,-,!,#,$,%
endif
" The Progress editor doesn't cope with tabs very well.
set expandtab
syn case ignore
" Progress Blocks of code and mismatched "end." errors.
syn match ProgressEndError "\<end\>"
syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\<do\>" matchgroup=ProgressDo end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
syn region ProgressForBlock transparent matchgroup=ProgressFor start="\<for\>" matchgroup=ProgressFor end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\<repeat\>" matchgroup=ProgressRepeat end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>" matchgroup=ProgressCase end="\<end\scase\>\|\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction
" These are Progress reserved words,
" and they could go in ProgressReserved,
" but I found it more helpful to highlight them in a different color.
syn keyword ProgressConditional if else then when otherwise
syn keyword ProgressFor each where
" Make those TODO and debugging notes stand out!
syn keyword ProgressTodo contained TODO BUG FIX
syn keyword ProgressDebug contained DEBUG
syn keyword ProgressDebug debugger
syn match ProgressTodo contained "NEED[S]*\s\s*WORK"
" If you like to highlight the whole line of
" the start and end of procedures
" to make the whole block of code stand out:
syn match ProgressProcedure "^\s*procedure.*"
syn match ProgressProcedure "^\s*end\s\s*procedure.*"
syn match ProgressFunction "^\s*function.*"
syn match ProgressFunction "^\s*end\s\s*function.*"
" ... otherwise use this:
" syn keyword ProgressFunction procedure function
syn keyword ProgressReserved accum[ulate] active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] assign at attr[-space]
syn keyword ProgressReserved authorization auto-ret[urn] avail[able] back[ground] before-h[ide] begins bell between blank break btos by call can-do can-find
syn keyword ProgressReserved center[ed] character check chr clear clipboard col colon color col[umn] column-lab[el] col[umns] compiler connected control count-of
syn keyword ProgressReserved cpstream create ctos current current-changed current-lang[uage] current-window current_date curs[or] database dataservers
syn keyword ProgressReserved dbcodepage dbcollation dbname dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimal decimals declare
syn keyword ProgressReserved def default default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp
syn keyword ProgressReserved disp[lay] distinct dos down drop editing enable encode entry error-stat[us] escape etime except exclusive
syn keyword ProgressReserved exclusive[-lock] exclusive-web-us[er] exists export false fetch field field[s] file-info[rmation] fill find find-case-sensitive
syn keyword ProgressReserved find-global find-next-occurrence find-prev-occurrence find-select find-wrap-around first first-of focus font form form[at]
syn keyword ProgressReserved fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line frame-name frame-row frame-val[ue]
syn keyword ProgressReserved from from-c[hars] from-p[ixels] gateway[s] get-byte get-codepage[s] get-coll[ations] get-key-val[ue] getbyte global go-on
syn keyword ProgressReserved go-pend[ing] grant graphic-e[dge] group having header help hide import in index indicator input input-o[utput] insert
syn keyword ProgressReserved integer into is is-attr[-space] join kblabel key-code key-func[tion] key-label keycode keyfunc[tion] keylabel keys keyword label
syn keyword ProgressReserved last last-even[t] last-key last-of lastkey ldbname leave library like line-count[er] listi[ng] locked lookup machine-class
syn keyword ProgressReserved map member message message-lines mouse mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s]
syn keyword ProgressReserved no-lock no-map no-mes[sage] no-pause no-prefe[tch] no-undo no-val[idate] no-wait not null num-ali[ases] num-dbs num-entries
syn keyword ProgressReserved of off old on open opsys option or os-append os-command os-copy os-create-dir os-delete os-dir os-drive[s] os-error os-rename
syn keyword ProgressReserved os2 os400 output overlay page page-bot[tom] page-num[ber] page-top param[eter] pause pdbname persist[ent] pixels
syn keyword ProgressReserved preproc[ess] privileges proc-ha[ndle] proc-st[atus] process program-name Progress prompt prompt[-for] promsgs propath provers[ion]
syn keyword ProgressReserved put put-byte put-key-val[ue] putbyte query query-tuning quit r-index rcode-informatio[n] readkey recid record-len[gth] rect[angle]
syn keyword ProgressReserved release reposition retain retry return return-val[ue] revert revoke run save schema screen screen-io screen-lines
syn keyword ProgressReserved scroll sdbname search seek select self session set setuser[id] share[-lock] shared show-stat[s] skip some space status stream
syn keyword ProgressReserved stream-io string-xref system-dialog table term term[inal] text text-cursor text-seg[-growth] this-procedure time title
syn keyword ProgressReserved to today top-only trans trans[action] trigger triggers trim true underl[ine] undo unform[atted] union unique unix up update
syn keyword ProgressReserved use-index use-revvideo use-underline user user[id] using v6frame value values variable view view-as vms wait-for web-con[text]
syn keyword ProgressReserved window window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xref yes _cbit
syn keyword ProgressReserved _control _list _memory _msg _pcontrol _serial[-num] _trace
" Strings. Handles embedded quotes.
" Note that, for some reason, Progress doesn't use the backslash, "\"
" as the escape character; it uses tilde, "~".
syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~'\|\~\~+
syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'\|\~\~+
syn match ProgressIdentifier "\<[a-zA-Z_%#]+\>()"
" syn match ProgressDelimiter "()"
syn match ProgressMatrixDelimiter "[][]"
" If you prefer you can highlight the range
"syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]"
syn match ProgressNumber "\<\-\=\d\+\(u\=l\=\|lu\|f\)\>"
syn match ProgressByte "\$[0-9a-fA-F]\+"
" More values: Logicals, and Progress's unknown value, ?.
syn match ProgressNumber "?"
syn keyword ProgressNumber true false yes no
" If you don't like tabs:
syn match ProgressShowTab "\t"
" If you don't like white space on the end of lines:
" syn match ProgressSpaceError "\s\+$"
syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug
syn region ProgressInclude start="^[ ]*[{][^&]" end="[}]" contains=ProgressPreProc,ProgressOperator,ProgressString,ProgressComment
syn region ProgressPreProc start="&" end="\>" contained
" This next line works reasonably well.
" syn match ProgressOperator "[!;|)(:.><+*=-]"
"
" Progress allows a '-' to be part of an identifier. To be considered
" the subtraction/negation operation operator it needs a non-word
" character on either side. Also valid are cases where the minus
" operation appears at the beginning or end of a line.
" This next line trips up on "no-undo" etc.
" syn match ProgressOperator "[!;|)(:.><+*=]\|\W-\W\|^-\W\|\W-$"
syn match ProgressOperator "[!;|)(:.><+*=]\|\s-\s\|^-\s\|\s-$"
syn keyword ProgressOperator <= <> >= abs[olute] accelerator across add-first add-last advise alert-box allow-replication ansi-only anywhere append appl-alert[-boxes] application as-cursor ask-overwrite
syn keyword ProgressOperator attach[ment] auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-z[ap] available-formats ave[rage] avg backward[s] base-key batch[-mode] bgc[olor] binary
syn keyword ProgressOperator bind-where block-iteration-display border-bottom border-bottom-ch[ars] border-bottom-pi[xels] border-left border-left-char[s] border-left-pixe[ls] border-right border-right-cha[rs]
syn keyword ProgressOperator border-right-pix[els] border-t[op] border-t[op-chars] border-top-pixel[s] both bottom box box-select[able] browse browse-header buffer buffer-chars buffer-lines
syn keyword ProgressOperator button button[s] byte cache cache-size can-query can-set cancel-break cancel-button caps careful-paint case-sensitive cdecl char[acter] character_length charset
syn keyword ProgressOperator checked choose clear-select[ion] close code codepage codepage-convert col-of colon-align[ed] color-table column-bgc[olor] column-dcolor column-fgc[olor] column-font
syn keyword ProgressOperator column-label-bgc[olor] column-label-dcolor column-label-fgc[olor] column-label-font column-of column-pfc[olor] column-sc[rolling] combo-box command compile complete
syn keyword ProgressOperator connect constrained contents context context-pop[up] control-containe[r] c[ontrol-form] convert-to-offse[t] convert count cpcase cpcoll cpint[ernal] cplog
syn keyword ProgressOperator cpprint cprcodein cprcodeout cpterm crc-val[ue] c[reate-control] create-result-list-entry create-test-file current-column current-environm[ent] current-iteration
syn keyword ProgressOperator current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-entry-retur[n] data-t[ype] date date-f[ormat] day db-references
syn keyword ProgressOperator dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] dec[imal] default-b[utton] default-extensio[n] defer-lob-fetch define defined delete-char delete-current-row
syn keyword ProgressOperator delete-line delete-selected-row delete-selected-rows deselect-focused-row deselect-rows deselect-selected-row d[esign-mode] dialog-box dialog-help dir disabled display-message
syn keyword ProgressOperator display-t[ype] double drag-enabled drop-down drop-down-list dump dynamic echo edge edge[-chars] edge-p[ixels] editor empty end-key endkey entered eq error error-col[umn]
syn keyword ProgressOperator error-row event-t[ype] event[s] exclusive-id execute exp expand extended extent external extract fetch-selected-row fgc[olor] file file-name file-off[set] file-type
syn keyword ProgressOperator filename fill-in filled filters first-child first-column first-proc[edure] first-tab-i[tem] fixed-only float focused-row font-based-layout font-table force-file
syn keyword ProgressOperator fore[ground] form-input forward[s] frame-spa[cing] frame-x frame-y frequency from-cur[rent] full-height full-height-char[s] full-height-pixe[ls] full-pathn[ame]
syn keyword ProgressOperator full-width full-width[-chars] full-width-pixel[s] ge get get-blue[-value] g[et-char-property] get-double get-dynamic get-file get-float get-green[-value]
syn keyword ProgressOperator get-iteration get-license get-long get-message get-number get-pointer-value get-red[-value] get-repositioned-row get-selected-wid[get] get-short get-signature get-size
syn keyword ProgressOperator get-string get-tab-item get-text-height get-text-height-char[s] get-text-height-pixe[ls] get-text-width get-text-width-c[hars] get-text-width-pixel[s] get-unsigned-short
syn keyword ProgressOperator grayed grid-factor-horizont[al] grid-factor-vert[ical] grid-set grid-snap grid-unit-height grid-unit-height-cha[rs] grid-unit-height-pix[els] grid-unit-width grid-unit-width-char[s]
syn keyword ProgressOperator grid-unit-width-pixe[ls] grid-visible gt handle height height[-chars] height-p[ixels] help-con[text] helpfile-n[ame] hidden hint hori[zontal] hwnd image image-down
syn keyword ProgressOperator image-insensitive image-size image-size-c[hars] image-size-pixel[s] image-up immediate-display index-hint indexed-reposition info[rmation] init init[ial] initial-dir
syn keyword ProgressOperator initial-filter initiate inner inner-chars inner-lines insert-b[acktab] insert-file insert-row insert-string insert-t[ab] int[eger] internal-entries is-lead-byte
syn keyword ProgressOperator is-row-selected is-selected item items-per-row join-by-sqldb keep-frame-z-ord[er] keep-messages keep-tab-order key keyword-all label-bgc[olor] label-dc[olor] label-fgc[olor]
syn keyword ProgressOperator label-font label-pfc[olor] labels language[s] large large-to-small last-child last-tab-i[tem] last-proce[dure] lc le leading left left-align[ed] left-trim length
syn keyword ProgressOperator line list-events list-items list-query-attrs list-set-attrs list-widgets load l[oad-control] load-icon load-image load-image-down load-image-insensitive load-image-up
syn keyword ProgressOperator load-mouse-point[er] load-small-icon log logical lookahead lower lt manual-highlight margin-extra margin-height margin-height-ch[ars] margin-height-pi[xels] margin-width
syn keyword ProgressOperator margin-width-cha[rs] margin-width-pix[els] matches max max-chars max-data-guess max-height max-height[-chars] max-height-pixel[s] max-rows max-size max-val[ue] max-width
syn keyword ProgressOperator max-width[-chars] max-width-p[ixels] maximize max[imum] memory menu menu-bar menu-item menu-k[ey] menu-m[ouse] menubar message-area message-area-font message-line
syn keyword ProgressOperator min min-height min-height[-chars] min-height-pixel[s] min-size min-val[ue] min-width min-width[-chars] min-width-p[ixels] min[imum] mod modified mod[ulo] month mouse-p[ointer]
syn keyword ProgressOperator movable move-after-tab-i[tem] move-before-tab-[item] move-col[umn] move-to-b[ottom] move-to-eof move-to-t[op] multiple multiple-key multitasking-interval must-exist
syn keyword ProgressOperator name native ne new-row next-col[umn] next-sibling next-tab-ite[m] next-value no-apply no-assign no-bind-where no-box no-column-scroll[ing] no-convert no-current-value
syn keyword ProgressOperator no-debug no-drag no-echo no-index-hint no-join-by-sqldb no-lookahead no-row-markers no-scrolling no-separate-connection no-separators no-und[erline] no-word-wrap
syn keyword ProgressOperator none num-but[tons] num-col[umns] num-copies num-formats num-items num-iterations num-lines num-locked-colum[ns] num-messages num-results num-selected num-selected-rows
syn keyword ProgressOperator num-selected-widgets num-tabs num-to-retain numeric numeric-f[ormat] octet_length ok ok-cancel on-frame[-border] ordered-join ordinal orientation os-getenv outer
syn keyword ProgressOperator outer-join override owner page-size page-wid[th] paged parent partial-key pascal pathname pfc[olor] pinnable pixels-per-colum[n] pixels-per-row popup-m[enu] popup-o[nly]
syn keyword ProgressOperator position precision presel[ect] prev prev-col[umn] prev-sibling prev-tab-i[tem] primary printer-control-handle printer-setup private-d[ata] profiler Progress-s[ource]
syn keyword ProgressOperator publish put-double put-float put-long put-short put-string put-unsigned-short query-off-end question radio-buttons radio-set random raw raw-transfer read-file read-only
syn keyword ProgressOperator real recursive refresh refreshable replace replace-selection-text replication-create replication-delete replication-write request resiza[ble] resize retry-cancel
syn keyword ProgressOperator return-ins[erted] return-to-start-di[r] reverse-from right right-align[ed] right-trim round row row-ma[rkers] row-of rowid rule rule-row rule-y save-as save-file
syn keyword ProgressOperator screen-val[ue] scroll-bars scroll-delta scroll-horiz-value scroll-offset scroll-to-current-row scroll-to-i[tem] scroll-to-selected-row scroll-vert-value scrollable
syn keyword ProgressOperator scrollbar-horizo[ntal] scrollbar-vertic[al] scrolled-row-positio[n] scrolling se-check-pools se-enable-of[f] se-enable-on se-num-pools se-use-messa[ge] section select-focused-row
syn keyword ProgressOperator select-next-row select-prev-row select-repositioned-row select-row selectable selected selected-items selection-end selection-list selection-start selection-text
syn keyword ProgressOperator send sensitive separate-connection separators set-blue[-value] set-break set-cell-focus set-contents set-dynamic set-green[-value] set-leakpoint set-pointer-valu[e]
syn keyword ProgressOperator s[et-property] set-red[-value] set-repositioned-row set-selection set-size set-wait[-state] side-lab side-lab[e] side-lab[el] side-label-handl[e] side-lab[els] silent
syn keyword ProgressOperator simple single size size-c[hars] size-p[ixels] slider smallint sort source source-procedure sql sqrt start status-area status-area-font status-bar stdcall stenciled stop stoppe[d]
syn keyword ProgressOperator stored-proc[edure] string sub-ave[rage] sub-count sub-max[imum] sub-me[nu] sub-menu-help sub-min[imum] sub-total subscribe subst[itute] substr[ing] subtype sum super suppress-warning[s]
syn keyword ProgressOperator system-alert-box[es] system-help tab-position tabbable target target-procedure temp-dir[ectory] temp-table terminate text-selected three-d through thru tic-marks time-source title-bgc[olor]
syn keyword ProgressOperator title-dc[olor] title-fgc[olor] title-fo[nt] to-rowid toggle-box tool-bar top topic total trailing trunc[ate] type unbuff[ered] unique-id unload unsubscribe upper use use-dic[t-exps]
syn keyword ProgressOperator use-filename use-text v6display valid-event valid-handle validate validate-condition validate-message var[iable] vert[ical] virtual-height virtual-height-c[hars]
syn keyword ProgressOperator virtual-height-pixel[s] virtual-width virtual-width-ch[ars] virtual-width-pi[xels] visible wait warning weekday widget widget-e[nter] widget-h[andle] widget-l[eave]
syn keyword ProgressOperator widget-pool width width[-chars] width-p[ixels] window-name window-sta[te] window-sys[tem] word-wrap x-of y-of year yes-no yes-no-cancel _dcm
syn keyword ProgressType char[acter] int[eger] format
syn keyword ProgressType var[iable] log[ical] da[te]
syn sync lines=800
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_progress_syntax_inits")
if version < 508
let did_progress_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default methods for highlighting. Can be overridden later.
HiLink ProgressByte Number
HiLink ProgressCase Repeat
HiLink ProgressComment Comment
HiLink ProgressConditional Conditional
HiLink ProgressDebug Debug
HiLink ProgressDo Repeat
HiLink ProgressEndError Error
HiLink ProgressFor Repeat
HiLink ProgressFunction Procedure
HiLink ProgressIdentifier Identifier
HiLink ProgressInclude Include
HiLink ProgressMatrixDelimiter Identifier
HiLink ProgressNumber Number
HiLink ProgressOperator Operator
HiLink ProgressPreProc PreProc
HiLink ProgressProcedure Procedure
HiLink ProgressQuote Delimiter
HiLink ProgressRepeat Repeat
HiLink ProgressReserved Statement
HiLink ProgressSpaceError Error
HiLink ProgressString String
HiLink ProgressTodo Todo
HiLink ProgressType Statement
HiLink ProgressShowTab Error
delcommand HiLink
endif
let b:current_syntax = "progress"
" vim: ts=8 sw=8

Просмотреть файл

@ -1,111 +0,0 @@
" Vim syntax file
" Language: R (GNU S)
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
" Last Change: 2006 Apr 30
" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
" First maintainer Tom Payne <tom@tompayne.org>
" Modified to make syntax less colourful and added the highlighting of
" R assignment arrow
" 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
if version >= 600
setlocal iskeyword=@,48-57,_,.
else
set iskeyword=@,48-57,_,.
endif
syn case match
" Comment
syn match rComment /\#.*/
" Constant
" string enclosed in double quotes
syn region rString start=/"/ skip=/\\\\\|\\"/ end=/"/
" string enclosed in single quotes
syn region rString start=/'/ skip=/\\\\\|\\'/ end=/'/
" number with no fractional part or exponent
syn match rNumber /\d\+/
" floating point number with integer and fractional parts and optional exponent
syn match rFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
" floating point number with no integer part and optional exponent
syn match rFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
" floating point number with no fractional part and optional exponent
syn match rFloat /\d\+[Ee][-+]\=\d\+/
" Identifier
" identifier with leading letter and optional following keyword characters
syn match rIdentifier /\a\k*/
" identifier with leading period, one or more digits, and at least one non-digit keyword character
syn match rIdentifier /\.\d*\K\k*/
" Statement
syn keyword rStatement break next return
syn keyword rConditional if else
syn keyword rRepeat for in repeat while
" Constant
syn keyword rConstant LETTERS letters month.ab month.name pi
syn keyword rConstant NULL
syn keyword rBoolean FALSE TRUE
syn keyword rNumber NA
syn match rArrow /<\{1,2}-/
" Type
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
" Special
syn match rDelimiter /[,;:]/
" Error
syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
syn match rError /[)\]}]/
syn match rBraceError /[)}]/ contained
syn match rCurlyError /[)\]]/ contained
syn match rParenError /[\]}]/ contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_r_syn_inits")
if version < 508
let did_r_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink rComment Comment
HiLink rConstant Constant
HiLink rString String
HiLink rNumber Number
HiLink rBoolean Boolean
HiLink rFloat Float
HiLink rStatement Statement
HiLink rConditional Conditional
HiLink rRepeat Repeat
HiLink rIdentifier Normal
HiLink rArrow Statement
HiLink rType Type
HiLink rDelimiter Delimiter
HiLink rError Error
HiLink rBraceError Error
HiLink rCurlyError Error
HiLink rParenError Error
delcommand HiLink
endif
let b:current_syntax="r"
" vim: ts=8 sw=2

Просмотреть файл

@ -1,176 +0,0 @@
" Vim syntax file
" Language: readline(3) configuration file
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2009-05-25
" readline_has_bash - if defined add support for bash specific
" settings/functions
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
setlocal iskeyword+=-
syn keyword readlineTodo contained TODO FIXME XXX NOTE
syn region readlineComment display oneline start='^\s*#' end='$'
\ contains=readlineTodo,@Spell
syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys
syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+
\ end=+"+ contains=readlineKeysTwo
syn case ignore
syn keyword readlineKeys contained Control Meta Del Esc Escape LFD
\ Newline Ret Return Rubout Space Spc Tab
syn case match
syn match readlineKeysTwo contained display
\ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+
syn match readlineKeymaps contained display
\ 'emacs\(-standard\|-meta\|-ctlx\)\='
syn match readlineKeymaps contained display
\ 'vi\(-move\|-command\|-insert\)\='
syn keyword readlineBellStyles contained audible visible none
syn match readlineNumber contained display '\<\d\+\>'
syn case ignore
syn keyword readlineBoolean contained on off
syn case match
syn keyword readlineIfOps contained mode term
syn region readlineConditional display oneline transparent
\ matchgroup=readlineConditional
\ start='^\s*$if' end="$"
\ contains=readlineIfOps,readlineKeymaps
syn match readlineConditional display '^\s*$\(else\|endif\)\>'
syn match readlineInclude display '^\s*$include\>'
syn region readlineSet display oneline transparent
\ matchgroup=readlineKeyword start='^\s*set\>'
\ end="$"me=e-1 contains=readlineNumber,
\ readlineBoolean,readlineKeymaps,
\ readlineBellStyles,readlineSettings
syn keyword readlineSettings contained bell-style comment-begin
\ completion-ignore-case completion-query-items
\ convert-meta disable-completion editing-mode
\ enable-keypad expand-tilde
\ horizontal-scroll-mode mark-directories
\ keymap mark-modified-lines meta-flag
\ input-meta output-meta
\ print-completions-horizontally
\ show-all-if-ambiguous visible-stats
\ prefer-visible-bell blink-matching-paren
\ match-hidden-files history-preserve-point
\ isearch-terminators
syn region readlineBinding display oneline transparent
\ matchgroup=readlineKeyword start=':' end='$'
\ contains=readlineKeys,readlineFunctions
syn keyword readlineFunctions contained display
\ beginning-of-line end-of-line forward-char
\ backward-char forward-word backward-word
\ clear-screen redraw-current-line
\ accept-line previous-history
\ next-history beginning-of-history
\ end-of-history reverse-search-history
\ forward-search-history
\ non-incremental-reverse-search-history
\ non-incremental-forward-search-history
\ history-search-forward
\ history-search-backward
\ yank-nth-arg yank-last-arg
\ delete-char backward-delete-char
\ forward-backward-delete-char quoted-insert
\ tab-insert self-insert transpose-chars
\ transpose-words upcase-word downcase-word
\ capitalize-word overwrite-mode kill-line
\ backward-kill-line unix-line-discard
\ kill-whole-line kill-word backward-kill-word
\ unix-word-rubout unix-filename-rubout
\ delete-horizontal-space kill-region
\ copy-region-as-kill copy-backward-word
\ copy-forward-word yank yank-pop
\ digit-argument universal-argument complete
\ possible-completions insert-completions
\ menu-complete delete-char-or-list
\ start-kbd-macro end-kbd-macro
\ call-last-kbd-macro re-read-init-file
\ abort do-uppercase-version prefix-meta
\ undo revert-line tilde-expand set-mark
\ exchange-point-and-mark character-search
\ character-search-backward insert-comment
\ dump-functions dump-variables dump-macros
\ emacs-editing-mode vi-editing-mode
\ vi-complete vi-char-search vi-redo
\ vi-search vi-arg-digit vi-append-eol
\ vi-prev-word vi-change-to vi-delete-to
\ vi-end-word vi-fetch-history vi-insert-beg
\ vi-search-again vi-put vi-replace
\ vi-subst vi-yank-to vi-first-print
\ vi-yank-arg vi-goto-mark vi-append-mode
\ vi-insertion-mode prev-history vi-set-mark
\ vi-search-again vi-put vi-change-char
\ vi-subst vi-delete vi-yank-to
\ vi-column vi-change-case vi-overstrike
\ vi-overstrike-delete do-lowercase-version
\ delete-char-or-list tty-status
\ arrow-key-prefix vi-back-to-indent vi-bword
\ vi-bWord vi-eword vi-eWord vi-fword vi-fWord
\ vi-next-word
\ vi-movement-mode
if exists("readline_has_bash")
syn keyword readlineFunctions contained
\ shell-expand-line history-expand-line
\ magic-space alias-expand-line
\ history-and-alias-expand-line
\ insert-last-argument operate-and-get-next
\ forward-backward-delete-char
\ delete-char-or-list complete-filename
\ possible-filename-completions
\ complete-username
\ possible-username-completions
\ complete-variable
\ possible-variable-completions
\ complete-hostname
\ possible-hostname-completions
\ complete-command
\ possible-command-completions
\ dynamic-complete-history
\ complete-into-braces
\ glob-expand-word glob-list-expansions
\ display-shell-version glob-complete-word
\ edit-and-execute-command
endif
hi def link readlineComment Comment
hi def link readlineTodo Todo
hi def link readlineString String
hi def link readlineKeys SpecialChar
hi def link readlineKeysTwo SpecialChar
hi def link readlineKeymaps Constant
hi def link readlineBellStyles Constant
hi def link readlineNumber Number
hi def link readlineBoolean Boolean
hi def link readlineIfOps Type
hi def link readlineConditional Conditional
hi def link readlineInclude Include
hi def link readlineKeyword Keyword
hi def link readlineSettings Type
hi def link readlineFunctions Type
let b:current_syntax = "readline"
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,116 +0,0 @@
" Vim syntax file
" Language: OpenSSH client configuration file (ssh_config)
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" Last Change: 2009-07-09
" Setup
if version >= 600
if exists("b:current_syntax")
finish
endif
else
syntax clear
endif
if version >= 600
setlocal iskeyword=_,-,a-z,A-Z,48-57
else
set iskeyword=_,-,a-z,A-Z,48-57
endif
syn case ignore
" Comments
syn match sshconfigComment "#.*$" contains=sshconfigTodo
syn keyword sshconfigTodo TODO FIXME NOT contained
" Constants
syn keyword sshconfigYesNo yes no ask
syn keyword sshconfigYesNo any auto
syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshconfigMAC hmac-md5-96
syn match sshconfigMAC "\<umac-64@openssh\.com\>"
syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
syn keyword sshconfigPreferredAuth hostbased publickey password
syn keyword sshconfigPreferredAuth keyboard-interactive
syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
syn match sshconfigVar "%[rhpldun]\>"
syn match sshconfigSpecial "[*?]"
syn match sshconfigNumber "\d\+"
syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
" Keywords
syn keyword sshconfigHostSect Host
syn keyword sshconfigKeyword AddressFamily
syn keyword sshconfigKeyword BatchMode BindAddress
syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP
syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings
syn keyword sshconfigKeyword Compression CompressionLevel ConnectTimeout
syn keyword sshconfigKeyword ConnectionAttempts ControlMaster
syn keyword sshconfigKeyword ControlPath DynamicForward
syn keyword sshconfigKeyword EnableSSHKeysign EscapeChar ExitOnForwardFailure
syn keyword sshconfigKeyword ForwardAgent ForwardX11
syn keyword sshconfigKeyword ForwardX11Trusted
syn keyword sshconfigKeyword GSSAPIAuthentication
syn keyword sshconfigKeyword GSSAPIDelegateCredentials GatewayPorts
syn keyword sshconfigKeyword GlobalKnownHostsFile
syn keyword sshconfigKeyword HostKeyAlgorithms HashKnownHosts
syn keyword sshconfigKeyword HostKeyAlias HostName HostbasedAuthentication
syn keyword sshconfigKeyword IdentitiesOnly IdentityFile
syn keyword sshconfigKeyword KbdInteractiveAuthentication KbdInteractiveDevices
syn keyword sshconfigKeyword LocalCommand LocalForward LogLevel
syn keyword sshconfigKeyword MACs
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
syn keyword sshconfigKeyword NumberOfPasswordPrompts
syn keyword sshconfigKeyword PasswordAuthentication PermitLocalCommand
syn keyword sshconfigKeyword Port PreferredAuthentications Protocol
syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication
syn keyword sshconfigKeyword PermitLocalCommand
syn keyword sshconfigKeyword RSAAuthentication RemoteForward RekeyLimit
syn keyword sshconfigKeyword RhostsRSAAuthentication
syn keyword sshconfigKeyword SendEnv ServerAliveCountMax ServerAliveInterval
syn keyword sshconfigKeyword SmartcardDevice StrictHostKeyChecking
syn keyword sshconfigKeyword Tunnel TunnelDevice
syn keyword sshconfigKeyword TCPKeepAlive UsePrivilegedPort User
syn keyword sshconfigKeyword UserKnownHostsFile
syn keyword sshconfigKeyword VerifyHostKeyDNS VisualHostKey
syn keyword sshconfigKeyword XAuthLocation
" Define the default highlighting
if version >= 508 || !exists("did_sshconfig_syntax_inits")
if version < 508
let did_sshconfig_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink sshconfigComment Comment
HiLink sshconfigTodo Todo
HiLink sshconfigHostPort sshconfigConstant
HiLink sshconfigNumber sshconfigConstant
HiLink sshconfigConstant Constant
HiLink sshconfigYesNo sshconfigEnum
HiLink sshconfigCipher sshconfigEnum
HiLink sshconfigMAC sshconfigEnum
HiLink sshconfigHostKeyAlg sshconfigEnum
HiLink sshconfigLogLevel sshconfigEnum
HiLink sshconfigSysLogFacility sshconfigEnum
HiLink sshconfigPreferredAuth sshconfigEnum
HiLink sshconfigVar sshconfigEnum
HiLink sshconfigEnum Identifier
HiLink sshconfigSpecial Special
HiLink sshconfigKeyword Keyword
HiLink sshconfigHostSect Type
delcommand HiLink
endif
let b:current_syntax = "sshconfig"

Просмотреть файл

@ -1,111 +0,0 @@
" Vim syntax file
" Language: OpenSSH server configuration file (sshd_config)
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" Last Change: 2009-07-09
" Setup
if version >= 600
if exists("b:current_syntax")
finish
endif
else
syntax clear
endif
if version >= 600
setlocal iskeyword=_,-,a-z,A-Z,48-57
else
set iskeyword=_,-,a-z,A-Z,48-57
endif
syn case ignore
" Comments
syn match sshdconfigComment "#.*$" contains=sshdconfigTodo
syn keyword sshdconfigTodo TODO FIXME NOT contained
" Constants
syn keyword sshdconfigYesNo yes no none
syn keyword sshdconfigAddressFamily any inet inet6
syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshdconfigMAC hmac-md5-96
syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
syn keyword sshdconfigRootLogin without-password forced-commands-only
syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
syn match sshdconfigSpecial "[*?]"
syn match sshdconfigNumber "\d\+"
syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
" FIXME: this matches quite a few things which are NOT valid IPv6 addresses
syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
" Keywords
syn keyword sshdconfigMatch Host User Group Address
syn keyword sshdconfigKeyword AcceptEnv AddressFamily AllowAgentForwarding
syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile
syn keyword sshdconfigKeyword Banner
syn keyword sshdconfigKeyword ChallengeResponseAuthentication ChrootDirectory
syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
syn keyword sshdconfigKeyword ClientAliveInterval Compression
syn keyword sshdconfigKeyword DenyGroups DenyUsers
syn keyword sshdconfigKeyword ForceCommand
syn keyword sshdconfigKeyword GatewayPorts GSSAPIAuthentication
syn keyword sshdconfigKeyword GSSAPICleanupCredentials
syn keyword sshdconfigKeyword HostbasedAuthentication HostKey
syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
syn keyword sshdconfigKeyword KerberosAuthentication KerberosGetAFSToken
syn keyword sshdconfigKeyword KerberosOrLocalPasswd KerberosTicketCleanup
syn keyword sshdconfigKeyword KeyRegenerationInterval
syn keyword sshdconfigKeyword ListenAddress LoginGraceTime LogLevel
syn keyword sshdconfigKeyword MACs Match MaxAuthTries MaxSessions MaxStartups
syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords
syn keyword sshdconfigKeyword PermitRootLogin PermitOpen PermitTunnel
syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
syn keyword sshdconfigKeyword PubkeyAuthentication
syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication
syn keyword sshdconfigKeyword ServerKeyBits ShowPatchLevel StrictModes
syn keyword sshdconfigKeyword Subsystem SyslogFacility
syn keyword sshdconfigKeyword TCPKeepAlive
syn keyword sshdconfigKeyword UseDNS UseLogin UsePAM UsePrivilegeSeparation
syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
" Define the default highlighting
if version >= 508 || !exists("did_sshdconfig_syntax_inits")
if version < 508
let did_sshdconfig_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink sshdconfigComment Comment
HiLink sshdconfigTodo Todo
HiLink sshdconfigHostPort sshdconfigConstant
HiLink sshdconfigTime sshdconfigConstant
HiLink sshdconfigNumber sshdconfigConstant
HiLink sshdconfigConstant Constant
HiLink sshdconfigYesNo sshdconfigEnum
HiLink sshdconfigAddressFamily sshdconfigEnum
HiLink sshdconfigCipher sshdconfigEnum
HiLink sshdconfigMAC sshdconfigEnum
HiLink sshdconfigRootLogin sshdconfigEnum
HiLink sshdconfigLogLevel sshdconfigEnum
HiLink sshdconfigSysLogFacility sshdconfigEnum
HiLink sshdconfigEnum Function
HiLink sshdconfigSpecial Special
HiLink sshdconfigKeyword Keyword
HiLink sshdconfigMatch Type
delcommand HiLink
endif
let b:current_syntax = "sshdconfig"

Просмотреть файл

@ -1,162 +0,0 @@
" Vim syntax file
" Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc )
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/tidy.vim
" Last Change: 2005 Oct 06
" 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
if version < 600
set iskeyword=@,48-57,-
else
setlocal iskeyword=@,48-57,-
endif
syn match tidyComment "^\s*//.*$" contains=tidyTodo
syn match tidyComment "^\s*#.*$" contains=tidyTodo
syn keyword tidyTodo TODO NOTE FIXME XXX contained
syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter
syn match tidyDelimiter ":" contained
syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter
syn match tidyNewTagDelimiter "," contained
syn match tidyNewTagValue "\<\w\+\>" contained
syn case ignore
syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained
syn case match
syn match tidyDoctype "\<omit\|auto\|strict\|loose\|transitional\|user\>" contained
" NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not
" always have precedence over tidyOption 'raw'
syn match tidyEncoding "\<\(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained
syn match tidyNewline "\<\(LF\|CRLF\|CR\)\>"
syn match tidyNumber "\<\d\+\>" contained
syn match tidyRepeat "\<keep-first\|keep-last\>" contained
syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString
syn match tidyOption "^accessibility-check" contained
syn match tidyOption "^add-xml-decl" contained
syn match tidyOption "^add-xml-pi" contained
syn match tidyOption "^add-xml-space" contained
syn match tidyOption "^alt-text" contained
syn match tidyOption "^ascii-chars" contained
syn match tidyOption "^assume-xml-procins" contained
syn match tidyOption "^bare" contained
syn match tidyOption "^break-before-br" contained
syn match tidyOption "^char-encoding" contained
syn match tidyOption "^clean" contained
syn match tidyOption "^css-prefix" contained
syn match tidyOption "^doctype" contained
syn match tidyOption "^doctype-mode" contained
syn match tidyOption "^drop-empty-paras" contained
syn match tidyOption "^drop-font-tags" contained
syn match tidyOption "^drop-proprietary-attributes" contained
syn match tidyOption "^enclose-block-text" contained
syn match tidyOption "^enclose-text" contained
syn match tidyOption "^error-file" contained
syn match tidyOption "^escape-cdata" contained
syn match tidyOption "^fix-backslash" contained
syn match tidyOption "^fix-bad-comments" contained
syn match tidyOption "^fix-uri" contained
syn match tidyOption "^force-output" contained
syn match tidyOption "^gnu-emacs" contained
syn match tidyOption "^gnu-emacs-file" contained
syn match tidyOption "^hide-comments" contained
syn match tidyOption "^hide-endtags" contained
syn match tidyOption "^indent" contained
syn match tidyOption "^indent-attributes" contained
syn match tidyOption "^indent-cdata" contained
syn match tidyOption "^indent-spaces" contained
syn match tidyOption "^input-encoding" contained
syn match tidyOption "^input-xml" contained
syn match tidyOption "^join-classes" contained
syn match tidyOption "^join-styles" contained
syn match tidyOption "^keep-time" contained
syn match tidyOption "^language" contained
syn match tidyOption "^literal-attributes" contained
syn match tidyOption "^logical-emphasis" contained
syn match tidyOption "^lower-literals" contained
syn match tidyOption "^markup" contained
syn match tidyOption "^merge-divs" contained
syn match tidyOption "^ncr" contained
syn match tidyOption "^newline" contained
syn match tidyOption "^numeric-entities" contained
syn match tidyOption "^output-bom" contained
syn match tidyOption "^output-encoding" contained
syn match tidyOption "^output-file" contained
syn match tidyOption "^output-html" contained
syn match tidyOption "^output-xhtml" contained
syn match tidyOption "^output-xml" contained
syn match tidyOption "^punctuation-wrap" contained
syn match tidyOption "^quiet" contained
syn match tidyOption "^quote-ampersand" contained
syn match tidyOption "^quote-marks" contained
syn match tidyOption "^quote-nbsp" contained
syn match tidyOption "^raw" contained
syn match tidyOption "^repeated-attributes" contained
syn match tidyOption "^replace-color" contained
syn match tidyOption "^show-body-only" contained
syn match tidyOption "^show-errors" contained
syn match tidyOption "^show-warnings" contained
syn match tidyOption "^slide-style" contained
syn match tidyOption "^split" contained
syn match tidyOption "^tab-size" contained
syn match tidyOption "^tidy-mark" contained
syn match tidyOption "^uppercase-attributes" contained
syn match tidyOption "^uppercase-tags" contained
syn match tidyOption "^word-2000" contained
syn match tidyOption "^wrap" contained
syn match tidyOption "^wrap-asp" contained
syn match tidyOption "^wrap-attributes" contained
syn match tidyOption "^wrap-jste" contained
syn match tidyOption "^wrap-php" contained
syn match tidyOption "^wrap-script-literals" contained
syn match tidyOption "^wrap-sections" contained
syn match tidyOption "^write-back" contained
syn match tidyOption "^vertical-space" contained
syn match tidyNewTagOption "^new-blocklevel-tags" contained
syn match tidyNewTagOption "^new-empty-tags" contained
syn match tidyNewTagOption "^new-inline-tags" contained
syn match tidyNewTagOption "^new-pre-tags" contained
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_tidy_syn_inits")
if version < 508
let did_tidy_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink tidyBoolean Boolean
HiLink tidyComment Comment
HiLink tidyDelimiter Special
HiLink tidyDoctype Constant
HiLink tidyEncoding Constant
HiLink tidyNewline Constant
HiLink tidyNewTagDelimiter Special
HiLink tidyNewTagOption Identifier
HiLink tidyNewTagValue Constant
HiLink tidyNumber Number
HiLink tidyOption Identifier
HiLink tidyRepeat Constant
HiLink tidyString String
HiLink tidyTodo Todo
delcommand HiLink
endif
let b:current_syntax = "tidy"
" vim: ts=8

Просмотреть файл

@ -1,194 +0,0 @@
" Wget syntax file
" Filename: wget.vim
" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc )
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
" Last Change: 2005 Jul 24
" TODO: all commands are actually underscore and hyphen insensitive, though
" they are normally named as listed below
" 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
syn match wgetComment "^\s*#.*$" contains=wgetTodo
syn keyword wgetTodo TODO NOTE FIXME XXX contained
syn match wgetAssignment "^\s*[A-Za-z0-9_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota,wgetRestriction,wgetTime
syn match wgetAssignmentOperator "=" contained
syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
" Note: make this a match so that always_rest matches properly
syn case ignore
syn match wgetBoolean "\<on\|off\|always\|never\|1\|0\>" contained
syn case match
syn match wgetNumber "\<\d\+\|inf\>" contained
syn match wgetQuota "\<\d\+[kKmM]\?\>" contained
syn match wgetTime "\<\d\+[smhdw]\>" contained
syn case ignore
syn keyword wgetValue default binary mega giga micro contained
syn case match
syn match wgetRestriction "\<\%(windows\|unix\)\%(,nocontrol\)\=\>" contained
syn match wgetRestriction "\<nocontrol\>" contained
syn case ignore
syn match wgetCommand "^\s*accept" contained
syn match wgetCommand "^\s*add[-_]\=hostdir" contained
syn match wgetCommand "^\s*always[-_]\=rest" contained
syn match wgetCommand "^\s*background" contained
syn match wgetCommand "^\s*backup[-_]\=converted" contained
syn match wgetCommand "^\s*backups" contained
syn match wgetCommand "^\s*base" contained
syn match wgetCommand "^\s*bind[-_]\=address" contained
syn match wgetCommand "^\s*ca[-_]\=certificate" contained
syn match wgetCommand "^\s*ca[-_]\=directory" contained
syn match wgetCommand "^\s*cache" contained
syn match wgetCommand "^\s*certificate" contained
syn match wgetCommand "^\s*certificate[-_]\=type" contained
syn match wgetCommand "^\s*check[-_]\=certificate" contained
syn match wgetCommand "^\s*connect[-_]\=timeout" contained
syn match wgetCommand "^\s*continue" contained
syn match wgetCommand "^\s*convert[-_]\=links" contained
syn match wgetCommand "^\s*cookies" contained
syn match wgetCommand "^\s*cut[-_]\=dirs" contained
syn match wgetCommand "^\s*debug" contained
syn match wgetCommand "^\s*delete[-_]\=after" contained
syn match wgetCommand "^\s*dns[-_]\=cache" contained
syn match wgetCommand "^\s*dns[-_]\=timeout" contained
syn match wgetCommand "^\s*dir[-_]\=prefix" contained
syn match wgetCommand "^\s*dir[-_]\=struct" contained
syn match wgetCommand "^\s*domains" contained
syn match wgetCommand "^\s*dot[-_]\=bytes" contained
syn match wgetCommand "^\s*dots[-_]\=in[-_]\=line" contained
syn match wgetCommand "^\s*dot[-_]\=spacing" contained
syn match wgetCommand "^\s*dot[-_]\=style" contained
syn match wgetCommand "^\s*egd[-_]\=file" contained
syn match wgetCommand "^\s*exclude[-_]\=directories" contained
syn match wgetCommand "^\s*exclude[-_]\=domains" contained
syn match wgetCommand "^\s*follow[-_]\=ftp" contained
syn match wgetCommand "^\s*follow[-_]\=tags" contained
syn match wgetCommand "^\s*force[-_]\=html" contained
syn match wgetCommand "^\s*ftp[-_]\=passw\(or\)\=d" contained
syn match wgetCommand "^\s*ftp[-_]\=user" contained
syn match wgetCommand "^\s*ftp[-_]\=proxy" contained
syn match wgetCommand "^\s*glob" contained
syn match wgetCommand "^\s*header" contained
syn match wgetCommand "^\s*html[-_]\=extension" contained
syn match wgetCommand "^\s*htmlify" contained
syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained
syn match wgetCommand "^\s*http[-_]\=passwd" contained
syn match wgetCommand "^\s*http[-_]\=password" contained
syn match wgetCommand "^\s*http[-_]\=proxy" contained
syn match wgetCommand "^\s*https[-_]\=proxy" contained
syn match wgetCommand "^\s*http[-_]\=user" contained
syn match wgetCommand "^\s*ignore[-_]\=length" contained
syn match wgetCommand "^\s*ignore[-_]\=tags" contained
syn match wgetCommand "^\s*include[-_]\=directories" contained
syn match wgetCommand "^\s*inet4[-_]\=only" contained
syn match wgetCommand "^\s*inet6[-_]\=only" contained
syn match wgetCommand "^\s*input" contained
syn match wgetCommand "^\s*keep[-_]\=session[-_]\=cookies" contained
syn match wgetCommand "^\s*kill[-_]\=longer" contained
syn match wgetCommand "^\s*limit[-_]\=rate" contained
syn match wgetCommand "^\s*load[-_]\=cookies" contained
syn match wgetCommand "^\s*logfile" contained
syn match wgetCommand "^\s*login" contained
syn match wgetCommand "^\s*mirror" contained
syn match wgetCommand "^\s*netrc" contained
syn match wgetCommand "^\s*no[-_]\=clobber" contained
syn match wgetCommand "^\s*no[-_]\=parent" contained
syn match wgetCommand "^\s*no[-_]\=proxy" contained
" Note: this option is deprecated, use 'tries' instead
syn match wgetCommand "^\s*numtries" contained
syn match wgetCommand "^\s*output[-_]\=document" contained
syn match wgetCommand "^\s*page[-_]\=requisites" contained
syn match wgetCommand "^\s*passive[-_]\=ftp" contained
syn match wgetCommand "^\s*passwd" contained
syn match wgetCommand "^\s*password" contained
syn match wgetCommand "^\s*post[-_]\=data" contained
syn match wgetCommand "^\s*post[-_]\=file" contained
syn match wgetCommand "^\s*prefer[-_]\=family" contained
syn match wgetCommand "^\s*preserve[-_]\=permissions" contained
syn match wgetCommand "^\s*private[-_]\=key" contained
syn match wgetCommand "^\s*private[-_]\=key[-_]\=type" contained
syn match wgetCommand "^\s*progress" contained
syn match wgetCommand "^\s*protocol[-_]\=directories" contained
syn match wgetCommand "^\s*proxy[-_]\=passwd" contained
syn match wgetCommand "^\s*proxy[-_]\=password" contained
syn match wgetCommand "^\s*proxy[-_]\=user" contained
syn match wgetCommand "^\s*quiet" contained
syn match wgetCommand "^\s*quota" contained
syn match wgetCommand "^\s*random[-_]\=file" contained
syn match wgetCommand "^\s*random[-_]\=wait" contained
syn match wgetCommand "^\s*read[-_]\=timeout" contained
syn match wgetCommand "^\s*reclevel" contained
syn match wgetCommand "^\s*recursive" contained
syn match wgetCommand "^\s*referer" contained
syn match wgetCommand "^\s*reject" contained
syn match wgetCommand "^\s*relative[-_]\=only" contained
syn match wgetCommand "^\s*remove[-_]\=listing" contained
syn match wgetCommand "^\s*restrict[-_]\=file[-_]\=names" contained
syn match wgetCommand "^\s*retr[-_]\=symlinks" contained
syn match wgetCommand "^\s*retry[-_]\=connrefused" contained
syn match wgetCommand "^\s*robots" contained
syn match wgetCommand "^\s*save[-_]\=cookies" contained
syn match wgetCommand "^\s*save[-_]\=headers" contained
syn match wgetCommand "^\s*secure[-_]\=protocol" contained
syn match wgetCommand "^\s*server[-_]\=response" contained
" Note: this option was removed in wget 1.8
syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained
syn match wgetCommand "^\s*span[-_]\=hosts" contained
syn match wgetCommand "^\s*spider" contained
syn match wgetCommand "^\s*strict[-_]\=comments" contained
syn match wgetCommand "^\s*sslcertfile" contained
syn match wgetCommand "^\s*sslcertkey" contained
syn match wgetCommand "^\s*timeout" contained
syn match wgetCommand "^\s*time[-_]\=stamping" contained
syn match wgetCommand "^\s*tries" contained
syn match wgetCommand "^\s*user" contained
syn match wgetCommand "^\s*use[-_]\=proxy" contained
syn match wgetCommand "^\s*user[-_]\=agent" contained
syn match wgetCommand "^\s*verbose" contained
syn match wgetCommand "^\s*wait" contained
syn match wgetCommand "^\s*wait[-_]\=retry" contained
syn case match
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_wget_syn_inits")
if version < 508
let did_wget_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink wgetAssignmentOperator Special
HiLink wgetBoolean Boolean
HiLink wgetCommand Identifier
HiLink wgetComment Comment
HiLink wgetNumber Number
HiLink wgetQuota Number
HiLink wgetString String
HiLink wgetTodo Todo
HiLink wgetValue Constant
delcommand HiLink
endif
let b:current_syntax = "wget"
" vim: ts=8

Просмотреть файл

@ -1,80 +0,0 @@
" Vim syntax file
" Language: XQuery
" Author: Jean-Marc Vanel <http://jmvanel.free.fr/>
" Last Change: mar jui 12 18:04:05 CEST 2005
" Filenames: *.xq
" URL: http://jmvanel.free.fr/vim/xquery.vim
" $Id: xquery.vim,v 1.1 2005/07/18 21:44:56 vimboss Exp $
" REFERENCES:
" [1] http://www.w3.org/TR/xquery/
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
runtime syntax/xml.vim
syn case match
" From XQuery grammar:
syn keyword xqueryStatement ancestor ancestor-or-self and as ascending at attribute base-uri by case cast castable child collation construction declare default descendant descendant-or-self descending div document element else empty encoding eq every except external following following-sibling for function ge greatest gt idiv if import in inherit-namespaces instance intersect is le least let lt mod module namespace ne no of or order ordered ordering parent preceding preceding-sibling preserve return satisfies schema self some stable strip then to treat typeswitch union unordered validate variable version where xmlspace xquery yes
" TODO contains clashes with vim keyword
syn keyword xqueryFunction abs adjust-date-to-timezone adjust-date-to-timezone adjust-dateTime-to-timezone adjust-dateTime-to-timezone adjust-time-to-timezone adjust-time-to-timezone avg base-uri base-uri boolean ceiling codepoint-equal codepoints-to-string collection collection compare concat count current-date current-dateTime current-time data dateTime day-from-date day-from-dateTime days-from-duration deep-equal deep-equal default-collation distinct-values distinct-values doc doc-available document-uri empty ends-with ends-with error error error error escape-uri exactly-one exists false floor hours-from-dateTime hours-from-duration hours-from-time id id idref idref implicit-timezone in-scope-prefixes index-of index-of insert-before lang lang last local-name local-name local-name-from-QName lower-case matches matches max max min min minutes-from-dateTime minutes-from-duration minutes-from-time month-from-date month-from-dateTime months-from-duration name name namespace-uri namespace-uri namespace-uri-for-prefix namespace-uri-from-QName nilled node-name normalize-space normalize-space normalize-unicode normalize-unicode not number number one-or-more position prefix-from-QName QName remove replace replace resolve-QName resolve-uri resolve-uri reverse root root round round-half-to-even round-half-to-even seconds-from-dateTime seconds-from-duration seconds-from-time starts-with starts-with static-base-uri string string string-join string-length string-length string-to-codepoints subsequence subsequence substring substring substring-after substring-after substring-before substring-before sum sum timezone-from-date timezone-from-dateTime timezone-from-time tokenize tokenize trace translate true unordered upper-case year-from-date year-from-dateTime years-from-duration zero-or-one
syn keyword xqueryOperator add-dayTimeDuration-to-date add-dayTimeDuration-to-dateTime add-dayTimeDuration-to-time add-dayTimeDurations add-yearMonthDuration-to-date add-yearMonthDuration-to-dateTime add-yearMonthDurations base64Binary-equal boolean-equal boolean-greater-than boolean-less-than concatenate date-equal date-greater-than date-less-than dateTime-equal dateTime-greater-than dateTime-less-than dayTimeDuration-equal dayTimeDuration-greater-than dayTimeDuration-less-than divide-dayTimeDuration divide-dayTimeDuration-by-dayTimeDuration divide-yearMonthDuration divide-yearMonthDuration-by-yearMonthDuration except gDay-equal gMonth-equal gMonthDay-equal gYear-equal gYearMonth-equal hexBinary-equal intersect is-same-node multiply-dayTimeDuration multiply-yearMonthDuration node-after node-before NOTATION-equal numeric-add numeric-divide numeric-equal numeric-greater-than numeric-integer-divide numeric-less-than numeric-mod numeric-multiply numeric-subtract numeric-unary-minus numeric-unary-plus QName-equal subtract-dates-yielding-dayTimeDuration subtract-dateTimes-yielding-dayTimeDuration subtract-dayTimeDuration-from-date subtract-dayTimeDuration-from-dateTime subtract-dayTimeDuration-from-time subtract-dayTimeDurations subtract-times subtract-yearMonthDuration-from-date subtract-yearMonthDuration-from-dateTime subtract-yearMonthDurations time-equal time-greater-than time-less-than to union yearMonthDuration-equal yearMonthDuration-greater-than yearMonthDuration-less-than
syn match xqueryType "xs:\(\|Datatype\|primitive\|string\|boolean\|float\|double\|decimal\|duration\|dateTime\|time\|date\|gYearMonth\|gYear\|gMonthDay\|gDay\|gMonth\|hexBinary\|base64Binary\|anyURI\|QName\|NOTATION\|\|normalizedString\|token\|language\|IDREFS\|ENTITIES\|NMTOKEN\|NMTOKENS\|Name\|NCName\|ID\|IDREF\|ENTITY\|integer\|nonPositiveInteger\|negativeInteger\|long\|int\|short\|byte\|nonNegativeInteger\|unsignedLong\|unsignedInt\|unsignedShort\|unsignedByte\|positiveInteger\)"
" From XPath grammar:
syn keyword xqueryXPath some every in in satisfies if then else to div idiv mod union intersect except instance of treat castable cast eq ne lt le gt ge is child descendant attribute self descendant-or-self following-sibling following namespace parent ancestor preceding-sibling preceding ancestor-or-self void item node document-node text comment processing-instruction attribute schema-attribute schema-element
" eXist extensions
syn match xqExist "&="
" XQdoc
syn match XQdoc contained "@\(param\|return\|author\)\>"
highlight def link xqueryStatement Statement
highlight def link xqueryFunction Function
highlight def link xqueryOperator Operator
highlight def link xqueryType Type
highlight def link xqueryXPath Operator
highlight def link XQdoc Special
highlight def link xqExist Operator
"floating point number, with dot, optional exponent
syn match cFloat "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
"floating point number, starting with a dot, optional exponent
syn match cFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent
syn match cFloat "\d\+e[-+]\=\d\+[fl]\=\>"
syn match cNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
syn match cNumber "\<\d\+\>"
highlight def link cNumber Number
highlight def link cFloat Number
syn region xqComment start='(:' excludenl end=':)' contains=XQdoc
highlight def link xqComment Comment
" syntax match xqVariable "$\w\+"
syntax match xqVariable +$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>+
highlight def link xqVariable Identifier
" Redefine the default XML highlighting:
highlight def link xmlTag Structure
highlight def link xmlTagName Structure
highlight def link xmlEndTag Structure
syntax match xqSeparator ",\|;"
highlight link xqSeparator Operator
syn region xqCode transparent contained start='{' excludenl end='}' contains=xmlRegionBis,xqComment,xqueryStatement,xmlString,xqSeparator,cNumber,xqVariable keepend extend
syn region xmlRegionBis start=+<\z([^ /!?<>"']\+\)+ skip=+<!--\_.\{-}-->+ end=+</\z1\_\s\{-}>+ end=+/>+ fold contains=xmlTag,xmlEndTag,xmlCdata,xmlRegionBis,xmlComment,xmlEntity,xmlProcessing,xqCode keepend extend
syn region List transparent start='(' excludenl end=')' contains=xqCode,xmlRegion,xqComment,xqSeparator,xqueryStatement,xqVariable,xqueryType keepend extend

Просмотреть файл

@ -1,39 +0,0 @@
" Vim syntax file
" Language: XS (Perl extension interface language)
" Maintainer: Andy Lester <andy@petdance.com>
" URL: http://github.com/petdance/vim-perl
" Last Change: 2009-08-14
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" Read the C syntax to start with
runtime! syntax/c.vim
" XS extentions
" TODO: Figure out how to look for trailing '='.
syn keyword xsKeyword MODULE PACKAGE PREFIX
syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT:
syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT:
syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE:
syn keyword xsKeyword ALIAS: INCLUDE: CASE:
" TODO: Figure out how to look for trailing '('.
syn keyword xsMacro SV EXTEND PUSHs
syn keyword xsVariable RETVAL NO_INIT
"syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1
"syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
" Define the default highlighting, but only when an item doesn't have highlighting yet
command -nargs=+ HiLink hi def link <args>
HiLink xsKeyword Keyword
HiLink xsMacro Macro
HiLink xsVariable Identifier
delcommand HiLink
let b:current_syntax = "xs"
" vim: ts=8

Просмотреть файл

@ -1,122 +0,0 @@
" Vim syntax file
" Language: Yacc
" Maintainer: Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Aug 2, 2010
" Version: 8
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Options: {{{1
" g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
" ---------------------------------------------------------------------
" this version of syntax/yacc.vim requires 6.0 or later
if version < 600
finish
endif
if exists("b:current_syntax")
syntax clear
endif
" ---------------------------------------------------------------------
" Folding Support {{{1
if has("folding")
com! -nargs=+ HiFold <args> fold
else
com! -nargs=+ HiFold <args>
endif
" ---------------------------------------------------------------------
" Read the C syntax to start with {{{1
if exists("g:yacc_uses_cpp")
syn include @yaccCode <sfile>:p:h/cpp.vim
else
syn include @yaccCode <sfile>:p:h/c.vim
endif
" ---------------------------------------------------------------------
" Yacc Clusters: {{{1
syn cluster yaccInitCluster contains=yaccKey,yaccKeyActn,yaccBrkt,yaccType,yaccString,yaccUnionStart,yaccHeader2,yaccComment,yaccDefines,yaccParseParam
syn cluster yaccRulesCluster contains=yaccNonterminal,yaccString
" ---------------------------------------------------------------------
" Yacc Sections: {{{1
HiFold syn region yaccInit start='.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty contained
HiFold syn region yaccInit2 start='\%^.'ms=s-1,rs=s-1 matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=@yaccInitCluster nextgroup=yaccRules skipwhite skipempty
HiFold syn region yaccHeader2 matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty contained
HiFold syn region yaccHeader matchgroup=yaccSep start="^\s*\zs%{" end="^\s*%}" contains=@yaccCode nextgroup=yaccInit skipwhite skipempty
HiFold syn region yaccRules matchgroup=yaccSectionSep start='^%%$' end='^%%$'me=e-2,re=e-2 contains=@yaccRulesCluster nextgroup=yaccEndCode skipwhite skipempty contained
HiFold syn region yaccEndCode matchgroup=yaccSectionSep start='^%%$' end='\%$' contains=@yaccCode contained
" ---------------------------------------------------------------------
" Yacc Commands: {{{1
syn match yaccDefines '^%define\s\+.*$'
syn match yaccParseParam '%parse-param\>' skipwhite nextgroup=yaccParseParamStr
syn region yaccParseParamStr contained matchgroup=Delimiter start='{' end='}' contains=cStructure
syn match yaccDelim "[:|]" contained
syn match yaccOper "@\d\+" contained
syn match yaccKey "^\s*%\(token\|type\|left\|right\|start\|ident\|nonassoc\)\>" contained
syn match yaccKey "\s%\(prec\|expect\)\>" contained
syn match yaccKey "\$\(<[a-zA-Z_][a-zA-Z_0-9]*>\)\=[\$0-9]\+" contained
syn keyword yaccKeyActn yyerrok yyclearin contained
syn match yaccUnionStart "^%union" skipwhite skipnl nextgroup=yaccUnion contained
HiFold syn region yaccUnion matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccCode contained
syn match yaccBrkt "[<>]" contained
syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt contained
HiFold syn region yaccNonterminal start="^\s*\a\w*\ze\_s*\(/\*\_.\{-}\*/\)\=\_s*:" matchgroup=yaccDelim end=";" matchgroup=yaccSectionSep end='^%%$'me=e-2,re=e-2 contains=yaccAction,yaccDelim,yaccString,yaccComment contained
syn region yaccComment start="/\*" end="\*/"
syn match yaccString "'[^']*'" contained
" ---------------------------------------------------------------------
" I'd really like to highlight just the outer {}. Any suggestions??? {{{1
syn match yaccCurlyError "[{}]"
HiFold syn region yaccAction matchgroup=yaccCurly start="{" end="}" contains=@yaccCode contained
" ---------------------------------------------------------------------
" Yacc synchronization: {{{1
syn sync fromstart
" ---------------------------------------------------------------------
" Define the default highlighting. {{{1
if !exists("did_yacc_syn_inits")
command -nargs=+ HiLink hi def link <args>
" Internal yacc highlighting links {{{2
HiLink yaccBrkt yaccStmt
HiLink yaccKey yaccStmt
HiLink yaccOper yaccStmt
HiLink yaccUnionStart yaccKey
" External yacc highlighting links {{{2
HiLink yaccComment Comment
HiLink yaccCurly Delimiter
HiLink yaccCurlyError Error
HiLink yaccDefines cDefine
HiLink yaccParseParam cDefine
HiLink yaccNonterminal Function
HiLink yaccDelim Delimiter
HiLink yaccKeyActn Special
HiLink yaccSectionSep Todo
HiLink yaccSep Delimiter
HiLink yaccString String
HiLink yaccStmt Statement
HiLink yaccType Type
" since Bram doesn't like my Delimiter :| {{{2
HiLink Delimiter Type
delcommand HiLink
endif
" ---------------------------------------------------------------------
" Cleanup: {{{1
delcommand HiFold
let b:current_syntax = "yacc"
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=15 fdm=marker

Просмотреть файл

@ -1,86 +0,0 @@
" Vim syntax file
" Language: YAML (YAML Ain't Markup Language)
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-08-12
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword yamlTodo contained TODO FIXME XXX NOTE
syn region yamlComment display oneline start='\%(^\|\s\)#' end='$'
\ contains=yamlTodo,@Spell
syn match yamlNodeProperty '!\%(![^\\^% ]\+\|[^!][^:/ ]*\)'
syn match yamlAnchor '&.\+'
syn match yamlAlias '\*.\+'
syn match yamlDelimiter '[-,:]'
syn match yamlBlock '[\[\]{}>|]'
syn match yamlOperator '[?+-]'
syn match yamlKey '\w\+\(\s\+\w\+\)*\ze\s*:'
syn region yamlString matchgroup=yamlStringDelimiter
\ start=+"+ skip=+\\"+ end=+"+
\ contains=yamlEscape
syn region yamlString matchgroup=yamlStringDelimiter
\ start=+'+ skip=+''+ end=+'+
\ contains=yamlSingleEscape
syn match yamlEscape contained display +\\[\\"abefnrtv^0_ NLP]+
syn match yamlEscape contained display '\\x\x\{2}'
syn match yamlEscape contained display '\\u\x\{4}'
syn match yamlEscape contained display '\\U\x\{8}'
" TODO: how do we get 0x85, 0x2028, and 0x2029 into this?
syn match yamlEscape display '\\\%(\r\n\|[\r\n]\)'
syn match yamlSingleEscape contained +''+
" TODO: sexagecimal and fixed (20:30.15 and 1,230.15)
syn match yamlNumber display
\ '\<[+-]\=\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\='
syn match yamlNumber display '0\o\+'
syn match yamlNumber display '0x\x\+'
syn match yamlNumber display '([+-]\=[iI]nf)'
syn match yamlNumber display '(NaN)'
syn match yamlConstant '\<[~yn]\>'
syn keyword yamlConstant true True TRUE false False FALSE
syn keyword yamlConstant yes Yes on ON no No off OFF
syn keyword yamlConstant null Null NULL nil Nil NIL
syn match yamlTimestamp '\d\d\d\d-\%(1[0-2]\|\d\)-\%(3[0-2]\|2\d\|1\d\|\d\)\%( \%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d [+-]\%([01]\d\|2[0-3]\):[0-5]\d\|t\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d[+-]\%([01]\d\|2[0-3]\):[0-5]\d\|T\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\dZ\)\='
syn region yamlDocumentHeader start='---' end='$' contains=yamlDirective
syn match yamlDocumentEnd '\.\.\.'
syn match yamlDirective contained '%[^:]\+:.\+'
hi def link yamlTodo Todo
hi def link yamlComment Comment
hi def link yamlDocumentHeader PreProc
hi def link yamlDocumentEnd PreProc
hi def link yamlDirective Keyword
hi def link yamlNodeProperty Type
hi def link yamlAnchor Type
hi def link yamlAlias Type
hi def link yamlDelimiter Delimiter
hi def link yamlBlock Operator
hi def link yamlOperator Operator
hi def link yamlKey Identifier
hi def link yamlString String
hi def link yamlStringDelimiter yamlString
hi def link yamlEscape SpecialChar
hi def link yamlSingleEscape SpecialChar
hi def link yamlNumber Number
hi def link yamlConstant Constant
hi def link yamlTimestamp Number
let b:current_syntax = "yaml"
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,851 +0,0 @@
===============================================================================
= 欢 迎 阅 读 《 V I M 教 程 》 —— 版本 1.5 =
===============================================================================
vim 是一个具有很多命令的功能非常强大的编辑器。限于篇幅,在本教程当中
就不详细介绍了。本教程的设计目标是讲述一些必要的基本命令,而掌握好这
些命令您就能够很容易将vim当作一个通用的万能编辑器来使用了。
完成本教程的内容大约需要25-30分钟取决于您训练的时间。
每一节的命令操作将会更改本文。推荐您复制本文的一个副本,然后在副本上
进行训练(如果您是通过"vimtutor"来启动教程的,那么本文就已经是副本了)。
切记一点∶本教程的设计思路是在使用中进行学习的。也就是说,您需要通过
执行命令来学习它们本身的正确用法。如果您只是阅读而不操作,那么您可能
会很快遗忘这些命令的!
好了现在请确定您的Shift-Lock(大小写锁定键)还没有按下,然后按键盘上
的字母键 j 足够多的次数来移动光标,直到第一节的内容能够完全充满屏幕。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第一讲第一节∶移动光标
※※ 要移动光标,请依照说明分别按下 h、j、k、l 键。 ※※
^
k 提示∶ h 的键位于左边,每次按下就会向左移动。
< h l > l 的键位于右边,每次按下就会向右移动。
j j 键看起来很象一支尖端方向朝下的箭头。
v
1. 请随意在屏幕内移动光标,直至您觉得舒服为止。
2. 按下下行键(j),直到出现光标重复下行。
---> 现在您应该已经学会如何移动到下一讲吧。
3. 现在请使用下行键,将光标移动到第二讲。
提示∶如果您不敢确定您所按下的字母,请按下<ESC>键回到正常(Normal)模式。
然后再次从键盘输入您想要的命令。
提示光标键应当也能正常工作的。但是使用hjkl键在习惯之后您就能够快速
地在屏幕内四处移动光标了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第一讲第二节VIM的进入和退出
!! 特别提示∶敬请阅读完整本一节的内容,然后才能执行以下所讲解的命令。
1. 请按<ESC>键(这是为了确保您处在正常模式)。
2. 然后输入∶ :q! <回车>
---> 这种方式的退出编辑器绝不会保存您进入编辑器以来所做的改动。
如果您想保存更改再退出,请输入∶
:wq <回车>
3. 如果您看到了命令行提示符,请输入能够带您回到本教程的命令,那就是∶
vimtutor <回车>
通常情况下您也可以用这种方式∶
vim tutor <回车>
---> 这里的 'vim' 表示进入vim编辑器而 'tutor'则是您准备要编辑的文件。
4. 如果您自信已经牢牢记住了这些步骤的话请从步骤1执行到步骤3退出
后再次进入编辑器。接着将光标移动到第一讲第三节来继续我们的教程讲解。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第一讲第三节∶文本编辑之删除
** 在正常(Normal)模式下,可以按下 x 键来删除光标所在位置的字符。**
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
2. 为了修正输入错误,请将光标移至准备删除的字符的位置处。
3. 然后按下 x 键将错误字符删除掉。
4. 重复步骤2到步骤4直到句子修正为止。
---> The ccow jumpedd ovverr thhe mooon.
5. 好了,该行已经修正了,下一节内容是第一讲第四节。
特别提示∶在您浏览本教程时,不要强行记忆。记住一点∶在使用中学习。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第一讲第四节∶文本编辑之插入
** 在正常模式下,可以按下 i 键来插入文本。**
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
2. 为了使得第一行内容雷同于第二行,请将光标移至文本第一个字符准备插入
的位置。
3. 然后按下 i 键,接着输入必要的文本字符。
4. 所有文本都修正完毕,请按下 <ESC> 键返回正常模式。
重复步骤2至步骤4以便修正句子。
---> There is text misng this .
---> There is some text missing from this line.
5. 如果您对文本插入操作已经很满意,请接着阅读下面的小结。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第一讲小结
1. 光标在屏幕文本中的移动既可以用箭头键,也可以使用 hjkl 字母键。
h (左移) j (下行) k (上行) l (右移)
2. 欲进入vim编辑器(从命令行提示符)请输入vim 文件名 <回车>
3. 欲退出vim编辑器请输入以下命令放弃所有修改
<ESC> :q! <回车>
或者输入以下命令保存所有修改∶
<ESC> :wq <回车>
4. 在正常模式下删除光标所在位置的字符,请按∶ x
5. 在正常模式下要在光标所在位置开始插入文本,请按∶
i 输入必要文本 <ESC>
特别提示∶按下 <ESC> 键会带您回到正常模式或者取消一个不期望或者部分完成
的命令。
好了,第一讲到此结束。下面接下来继续第二讲的内容。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲第一节∶删除类命令
** 输入 dw 可以从光标处删除至一个单字/单词的末尾。**
1. 请按下 <ESC> 键确保您处于正常模式。
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
3. 请将光标移至准备要删除的单词的开始。
4. 接着输入 dw 删除掉该单词。
特别提示∶您所输入的 dw 会在您输入的同时出现在屏幕的最后一行。如果您输
入有误,请按下 <ESC> 键取消,然后重新再来。
---> There are a some words fun that don't belong paper in this sentence.
5. 重复步骤3至步骤4直至句子修正完毕。接着继续第二讲第二节内容。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲第二节∶其他删除类命令
** 输入 d$ 从当前光标删除到行末。**
1. 请按下 <ESC> 键确保您处于正常模式。
2. 请将光标移动到本节中下面标记有 ---> 的那一行。
3. 请将光标移动到该行的尾部(也就是在第一个点号‘.’后面)。
4. 然后输入 d$ 从光标处删至当前行尾部。
---> Somebody typed the end of this line twice. end of this line twice.
5. 请继续学习第二讲第三节就知道是怎么回事了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲第三节∶关于命令和对象
删除命令 d 的格式如下∶
[number] d object 或者 d [number] object
其意如下∶
number - 代表执行命令的次数(可选项,缺省设置为 1 )。
d - 代表删除。
object - 代表命令所要操作的对象(下面有相关介绍)。
一个简短的对象列表∶
w - 从当前光标当前位置直到单字/单词末尾,包括空格。
e - 从当前光标当前位置直到单字/单词末尾,但是 *不* 包括空格。
$ - 从当前光标当前位置直到当前行末。
特别提示∶
对于勇于探索者,请在正常模式下面仅按代表相应对象的键而不使用命令,则
将看到光标的移动正如上面的对象列表所代表的一样。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲第四节∶对象命令的特殊情况
** 输入 dd 可以删除整一个当前行。 **
鉴于整行删除的高频度VIM 的设计者决定要简化整行删除,仅需要在同一行上
击打两次 d 就可以删除掉光标所在的整行了。
1. 请将光标移动到本节中下面的短句段落中的第二行。
2. 输入 dd 删除该行。
3. 然后移动到第四行。
4. 接着输入 2dd (还记得前面讲过的 number-command-object 吗?) 删除两行。
1) Roses are red,
2) Mud is fun,
3) Violets are blue,
4) I have a car,
5) Clocks tell time,
6) Sugar is sweet
7) And so are you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲第五节∶撤消类命令
** 输入 u 来撤消最后执行的命令,输入 U 来修正整行。**
1. 请将光标移动到本节中下面标记有 ---> 的那一行,并将其置于第一个错误
处。
2. 输入 x 删除第一个不想保留的字母。
3. 然后输入 u 撤消最后执行的(一次)命令。
4. 这次要使用 x 修正本行的所有错误。
5. 现在输入一个大写的 U ,恢复到该行的原始状态。
6. 接着多次输入 u 以撤消 U 以及更前的命令。
7. 然后多次输入 CTRL-R (先按下 CTRL 键不放开,接着输入 R 键) ,这样就
可以执行恢复命令,也就是撤消掉撤消命令。
---> Fiix the errors oon thhis line and reeplace them witth undo.
8. 这些都是非常有用的命令。下面是第二讲的小结了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第二讲小结
1. 欲从当前光标删除至单字/单词末尾请输入dw
2. 欲从当前光标删除至当前行末尾请输入d$
3. 欲删除整行请输入dd
4. 在正常模式下一个命令的格式是∶
[number] command object 或者 command [number] object
其意是∶
number - 代表的是命令执行的次数
command - 代表要做的事情,比如 d 代表删除
object - 代表要操作的对象,比如 w 代表单字/单词,$ 代表到行末等等。
$ (to the end of line), etc.
5. 欲撤消以前的操作请输入u (小写的u)
欲撤消在一行中所做的改动请输入U (大写的U)
欲撤消以前的撤消命令恢复以前的操作结果请输入CTRL-R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三讲第一节∶置入类命令
** 输入 p 将最后一次删除的内容置入光标之后 **
1. 请将光标移动到本节中下面示范段落的首行。
2. 输入 dd 将该行删除这样会将该行保存到vim的缓冲区中。
3. 接着将光标移动到准备置入的位置的上方。记住∶是上方哦。
4. 然后在正常模式下(<ESC>键进入),输入 p 将该行粘贴置入。
5. 重复步骤2至步骤4将所有的行依序放置到正确的位置上。
d) Can you learn too?
b) Violets are blue,
c) Intelligence is learned,
a) Roses are red,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三讲第二节∶替换类命令
** 输入 r 和一个字符替换光标所在位置的字符。**
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
2. 请移动光标到第一个错误的适当位置。
3. 接着输入 r ,这样就能将错误替换掉了。
4. 重复步骤2和步骤3直到第一行已经修改完毕。
---> Whan this lime was tuoed in, someone presswd some wrojg keys!
---> When this line was typed in, someone pressed some wrong keys!
5. 然后我们继续学校第三讲第三节。
特别提示∶切记您要在使用中学习,而不是在记忆中学习。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三讲第三节∶更改类命令
** 要改变一个单字/单词的部分或者全部,请输入 cw **
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
2. 接着把光标放在单词 lubw 的字母 u 的位置那里。
3. 然后输入 cw 就可以修正该单词了(在本例这里是输入 ine 。)
4. 最后按 <ESC> 键,然后光标定位到下一个错误第一个准备更改的字母处。
5. 重复步骤3和步骤4直到第一个句子完全雷同第二个句子。
---> This lubw has a few wptfd that mrrf changing usf the change command.
---> This line has a few words that need changing using the change command.
提示∶请注意 cw 命令不仅仅是替换了一个单词,也让您进入文本插入状态了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三讲第四节使用c指令的其他更改类命令
** 更改类指令可以使用同删除类命令所使用的对象参数。**
1. 更改类指令的工作方式跟删除类命令是一致的。操作格式是∶
[number] c object 或者 c [number] object
2. 对象参数也是一样的,比如 w 代表单字/单词,$代表行末等等。
3. 请将光标移动到本节中下面标记有 ---> 的第一行。
4. 接着将光标移动到第一个错误处。
5. 然后输入 c$ 使得该行剩下的部分更正得同第二行一样。最后按 <ESC> 键。
---> The end of this line needs some help to make it like the second.
---> The end of this line needs to be corrected using the c$ command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三讲小结
1. 要重新置入已经删除的文本内容,请输入小写字母 p。该操作可以将已删除
的文本内容置于光标之后。如果最后一次删除的是一个整行,那么该行将置
于当前光标所在行的下一行。
2. 要替换光标所在位置的字符,请输入小写的 r 和要替换掉原位置字符的新字
符即可。
3. 更改类命令允许您改变指定的对象,从当前光标所在位置直到对象的末尾。
比如输入 cw 可以替换当前光标到单词的末尾的内容;输入 c$ 可以替换当
前光标到行末的内容。
4. 更改类命令的格式是∶
[number] c object 或者 c [number] object
下面我们继续学习下一讲。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第四讲第一节∶定位及文件状态
** 输入 CTRL-g 显示当前编辑文件中当前光标所在行位置以及文件状态信息。
输入 SHIFT-G 则直接跳转到文件中的某一指定行。**
提示∶切记要先通读本节内容,之后才可以执行以下步骤!!!
1. 按下 CTRL 键不放开然后按 g 键。然后就会看到页面最底部出现一个状态信
息行显示的内容是当前编辑的文件名和文件的总行数。请记住步骤3的行号。
2. 按下 SHIFT-G 键可以使得当前光标直接跳转到文件最后一行。
3. 输入您曾停留的行号,然后按下 SHIFT-G。这样就可以返回到您第一次按下
CTRL-g 时所在的行好了。注意∶输入行号时,行号是不会在屏幕上显示出来
的。
4. 如果愿意您可以继续执行步骤1至步骤三。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第四讲第二节∶搜索类命令
** 输入 / 以及尾随的字符串可以用以在当前文件中查找该字符串。**
1. 在正常模式下输入 / 字符。您此时会注意到该字符和光标都会出现在屏幕底
部,这跟 : 命令是一样的。
2. 接着输入 errroor <回车>。那个errroor就是您要查找的字符串。
3. 要查找同上一次的字符串,只需要按 n 键。要向相反方向查找同上一次的字
符串,请输入 Shift-N 即可。
4. 如果您想逆向查找字符串,请使用 ? 代替 / 进行。
---> When the search reaches the end of the file it will continue at the start.
"errroor" is not the way to spell error; errroor is an error.
提示∶如果查找已经到达文件末尾,查找会自动从文件头部继续查找。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第四讲第三节∶配对括号的查找
** 按 % 可以查找配对的括号 )、]、}。**
1. 把光标放在本节下面标记有 --> 那一行中的任何一个 (、[ 或 { 处。
2. 接着按 % 字符。
3. 此时光标的位置应当是在配对的括号处。
4. 再次按 % 就可以跳回配对的第一个括号处。
---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
提示∶在程序调试时,这个功能用来查找不配对的括号是很有用的。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第四讲第四节∶修正错误的方法之一
** 输入 :s/old/new/g 可以替换 old 为 new。**
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
2. 输入 :s/thee/the <回车> 。请注意该命令只改变光标所在行的第一个匹配
串。
3. 输入 :s/thee/the/g 则是替换全行的匹配串。
---> the best time to see thee flowers is in thee spring.
4. 要替换两行之间出现的每个匹配串,请输入 :#,#s/old/new/g (#,#代表的是
两行的行号)。输入 :%s/old/new/g 则是替换整个文件中的每个匹配串。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第四讲小结
1. Ctrl-g 用于显示当前光标所在位置和文件状态信息。Shift-G 用于将光标跳
转至文件最后一行。先敲入一个行号然后按 Shift-G 则是将光标移动至该行
号代表的行。
2. 输入 / 然后紧随一个字符串是则是在当前所编辑的文档中向后查找该字符串。
输入问号 ? 然后紧随一个字符串是则是在当前所编辑的文档中向前查找该字
符串。完成一次查找之后按 n 键则是重复上一次的命令,可在同一方向上查
找下一个字符串所在;或者按 Shift-N 向相反方向查找下该字符串所在。
3. 如果光标当前位置是括号(、)、[、]、{、},按 % 可以将光标移动到配对的
括号上。
4. 在一行内替换头一个字符串 old 为新的字符串 new请输入 :s/old/new
在一行内替换所有的字符串 old 为新的字符串 new请输入 :s/old/new/g
在两行内替换所有的字符串 old 为新的字符串 new请输入 :#,#s/old/new/g
在文件内替换所有的字符串 old 为新的字符串 new请输入 :%s/old/new/g
进行全文替换时询问用户确认每个替换需添加 c 选项,请输入 :%s/old/new/gc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第五讲第一节∶在 VIM 内执行外部命令的方法
** 输入 :! 然后紧随著输入一个外部命令可以执行该外部命令。**
1. 按下我们所熟悉的 : 命令设置光标到屏幕底部。这样就可以让您输入命令了。
2. 接着输入感叹号 ! 这个字符,这样就允许您执行外部的 shell 命令了。
3. 我们以 ls 命令为例。输入 !ls <回车> 。该命令就会列举出您当前目录的
内容,就如同您在命令行提示符下输入 ls 命令的结果一样。如果 !ls 没起
作用,您可以试试 :!dir 看看。
---> 提示∶ 所有的外部命令都可以以这种方式执行。
---> 提示∶ 所有的 : 命令都必须以 <回车> 告终。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第五讲第二节∶关于保存文件的更多信息
** 要将对文件的改动保存到文件中,请输入 :w FILENAME 。**
1. 输入 :!dir 或者 :!ls 获知当前目录的内容。您应当已知道最后还得敲
<回车> 吧。
2. 选择一个尚未存在文件名,比如 TEST 。
3. 接着输入 :w TEST (此处 TEST 是您所选择的文件名。)
4. 该命令会以 TEST 为文件名保存整个文件 (VIM 教程)。为了确保正确保存,
请再次输入 :!dir 查看您的目录列表内容。
---> 请注意∶如果您退出 VIM 然后在以文件名 TEST 为参数进入,那么该文件内
容应该同您保存时的文件内容是完全一样的。
5. 现在您可以通过输入 :!rm TEST 来删除 TEST 文件了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第五讲第三节∶一个具有选择性的保存命令
** 要保存文件的部分内容,请输入 :#,# w FILENAME **
1. 再来执行一次 :!dir 或者 :!ls 获知当前目录的内容,然后选择一个合适的
不重名的文件名,比如 TEST 。
2. 接着将光标移动至本页的最顶端,然后按 CTRL-g 找到该行的行号。别忘了
行号哦。
3. 接着把光标移动至本页的最底端,再按一次 CTRL-g 。也别忘了这个行好哦。
4. 为了只保存文章的某个部分,请输入 :#,# w TEST 。这里的 #,# 就是上面
要求您记住的行号(顶端行号,底端行号),而 TEST 就是选定的文件名。
5. 最后,用 :!dir 确认文件是否正确保存。但是这次先别删除掉。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第五讲第四节∶提取和合并文件
** 要向当前文件中插入另外的文件的内容,请输入 :r FILENAME **
1. 请键入 :!dir 确认您前面创建的 TEST 文件还在。
2. 然后将光标移动至当前页面的顶端。
特别提示∶ 执行步骤3之后您将看到第五讲第三节请届时再往下移动回到这里来。
3. 接着通过 :r TEST 将前面创建的名为 TEST 的文件提取进来。
特别提示∶您所提取进来的文件将从光标所在位置处开始置入。
4. 为了确认文件已经提取成功,移动光标回到原来的位置就可以注意有两份第
五讲第三节,一份是原本,另外一份是来自文件的副本。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第五讲小结
1. :!command 用于执行一个外部命令 command。
请看一些实际例子∶
:!dir - 用于显示当前目录的内容。
:!rm FILENAME - 用于删除名为 FILENAME 的文件。
2. :w FILENAME 可将当前 VIM 中正在编辑的文件保存到名为 FILENAME 的文
件中。
3. :#,#w FILENAME 可将当前编辑文件第 # 行至第 # 行的内容保存到文件
FILENAME 中。
4. :r FILENAME 可提取磁盘文件 FILENAME 并将其插入到当前文件的光标位置
后面。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第六讲第一节∶打开类命令
** 输入 o 将在光标的下方打开新的一行并进入插入模式。**
1. 请将光标移动到本节中下面标记有 ---> 的那一行。
2. 接着输入小写的 o 在光标 *下方* 打开新的一行并进入插入模式。
3. 然后复制标记有 ---> 的行并按 <ESC> 键退出插入模式而进入正常模式。
---> After typing o the cursor is placed on the open line in Insert mode.
4. 为了在光标 *上方* 打开新的一行,只需要输入大写的 O 而不是小写的 o
就可以了。请在下行测试一下吧。当光标处在在该行上时,按 Shift-O可以
在该行上方新开一行。
Open up a line above this by typing Shift-O while the cursor is on this line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第六讲第二节∶光标后插入类命令
** 输入 a 将可在光标之后插入文本。 **
1. 请在正常模式下通过输入 $ 将光标移动到本节中下面标记有 ---> 的第一行
的末尾。
2. 接着输入小写的 a 则可在光标之后插入文本了。大写的 A 则可以直接在行
末插入文本。
提示∶输入大写 A 的操作方法可以在行末插入文本,避免了输入 i光标定位到
最后一个字符,输入的文本,<ESC> 回复正常模式,箭头右键移动光标以及
x 删除当前光标所在位置字符等等诸多繁杂的操作。
3. 操作之后第一行就可以补充完整了。请注意光标后插入文本与插入模式是基
本完全一致的,只是文本插入的位置定位稍有不同罢了。
---> This line will allow you to practice
---> This line will allow you to practice appending text to the end of a line.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第六讲第三节∶另外一个置换类命令的版本
** 输入大写的 R 可连续替换多个字符。**
1. 请将光标移动到本节中下面标记有 ---> 的第一行。
2. 移动光标到第一行中不同于标有 ---> 的第二行的第一个单词的开始,即单
词 last 处。
3. 然后输入大写的 R 开始把第一行中的不同于第二行的剩余字符逐一输入,就
可以全部替换掉原有的字符而使得第一行完全雷同第二行了。
---> To make the first line the same as the last on this page use the keys.
---> To make the first line the same as the second, type R and the new text.
4. 请注意∶如果您按 <ESC> 退出置换模式回复正常模式,尚未替换的文本将仍
然保持原状。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第六讲第四节∶设置类命令的选项
** 设置可使查找或者替换可忽略大小写的选项 **
1. 要查找单词 ignore 可在正常模式下输入 /ignore 。要重复查找该词,可以
重复按 n 键。
2. 然后设置 ic 选项(ic就是英文忽略大小写Ignore Case的首字母缩写词),即
输入∶
:set ic
3. 现在可以通过键入 n 键再次查找单词 ignore。重复查找可以重复键入 n 键。
4. 然后设置 hlsearch 和 incsearch 这两个选项,输入以下内容∶
:set hls is
5. 现在可以再次输入查找命令,看看会有什么效果∶
/ignore
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第六讲小结
1. 输入小写的 o 可以在光标下方打开新的一行并将光标置于新开的行首,进入
插入模式。
输入大写的 O 可以在光标上方打开新的一行并将光标置于新开的行首,进入
插入模式。
2. 输入小写的 a 可以在光标所在位置之后插入文本。
输入大写的 A 可以在光标所在行的行末之后插入文本。
3. 输入大写的 R 将进入替换模式,直至按 <ESC> 键退出替换模式而进入正常
模式。
4. 输入 :set xxx 可以设置 xxx 选项。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第七讲∶在线帮助命令
** 使用在线帮助系统 **
Vim 拥有一个细致全面的在线帮助系统。要启动该帮助系统,请选择如下三种方
法之一∶
- 按下 <HELP> 键 (如果键盘上有的话)
- 按下 <F1> 键 (如果键盘上有的话)
- 输入 :help <回车>
输入 :q <回车> 可以关闭帮助窗口。
提供一个正确的参数给":help"命令,您可以找到关于该主题的帮助。请试验以
下参数(可别忘了按回车键哦。:)
:help w <回车>
:help c_<T <回车>
:help insert-index <回车>
:help user-manual <回车>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第八讲∶创建一个启动脚本
** 启用vim的功能 **
Vim的功能特性要比vi多得多但大部分功能都没有缺省激活。为了启动更多的
功能您得创建一个vimrc文件。
1. 开始编辑vimrc文件这取决于您所使用的操作系统
:edit ~/.vimrc 这是Unix系统所使用的命令
:edit $VIM/_vimrc 这是Windows系统所使用的命令
2. 接着导入vimrc范例文件
:read $VIMRUNTIME/vimrc_example.vim
3. 保存文件,命令为∶
:write
在下次您启动vim的时候编辑器就会有了语法高亮的功能。您可以继续把您喜
欢的其它功能设置添加到这个vimrc文件中。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim 教程到此结束。本教程只是为了简明地介绍一下vim编辑器但已足以让您
很容易学会使用本编辑器了。毋庸质疑vim还有很多很多的命令本教程所介
绍的还差得远著呢。所以您要精通的话,还望继续努力哦。下一步您可以阅读
vim手册使用的命令是
:help user-manual
为了更进一步的参考和学习,以下这本书值得推荐∶
Vim - Vi Improved - 作者Steve Oualline
出版社New Riders
这是第一本完全讲解vim的书籍。对于初学者特别有用。其中还包含有大量实例
和图示。欲知详情,请访问 http://iccf-holland.org/click5.html
以下这本书比较老了而且内容主要是vi而不是vim但是也值得推荐
Learning the Vi Editor - 作者Linda Lamb
出版社O'Reilly & Associates Inc.
这是一本不错的书通过它您几乎能够了解到全部vi能够做到的事情。此书的第
六个版本也包含了一些关于vim的信息。
本教程是由来自Calorado School of Minese的Michael C. Pierce、Robert K.
Ware 所编写的其中来自Colorado State University的Charles Smith提供了
很多创意。编者通信地址是∶
bware@mines.colorado.edu
本教程已由Bram Moolenaar专为vim进行修订。
译制者附言∶
===========
简体中文教程翻译版之译制者为梁昌泰 <beos@turbolinux.com.cn>,还有
另外一个联系地址linuxrat@gnuchina.org。
繁体中文教程是从简体中文教程翻译版使用 Debian GNU/Linux 中文项目小
组的于广辉先生编写的中文汉字转码器 autoconvert 转换而成的,并对转
换的结果做了一些细节的改动。
变更记录∶
=========
2002年08月30日 梁昌泰 <beos@turbolinux.com.cn>
感谢 RMS@SMTH 的指正,将多处错误修正。
2002年04月22日 梁昌泰 <linuxrat@gnuchina.org>
感谢 xuandong@sh163.net 的指正,将两处错别字修正。
2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
根据Bram Molenaar先生在2002年03月16日的来信要求将vimtutor1.4中译
版升级到vimtutor1.5。
2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
将vimtutor1.4中译版提交给Bram Molenaar和Sven Guckes。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Двоичные данные
share/vim/vim73/vim.exe

Двоичный файл не отображается.

Просмотреть файл

@ -29,6 +29,8 @@
if version < 700
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" Section: Constants {{{1
"
@ -619,6 +621,9 @@ lockvar g:ada#Comment
lockvar! g:ada#Keywords
lockvar! g:ada#Ctags_Kinds
let &cpo = s:keepcpo
unlet s:keepcpo
finish " 1}}}
"------------------------------------------------------------------------------

Просмотреть файл

@ -1,8 +1,10 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2010 Mar 23
" Last Change: 2012 Jun 20
let s:cpo_save = &cpo
set cpo&vim
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
@ -498,7 +500,7 @@ function! s:StructMembers(typename, items, all)
endif
if !cached
while 1
exe 'silent! ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
exe 'silent! keepj noautocmd ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
@ -603,3 +605,6 @@ function! s:SearchMembers(matches, items, all)
endfor
return res
endfunc
let &cpo = s:cpo_save
unlet s:cpo_save

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
" Date: Dec 28, 2009
" Version: 32
" Author: Charles E. Campbell
" Date: Apr 17, 2013
" Version: 35
" Installing: :help glvs-install
" Usage: :help glvs
"
@ -15,7 +15,7 @@
if exists("g:loaded_getscript")
finish
endif
let g:loaded_getscript= "v32"
let g:loaded_getscript= "v35"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
@ -74,6 +74,11 @@ if !exists("g:GetLatestVimScripts_allowautoinstall")
let g:GetLatestVimScripts_allowautoinstall= 1
endif
" set up default scriptaddr address
if !exists("g:GetLatestVimScripts_scriptaddr")
let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
endif
"" For debugging:
"let g:GetLatestVimScripts_wget = "echo"
"let g:GetLatestVimScripts_options = "options"
@ -314,7 +319,7 @@ fun! getscript#GetLatestVimScripts()
if &mod
silent! w!
endif
q
q!
" restore events and current directory
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
@ -415,7 +420,7 @@ fun! s:GetOneScript(...)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sourceforge.net webpage
let scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='.scriptid
let scriptaddr = g:GetLatestVimScripts_scriptaddr.scriptid
let tmpfile = tempname()
let v:errmsg = ""
@ -519,6 +524,7 @@ fun! s:GetOneScript(...)
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
" call Decho(" ")
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
@ -526,7 +532,7 @@ fun! s:GetOneScript(...)
" call Decho("<".sname."> is readable")
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
@ -549,25 +555,42 @@ fun! s:GetOneScript(...)
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "silent !bunzip2 ".shellescape(sname)
exe "sil !bunzip2 ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "silent !gunzip ".shellescape(sname)
exe "sil !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
elseif sname =~ '\.xz$'
" call Decho("decompress: attempt to unxz ".sname)
exe "sil !unxz ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','')
" call Decho("decompress: new sname<".sname."> after unxz")
else
" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba) contents
" distribute archive(.zip, .tar, .vba, ...) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.tgz$'
" call Decho("dearchive: attempt to untar+gunzip ".sname)
exe "silent !tar -zxvf ".shellescape(sname)
elseif sname =~ '\.taz$'
" call Decho("dearchive: attempt to untar+uncompress ".sname)
exe "silent !tar -Zxvf ".shellescape(sname)
elseif sname =~ '\.tbz$'
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
exe "silent !tar -jxvf ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,7 +1,7 @@
" Vim completion script
" Language: HTML and XHTML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Oct 19
" Last Change: 2011 Apr 28
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
@ -285,6 +285,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
let cssfiles = styletable + secimportfiles
let classes = []
for file in cssfiles
let classlines = []
if filereadable(file)
let stylesheet = readfile(file)
let stylefile = join(stylesheet, ' ')

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,9 +1,9 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: Sep 30, 2008
" Version: 10
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
" Author: Charles E. Campbell
" Date: May 03, 2013
" Version: 11b ASTRO-ONLY
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@ -20,7 +20,7 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v10"
let g:loaded_netrwFileHandlers= "v11b"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
@ -34,10 +34,10 @@ set cpo&vim
" netrwFileHandlers#Invoke: {{{1
fun! netrwFileHandlers#Invoke(exten,fname)
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
let fname= a:fname
let exten= a:exten
" list of supported special characters. Consider rcs,v --- that can be
" supported with a NFH_rcsCOMMAv() handler
if a:fname =~ '[@:,$!=\-+%?;~]'
if exten =~ '[@:,$!=\-+%?;~]'
let specials= {
\ '@' : 'AT',
\ ':' : 'COLON',
@ -51,20 +51,20 @@ fun! netrwFileHandlers#Invoke(exten,fname)
\ '?' : 'QUESTION',
\ ';' : 'SEMICOLON',
\ '~' : 'TILDE'}
let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
let exten= substitute(a:exten,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
" call Decho('fname<'.fname.'> done with dictionary')
endif
if a:exten != "" && exists("*NFH_".a:exten)
if a:exten != "" && exists("*NFH_".exten)
" support user NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= NFH_".a:exten.'("'.fname.'")'
elseif a:exten != "" && exists("*s:NFH_".a:exten)
exe "let ret= NFH_".exten.'("'.a:fname.'")'
elseif a:exten != "" && exists("*s:NFH_".exten)
" use builtin-NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
@ -356,6 +356,7 @@ fun! s:NFH_obj(obj)
endfun
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

Просмотреть файл

@ -1,8 +1,8 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Sep 03, 2008
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 13
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
" Date: May 03, 2013
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
" Version: 14a ASTRO-ONLY
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v13"
let g:loaded_netrwSettings = "v14a"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
@ -63,7 +63,7 @@ fun! netrwSettings#NetrwSettings()
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
put ='+ NetrwSettings: by Charles E. Campbell'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
@ -88,6 +88,7 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
@ -99,51 +100,81 @@ fun! netrwSettings#NetrwSettings()
put ='+ Netrw Browser Control'
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_banner = '.g:netrw_banner
if exists("g:netrw_bannerbackslash")
put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash
else
put = '\" let g:netrw_bannerbackslash = (not defined)'
endif
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = 'let g:netrw_browsex_viewer = (not defined)'
put = '\" let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
put = 'let g:netrw_cursorline = '.g:netrw_cursorline
if exists("g:Netrw_corehandler")
put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler
else
put = '\" let g:Netrw_corehandler = (not defined)'
endif
put = 'let g:netrw_ctags = '.g:netrw_ctags
put = 'let g:netrw_cursor = '.g:netrw_cursor
let decompressline= line("$")
put ='let g:netrw_decompress...'
put = 'let g:netrw_decompress = '.string(g:netrw_decompress)
if exists("g:netrw_dynamic_maxfilenamelen")
put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen
else
put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape...'
put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape)
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put ='let g:netrw_glob_escape...'
put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape)
put = 'let g:netrw_hide = '.g:netrw_hide
if exists("g:netrw_home")
put = 'let g:netrw_home = '.g:netrw_home
else
put = '\" let g:netrw_home = (not defined)'
endif
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
if exists("g:netrw_nobeval")
put = 'let g:netrw_nobeval = '.g:netrw_nobeval
else
put = '\" let g:netrw_nobeval = (not defined)'
endif
put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport

Просмотреть файл

Просмотреть файл

@ -1,7 +1,7 @@
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 May 9
" Last Change: 2011 Dec 08
"
" TODO:
" - Class aware completion:
@ -650,6 +650,7 @@ function! phpcomplete#GetClassContents(file, name) " {{{
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
let original_window = winnr()
below 1new
0put =cfile
call search('class\s\+'.a:name)
@ -667,6 +668,9 @@ function! phpcomplete#GetClassContents(file, name) " {{{
let classcontent = join(classc, "\n")
bw! %
" go back to where we started
exe original_window.'wincmd w'
if extends_class != ''
let classlocation = phpcomplete#GetClassLocation(extends_class)
if filereadable(classlocation)

Просмотреть файл

@ -1,9 +1,7 @@
" Vim completion script
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" Last Change: 2009 Sep 28
" URL: http://vim-ruby.rubyforge.org
" Anon CVS: See above site
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Maintainer Version: 0.8.1
" ----------------------------------------------------------------------------
@ -12,16 +10,23 @@
" ----------------------------------------------------------------------------
" {{{ requirement checks
function! s:ErrMsg(msg)
echohl ErrorMsg
echo a:msg
echohl None
endfunction
if !has('ruby')
s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
s:ErrMsg( "Error: falling back to syntax completion" )
call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
call s:ErrMsg( "Error: falling back to syntax completion" )
" lets fall back to syntax completion
setlocal omnifunc=syntaxcomplete#Complete
finish
endif
if version < 700
s:ErrMsg( "Error: Required vim >= 7.0" )
call s:ErrMsg( "Error: Required vim >= 7.0" )
finish
endif
" }}} requirement checks
@ -51,12 +56,6 @@ endif
" {{{ vim-side support functions
let s:rubycomplete_debug = 0
function! s:ErrMsg(msg)
echohl ErrorMsg
echo a:msg
echohl None
endfunction
function! s:dprint(msg)
if s:rubycomplete_debug == 1
echom a:msg
@ -133,7 +132,7 @@ function! s:GetRubyVarType(v)
let stopline = 1
let vtp = ''
let pos = getpos('.')
let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$'
let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$'
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0
call setpos('.',pos)
@ -275,7 +274,7 @@ class VimRubyCompletion
pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef )
load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed
mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef )
mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef )
load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed
begin
@ -364,6 +363,10 @@ class VimRubyCompletion
print txt if @@debug
end
def escape_vim_singlequote_string(str)
str.to_s.gsub(/'/,"\\'")
end
def get_buffer_entity_list( type )
# this will be a little expensive.
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
@ -526,9 +529,9 @@ class VimRubyCompletion
end
def clean_sel(sel, msg)
sel.delete_if { |x| x == nil }
sel.uniq!
sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil
ret = sel.reject{|x|x.nil?}.uniq
ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil
ret
end
def get_rails_view_methods
@ -767,10 +770,10 @@ class VimRubyCompletion
constants = clean_sel( constants, message )
valid = []
valid += methods.collect { |m| { :name => m, :type => 'm' } }
valid += variables.collect { |v| { :name => v, :type => 'v' } }
valid += classes.collect { |c| { :name => c, :type => 't' } }
valid += constants.collect { |d| { :name => d, :type => 'd' } }
valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } }
valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } }
valid += classes.collect { |c| { :name => c.to_s, :type => 't' } }
valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } }
valid.sort! { |x,y| x[:name] <=> y[:name] }
outp = ""
@ -779,7 +782,7 @@ class VimRubyCompletion
rg.step(150) do |x|
stpos = 0+x
enpos = 150+x
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] }
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} }
outp.sub!(/,$/, '')
VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp)

Просмотреть файл

@ -1,6 +1,6 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Nov 29
" Last Change: 2012 Jan 08
if !exists('g:spellfile_URL')
" Prefer using http:// when netrw should be able to use it, since
@ -70,7 +70,7 @@ function! spellfile#LoadFile(lang)
" Remember the buffer number, we check it below.
new
let newbufnr = winbufnr(0)
setlocal bin
setlocal bin fenc=
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
@ -83,7 +83,7 @@ function! spellfile#LoadFile(lang)
" Our buffer has vanished!? Open a new window.
echomsg "download buffer disappeared, opening a new one"
new
setlocal bin
setlocal bin fenc=
else
exe winnr . "wincmd w"
endif
@ -120,6 +120,7 @@ function! spellfile#LoadFile(lang)
else
let dirname = escape(dirlist[dirchoice], ' ')
endif
setlocal fenc=
exe "write " . dirname . '/' . fname
" Also download the .sug file, if the user wants to.

Просмотреть файл

@ -1,16 +1,63 @@
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 10.0
" Last Change: 2010 Jun 11
" Version: 15.0
" Last Change: 2013 May 13
" Homepage: http://www.vim.org/scripts/script.php?script_id=1572
" Usage: For detailed help
" ":help sql.txt"
" or ":help ft-sql-omni"
" ":help sql.txt"
" or ":help ft-sql-omni"
" or read $VIMRUNTIME/doc/sql.txt
" History
"
" TODO
" - Jonas Enberg - if no table is found when using column completion
" look backwards to a FROM clause and find the first table
" and complete it.
"
" Version 15.0 (May 2013)
" - NF: Changed the SQL precached syntax items, omni_sql_precache_syntax_groups,
" to use regular expressions to pick up extended syntax group names.
" This requires an updated SyntaxComplete plugin version 13.0.
" If the required versions have not been installed, previous
" behaviour will not be impacted.
"
" Version 14.0 (Dec 2012)
" - BF: Added check for cpo
"
" Version 13.0 (Dec 2012)
" - NF: When completing column lists or drilling into a table
" and g:omni_sql_include_owner is enabled, the
" only the table name would be replaced with the column
" list instead of the table name and owner (if specified).
" - NF: When completing column lists using table aliases
" and g:omni_sql_include_owner is enabled, account
" for the owner name when looking up the table
" list instead of the table name and owner (if specified).
" - BF: When completing column lists or drilling into a table
" and g:omni_sql_include_owner is enabled, the
" column list could often not be found for the table.
" - BF: When OMNI popped up, possibly the wrong word
" would be replaced for column and column list options.
"
" Version 12.0 (Feb 2012)
" - Partial column name completion did not work when a table
" name or table alias was provided (Jonas Enberg).
" - Improved the handling of column completion. First we match any
" columns from a previous completion. If not matches are found, we
" consider the partial name to be a table or table alias for the
" query and attempt to match on it.
"
" Version 11.0 (Jan 2012)
" Added g:omni_sql_default_compl_type variable
" - You can specify which type of completion to default to
" when pressing <C-X><C-O>. The entire list of available
" choices can be found in the calls to sqlcomplete#Map in:
" ftplugin/sql.vim
"
" Version 10.0
" Updated PreCacheSyntax()
" Updated PreCacheSyntax()
" - Now returns a List of the syntax items it finds.
" This allows other plugins / scripts to use this list for their own
" purposes. In this case XPTemplate can use them for a Choose list.
@ -18,33 +65,33 @@
" warning if not.
" - Verifies the parameters are the correct type and displays a
" warning if not.
" Updated SQLCWarningMsg()
" Updated SQLCWarningMsg()
" - Prepends warning message with SQLComplete so you know who issued
" the warning.
" Updated SQLCErrorMsg()
" Updated SQLCErrorMsg()
" - Prepends error message with SQLComplete so you know who issued
" the error.
"
" Version 9.0
"
" Version 9.0 (May 2010)
" This change removes some of the support for tables with spaces in their
" names in order to simplify the regexes used to pull out query table
" names in order to simplify the regexes used to pull out query table
" aliases for more robust table name and column name code completion.
" Full support for "table names with spaces" can be added in again
" after 7.3.
"
" Version 8.0
" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left
" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left
" when drilling in and out of a column list for a table.
"
" Version 7.0
" Version 7.0 (Jan 2010)
" Better handling of object names
"
" Version 6.0
" Version 6.0 (Apr 2008)
" Supports object names with spaces "my table name"
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
" sourced directly instead of using the autoload feature.
if exists('&omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
@ -54,9 +101,11 @@ if exists('&omnifunc')
endif
if exists('g:loaded_sql_completion')
finish
finish
endif
let g:loaded_sql_completion = 100
let g:loaded_sql_completion = 150
let s:keepcpo= &cpo
set cpo&vim
" Maintains filename of dictionary
let s:sql_file_table = ""
@ -69,17 +118,19 @@ let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
" Used in conjunction with the syntaxcomplete plugin
let s:save_inc = ""
let s:save_exc = ""
if exists('g:omni_syntax_group_include_sql')
let s:save_inc = g:omni_syntax_group_include_sql
if !exists('g:omni_syntax_group_include_sql')
let g:omni_syntax_group_include_sql = ''
endif
if exists('g:omni_syntax_group_exclude_sql')
let s:save_exc = g:omni_syntax_group_exclude_sql
if !exists('g:omni_syntax_group_exclude_sql')
let g:omni_syntax_group_exclude_sql = ''
endif
let s:save_inc = g:omni_syntax_group_include_sql
let s:save_exc = g:omni_syntax_group_exclude_sql
" Used with the column list
let s:save_prev_table = ""
@ -90,12 +141,12 @@ endif
" Default syntax items to precache
if !exists('g:omni_sql_precache_syntax_groups')
let g:omni_sql_precache_syntax_groups = [
\ 'syntax',
\ 'sqlKeyword',
\ 'sqlFunction',
\ 'sqlOption',
\ 'sqlType',
\ 'sqlStatement'
\ 'syntax\w*',
\ 'sqlKeyword\w*',
\ 'sqlFunction\w*',
\ 'sqlOption\w*',
\ 'sqlType\w*',
\ 'sqlStatement\w*'
\ ]
endif
" Set ignorecase to the ftplugin standard
@ -110,14 +161,25 @@ if !exists('g:omni_sql_include_owner')
if g:loaded_dbext >= 300
" New to dbext 3.00, by default the table lists include the owner
" name of the table. This is used when determining how much of
" whatever has been typed should be replaced as part of the
" whatever has been typed should be replaced as part of the
" code replacement.
let g:omni_sql_include_owner = 1
endif
endif
endif
" Default type of completion used when <C-X><C-O> is pressed
if !exists('g:omni_sql_default_compl_type')
let g:omni_sql_default_compl_type = 'table'
endif
" This function is used for the 'omnifunc' option.
" It is called twice by omni and it is responsible
" for returning the completion list of items.
" But it must also determine context of what to complete
" and what to "replace" with the completion.
" The a:base, is replaced directly with what the user
" chooses from the choices.
" The s:prepend provides context for the completion.
function! sqlcomplete#Complete(findstart, base)
" Default to table name completion
@ -126,6 +188,7 @@ function! sqlcomplete#Complete(findstart, base)
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
endif
let begindot = 0
" First pass through this function determines how much of the line should
" be replaced by whatever is chosen from the completion list
@ -134,13 +197,12 @@ function! sqlcomplete#Complete(findstart, base)
let line = getline('.')
let start = col('.') - 1
let lastword = -1
let begindot = 0
" Check if the first character is a ".", for column completion
if line[start - 1] == '.'
let begindot = 1
endif
while start > 0
" Additional code was required to handle objects which
" Additional code was required to handle objects which
" can contain spaces like "my table name".
if line[start - 1] !~ '\(\w\|\.\)'
" If the previous character is not a period or word character
@ -150,7 +212,7 @@ function! sqlcomplete#Complete(findstart, base)
elseif line[start - 1] =~ '\w'
" If the previous character is word character continue back
let start -= 1
elseif line[start - 1] =~ '\.' &&
elseif line[start - 1] =~ '\.' &&
\ compl_type =~ 'column\|table\|view\|procedure'
" If the previous character is a period and we are completing
" an object which can be specified with a period like this:
@ -160,7 +222,10 @@ function! sqlcomplete#Complete(findstart, base)
" If lastword has already been set for column completion
" break from the loop, since we do not also want to pickup
" a table name if it was also supplied.
if lastword != -1 && compl_type == 'column'
" Unless g:omni_sql_include_owner == 1, then we can
" include the ownername.
if lastword != -1 && compl_type == 'column'
\ && g:omni_sql_include_owner == 0
break
endif
" If column completion was specified stop at the "." if
@ -171,8 +236,8 @@ function! sqlcomplete#Complete(findstart, base)
endif
" If omni_sql_include_owner = 0, do not include the table
" name as part of the substitution, so break here
if lastword == -1 &&
\ compl_type =~ 'table\|view\|procedure\column_csv' &&
if lastword == -1 &&
\ compl_type =~ '\<\(table\|view\|procedure\|column\|column_csv\)\>' &&
\ g:omni_sql_include_owner == 0
let lastword = start
break
@ -202,7 +267,7 @@ function! sqlcomplete#Complete(findstart, base)
let compl_list = []
" Default to table name completion
let compl_type = 'table'
let compl_type = g:omni_sql_default_compl_type
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
@ -216,7 +281,7 @@ function! sqlcomplete#Complete(findstart, base)
if compl_type == 'table' ||
\ compl_type == 'procedure' ||
\ compl_type == 'view'
\ compl_type == 'view'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
@ -254,7 +319,7 @@ function! sqlcomplete#Complete(findstart, base)
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
@ -269,20 +334,26 @@ function! sqlcomplete#Complete(findstart, base)
let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
let column = matchstr( base, '.*\.\zs.*' )
if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != ''
let owner = table
let table = column
let column = ''
endif
" It is pretty well impossible to determine if the user
" has entered:
" owner.table
" table.column_prefix
" So there are a couple of things we can do to mitigate
" So there are a couple of things we can do to mitigate
" this issue.
" 1. Check if the dbext plugin has the option turned
" on to even allow owners
" 2. Based on 1, if the user is showing a table list
" and the DrillIntoTable (using <Right>) then
" and the DrillIntoTable (using <Right>) then
" this will be owner.table. In this case, we can
" check to see the table.column exists in the
" check to see the table.column exists in the
" cached table list. If it does, then we have
" determined the user has actually chosen
" determined the user has actually chosen
" owner.table, not table.column_prefix.
let found = -1
if g:omni_sql_include_owner == 1 && owner == ''
@ -297,17 +368,46 @@ function! sqlcomplete#Complete(findstart, base)
" If the user has indicated not to use table owners at all and
" the base ends in a '.' we know they are not providing a column
" name, so we can shift the items appropriately.
if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
let owner = table
let table = column
let column = ''
endif
" if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
" let owner = table
" let table = column
" let column = ''
" endif
else
" If no "." was provided and the user asked for
" column level completion, first attempt the match
" on any previous column lists. If the user asked
" for a list of columns comma separated, continue as usual.
if compl_type == 'column' && s:save_prev_table != ''
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let table = s:save_prev_table
let list_type = ''
let compl_list = s:SQLCGetColumns(table, list_type)
if ! empty(compl_list)
" If no column prefix has been provided and the table
" name was provided, append it to each of the items
" returned.
let compl_list = filter(deepcopy(compl_list), 'v:val=~"^'.base.'"' )
" If not empty, we have a match on columns
" return the list
if ! empty(compl_list)
return compl_list
endif
endif
endif
" Since no columns were found to match the base supplied
" assume the user is trying to complete the column list
" for a table (and or an alias to a table).
let table = base
endif
" Get anything after the . and consider this the table name
" If an owner has been specified, then we must consider the
" If an owner has been specified, then we must consider the
" base to be a partial column name
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
@ -322,16 +422,25 @@ function! sqlcomplete#Complete(findstart, base)
let list_type = 'csv'
endif
let compl_list = s:SQLCGetColumns(table, list_type)
" If we are including the OWNER for the objects, then for
" table completion, if we have it, it should be included
" as there can be the same table names in a database yet
" with different owner names.
if g:omni_sql_include_owner == 1 && owner != '' && table != ''
let compl_list = s:SQLCGetColumns(owner.'.'.table, list_type)
else
let compl_list = s:SQLCGetColumns(table, list_type)
endif
if column != ''
" If no column prefix has been provided and the table
" name was provided, append it to each of the items
" returned.
let compl_list = map(compl_list, "table.'.'.v:val")
let compl_list = map(compl_list, 'table.".".v:val')
if owner != ''
" If an owner has been provided append it to each of the
" items returned.
let compl_list = map(compl_list, "owner.'.'.v:val")
let compl_list = map(compl_list, 'owner.".".v:val')
endif
else
let base = ''
@ -345,11 +454,14 @@ function! sqlcomplete#Complete(findstart, base)
endif
elseif compl_type == 'resetCache'
" Reset all cached items
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""
let msg = "All SQL cached items have been removed."
call s:SQLCWarningMsg(msg)
@ -361,22 +473,41 @@ function! sqlcomplete#Complete(findstart, base)
if base != ''
" Filter the list based on the first few characters the user entered.
" Check if the text matches at the beginning
" or
" Check if the text matches at the beginning
" \\(^.base.'\\)
" or
" Match to a owner.table or alias.column type match
" ^\\(\\w\\+\\.\\)\\?'.base.'\\)
" or
" Handle names with spaces "my table name"
" "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
"
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
let compl_list = filter(deepcopy(compl_list), expr)
if empty(compl_list) && compl_type == 'table' && base =~ '\.$'
" It is possible we could be looking for column name completion
" and the user simply hit C-X C-O to lets try it as well
" since we had no hits with the tables.
" If the base ends with a . it is hard to know if we are
" completing table names or column names.
let list_type = ''
let compl_list = s:SQLCGetColumns(base, list_type)
endif
endif
if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != ""
let &omnifunc = b:sql_compl_savefunc
endif
if empty(compl_list)
call s:SQLCWarningMsg( 'Could not find type['.compl_type.'] using prepend[.'.s:prepended.'] base['.a:base.']' )
endif
return compl_list
endfunc
@ -384,7 +515,7 @@ function! sqlcomplete#PreCacheSyntax(...)
let syn_group_arr = []
let syn_items = []
if a:0 > 0
if a:0 > 0
if type(a:1) != 3
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
return ''
@ -407,7 +538,7 @@ endfunction
function! sqlcomplete#ResetCacheSyntax(...)
let syn_group_arr = []
if a:0 > 0
if a:0 > 0
if type(a:1) != 3
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
return ''
@ -458,7 +589,7 @@ function! sqlcomplete#DrillIntoTable()
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" or feedkeys will simply push each character of the string
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
endif
@ -475,7 +606,7 @@ function! sqlcomplete#DrillOutOfColumns()
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" or feedkeys will simply push each character of the string
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
endif
@ -484,16 +615,16 @@ endfunction
function! s:SQLCWarningMsg(msg)
echohl WarningMsg
echomsg 'SQLComplete:'.a:msg
echomsg 'SQLComplete:'.a:msg
echohl None
endfunction
function! s:SQLCErrorMsg(msg)
echohl ErrorMsg
echomsg 'SQLComplete:'.a:msg
echomsg 'SQLComplete:'.a:msg
echohl None
endfunction
function! s:SQLCGetSyntaxList(syn_group)
let syn_group = a:syn_group
let compl_list = []
@ -504,19 +635,23 @@ function! s:SQLCGetSyntaxList(syn_group)
" Return previously cached value
let compl_list = s:syn_value[list_idx]
else
" Request the syntax list items from the
let s:save_inc = g:omni_syntax_group_include_sql
let s:save_exc = g:omni_syntax_group_exclude_sql
let g:omni_syntax_group_include_sql = ''
let g:omni_syntax_group_exclude_sql = ''
" Request the syntax list items from the
" syntax completion plugin
if syn_group == 'syntax'
" Handle this special case. This allows the user
" to indicate they want all the syntax items available,
" so do not specify a specific include list.
let g:omni_syntax_group_include_sql = ''
let syn_value = syntaxcomplete#OmniSyntaxList()
else
" The user has specified a specific syntax group
let g:omni_syntax_group_include_sql = syn_group
let syn_value = syntaxcomplete#OmniSyntaxList(syn_group)
endif
let g:omni_syntax_group_exclude_sql = ''
let syn_value = syntaxcomplete#OmniSyntaxList()
let g:omni_syntax_group_include_sql = s:save_inc
let g:omni_syntax_group_exclude_sql = s:save_exc
" Cache these values for later use
@ -552,7 +687,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
let table_alias = a:table_alias
let cols = a:cols
if g:omni_sql_use_tbl_alias != 'n'
if g:omni_sql_use_tbl_alias != 'n'
if table_alias == ''
if 'da' =~? g:omni_sql_use_tbl_alias
if table_name =~ '_'
@ -562,13 +697,13 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
setlocal iskeyword-=_
" Get the first letter of each word
" [[:alpha:]] is used instead of \w
" [[:alpha:]] is used instead of \w
" to catch extended accented characters
"
let table_alias = substitute(
\ table_name,
\ '\<[[:alpha:]]\+\>_\?',
\ '\=strpart(submatch(0), 0, 1)',
let table_alias = substitute(
\ table_name,
\ '\<[[:alpha:]]\+\>_\?',
\ '\=strpart(submatch(0), 0, 1)',
\ 'g'
\ )
" Restore original value
@ -596,7 +731,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
return cols
endfunction
function! s:SQLCGetObjectOwner(object)
function! s:SQLCGetObjectOwner(object)
" The owner regex matches a word at the start of the string which is
" followed by a dot, but doesn't include the dot in the result.
" ^ - from beginning of line
@ -609,11 +744,29 @@ function! s:SQLCGetObjectOwner(object)
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
return owner
endfunction
endfunction
function! s:SQLCGetColumns(table_name, list_type)
if a:table_name =~ '\.'
" Check if the owner/creator has been specified
let owner = matchstr( a:table_name, '^\zs.*\ze\..*\..*' )
let table = matchstr( a:table_name, '^\(.*\.\)\?\zs.*\ze\..*' )
let column = matchstr( a:table_name, '.*\.\zs.*' )
if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != ''
let owner = table
let table = column
let column = ''
endif
else
let owner = ''
let table = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
let column = ''
endif
" Check if the table name was provided as part of the column name
let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
" let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
let table_name = table
let table_cols = []
let table_alias = ''
let move_to_top = 1
@ -636,7 +789,7 @@ function! s:SQLCGetColumns(table_name, list_type)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx], '\n')
else
" Check if we have already cached the column list for this table
" Check if we have already cached the column list for this table
" by its alias, assuming the table_name provided was actually
" the alias for the table instead
" select *
@ -654,7 +807,7 @@ function! s:SQLCGetColumns(table_name, list_type)
" And the table ends in a "." or we are looking for a column list
" if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column')
" if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv')
if list_idx == -1
if list_idx == -1
let saveY = @y
let saveSearch = @/
let saveWScan = &wrapscan
@ -665,7 +818,7 @@ function! s:SQLCGetColumns(table_name, list_type)
setlocal nowrapscan
" If . was entered, look at the word just before the .
" We are looking for something like this:
" select *
" select *
" from customer c
" where c.
" So when . is pressed, we need to find 'c'
@ -692,15 +845,15 @@ function! s:SQLCGetColumns(table_name, list_type)
" if query =~? '^\c\(select\)'
if query =~? '^\(select\|update\|delete\)'
let found = 1
" \(\(\<\w\+\>\)\.\)\? -
" \(\(\<\w\+\>\)\.\)\? -
" '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive)
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
" '\<\w\+\>\ze' - Get the table name
" '\<\w\+\>\ze' - Get the table name
" '\s\+\<'.table_name.'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
" let table_name_new = matchstr(@y,
" let table_name_new = matchstr(@y,
" \ '\c\(from\|join\|,\).\{-}'.
" \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
" \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'.
@ -711,7 +864,16 @@ function! s:SQLCGetColumns(table_name, list_type)
" \ '\(\<where\>\|$\)'.
" \ '.*'
" \ )
let table_name_new = matchstr(@y,
"
"
" ''\c\(\<from\>\|\<join\>\|,\)\s*' - Starting at the from clause (case insensitive)
" '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?' - Get the owner name (optional)
" '\("\|\[\)\?\w\+\("\|\]\)\?\ze' - Get the table name
" '\s\+\%(as\s\+\)\?\<'.matchstr(table_name, '.\{-}\ze\.\?$').'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
let table_name_new = matchstr(@y,
\ '\c\(\<from\>\|\<join\>\|,\)\s*'.
\ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'.
\ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'.
@ -725,7 +887,12 @@ function! s:SQLCGetColumns(table_name, list_type)
if table_name_new != ''
let table_alias = table_name
let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' )
if g:omni_sql_include_owner == 1
let table_name = matchstr( table_name_new, '^\zs\(.\{-}\.\)\?\(.\{-}\.\)\?.*\ze' )
else
" let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' )
let table_name = matchstr( table_name_new, '^\(.\{-}\.\)\?\zs\(.\{-}\.\)\?.*\ze' )
endif
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
@ -753,7 +920,7 @@ function! s:SQLCGetColumns(table_name, list_type)
" Return to previous location
call cursor(curline, curcol)
if found == 0
if g:loaded_dbext > 300
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
@ -762,12 +929,13 @@ function! s:SQLCGetColumns(table_name, list_type)
" Not a SQL statement, do not display a list
return []
endif
endif
endif
if empty(table_cols)
" Specify silent mode, no messages to the user (tbl, 1)
" Specify do not comma separate (tbl, 1, 1)
let table_cols_str = DB_getListColumn(table_name, 1, 1)
" let table_cols_str = DB_getListColumn(table_name, 1, 1)
let table_cols_str = DB_getListColumn((owner!=''?owner.'.':'').table_name, 1, 1)
if table_cols_str != ""
let s:tbl_name = add( s:tbl_name, table_name )
@ -793,3 +961,7 @@ function! s:SQLCGetColumns(table_name, list_type)
return table_cols
endfunction
" Restore:
let &cpo= s:keepcpo
unlet s:keepcpo
" vim: ts=4 fdm=marker

Просмотреть файл

@ -0,0 +1,755 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 13.0
" Last Change: 2013 May 14
" Usage: For detailed help, ":help ft-syntax-omni"
" History
"
" Version 13.0
" - Extended the option omni_syntax_group_include_{filetype}
" to accept a comma separated list of regex's rather than
" string. For example, for the javascript filetype you could
" use:
" let g:omni_syntax_group_include_javascript = 'javascript\w\+,jquery\w\+'
" - Some syntax files (perl.vim) use the match // syntax as a mechanism
" to identify keywords. This update attempts to parse the
" match syntax and pull out syntax items which are at least
" 3 words or more.
"
" Version 12.0
" - It is possible to have '-' as part of iskeyword, when
" checking for character ranges, tighten up the regex.
" E688: More targets than List items.
"
" Version 11.0
" - Corrected which characters required escaping during
" substitution calls.
"
" Version 10.0
" - Cycle through all the character ranges specified in the
" iskeyword option and build a list of valid word separators.
" Prior to this change, only actual characters were used,
" where for example ASCII "45" == "-". If "45" were used
" in iskeyword the hyphen would not be picked up.
" This introduces a new option, since the character ranges
" specified could be multibyte:
" let g:omni_syntax_use_single_byte = 1
" - This by default will only allow single byte ASCII
" characters to be added and an additional check to ensure
" the charater is printable (see documentation for isprint).
"
" Version 9.0
" - Add the check for cpo.
"
" Version 8.0
" - Updated SyntaxCSyntaxGroupItems()
" - Some additional syntax items were also allowed
" on nextgroup= lines which were ignored by default.
" Now these lines are processed independently.
"
" Version 7.0
" - Updated syntaxcomplete#OmniSyntaxList()
" - Looking up the syntax groups defined from a syntax file
" looked for only 1 format of {filetype}GroupName, but some
" syntax writers use this format as well:
" {b:current_syntax}GroupName
" - OmniSyntaxList() will now check for both if the first
" method does not find a match.
"
" Version 6.0
" - Added syntaxcomplete#OmniSyntaxList()
" - Allows other plugins to use this for their own
" purposes.
" - It will return a List of all syntax items for the
" syntax group name passed in.
" - XPTemplate for SQL will use this function via the
" sqlcomplete plugin to populate a Choose box.
"
" Version 5.0
" - Updated SyntaxCSyntaxGroupItems()
" - When processing a list of syntax groups, the final group
" was missed in function SyntaxCSyntaxGroupItems.
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
if exists('+omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
if &omnifunc == ""
setlocal omnifunc=syntaxcomplete#Complete
endif
endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 130
" Turn on support for line continuations when creating the script
let s:cpo_save = &cpo
set cpo&vim
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_ignorecase')
let g:omni_syntax_ignorecase = &ignorecase
endif
" Indicates whether we should use the iskeyword option to determine
" how to split words.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_use_iskeyword')
let g:omni_syntax_use_iskeyword = 1
endif
" When using iskeyword, this setting controls whether the characters
" should be limited to single byte characters.
if !exists('g:omni_syntax_use_single_byte')
let g:omni_syntax_use_single_byte = 1
endif
" When using iskeyword, this setting controls whether the characters
" should be limited to single byte characters.
if !exists('g:omni_syntax_use_iskeyword_numeric')
let g:omni_syntax_use_iskeyword_numeric = 1
endif
" Only display items in the completion window that are at least
" this many characters in length.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_minimum_length')
let g:omni_syntax_minimum_length = 0
endif
" This script will build a completion list based on the syntax
" elements defined by the files in $VIMRUNTIME/syntax.
" let s:syn_remove_words = 'match,matchgroup=,contains,'.
let s:syn_remove_words = 'matchgroup=,contains,'.
\ 'links to,start=,end='
" \ 'links to,start=,end=,nextgroup='
let s:cache_name = []
let s:cache_list = []
let s:prepended = ''
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_ignorecase')
if exists('g:omni_syntax_ignorecase')
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
else
let b:omni_syntax_ignorecase = &ignorecase
endif
endif
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
" if line[start - 1] =~ '\S'
" let start -= 1
" elseif line[start - 1] =~ '\.'
if line[start - 1] =~ '\k'
let start -= 1
let lastword = a:findstart
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, (col('.') - 1) - start)
return start
endif
" let base = s:prepended . a:base
let base = s:prepended
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = OmniSyntaxList()
let s:cache_name = add( s:cache_name, filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
" Return list of matches.
if base != ''
" let compstr = join(compl_list, ' ')
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
" let compstr = substitute(compstr, expr, '', 'g')
" let compl_list = split(compstr, '\s\+')
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
let compl_list = filter(deepcopy(compl_list), expr)
endif
return compl_list
endfunc
function! syntaxcomplete#OmniSyntaxList(...)
if a:0 > 0
let parms = []
if 3 == type(a:1)
let parms = a:1
elseif 1 == type(a:1)
let parms = split(a:1, ',')
endif
return OmniSyntaxList( parms )
else
return OmniSyntaxList()
endif
endfunc
function! OmniSyntaxList(...)
let list_parms = []
if a:0 > 0
if 3 == type(a:1)
let list_parms = a:1
elseif 1 == type(a:1)
let list_parms = split(a:1, ',')
endif
endif
" Default to returning a dictionary, if use_dictionary is set to 0
" a list will be returned.
" let use_dictionary = 1
" if a:0 > 0 && a:1 != ''
" let use_dictionary = a:1
" endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_use_iskeyword')
if exists('g:omni_syntax_use_iskeyword')
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
else
let b:omni_syntax_use_iskeyword = 1
endif
endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_minimum_length')
if exists('g:omni_syntax_minimum_length')
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
else
let b:omni_syntax_minimum_length = 0
endif
endif
let saveL = @l
let filetype = substitute(&filetype, '\.', '_', 'g')
if empty(list_parms)
" Default the include group to include the requested syntax group
let syntax_group_include_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_include_'.filetype)
let syntax_group_include_{filetype} =
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
let list_parms = split(g:omni_syntax_group_include_{filetype}, ',')
if syntax_group_include_{filetype} =~ '\w'
let syntax_group_include_{filetype} =
\ substitute( syntax_group_include_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
else
" A specific list was provided, use it
endif
" Loop through all the syntax groupnames, and build a
" syntax file which contains these names. This can
" work generically for any filetype that does not already
" have a plugin defined.
" This ASSUMES the syntax groupname BEGINS with the name
" of the filetype. From my casual viewing of the vim7\syntax
" directory this is true for almost all syntax definitions.
" As an example, the SQL syntax groups have this pattern:
" sqlType
" sqlOperators
" sqlKeyword ...
if !empty(list_parms) && empty(substitute(join(list_parms), '[a-zA-Z ]', '', 'g'))
" If list_parms only includes word characters, use it to limit
" the syntax elements.
" If using regex syntax list will fail to find those items, so
" simply grab the who syntax list.
redir @l
silent! exec 'syntax list '.join(list_parms)
redir END
else
redir @l
silent! exec 'syntax list'
redir END
endif
let syntax_full = "\n".@l
let @l = saveL
if syntax_full =~ 'E28'
\ || syntax_full =~ 'E411'
\ || syntax_full =~ 'E415'
\ || syntax_full =~ 'No Syntax items'
return []
endif
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_exclude_groups = []
if a:0 > 0
" Do nothing since we have specific a specific list of groups
else
" Default the exclude group to nothing
let syntax_group_exclude_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_exclude_'.filetype)
let syntax_group_exclude_{filetype} =
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
if syntax_group_exclude_{filetype} =~ '\w'
let syntax_group_exclude_{filetype} =
\ substitute( syntax_group_exclude_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
endif
if empty(list_parms)
let list_parms = [&filetype.'\w\+']
endif
let syn_list = ''
let index = 0
for group_regex in list_parms
" Sometimes filetypes can be composite names, like c.doxygen
" Loop through each individual part looking for the syntax
" items specific to each individual filetype.
" let ftindex = 0
" let ftindex = match(syntax_full, group_regex, ftindex)
" while ftindex > -1
" let ft_part_name = matchstr( syntax_full, '\w\+', ftindex )
" Syntax rules can contain items for more than just the current
" filetype. They can contain additional items added by the user
" via autocmds or their vimrc.
" Some syntax files can be combined (html, php, jsp).
" We want only items that begin with the filetype we are interested in.
let next_group_regex = '\n' .
\ '\zs'.group_regex.'\ze'.
\ '\s\+xxx\s\+'
let index = match(syntax_full, next_group_regex, index)
" For the matched group name, strip off any of the regex special
" characters and see if we get a match with the current syntax
if index == -1 && exists('b:current_syntax') && substitute(group_regex, '[^a-zA-Z ]\+.*', '', 'g') !~ '^'.b:current_syntax
" There appears to be two standards when writing syntax files.
" Either items begin as:
" syn keyword {filetype}Keyword values ...
" let b:current_syntax = "sql"
" let b:current_syntax = "sqlanywhere"
" Or
" syn keyword {syntax_filename}Keyword values ...
" let b:current_syntax = "mysql"
" So, we will make the format of finding the syntax group names
" a bit more flexible and look for both if the first fails to
" find a match.
let next_group_regex = '\n' .
\ '\zs'.b:current_syntax.'\w\+\ze'.
\ '\s\+xxx\s\+'
let index = 0
let index = match(syntax_full, next_group_regex, index)
endif
while index > -1
let group_name = matchstr( syntax_full, '\w\+', index )
let get_syn_list = 1
for exclude_group_name in list_exclude_groups
if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
let get_syn_list = 0
endif
endfor
" This code is no longer needed in version 6.0 since we have
" augmented the syntax list command to only retrieve the syntax
" groups we are interested in.
"
" if get_syn_list == 1
" if syntax_group_include_{filetype} != ''
" if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endif
" endif
if get_syn_list == 1
" Pass in the full syntax listing, plus the group name we
" are interested in.
let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
let syn_list = syn_list . extra_syn_list . "\n"
endif
let index = index + strlen(group_name)
let index = match(syntax_full, next_group_regex, index)
endwhile
" let ftindex = ftindex + len(ft_part_name)
" let ftindex = match( syntax_full, group_regex, ftindex )
" endwhile
endfor
" " Sometimes filetypes can be composite names, like c.doxygen
" " Loop through each individual part looking for the syntax
" " items specific to each individual filetype.
" let syn_list = ''
" let ftindex = 0
" let ftindex = match(&filetype, '\w\+', ftindex)
" while ftindex > -1
" let ft_part_name = matchstr( &filetype, '\w\+', ftindex )
" " Syntax rules can contain items for more than just the current
" " filetype. They can contain additional items added by the user
" " via autocmds or their vimrc.
" " Some syntax files can be combined (html, php, jsp).
" " We want only items that begin with the filetype we are interested in.
" let next_group_regex = '\n' .
" \ '\zs'.ft_part_name.'\w\+\ze'.
" \ '\s\+xxx\s\+'
" let index = 0
" let index = match(syntax_full, next_group_regex, index)
" if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax
" " There appears to be two standards when writing syntax files.
" " Either items begin as:
" " syn keyword {filetype}Keyword values ...
" " let b:current_syntax = "sql"
" " let b:current_syntax = "sqlanywhere"
" " Or
" " syn keyword {syntax_filename}Keyword values ...
" " let b:current_syntax = "mysql"
" " So, we will make the format of finding the syntax group names
" " a bit more flexible and look for both if the first fails to
" " find a match.
" let next_group_regex = '\n' .
" \ '\zs'.b:current_syntax.'\w\+\ze'.
" \ '\s\+xxx\s\+'
" let index = 0
" let index = match(syntax_full, next_group_regex, index)
" endif
" while index > -1
" let group_name = matchstr( syntax_full, '\w\+', index )
" let get_syn_list = 1
" for exclude_group_name in list_exclude_groups
" if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endfor
" " This code is no longer needed in version 6.0 since we have
" " augmented the syntax list command to only retrieve the syntax
" " groups we are interested in.
" "
" " if get_syn_list == 1
" " if syntax_group_include_{filetype} != ''
" " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
" " let get_syn_list = 0
" " endif
" " endif
" " endif
" if get_syn_list == 1
" " Pass in the full syntax listing, plus the group name we
" " are interested in.
" let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
" let syn_list = syn_list . extra_syn_list . "\n"
" endif
" let index = index + strlen(group_name)
" let index = match(syntax_full, next_group_regex, index)
" endwhile
" let ftindex = ftindex + len(ft_part_name)
" let ftindex = match( &filetype, '\w\+', ftindex )
" endwhile
" Convert the string to a List and sort it.
let compl_list = sort(split(syn_list))
if &filetype == 'vim'
let short_compl_list = []
for i in range(len(compl_list))
if i == len(compl_list)-1
let next = i
else
let next = i + 1
endif
if compl_list[next] !~ '^'.compl_list[i].'.$'
let short_compl_list += [compl_list[i]]
endif
endfor
return short_compl_list
else
return compl_list
endif
endfunction
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
let syn_list = ""
" From the full syntax listing, strip out the portion for the
" request group.
" Query:
" \n - must begin with a newline
" a:group_name - the group name we are interested in
" \s\+xxx\s\+ - group names are always followed by xxx
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \( - start a group or 2 potential matches
" \n\w - at the first newline starting with a character
" \| - 2nd potential match
" \%$ - matches end of the file or string
" \) - end a group
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)'
\ )
if syntax_group != ""
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
" Tried to remove all lines that do not begin with contained
" but this does not work in all cases since you can have
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute(
\ syntax_group, '\<\('.
\ substitute(
\ escape(s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g'
\ ).
\ '\).\{-}\%($\|'."\n".'\)'
\ , "\n", 'g'
\ )
" Attempt to deal with lines using the match syntax
" javaScriptDocTags xxx match /@\(param\|argument\|requires\|file\)\>/
" Though it can use any types of regex, so this plugin will attempt
" to restrict it
" 1. Only use \( or \%( constructs remove all else
" 2 Remove and []s
" 3. Account for match //constructs
" \%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?
" 4. Hope for the best
"
"
let syn_list_old = syn_list
while syn_list =~ '\<match\>\s\+\/'
if syn_list =~ 'perlElseIfError'
let syn_list = syn_list
endif
" Check if the match has words at least 3 characters long
if syn_list =~ '\<match \/\zs.\{-}\<\w\{3,}\>.\{-}\ze\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+'
" Remove everything after / and before the first \(
let syn_list = substitute( syn_list, '\<match \/\zs.\{-}\ze\\%\?(.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove everything after \) and up to the ending /
let syn_list = substitute( syn_list, '\<match \/.\{-}\\)\zs.\{-}\ze\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove any character classes
" let syn_list = substitute( syn_list, '\<match /\zs.\{-}\[[^]]*\].\{-}\ze\/ ', '', 'g' )
let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\[[^]]*\]\ze.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?', '', 'g' )
" Remove any words < 3 characters
let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\<\w\{1,2}\>\ze.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove all non-word characters
" let syn_list = substitute( syn_list, '\<match /\zs.\{-}\<\W\+\>.\{-}\ze\/ ', "", 'g' )
" let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\W\+\ze.\{-}\/ ', ' ', 'g' )
" Do this by using the outer substitue() call to gather all
" text between the match /.../ tags.
" The inner substitute() call operates on the text selected
" and replaces all non-word characters.
let syn_list = substitute( syn_list, '\<match \/\zs\(.\{-}\)\ze\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+'
\ , '\=substitute(submatch(1), "\\W\\+", " ", "g")'
\ , 'g' )
" Remove the match / / syntax
let syn_list = substitute( syn_list, '\<match \/\(.\{-}\)\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '\1', 'g' )
else
" No words long enough, remove the match
" Remove the match syntax
" let syn_list = substitute( syn_list, '\<match \/[^\/]*\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
let syn_list = substitute( syn_list, '\<match \/\%(.\{-}\)\?\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
endif
if syn_list =~ '\<match\>\s\+\/'
" Problem removing the match / / tags
let syn_list = ''
endif
endwhile
" Now strip off the newline + blank space + contained.
" Also include lines with nextgroup=@someName skip_key_words syntax_element
" \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)'
" \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=[@a-zA-Z,]*\)'
let syn_list = substitute(
\ syn_list, '\<\(contained\|nextgroup=[@a-zA-Z,]*\)'
\ , "", 'g'
\ )
" This can leave lines like this
" =@vimMenuList skipwhite onoremenu
" Strip the special option keywords first
" :h :syn-skipwhite*
let syn_list = substitute(
\ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>'
\ , "", 'g'
\ )
" Now remove the remainder of the nextgroup=@someName lines
let syn_list = substitute(
\ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)'
\ , "", 'g'
\ )
if b:omni_syntax_use_iskeyword == 0
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
else
if g:omni_syntax_use_iskeyword_numeric == 1
" iskeyword can contain value like this
" 38,42,43,45,47-58,60-62,64-90,97-122,_,+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
" Numeric values convert to their ASCII equivalent using the
" nr2char() function.
" & 38
" * 42
" + 43
" - 45
" ^ 94
" Iterate through all numeric specifications and convert those
" to their ascii equivalent ensuring the character is printable.
" If so, add it to the list.
let accepted_chars = ''
for item in split(&iskeyword, ',')
if item =~ '\d-\d'
" This is a character range (ie 47-58),
" cycle through each character within the range
let [b:start, b:end] = split(item, '-')
for range_item in range( b:start, b:end )
if range_item <= 127 || g:omni_syntax_use_single_byte == 0
if nr2char(range_item) =~ '\p'
let accepted_chars = accepted_chars . nr2char(range_item)
endif
endif
endfor
elseif item =~ '^\d\+$'
" Only numeric, translate to a character
if item < 127 || g:omni_syntax_use_single_byte == 0
if nr2char(item) =~ '\p'
let accepted_chars = accepted_chars . nr2char(item)
endif
endif
else
if char2nr(item) < 127 || g:omni_syntax_use_single_byte == 0
if item =~ '\p'
let accepted_chars = accepted_chars . item
endif
endif
endif
endfor
" Escape special regex characters
" Looks like the wrong chars are escaped. In a collection,
" :h /[]
" only `]', `\', `-' and `^' are special:
" let accepted_chars = escape(accepted_chars, '\\/.*$^~[]' )
let accepted_chars = escape(accepted_chars, ']\-^' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^A-Za-z'.accepted_chars.']', ' ', 'g' )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
" Remove all numeric specifications
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
" Looks like the wrong chars are escaped. In a collection,
" :h /[]
" only `]', `\', `-' and `^' are special:
" let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
let accept_chars = escape(accept_chars, ']\-^' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^0-9A-Za-z_'.accept_chars.']', ' ', 'g' )
endif
endif
if b:omni_syntax_minimum_length > 0
" If the user specified a minimum length, enforce it
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
endif
else
let syn_list = ''
endif
return syn_list
endfunction
function! OmniSyntaxShowChars(spec)
let result = []
for item in split(a:spec, ',')
if len(item) > 1
if item == '@-@'
call add(result, char2nr(item))
else
call extend(result, call('range', split(item, '-')))
endif
else
if item == '@' " assume this is [A-Za-z]
for [c1, c2] in [['A', 'Z'], ['a', 'z']]
call extend(result, range(char2nr(c1), char2nr(c2)))
endfor
else
call add(result, char2nr(item))
endif
endif
endfor
return join(map(result, 'nr2char(v:val)'), ', ')
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

Просмотреть файл

@ -1,13 +1,13 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Aug 09, 2010
" Version: 26
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" Date: Apr 17, 2013
" Version: 29
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
"
" Copyright: Copyright (C) 2005-2009 Charles E. Campbell, Jr. {{{1
" Copyright: Copyright (C) 2005-2011 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@ -22,7 +22,7 @@
if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v26"
let g:loaded_tar= "v29"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
@ -31,6 +31,7 @@ if v:version < 702
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
@ -47,6 +48,17 @@ endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
if !exists("g:tar_copycmd")
if !exists("g:netrw_localcopycmd")
if has("win32") || has("win95") || has("win64") || has("win16")
@ -63,24 +75,13 @@ if !exists("g:tar_copycmd")
endif
let g:tar_copycmd= g:netrw_localcopycmd
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
if !exists("g:tar_extractcmd")
let g:tar_extractcmd= "tar -xf"
endif
" set up shell quoting character
if !exists("g:tar_shq")
if exists("&shq") && &shq != ""
if exists("+shq") && exists("&shq") && &shq != ""
let g:tar_shq= &shq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if exists("g:netrw_cygwin") && g:netrw_cygwin
@ -142,38 +143,38 @@ fun! tar#Browse(tarfile)
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
$put =''
0d
$
keepj $put =''
keepj sil! 0d
keepj $
let tarfile= a:tarfile
if has("win32") && executable("cygpath")
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
let curlast= line("$")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$'
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lzma$'
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lzma\|tlz\)$'
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
@ -184,12 +185,12 @@ fun! tar#Browse(tarfile)
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
silent %d
keepj sil! %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".fnameescape(a:tarfile)
let &ei= eikeep
1d
keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
@ -227,7 +228,7 @@ fun! s:TarBrowseSelect()
" about to make a new window, need to use b:tarfile
let tarfile= b:tarfile
let curfile= expand("%")
if has("win32") && executable("cygpath")
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
@ -239,6 +240,8 @@ fun! s:TarBrowseSelect()
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.'::'.fname,1)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
let &report= repkeep
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
@ -252,7 +255,7 @@ fun! tar#Read(fname,mode)
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
if has("win32") && executable("cygpath")
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
@ -286,19 +289,19 @@ fun! tar#Read(fname,mode)
endif
if tarfile =~# '\.bz2$'
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lrp$'
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "silent r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lzma$'
" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
@ -317,7 +320,7 @@ fun! tar#Read(fname,mode)
exe "file tarfile::".fnameescape(fname)
" cleanup
0d
keepj sil! 0d
set nomod
let &report= repkeep
@ -425,7 +428,7 @@ fun! tar#Write(fname)
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if executable("cygpath")
if has("win32unix") && executable("cygpath")
let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e')
endif
call mkdir(dirpath,"p")
@ -445,7 +448,7 @@ fun! tar#Write(fname)
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
if executable("cygpath")
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
@ -500,6 +503,30 @@ fun! tar#Write(fname)
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" tar#Diff: {{{2
fun! tar#Diff(userfname,fname)
" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")")
let fname= a:fname
if a:userfname != ""
let fname= a:userfname
endif
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
" opens original file, sets it for diff'ing
" sets up b:tardiff_otherbuf variables so each buffer knows about the other (for closing purposes)
diffthis
wincmd v
exe "e ".fnameescape(fname)
diffthis
else
redraw!
echo "***warning*** unable to read file<".fname.">"
endif
" call Dret("tar#Diff")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)

Просмотреть файл

@ -0,0 +1,923 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2013 Jun 19
"
" Additional contributors:
"
" Original by Bram Moolenaar <Bram@vim.org>
" Diff2HTML() added by Christian Brabandt <cb@256bit.org>
"
" See Mercurial change logs for more!
" this file uses line continuations
let s:cpo_sav = &cpo
set cpo&vim
" Automatically find charsets from all encodings supported natively by Vim. With
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
" this. Let the user specify these however since they won't be supported on
" every system.
"
" Note, not all of Vim's supported encodings have a charset to use.
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#encoding_to_charset: {{{
let g:tohtml#encoding_to_charset = {
\ 'latin1' : 'ISO-8859-1',
\ 'iso-8859-2' : 'ISO-8859-2',
\ 'iso-8859-3' : 'ISO-8859-3',
\ 'iso-8859-4' : 'ISO-8859-4',
\ 'iso-8859-5' : 'ISO-8859-5',
\ 'iso-8859-6' : 'ISO-8859-6',
\ 'iso-8859-7' : 'ISO-8859-7',
\ 'iso-8859-8' : 'ISO-8859-8',
\ 'iso-8859-9' : 'ISO-8859-9',
\ 'iso-8859-10' : '',
\ 'iso-8859-13' : 'ISO-8859-13',
\ 'iso-8859-14' : '',
\ 'iso-8859-15' : 'ISO-8859-15',
\ 'koi8-r' : 'KOI8-R',
\ 'koi8-u' : 'KOI8-U',
\ 'macroman' : 'macintosh',
\ 'cp437' : '',
\ 'cp775' : '',
\ 'cp850' : '',
\ 'cp852' : '',
\ 'cp855' : '',
\ 'cp857' : '',
\ 'cp860' : '',
\ 'cp861' : '',
\ 'cp862' : '',
\ 'cp863' : '',
\ 'cp865' : '',
\ 'cp866' : 'IBM866',
\ 'cp869' : '',
\ 'cp874' : '',
\ 'cp1250' : 'windows-1250',
\ 'cp1251' : 'windows-1251',
\ 'cp1253' : 'windows-1253',
\ 'cp1254' : 'windows-1254',
\ 'cp1255' : 'windows-1255',
\ 'cp1256' : 'windows-1256',
\ 'cp1257' : 'windows-1257',
\ 'cp1258' : 'windows-1258',
\ 'euc-jp' : 'EUC-JP',
\ 'sjis' : 'Shift_JIS',
\ 'cp932' : 'Shift_JIS',
\ 'cp949' : '',
\ 'euc-kr' : 'EUC-KR',
\ 'cp936' : 'GBK',
\ 'euc-cn' : 'GB2312',
\ 'big5' : 'Big5',
\ 'cp950' : 'Big5',
\ 'utf-8' : 'UTF-8',
\ 'ucs-2' : 'UTF-8',
\ 'ucs-2le' : 'UTF-8',
\ 'utf-16' : 'UTF-8',
\ 'utf-16le' : 'UTF-8',
\ 'ucs-4' : 'UTF-8',
\ 'ucs-4le' : 'UTF-8',
\ }
lockvar g:tohtml#encoding_to_charset
" Notes:
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
" 2. Any blank spaces are there because Vim supports it but at least one major
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
" }}}
" Only automatically find encodings supported natively by Vim, let the user
" specify the encoding if it's not natively supported. This function is only
" used when the user specifies the charset, they better know what they are
" doing!
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#charset_to_encoding: {{{
let g:tohtml#charset_to_encoding = {
\ 'iso_8859-1:1987' : 'latin1',
\ 'iso-ir-100' : 'latin1',
\ 'iso_8859-1' : 'latin1',
\ 'iso-8859-1' : 'latin1',
\ 'latin1' : 'latin1',
\ 'l1' : 'latin1',
\ 'ibm819' : 'latin1',
\ 'cp819' : 'latin1',
\ 'csisolatin1' : 'latin1',
\ 'iso_8859-2:1987' : 'iso-8859-2',
\ 'iso-ir-101' : 'iso-8859-2',
\ 'iso_8859-2' : 'iso-8859-2',
\ 'iso-8859-2' : 'iso-8859-2',
\ 'latin2' : 'iso-8859-2',
\ 'l2' : 'iso-8859-2',
\ 'csisolatin2' : 'iso-8859-2',
\ 'iso_8859-3:1988' : 'iso-8859-3',
\ 'iso-ir-109' : 'iso-8859-3',
\ 'iso_8859-3' : 'iso-8859-3',
\ 'iso-8859-3' : 'iso-8859-3',
\ 'latin3' : 'iso-8859-3',
\ 'l3' : 'iso-8859-3',
\ 'csisolatin3' : 'iso-8859-3',
\ 'iso_8859-4:1988' : 'iso-8859-4',
\ 'iso-ir-110' : 'iso-8859-4',
\ 'iso_8859-4' : 'iso-8859-4',
\ 'iso-8859-4' : 'iso-8859-4',
\ 'latin4' : 'iso-8859-4',
\ 'l4' : 'iso-8859-4',
\ 'csisolatin4' : 'iso-8859-4',
\ 'iso_8859-5:1988' : 'iso-8859-5',
\ 'iso-ir-144' : 'iso-8859-5',
\ 'iso_8859-5' : 'iso-8859-5',
\ 'iso-8859-5' : 'iso-8859-5',
\ 'cyrillic' : 'iso-8859-5',
\ 'csisolatincyrillic' : 'iso-8859-5',
\ 'iso_8859-6:1987' : 'iso-8859-6',
\ 'iso-ir-127' : 'iso-8859-6',
\ 'iso_8859-6' : 'iso-8859-6',
\ 'iso-8859-6' : 'iso-8859-6',
\ 'ecma-114' : 'iso-8859-6',
\ 'asmo-708' : 'iso-8859-6',
\ 'arabic' : 'iso-8859-6',
\ 'csisolatinarabic' : 'iso-8859-6',
\ 'iso_8859-7:1987' : 'iso-8859-7',
\ 'iso-ir-126' : 'iso-8859-7',
\ 'iso_8859-7' : 'iso-8859-7',
\ 'iso-8859-7' : 'iso-8859-7',
\ 'elot_928' : 'iso-8859-7',
\ 'ecma-118' : 'iso-8859-7',
\ 'greek' : 'iso-8859-7',
\ 'greek8' : 'iso-8859-7',
\ 'csisolatingreek' : 'iso-8859-7',
\ 'iso_8859-8:1988' : 'iso-8859-8',
\ 'iso-ir-138' : 'iso-8859-8',
\ 'iso_8859-8' : 'iso-8859-8',
\ 'iso-8859-8' : 'iso-8859-8',
\ 'hebrew' : 'iso-8859-8',
\ 'csisolatinhebrew' : 'iso-8859-8',
\ 'iso_8859-9:1989' : 'iso-8859-9',
\ 'iso-ir-148' : 'iso-8859-9',
\ 'iso_8859-9' : 'iso-8859-9',
\ 'iso-8859-9' : 'iso-8859-9',
\ 'latin5' : 'iso-8859-9',
\ 'l5' : 'iso-8859-9',
\ 'csisolatin5' : 'iso-8859-9',
\ 'iso-8859-10' : 'iso-8859-10',
\ 'iso-ir-157' : 'iso-8859-10',
\ 'l6' : 'iso-8859-10',
\ 'iso_8859-10:1992' : 'iso-8859-10',
\ 'csisolatin6' : 'iso-8859-10',
\ 'latin6' : 'iso-8859-10',
\ 'iso-8859-13' : 'iso-8859-13',
\ 'iso-8859-14' : 'iso-8859-14',
\ 'iso-ir-199' : 'iso-8859-14',
\ 'iso_8859-14:1998' : 'iso-8859-14',
\ 'iso_8859-14' : 'iso-8859-14',
\ 'latin8' : 'iso-8859-14',
\ 'iso-celtic' : 'iso-8859-14',
\ 'l8' : 'iso-8859-14',
\ 'iso-8859-15' : 'iso-8859-15',
\ 'iso_8859-15' : 'iso-8859-15',
\ 'latin-9' : 'iso-8859-15',
\ 'koi8-r' : 'koi8-r',
\ 'cskoi8r' : 'koi8-r',
\ 'koi8-u' : 'koi8-u',
\ 'macintosh' : 'macroman',
\ 'mac' : 'macroman',
\ 'csmacintosh' : 'macroman',
\ 'ibm437' : 'cp437',
\ 'cp437' : 'cp437',
\ '437' : 'cp437',
\ 'cspc8codepage437' : 'cp437',
\ 'ibm775' : 'cp775',
\ 'cp775' : 'cp775',
\ 'cspc775baltic' : 'cp775',
\ 'ibm850' : 'cp850',
\ 'cp850' : 'cp850',
\ '850' : 'cp850',
\ 'cspc850multilingual' : 'cp850',
\ 'ibm852' : 'cp852',
\ 'cp852' : 'cp852',
\ '852' : 'cp852',
\ 'cspcp852' : 'cp852',
\ 'ibm855' : 'cp855',
\ 'cp855' : 'cp855',
\ '855' : 'cp855',
\ 'csibm855' : 'cp855',
\ 'ibm857' : 'cp857',
\ 'cp857' : 'cp857',
\ '857' : 'cp857',
\ 'csibm857' : 'cp857',
\ 'ibm860' : 'cp860',
\ 'cp860' : 'cp860',
\ '860' : 'cp860',
\ 'csibm860' : 'cp860',
\ 'ibm861' : 'cp861',
\ 'cp861' : 'cp861',
\ '861' : 'cp861',
\ 'cp-is' : 'cp861',
\ 'csibm861' : 'cp861',
\ 'ibm862' : 'cp862',
\ 'cp862' : 'cp862',
\ '862' : 'cp862',
\ 'cspc862latinhebrew' : 'cp862',
\ 'ibm863' : 'cp863',
\ 'cp863' : 'cp863',
\ '863' : 'cp863',
\ 'csibm863' : 'cp863',
\ 'ibm865' : 'cp865',
\ 'cp865' : 'cp865',
\ '865' : 'cp865',
\ 'csibm865' : 'cp865',
\ 'ibm866' : 'cp866',
\ 'cp866' : 'cp866',
\ '866' : 'cp866',
\ 'csibm866' : 'cp866',
\ 'ibm869' : 'cp869',
\ 'cp869' : 'cp869',
\ '869' : 'cp869',
\ 'cp-gr' : 'cp869',
\ 'csibm869' : 'cp869',
\ 'windows-1250' : 'cp1250',
\ 'windows-1251' : 'cp1251',
\ 'windows-1253' : 'cp1253',
\ 'windows-1254' : 'cp1254',
\ 'windows-1255' : 'cp1255',
\ 'windows-1256' : 'cp1256',
\ 'windows-1257' : 'cp1257',
\ 'windows-1258' : 'cp1258',
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
\ 'cseucpkdfmtjapanese' : 'euc-jp',
\ 'euc-jp' : 'euc-jp',
\ 'shift_jis' : 'sjis',
\ 'ms_kanji' : 'sjis',
\ 'sjis' : 'sjis',
\ 'csshiftjis' : 'sjis',
\ 'ibm-thai' : 'cp874',
\ 'csibmthai' : 'cp874',
\ 'ks_c_5601-1987' : 'cp949',
\ 'iso-ir-149' : 'cp949',
\ 'ks_c_5601-1989' : 'cp949',
\ 'ksc_5601' : 'cp949',
\ 'korean' : 'cp949',
\ 'csksc56011987' : 'cp949',
\ 'euc-kr' : 'euc-kr',
\ 'cseuckr' : 'euc-kr',
\ 'gbk' : 'cp936',
\ 'cp936' : 'cp936',
\ 'ms936' : 'cp936',
\ 'windows-936' : 'cp936',
\ 'gb_2312-80' : 'euc-cn',
\ 'iso-ir-58' : 'euc-cn',
\ 'chinese' : 'euc-cn',
\ 'csiso58gb231280' : 'euc-cn',
\ 'big5' : 'big5',
\ 'csbig5' : 'big5',
\ 'utf-8' : 'utf-8',
\ 'iso-10646-ucs-2' : 'ucs-2',
\ 'csunicode' : 'ucs-2',
\ 'utf-16' : 'utf-16',
\ 'utf-16be' : 'utf-16',
\ 'utf-16le' : 'utf-16le',
\ 'utf-32' : 'ucs-4',
\ 'utf-32be' : 'ucs-4',
\ 'utf-32le' : 'ucs-4le',
\ 'iso-10646-ucs-4' : 'ucs-4',
\ 'csucs4' : 'ucs-4'
\ }
lockvar g:tohtml#charset_to_encoding
"}}}
func! tohtml#Convert2HTML(line1, line2) "{{{
let s:settings = tohtml#GetUserSettings()
if !&diff || s:settings.diff_one_file "{{{
if a:line2 >= a:line1
let g:html_start_line = a:line1
let g:html_end_line = a:line2
else
let g:html_start_line = a:line2
let g:html_end_line = a:line1
endif
runtime syntax/2html.vim "}}}
else "{{{
let win_list = []
let buf_list = []
windo | if &diff | call add(win_list, winbufnr(0)) | endif
let s:settings.whole_filler = 1
let g:html_diff_win_num = 0
for window in win_list
" switch to the next buffer to convert
exe ":" . bufwinnr(window) . "wincmd w"
" figure out whether current charset and encoding will work, if not
" default to UTF-8
if !exists('g:html_use_encoding') &&
\ (((&l:fileencoding=='' || (&l:buftype!='' && &l:buftype!=?'help'))
\ && &encoding!=?s:settings.vim_encoding)
\ || &l:fileencoding!='' && &l:fileencoding!=?s:settings.vim_encoding)
echohl WarningMsg
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
echohl None
let s:settings.vim_encoding = 'utf-8'
let s:settings.encoding = 'UTF-8'
endif
" set up for diff-mode conversion
let g:html_start_line = 1
let g:html_end_line = line('$')
let g:html_diff_win_num += 1
" convert this file
runtime syntax/2html.vim
" remember the HTML buffer for later combination
call add(buf_list, bufnr('%'))
endfor
unlet g:html_diff_win_num
call tohtml#Diff2HTML(win_list, buf_list)
endif "}}}
unlet g:html_start_line
unlet g:html_end_line
unlet s:settings
endfunc "}}}
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
let xml_line = ""
let tag_close = '>'
let s:old_paste = &paste
set paste
let s:old_magic = &magic
set magic
if s:settings.use_xhtml
if s:settings.encoding != ""
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
else
let xml_line = "<?xml version=\"1.0\"?>"
endif
let tag_close = ' />'
endif
let style = [s:settings.use_xhtml ? "" : '-->']
let body_line = ''
let html = []
if s:settings.use_xhtml
call add(html, xml_line)
endif
if s:settings.use_xhtml
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
elseif s:settings.use_css && !s:settings.no_pre
call add(html, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">")
call add(html, '<html>')
else
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
call add(html, '<html>')
endif
call add(html, '<head>')
" include encoding as close to the top as possible, but only if not already
" contained in XML information
if s:settings.encoding != "" && !s:settings.use_xhtml
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
endif
call add(html, '<title>diff</title>')
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
call add(html, '<meta name="settings" content="'.
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
\ ',prevent_copy='.s:settings.prevent_copy.
\ '"'.tag_close)
call add(html, '<meta name="colorscheme" content="'.
\ (exists('g:colors_name')
\ ? g:colors_name
\ : 'none'). '"'.tag_close)
call add(html, '</head>')
let body_line_num = len(html)
if !empty(s:settings.prevent_copy)
call add(html, "<body onload='FixCharWidth();".(s:settings.line_ids ? " JumpToLine();" : "")."'>")
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
call add(html, "<div id='oneCharWidth'>0</div>")
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
else
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
endif
call add(html, "<table border='1' width='100%' id='vimCodeElement".s:settings.id_suffix."'>")
call add(html, '<tr>')
for buf in a:win_list
call add(html, '<th>'.bufname(buf).'</th>')
endfor
call add(html, '</tr><tr>')
let diff_style_start = 0
let insert_index = 0
for buf in a:buf_list
let temp = []
exe bufwinnr(buf) . 'wincmd w'
" If text is folded because of user foldmethod settings, etc. we don't want
" to act on everything in a fold by mistake.
setlocal nofoldenable
" When not using CSS or when using xhtml, the <body> line can be important.
" Assume it will be the same for all buffers and grab it from the first
" buffer. Similarly, need to grab the body end line as well.
if body_line == ''
1
call search('<body')
let body_line = getline('.')
$
call search('</body>', 'b')
let s:body_end_line = getline('.')
endif
" Grab the style information. Some of this will be duplicated so only insert
" it if it's not already there. {{{
1
let style_start = search('^<style type="text/css">')
1
let style_end = search('^</style>')
if style_start > 0 && style_end > 0
let buf_styles = getline(style_start + 1, style_end - 1)
for a_style in buf_styles
if index(style, a_style) == -1
if diff_style_start == 0
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
let diff_style_start = len(style)-1
endif
endif
call insert(style, a_style, insert_index)
let insert_index += 1
endif
endfor
endif " }}}
" everything new will get added before the diff styles so diff highlight
" properly overrides normal highlight
if diff_style_start != 0
let insert_index = diff_style_start
endif
" Delete those parts that are not needed so we can include the rest into the
" resulting table.
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
$
?</body>?,$d_
let temp = getline(1,'$')
" clean out id on the main content container because we already set it on
" the table
let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "")
" undo deletion of start and end part
" so we can later save the file as valid html
" TODO: restore using grabbed lines if undolevel is 1?
normal! 2u
if s:settings.use_css
call add(html, '<td valign="top"><div>')
elseif s:settings.use_xhtml
call add(html, '<td nowrap="nowrap" valign="top"><div>')
else
call add(html, '<td nowrap valign="top"><div>')
endif
let html += temp
call add(html, '</div></td>')
" Close this buffer
" TODO: the comment above says we're going to allow saving the file
" later...but here we discard it?
quit!
endfor
let html[body_line_num] = body_line
call add(html, '</tr>')
call add(html, '</table>')
call add(html, s:body_end_line)
call add(html, '</html>')
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
call add(html, '<!-- vim: set foldmethod=manual : -->')
let i = 1
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
" Find an unused file name if current file name is already in use
while filereadable(name)
let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e")
let i += 1
endwhile
exe "topleft new " . name
setlocal modifiable
" just in case some user autocmd creates content in the new buffer, make sure
" it is empty before proceeding
%d
" set the fileencoding to match the charset we'll be using
let &l:fileencoding=s:settings.vim_encoding
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
" order mark is highly recommend on the web when using multibyte encodings. But,
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
" determine when it is actually inserted.
if s:settings.vim_encoding == 'utf-8'
setlocal nobomb
else
setlocal bomb
endif
call append(0, html)
if len(style) > 0
1
let style_start = search('^</head>')-1
" add required javascript in reverse order so we can just call append again
" and again without adjusting {{{
" insert script closing tag
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
" insert script which corrects the size of small input elements in
" prevent_copy mode. See 2html.vim for details on why this is needed and how
" it works.
if !empty(s:settings.prevent_copy)
call append(style_start, [
\ '',
\ '/* simulate a "ch" unit by asking the browser how big a zero character is */',
\ 'function FixCharWidth() {',
\ ' /* get the hidden element which gives the width of a single character */',
\ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;',
\ ' /* get all input elements, we''ll filter on class later */',
\ ' var inputTags = document.getElementsByTagName("input");',
\ ' var ratio = 5;',
\ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;',
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
\ ' if (inputWidth > goodWidth) {',
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
\ ' }',
\ '}'
\ ])
endif
"
" insert javascript to get IDs from line numbers, and to open a fold before
" jumping to any lines contained therein
call append(style_start, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
if s:settings.dynamic_folds
call append(style_start, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " /* toggle open the fold ID (remove window ID) */",
\ " toggleFold(node.id.substr(4));",
\ " }",
\ " node = node.parentNode;",
\ " }",
\ ])
endif
call append(style_start, [
\ "",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " if (lineNum.indexOf('W') == -1) {",
\ " lineNum = 'W1'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ ])
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
if s:settings.dynamic_folds
call append(style_start, [
\ " function toggleFold(objID)",
\ " {",
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
\ " {",
\ " var fold;",
\ ' fold = document.getElementById("win"+win_num+objID);',
\ " if(fold.className == 'closed-fold')",
\ " {",
\ " fold.className = 'open-fold';",
\ " }",
\ " else if (fold.className == 'open-fold')",
\ " {",
\ " fold.className = 'closed-fold';",
\ " }",
\ " }",
\ " }",
\ ])
endif
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
" up the full browser window (but not more), and be static in size,
" horizontally scrollable when the lines are too long. Otherwise, the diff
" is pretty useless for really long lines. {{{
if s:settings.use_css
call append(style_start,
\ ['<style type="text/css">']+
\ style+
\ [ s:settings.use_xhtml ? '' : '<!--',
\ 'table { table-layout: fixed; }',
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
\ 'td div { overflow: auto; }',
\ s:settings.use_xhtml ? '' : '-->',
\ '</style>'
\])
endif "}}}
endif
let &paste = s:old_paste
let &magic = s:old_magic
endfunc "}}}
" Gets a single user option and sets it in the passed-in Dict, or gives it the
" default value if the option doesn't actually exist.
func! tohtml#GetOption(settings, option, default) "{{{
if exists('g:html_'.a:option)
let a:settings[a:option] = g:html_{a:option}
else
let a:settings[a:option] = a:default
endif
endfunc "}}}
" returns a Dict containing the values of all user options for 2html, including
" default values for those not given an explicit value by the user. Discards the
" html_ prefix of the option for nicer looking code.
func! tohtml#GetUserSettings() "{{{
if exists('s:settings')
" just restore the known options if we've already retrieved them
return s:settings
else
" otherwise figure out which options are set
let user_settings = {}
" Define the correct option if the old option name exists and we haven't
" already defined the correct one. Maybe I'll put out a warnig message about
" this sometime and remove the old option entirely at some even later time,
" but for now just silently accept the old option.
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")
let g:html_use_xhtml = g:use_xhtml
endif
" get current option settings with appropriate defaults {{{
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
call tohtml#GetOption(user_settings, 'number_lines', &number )
call tohtml#GetOption(user_settings, 'pre_wrap', &wrap )
call tohtml#GetOption(user_settings, 'use_css', 1 )
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
call tohtml#GetOption(user_settings, 'no_foldcolumn', user_settings.ignore_folding)
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
call tohtml#GetOption(user_settings, 'line_ids', user_settings.number_lines )
" }}}
" override those settings that need it {{{
" hover opening implies dynamic folding
if user_settings.hover_unfold
let user_settings.dynamic_folds = 1
endif
" ignore folding overrides dynamic folding
if user_settings.ignore_folding && user_settings.dynamic_folds
let user_settings.dynamic_folds = 0
let user_settings.hover_unfold = 0
endif
" dynamic folding with no foldcolumn implies hover opens
if user_settings.dynamic_folds && user_settings.no_foldcolumn
let user_settings.hover_unfold = 1
endif
" dynamic folding implies css
if user_settings.dynamic_folds
let user_settings.use_css = 1
else
let user_settings.no_foldcolumn = 1 " won't do anything but for consistency and for the test suite
endif
" if we're not using CSS we cannot use a pre section because <font> tags
" aren't allowed inside a <pre> block
if !user_settings.use_css
let user_settings.no_pre = 1
endif
" pre_wrap doesn't do anything if not using pre or not using CSS
if user_settings.no_pre || !user_settings.use_css
let user_settings.pre_wrap=0
endif
"}}}
" set up expand_tabs option after all the overrides so we know the
" appropriate defaults {{{
if user_settings.no_pre == 0
call tohtml#GetOption(user_settings,
\ 'expand_tabs',
\ &expandtab || &ts != 8 || user_settings.number_lines ||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
else
let user_settings.expand_tabs = 1
endif
" }}}
" textual options
if exists("g:html_use_encoding") "{{{
" user specified the desired MIME charset, figure out proper
" 'fileencoding' from it or warn the user if we cannot
let user_settings.encoding = g:html_use_encoding
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
if user_settings.vim_encoding == ''
echohl WarningMsg
echomsg "TOhtml: file encoding for"
\ g:html_use_encoding
\ "unknown, please set 'fileencoding'"
echohl None
endif
else
" Figure out proper MIME charset from 'fileencoding' if possible
if &l:fileencoding != ''
" If the buffer is not a "normal" type, the 'fileencoding' value may not
" be trusted; since the buffer should not be written the fileencoding is
" not intended to be used.
if &l:buftype=='' || &l:buftype==?'help'
let user_settings.vim_encoding = &l:fileencoding
call tohtml#CharsetFromEncoding(user_settings)
else
let user_settings.encoding = '' " trigger detection using &encoding
endif
endif
" else from 'encoding' if possible
if &l:fileencoding == '' || user_settings.encoding == ''
let user_settings.vim_encoding = &encoding
call tohtml#CharsetFromEncoding(user_settings)
endif
" else default to UTF-8 and warn user
if user_settings.encoding == ''
let user_settings.vim_encoding = 'utf-8'
let user_settings.encoding = 'UTF-8'
echohl WarningMsg
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
echohl None
endif
endif "}}}
" Default to making nothing uncopyable, because we default to
" not-standards way of doing things, and also because Microsoft Word and
" others paste the <input> elements anyway.
"
" html_prevent_copy only has an effect when using CSS.
"
" All options:
" f - fold column
" n - line numbers (also within fold text)
" t - fold text
" d - diff filler
" c - concealed text (reserved future)
" l - listchars (reserved possible future)
" s - signs (reserved possible future)
"
" Normal text is always selectable.
let user_settings.prevent_copy = ""
if user_settings.use_css
if exists("g:html_prevent_copy")
if user_settings.dynamic_folds && !user_settings.no_foldcolumn && g:html_prevent_copy =~# 'f'
let user_settings.prevent_copy .= 'f'
endif
if user_settings.number_lines && g:html_prevent_copy =~# 'n'
let user_settings.prevent_copy .= 'n'
endif
if &diff && g:html_prevent_copy =~# 'd'
let user_settings.prevent_copy .= 'd'
endif
if !user_settings.ignore_folding && g:html_prevent_copy =~# 't'
let user_settings.prevent_copy .= 't'
endif
else
let user_settings.prevent_copy = ""
endif
endif
if empty(user_settings.prevent_copy)
let user_settings.no_invalid = 0
endif
if exists('g:html_id_expr')
let user_settings.id_suffix = eval(g:html_id_expr)
if user_settings.id_suffix !~ '^[-_:.A-Za-z0-9]*$'
echohl WarningMsg
echomsg '2html: g:html_id_expr evaluated to invalid string for HTML id attributes'
echomsg '2html: Omitting user-specified suffix'
echohl None
sleep 3
let user_settings.id_suffix=""
endif
else
let user_settings.id_suffix=""
endif
" TODO: font
return user_settings
endif
endfunc "}}}
" get the proper HTML charset name from a Vim encoding option.
function! tohtml#CharsetFromEncoding(settings) "{{{
let l:vim_encoding = a:settings.vim_encoding
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
else
if l:vim_encoding =~ '^8bit\|^2byte'
" 8bit- and 2byte- prefixes are to indicate encodings available on the
" system that Vim will convert with iconv(), look up just the encoding name,
" not Vim's prefix.
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
endif
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
else
let a:settings.encoding = ""
endif
endif
if a:settings.encoding != ""
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
if l:vim_encoding != ""
" if the Vim encoding to HTML encoding conversion is set up (by default or
" by the user) to convert to a different encoding, we need to also change
" the Vim encoding of the new buffer
let a:settings.vim_encoding = l:vim_encoding
endif
endif
endfun "}}}
" Get the proper Vim encoding option setting from an HTML charset name.
function! tohtml#EncodingFromCharset(encoding) "{{{
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
return g:html_encoding_override[a:encoding]
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
else
return ""
endif
endfun "}}}
let &cpo = s:cpo_sav
unlet s:cpo_sav
" Make sure any patches will probably use consistent indent
" vim: ts=8 sw=2 sts=2 noet fdm=marker

Просмотреть файл

@ -1,9 +1,9 @@
" vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: Apr 12, 2010
" Version: 31
" Date: Jan 17, 2012
" Version: 35
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2009 by Charles E. Campbell, Jr.
" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
@ -14,7 +14,7 @@
if &cp || exists("g:loaded_vimball")
finish
endif
let g:loaded_vimball = "v31"
let g:loaded_vimball = "v35"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of vimball needs vim 7.2"
@ -67,10 +67,10 @@ endif
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Input:
" line1,line2: a range of lines containing paths to files to be included in the vimball
" writelevel : if true, force a write to filename.vba, even if it exists
" writelevel : if true, force a write to filename.vmb, even if it exists
" (usually accomplished with :MkVimball! ...
" filename : base name of file to be created (ie. filename.vba)
" Output: a filename.vba using vimball format:
" filename : base name of file to be created (ie. filename.vmb)
" Output: a filename.vmb using vimball format:
" path
" filesize
" [file]
@ -80,12 +80,12 @@ endif
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
else
let vbname= a:1
endif
if vbname !~ '\.vba$'
let vbname= vbname.'.vba'
if vbname !~ '\.vmb$'
let vbname= vbname.'.vmb'
endif
" call Decho("vbname<".vbname.">")
if !a:writelevel && a:1 =~ '[\/]'
@ -134,7 +134,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
" create/switch to mkvimball tab
if !exists("vbtabnr")
tabnew
silent! file Vimball
sil! file Vimball
let vbtabnr= tabpagenr()
else
exe "tabn ".vbtabnr
@ -195,8 +195,8 @@ fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
echoerr "your vim is missing the fnameescape() function"
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)"
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
return
endif
@ -214,13 +214,22 @@ fun! vimball#Vimball(really,...)
" set up vimball tab
" call Decho("setting up vimball tab")
tabnew
silent! file Vimball
sil! file Vimball
let vbtabnr= tabpagenr()
let didhelp= ""
" go to vim plugin home
if a:0 > 0
" let user specify the directory where the vimball is to be unpacked.
" If, however, the user did not specify a full path, set the home to be below the current directory
let home= expand(a:1)
if has("win32") || has("win95") || has("win64") || has("win16")
if home !~ '^\a:[/\\]'
let home= getcwd().'/'.a:1
endif
elseif home !~ '^/'
let home= getcwd().'/'.a:1
endif
else
let home= vimball#VimballHome()
endif
@ -254,11 +263,10 @@ fun! vimball#Vimball(really,...)
while 1 < linenr && linenr < line("$")
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
" let fsize = getline(linenr+1)+0
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\+\)$','\1','')
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
if a:really
echomsg "extracted <".fname.">: ".fsize." lines"
@ -283,11 +291,14 @@ fun! vimball#Vimball(really,...)
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
let fnamebuf= substitute(fname,'\\','/','g')
let dirpath = substitute(home,'\\','/','g')
" call Decho("init: fnamebuf<".fnamebuf.">")
" call Decho("init: dirpath <".dirpath.">")
while fnamebuf =~ '/'
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
let dirpath = dirname
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
" call Decho("dirname<".dirname.">")
" call Decho("dirpath<".dirpath.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
if exists("g:vimball_mkdir")
@ -306,20 +317,22 @@ fun! vimball#Vimball(really,...)
let linenr = linenr + 2
let lastline = linenr + fsize - 1
" call Decho("exe ".linenr.",".lastline."yank a")
exe "silent ".linenr.",".lastline."yank a"
" no point in handling a zero-length file
if lastline >= linenr
exe "silent ".linenr.",".lastline."yank a"
" copy "a" buffer into tab
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
setlocal ma
silent! %d
silent put a
1
silent d
exe "tabn ".vbtabnr
setlocal ma
sil! %d
silent put a
1
sil! d
" write tab to file
if a:really
let fnamepath= home."/".fname
" write tab to file
if a:really
let fnamepath= home."/".fname
" call Decho("exe w! ".fnameescape(fnamepath))
if fenc != ""
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
@ -328,17 +341,18 @@ fun! vimball#Vimball(really,...)
endif
echo "wrote ".fnameescape(fnamepath)
call s:RecordInVar(home,"call delete('".fnamepath."')")
endif
endif
" return to tab with vimball
" return to tab with vimball
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
exe "tabn ".curtabnr
" set up help if its a doc/*.txt file
" set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
" call Decho("didhelp<".didhelp.">")
endif
endif
" update for next file
@ -400,7 +414,9 @@ fun! vimball#RmVimball(...)
let curfile= a:1
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
endif
if curfile =~ '\.vba$'
if curfile =~ '\.vmb$'
let curfile= substitute(curfile,'\.vmb','','')
elseif curfile =~ '\.vba$'
let curfile= substitute(curfile,'\.vba','','')
endif
if a:0 >= 2
@ -418,13 +434,17 @@ fun! vimball#RmVimball(...)
" call Decho(".VimballRecord is readable")
" call Decho("curfile<".curfile.">")
keepalt keepjumps 1split
silent! keepalt keepjumps e .VimballRecord
sil! keepalt keepjumps e .VimballRecord
let keepsrch= @/
" call Decho('search for ^\M'.curfile.'.\m: ')
" call Decho('search for ^\M'.curfile.'.\mvba: ')
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.vba: ')
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
if search('^\M'.curfile."\m: ".'cw')
let foundit= 1
elseif search('^\M'.curfile.".\mvmb: ",'cw')
let foundit= 2
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
let foundit= 2
elseif search('^\M'.curfile.".\mvba: ",'cw')
let foundit= 1
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
@ -433,25 +453,29 @@ fun! vimball#RmVimball(...)
let foundit = 0
endif
if foundit
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
if foundit == 1
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
else
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
endif
let s:VBRstring= substitute(exestring,'call delete(','','g')
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
" call Decho("exe ".exestring)
silent! keepalt keepjumps exe exestring
silent! keepalt keepjumps d
sil! keepalt keepjumps exe exestring
sil! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
" call Decho("exestring<".exestring.">")
echomsg "removed ".exestring." files"
else
let s:VBRstring= ''
let curfile = substitute(curfile,'\.vba','','')
let curfile = substitute(curfile,'\.vmb','','')
" call Decho("unable to find <".curfile."> in .VimballRecord")
if !exists("s:ok_unablefind")
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
endif
endif
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
sil! keepalt keepjumps g/^\s*$/d
sil! keepalt keepjumps wq!
let @/= keepsrch
endif
call s:ChgDir(curdir)
@ -557,9 +581,19 @@ endfun
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
try
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
catch /^Vim\%((\a\+)\)\=:E/
call mkdir(fnameescape(substitute(a:newdir,'/','\\','g')))
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
endtry
else
exe 'silent cd '.fnameescape(a:newdir)
try
exe 'silent cd '.fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E/
call mkdir(fnameescape(a:newdir))
exe 'silent cd '.fnameescape(a:newdir)
endtry
endif
" call Dret("ChgDir : curdir<".getcwd().">")
endfun
@ -599,7 +633,7 @@ fun! s:RecordInFile(home)
let cmd= expand("%:tr").": "
" call Decho("cmd<".cmd.">")
silent! keepalt keepjumps e .VimballRecord
sil! keepalt keepjumps e .VimballRecord
setlocal ma
$
if exists("s:recordfile") && exists("s:recorddir")
@ -616,8 +650,8 @@ fun! s:RecordInFile(home)
" put command into buffer, write .VimballRecord `file
keepalt keepjumps put=cmd
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
sil! keepalt keepjumps g/^\s*$/d
sil! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir")
@ -693,10 +727,11 @@ fun! vimball#SaveSettings()
let s:repkeep = &report
let s:vekeep = &ve
let s:ffkeep = &l:ff
let s:swfkeep = &l:swf
if exists("&acd")
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
else
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
endif
" vimballs should be in unix format
setlocal ff=unix
@ -732,6 +767,9 @@ fun! vimball#RestoreSettings()
" call Dret("RestoreSettings")
endfun
let &cpo = s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше