Update all packages

This commit is contained in:
Adam Stankiewicz 2015-01-23 21:09:23 +01:00
parent 1a97304cf6
commit 6745c49110
20 changed files with 358 additions and 230 deletions

View File

@ -1,20 +0,0 @@
" This file describes a very basic syntax for TomDoc comments in a
" CoffeeScript file.
"
" For more information on TomDoc, check it out here: http://tomdoc.org/
"
syn keyword tomdocKeywords Returns containedin=coffeeComment contained
syn keyword tomdocKeywords Throws containedin=coffeeComment contained
syn keyword tomdocKeywords Examples containedin=coffeeComment contained
syn keyword tomdocKeywords Signature containedin=coffeeComment contained
syn match tomdocArguments +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3 containedin=coffeeComment contained
syn match tomdocDescriptions +\s*Public:+he=e-1 containedin=coffeeComment contained
syn match tomdocDescriptions +\s*Internal:+he=e-1 containedin=coffeeComment contained
syn match tomdocDescriptions +\s*Deprecated:+he=e-1 containedin=coffeeComment contained
hi default link tomdocDescriptions String
hi default link tomdocKeywords String
hi default link tomdocArguments HELP

View File

@ -1,23 +1,3 @@
" This file describes a very basic syntax for TomDoc comments in a Ruby file.
"
" For more information on TomDoc, check it out here: http://tomdoc.org/
"
syn keyword tomdocKeywords Returns containedin=rubyComment contained
syn keyword tomdocKeywords Yields containedin=rubyComment contained
syn keyword tomdocKeywords Raises containedin=rubyComment contained
syn keyword tomdocKeywords Examples containedin=rubyComment contained
syn keyword tomdocKeywords Signature containedin=rubyComment contained
syn match tomdocArguments +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3 containedin=rubyComment contained
syn match tomdocDescriptions +\s*Public:+he=e-1 containedin=rubyComment contained
syn match tomdocDescriptions +\s*Internal:+he=e-1 containedin=rubyComment contained
syn match tomdocDescriptions +\s*Deprecated:+he=e-1 containedin=rubyComment contained
hi default link tomdocDescriptions String
hi default link tomdocKeywords String
hi default link tomdocArguments HELP
" Ruby syntax extensions for highlighting YARD documentation.
"
" Author: Joel Holdbrooks <https://github.com/noprompt>

View File

@ -235,9 +235,9 @@ endfunction
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
let s:_numval = '\(\d\{1,3}%\?\)' " submatch 3,4,5
let s:_ws_ = '\s*'
let s:_listsep = s:_ws_ . ',' . s:_ws_
let s:_numval = s:_ws_ . '\(\d\{1,3}%\?\)' " submatch 3,4,5
let s:_listsep = s:_ws_ . ','
let s:_otherargs_ = '\%(,[^)]*\)\?'
let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . s:_otherargs_ . '[)]'
let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr

View File

@ -601,7 +601,7 @@ let g:xmldata_html5 = {
\ ],
\ 'meta': [
\ [],
\ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
\ extend(copy(global_attributes), {'name': ['application-name', 'author', 'description', 'generator', 'referrer', 'creator', 'googlebot', 'publisher', 'robots', 'slurp', 'viewport', 'theme-color'], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
\ ],
\ 'meter': [
\ phrasing_elements,

View File

@ -3,11 +3,14 @@ if exists("current_compiler")
endif
let current_compiler = "typescript"
if !exists("g:typescript_compiler_binary")
let g:typescript_compiler_binary = "tsc"
endif
if !exists("g:typescript_compiler_options")
let g:typescript_compiler_options = ""
endif
let &l:makeprg='tsc' . g:typescript_compiler_options . ' $* %'
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

View File

@ -29,11 +29,11 @@ autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
autocmd BufNewFile,BufRead *.git/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
autocmd BufNewFile,BufRead *.git/**
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
\ set ft=git |
@ -202,6 +202,7 @@ au BufRead,BufNewFile *.textile set filetype=textile
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux
autocmd BufNewFile,BufRead *.toml set filetype=toml
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
autocmd BufNewFile,BufRead *.twig set filetype=twig
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript

View File

@ -1,11 +1,11 @@
" Filetype plugin for editing CSV files. "{{{1
" Author: Christian Brabandt <cb@256bit.org>
" Version: 0.30
" Version: 0.31
" Script: http://www.vim.org/scripts/script.php?script_id=2830
" License: VIM License
" Last Change: Thu, 27 Mar 2014 23:28:40 +0100
" Last Change: Thu, 15 Jan 2015 21:05:10 +0100
" Documentation: see :help ft-csv.txt
" GetLatestVimScripts: 2830 29 :AutoInstall: csv.vim
" GetLatestVimScripts: 2830 30 :AutoInstall: csv.vim
"
" Some ideas are taken from the wiki http://vim.wikia.com/wiki/VimTip667
" though, implementation differs.
@ -90,7 +90,7 @@ fu! <sid>Init(startline, endline) "{{{3
" - Should work with most ugly solutions that are available
let b:col='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
\ '[^"]\|""\)*"\)' . s:del . '\)\|\%(' .
\ '[^"]\|""\)*"\s*\)' . s:del . '\)\|\%(' .
\ '[^' . b:delimiter . ']*' . s:del . '\)\)'
let b:col_end='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
@ -147,7 +147,7 @@ fu! <sid>Init(startline, endline) "{{{3
let b:undo_ftplugin .= "| unlet! b:delimiter b:col"
\ . "| unlet! b:csv_fixed_width_cols b:csv_filter"
\ . "| unlet! b:csv_fixed_width b:csv_list b:col_width"
\ . "| unlet! b:csv_SplitWindow b:csv_headerline"
\ . "| unlet! b:csv_SplitWindow b:csv_headerline b:csv_cmt"
\ . "| unlet! b:csv_thousands_sep b:csv_decimal_sep"
\. " | unlet! b:browsefilter b:csv_cmt"
\. " | unlet! b:csv_arrange_leftalign"
@ -182,7 +182,7 @@ fu! <sid>Init(startline, endline) "{{{3
" \ delf <sid>SaveOptions | delf <sid>CheckDuplicates |
" \ delf <sid>CompleteColumnNr | delf <sid>CSVPat | delf <sid>Transpose |
" \ delf <sid>LocalSettings() | delf <sid>AddColumn | delf <sid>SubstituteInColumn
" \ delf <sid>SetupQuitPre() | delf CSV_CloseBuffer
" \ delf <sid>SetupAutoCmd() | delf CSV_CloseBuffer
endfu
fu! <sid>LocalSettings(type) "{{{3
@ -194,11 +194,8 @@ fu! <sid>LocalSettings(type) "{{{3
let b:undo_ftplugin = "setlocal sol& tw< wrap<"
" Set browsefilter
if (v:version > 703 || (v:version == 703 && has("patch593")))
\ && exists("browsefilter")
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
\ "All Files\t*.*\n"
endif
if has("conceal")
setl cole=2 cocu=nc
@ -341,7 +338,8 @@ fu! <sid>SearchColumn(arg) "{{{3
endif
let @/ = <sid>GetPat(colnr, maxcolnr, '\%('.pat. '\)')
try
norm! n
" force redraw, so that the search pattern isn't shown
exe "norm! n\<c-l>"
catch /^Vim\%((\a\+)\)\=:E486/
" Pattern not found
echohl Error
@ -619,10 +617,6 @@ fu! <sid>ColWidth(colnr) "{{{3
endfu
fu! <sid>ArrangeCol(first, last, bang, limit) range "{{{3
"TODO: Why doesn't that work?
" is this because of the range flag?
" It's because of the way, Vim works with
" a:firstline and a:lastline parameter, therefore
" explicitly give the range as argument to the function
if exists("b:csv_fixed_width_cols")
" Nothing to do
@ -713,6 +707,8 @@ fu! <sid>CalculateColumnWidth() "{{{3
" delete buffer content in variable b:csv_list,
" this was only necessary for calculating the max width
unlet! b:csv_list
unlet! s:columnize_count
unlet! s:decimal_column
endfu
fu! <sid>Columnize(field) "{{{3
@ -736,51 +732,83 @@ fu! <sid>Columnize(field) "{{{3
" Careful: Keep this fast! Using
" let width=get(b:col_width,<SID>WColumn()-1,20)
" is too slow, so we are using:
let width=get(b:col_width, (s:columnize_count % s:max_cols), 20)
let colnr = s:columnize_count % s:max_cols
let width=get(b:col_width, colnr, 20)
let align='r'
if exists('b:csv_arrange_align')
let align_list=split(get(b:, 'csv_arrange_align', " "), '\zs')
try
let align = align_list[colnr]
catch
let align = 'r'
endtry
endif
if ((align isnot? 'r' && align isnot? 'l' &&
\ align isnot? 'c' && align isnot? '.') || get(b:, 'csv_arrange_leftalign', 0))
let align = 'r'
endif
let s:columnize_count += 1
let has_delimiter = (a:field =~# b:delimiter.'$')
if v:version > 703 || v:version == 703 && has("patch713")
" printf knows about %S (e.g. can handle char length
if get(b:, 'csv_arrange_leftalign',0)
" left-align content
return printf("%-*S%s", width+1 ,
\ (has_delimiter ?
\ matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
\ (has_delimiter ? b:delimiter : ''))
else
return printf("%*S", width+1 , a:field)
if align is? 'l'
" left-align content
return printf("%-*S%s", width+1 ,
\ (has_delimiter ? a:field[:-2] : a:field),
\ (has_delimiter ? b:delimiter : ' '))
elseif align is? 'c'
" center the column
let t = width - len(split(a:field, '\zs'))
let leftwidth = t/2
" uneven width, add one
let rightwidth = (t%2 ? leftwidth+1 : leftwidth)
let field = (has_delimiter ? a:field[:-2] : a:field). repeat(' ', rightwidth)
return printf("%*S%s", width , field, (has_delimiter ? b:delimiter : ' '))
elseif align is? '.'
if !exists("s:decimal_column")
let s:decimal_column = {}
endif
else
" printf only handles bytes
if !exists("g:csv_no_multibyte") &&
\ match(a:field, '[^ -~]') != -1
" match characters outside the ascii range
let a = split(a:field, '\zs')
let add = eval(join(map(a, 'len(v:val)'), '+'))
let add -= len(a)
else
let add = 0
endif
" Add one for the frame
" plus additional width for multibyte chars,
" since printf(%*s..) uses byte width!
let width = width + add + 1
if width == strlen(a:field)
" Column has correct length, don't use printf()
return a:field
else
if get(b:, 'csv_arrange_leftalign',0)
" left-align content
return printf("%-*s%s", width,
\ (has_delimiter ? matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
\ (has_delimiter ? b:delimiter : ''))
else
return printf("%*s", width , a:field)
if get(s:decimal_column, colnr, 0) == 0
call <sid>CheckHeaderLine()
call <sid>NumberFormat()
let data = <sid>CopyCol('', colnr+1, '')[s:csv_fold_headerline : -1]
let pat1 = escape(s:nr_format[1], '.').'\zs[^'.s:nr_format[1].']*\ze'.
\ (has_delimiter ? b:delimiter : '').'$'
let pat2 = '\d\+\ze\%(\%('.escape(s:nr_format[1], '.'). '\d\+\)\|'.
\ (has_delimiter ? b:delimiter : '').'$\)'
let data1 = map(copy(data), 'matchstr(v:val, pat1)')
let data2 = map(data, 'matchstr(v:val, pat2)')
" strlen should be okay for decimals...
let data1 = map(data1, 'strlen(v:val)')
let data2 = map(data2, 'strlen(v:val)')
let dec = max(data1)
let scal = max(data2)
if dec + scal + 1 + (has_delimiter ? 1 : 0) > width
let width = dec + scal + 1 + (has_delimiter ? 1 :0)
let b:col_width[colnr] = width
endif
let s:decimal_column[colnr] = dec
else
let dec = get(s:decimal_column, colnr)
endif
let field = (has_delimiter ? a:field[:-2] : a:field)
let fmt = printf("%%%d.%df", width+1, dec)
try
if s:nr_format[1] isnot '.'
let field = substitute(field, s:nr_format[1], '.', 'g')
let field = substitute(field, s:nr_format[0], '', 'g')
endif
if field =~? '\h' " text in the column, can't be converted to float
throw "no decimal"
endif
let result = printf(fmt, str2float(field)). (has_delimiter ? b:delimiter : ' ')
catch
let result = printf("%*S", width+2, a:field)
endtry
return result
else
" right align
return printf("%*S", width+1 , a:field)
endif
endfun
@ -809,14 +837,13 @@ fu! <sid>GetColPat(colnr, zs_flag) "{{{3
return pat . (a:zs_flag ? '\zs' : '')
endfu
fu! <sid>SetupQuitPre(window) "{{{3
fu! <sid>SetupAutoCmd(window,bufnr) "{{{3
" Setup QuitPre autocommand to quit cleanly
if exists("##QuitPre")
augroup CSV_QuitPre
au!
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
augroup end
endif
aug CSV_QuitPre
au!
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
exe "au CursorHold <buffer=".a:bufnr."> call CSV_SetSplitOptions(".a:window.")"
aug END
endfu
fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
@ -837,8 +864,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
let _sbo = &sbo
let a = []
let b=b:col
let bufnr = bufnr('.')
if a:hor
setl scrollopt=hor scrollbind
setl scrollopt=hor scrollbind cursorbind
let _fdc = &l:fdc
let lines = empty(a:lines) ? s:csv_fold_headerline : a:lines
let a = getline(1,lines)
@ -851,16 +879,21 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
"setl syntax=csv
sil! doautocmd FileType csv
noa 1
sil! sign unplace *
exe "resize" . lines
setl scrollopt=hor winfixheight nowrap
"let &l:stl=repeat(' ', winwidth(0))
setl scrollopt=hor winfixheight nowrap cursorbind
let &l:stl="%#Normal#".repeat(' ',winwidth(0))
let s:local_stl = &l:stl
" set the foldcolumn to the same of the other window
let &l:fdc = _fdc
else
setl scrollopt=ver scrollbind
setl scrollopt=ver scrollbind cursorbind
noa 0
let a=<sid>CopyCol('',1,a:lines)
if a:lines[-1:] is? '!'
let a=<sid>CopyCol('',a:lines,'')
else
let a=<sid>CopyCol('',1, a:lines-1)
endif
" Does it make sense to use the preview window?
"vert sil! pedit |wincmd w | enew!
above vsp +enew
@ -876,11 +909,14 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
noa 0
let b:csv_SplitWindow = winnr()
sil :call <sid>ArrangeCol(1,line('$'), 1, -1)
sil! sign unplace *
exe "vert res" . len(split(getline(1), '\zs'))
call matchadd("CSVHeaderLine", b:col)
setl scrollopt=ver winfixwidth
setl scrollopt=ver winfixwidth cursorbind nonu nornu fdc=0
endif
call <sid>SetupQuitPre(winnr())
call <sid>SetupAutoCmd(winnr(),bufnr)
" disable airline
let w:airline_disabled = 1
let win = winnr()
setl scrollbind buftype=nowrite bufhidden=wipe noswapfile nobuflisted
noa wincmd p
@ -901,9 +937,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
if exists("_sbo")
let &sbo = _sbo
endif
setl noscrollbind
setl noscrollbind nocursorbind
try
wincmd c
noa wincmd c
catch /^Vim\%((\a\+)\)\=:E444/ " cannot close last window
catch /^Vim\%((\a\+)\)\=:E517/ " buffer already wiped
" no-op
@ -959,6 +995,9 @@ fu! <sid>MoveCol(forward, line, ...) "{{{3
elseif line > line('$')
let line=line('$')
endif
if foldclosed(line) != -1
let line = line > line('.') ? foldclosedend(line) : foldclosed(line)
endif
" Generate search pattern
if colnr == 1
@ -1906,7 +1945,7 @@ fu! <sid>CommandDefinitions() "{{{3
call <sid>LocalCmd("CSVFixed", ':call <sid>InitCSVFixedWidth()', '')
call <sid>LocalCmd("NewRecord", ':call <sid>NewRecord(<line1>,
\ <line2>, <q-args>)', '-nargs=? -range')
call <sid>LocalCmd("NewDelimiter", ':call <sid>NewDelimiter(<q-args>)',
call <sid>LocalCmd("NewDelimiter", ':call <sid>NewDelimiter(<q-args>, 1, line(''$''))',
\ '-nargs=1')
call <sid>LocalCmd("Duplicates", ':call <sid>CheckDuplicates(<q-args>)',
\ '-nargs=1 -complete=custom,<sid>CompleteColumnNr')
@ -1993,7 +2032,7 @@ fu! <sid>SaveOptions(list) "{{{3
return save
endfu
fu! <sid>NewDelimiter(newdelimiter) "{{{3
fu! <sid>NewDelimiter(newdelimiter, firstl, lastl) "{{{3
let save = <sid>SaveOptions(['ro', 'ma'])
if exists("b:csv_fixed_width_cols")
call <sid>Warn("NewDelimiter does not work with fixed width column!")
@ -2005,8 +2044,12 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
if &l:ro
setl noro
endif
let line=1
while line <= line('$')
let delimiter = a:newdelimiter
if a:newdelimiter is '\t'
let delimiter="\t"
endif
let line=a:firstl
while line <= a:lastl
" Don't change delimiter for comments
if getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\')
let line+=1
@ -2016,7 +2059,7 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
" Remove field delimiter
call map(fields, 'substitute(v:val, b:delimiter .
\ ''\?$'' , "", "")')
call setline(line, join(fields, a:newdelimiter))
call setline(line, join(fields, delimiter))
let line+=1
endwhile
" reset local buffer options
@ -2024,7 +2067,17 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
call setbufvar('', '&'. key, value)
endfor
"reinitialize the plugin
if exists("g:csv_delim")
let _delim = g:csv_delim
endif
let g:csv_delim = delimiter
call <sid>Init(1,line('$'))
if exists("_delim")
let g:csv_delim = _delim
else
unlet g:csv_delim
endif
unlet! _delim
endfu
fu! <sid>IN(list, value) "{{{3
@ -2207,6 +2260,23 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
let adjust_last = 0
call cursor(a:first,0)
call <sid>CheckHeaderLine()
let line=a:first
if exists("g:csv_table_leftalign")
let b:csv_arrange_leftalign = 1
endif
let newlines=[]
while line <= a:last
let curline = getline(line)
if empty(split(curline, b:delimiter))
" only empty delimiters, add one empty delimiter
" (:NewDelimiter strips trailing delimiter
let curline = repeat(b:delimiter, <sid>MaxColumns())
call add(newlines, line)
call setline(line, curline)
endif
let line+=1
endw
unlet! line
if exists("b:csv_fixed_width_cols")
let cols=copy(b:csv_fixed_width_cols)
let pat = join(map(cols, ' ''\(\%''. v:val. ''c\)'' '), '\|')
@ -2223,21 +2293,35 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
" don't clear column width variable, might have been set in the
" plugin!
sil call <sid>ArrangeCol(a:first, a:last, 0, -1)
if !get(b:, 'csv_arrange_leftalign',0)
for line in newlines
let cline = getline(line)
let cline = substitute(cline, '\s$', ' ', '')
call setline(line, cline)
endfor
unlet! line
endif
endif
if empty(b:col_width)
call <sid>Warn('An error occured, aborting!')
return
endif
let b:col_width[-1] += 1
if get(b:, 'csv_arrange_leftalign', 0)
call map(b:col_width, 'v:val+1')
endif
if b:delimiter == "\t" && !get(b:, 'csv_arrange_leftalign',0)
let b:col_width[-1] += 1
endif
let marginline = s:td.scol. join(map(copy(b:col_width), 'repeat(s:td.hbar, v:val)'), s:td.cros). s:td.ecol
exe printf('sil %d,%ds/%s/%s/ge', a:first, (a:last+adjust_last),
\ (exists("b:csv_fixed_width_cols") ? pat : b:delimiter ), s:td.vbar)
call <sid>NewDelimiter(s:td.vbar, a:first, a:last+adjust_last)
"exe printf('sil %d,%ds/%s/%s/ge', a:first, (a:last+adjust_last),
" \ (exists("b:csv_fixed_width_cols") ? pat : b:delimiter ), s:td.vbar)
" Add vertical bar in first column, if there isn't already one
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
\ '^[^'. s:td.vbar. s:td.scol. ']', s:td.vbar.'&')
" And add a final vertical bar, if there isn't already
" And add a final vertical bar, if there isn't one already
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
\ '[^'. s:td.vbar. s:td.ecol. ']$', '&'. s:td.vbar)
" Make nice intersection graphs
@ -2247,11 +2331,16 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
call append(a:first-1, s:td.ltop. join(line, s:td.dhor). s:td.rtop)
call append(a:last+adjust_last+1, s:td.lbot. join(line, s:td.uhor). s:td.rbot)
if s:csv_fold_headerline > 0 && !a:bang
"call <sid>NewRecord(s:csv_fold_headerline, s:csv_fold_headerline, 1)
if s:csv_fold_headerline > 0
call append(a:first + s:csv_fold_headerline, marginline)
let adjust_last += 1
endif
" Adjust headerline to header of new table
let b:csv_headerline = (exists('b:csv_headerline')?b:csv_headerline+2:3)
call <sid>CheckHeaderLine()
" Adjust syntax highlighting
unlet! b:current_syntax
ru syntax/csv.vim
if a:bang
exe printf('sil %d,%ds/^%s\zs\n/&%s&/e', a:first + s:csv_fold_headerline, a:last + adjust_last,
@ -2484,8 +2573,23 @@ fu! CSV_WCol(...) "{{{3
endtry
endfun
fu! CSV_SetSplitOptions(window) "{{{3
if exists("s:local_stl")
" local horizontal statusline
for opt in items({'&nu': &l:nu, '&rnu': &l:rnu, '&fdc': &fdc})
if opt[1] != getwinvar(a:window, opt[0])
call setwinvar(a:window, opt[0], opt[1])
endif
endfor
" Check statusline (airline might change it)
if getwinvar(a:window, '&l:stl') != s:local_stl
call setwinvar(a:window, '&stl', s:local_stl)
endif
endif
endfun
fu! CSV_CloseBuffer(buffer) "{{{3
" Setup by SetupQuitPre autocommand
" Setup by SetupAutoCmd autocommand
try
if bufnr((a:buffer)+0) > -1
exe a:buffer. "bw"

View File

@ -30,7 +30,7 @@ function! LatexBox_GetMainFileName(...)
" move up the directory tree until we find a .latexmain file.
" TODO: Should we be doing this recursion by default, or should there be a
" setting?
while glob('*.latexmain') == ''
while glob('*.latexmain',1) == ''
let dirmodifier = dirmodifier.':h'
let dirNew = fnameescape(expand(dirmodifier))
" break from the loop if we cannot go up any further.
@ -41,7 +41,7 @@ function! LatexBox_GetMainFileName(...)
exe 'cd '.dirLast
endwhile
let lheadfile = glob('*.latexmain')
let lheadfile = glob('*.latexmain',1)
if lheadfile != ''
" Remove the trailing .latexmain part of the filename... We never want
" that.

View File

@ -443,10 +443,32 @@ function! LatexBox_LatexErrors(status, ...)
endif
endfunction
" Redefine uniq() for compatibility with older Vim versions (< 7.4.218)
function! s:uniq(list)
if exists('*uniq')
return uniq(a:list)
elseif len(a:list) <= 1
return a:list
endif
let last_element = get(a:list,0)
let uniq_list = [last_element]
for i in range(1, len(a:list)-1)
let next_element = get(a:list, i)
if last_element == next_element
continue
endif
let last_element = next_element
call add(uniq_list, next_element)
endfor
return uniq_list
endfunction
function! s:log_contains_error(file)
let lines = readfile(a:file)
let lines = filter(lines, 'v:val =~ ''^.*:\d\+: ''')
let lines = uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
let lines = s:uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
let lines = filter(lines, 'filereadable(fnameescape(v:val))')
return len(lines) > 0
endfunction

View File

@ -5,31 +5,31 @@ if exists("g:LatexBox_no_mappings")
endif
" latexmk {{{
map <buffer> <LocalLeader>ll :Latexmk<CR>
map <buffer> <LocalLeader>lL :Latexmk!<CR>
map <buffer> <LocalLeader>lc :LatexmkClean<CR>
map <buffer> <LocalLeader>lC :LatexmkClean!<CR>
map <buffer> <LocalLeader>lg :LatexmkStatus<CR>
map <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
map <buffer> <LocalLeader>lk :LatexmkStop<CR>
map <buffer> <LocalLeader>le :LatexErrors<CR>
noremap <buffer> <LocalLeader>ll :Latexmk<CR>
noremap <buffer> <LocalLeader>lL :Latexmk!<CR>
noremap <buffer> <LocalLeader>lc :LatexmkClean<CR>
noremap <buffer> <LocalLeader>lC :LatexmkClean!<CR>
noremap <buffer> <LocalLeader>lg :LatexmkStatus<CR>
noremap <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
noremap <buffer> <LocalLeader>lk :LatexmkStop<CR>
noremap <buffer> <LocalLeader>le :LatexErrors<CR>
" }}}
" View {{{
map <buffer> <LocalLeader>lv :LatexView<CR>
noremap <buffer> <LocalLeader>lv :LatexView<CR>
" }}}
" TOC {{{
map <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
noremap <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
" }}}
" List of labels {{{
map <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
noremap <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
" }}}
" Folding {{{
if g:LatexBox_Folding == 1
map <buffer> <LocalLeader>lf :LatexFold<CR>
noremap <buffer> <LocalLeader>lf :LatexFold<CR>
endif
" }}}
@ -44,12 +44,12 @@ endif
" Define text objects {{{
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
omap <buffer> ie :normal vie<CR>
omap <buffer> ae :normal vae<CR>
onoremap <buffer> ie :normal vie<CR>
onoremap <buffer> ae :normal vae<CR>
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
omap <buffer> i$ :normal vi$<CR>
omap <buffer> a$ :normal va$<CR>
onoremap <buffer> i$ :normal vi$<CR>
onoremap <buffer> a$ :normal va$<CR>
" }}}
" Jump between sections {{{

View File

@ -443,11 +443,17 @@ function! Fixedgq(lnum, count)
let l:tw = &tw ? &tw : 80;
let l:count = a:count
let l:first_char = indent(a:lnum) + 1
if mode() == 'i' " gq was not pressed, but tw was set
return 1
endif
" This gq is only meant to do code with strings, not comments
if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char)
return 1
endif
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
return 1
endif

View File

@ -106,10 +106,9 @@ fu! <sid>DoHighlight() "{{{3
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
\. s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%1l'
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
\. s:col . '/ contains=CSVDelimiter'
else
for i in range(len(b:csv_fixed_width_cols))
@ -137,8 +136,13 @@ fu! <sid>DoSyntaxDefinitions() "{{{3
hi def link CSVColumnHeaderOdd WarningMsg
hi def link CSVColumnHeaderEven WarningMsg
hi def link CSVColumnOdd DiffAdd
hi def link CSVColumnEven DiffChange
if get(g:, 'csv_no_column_highlight', 0)
hi def link CSVColumnOdd Normal
hi def link CSVColumnEven Normal
else
hi def link CSVColumnOdd DiffAdd
hi def link CSVColumnEven DiffChange
endif
endfun
" Main: {{{2

View File

@ -15,8 +15,8 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
syn match elixirComment '#.*' contains=elixirTodo
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_record is_reference is_tuple is_exception
syn keyword elixirKeyword case cond for if unless try receive send
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_map is_number is_pid is_port is_record is_reference is_tuple is_exception
syn keyword elixirKeyword case when cond for if unless try receive send
syn keyword elixirKeyword exit raise throw after rescue catch else do end
syn keyword elixirKeyword quote unquote super

View File

@ -67,6 +67,10 @@ if !exists("g:go_highlight_structs")
let g:go_highlight_structs = 0
endif
if !exists("g:go_highlight_build_constraints")
let g:go_highlight_build_constraints = 0
endif
syn case match
syn keyword goDirective package import
@ -270,6 +274,21 @@ endif
hi def link goStruct Function
hi def link goStructDef Function
" Build Constraints
if g:go_highlight_build_constraints != 0
syn keyword goBuildOs contained ignore cgo android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows
syn keyword goBuildArch contained 386 amd64 amd64p32 arm
syn match goBuildDirective display contained "+build"
syn region goBuildComment start="//\s*+build" end="$" contains=goBuildDirective,goBuildOs,goBuildArch
syn region goBuildComment start="/\*\s*+build" end="\*/" contains=goBuildDirective,goBuildOs,goBuildArch
endif
hi def link goBuildComment Comment
hi def link goBuildOs Type
hi def link goBuildArch Type
hi def link goBuildDirective PreProc
" Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/

View File

@ -31,6 +31,7 @@ syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassCha
syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
syn match jadeComment '\s*\/\/.*$'
syn region jadeCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
syn match jadeClassChar "\." contained nextgroup=jadeClass
@ -45,7 +46,7 @@ syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$"
syn keyword jadeHtmlArg contained href title
syn match jadePlainChar "\\" contained
syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript
syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="[#!]{" end="}" contains=@htmlJavascript
syn match jadeInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
syn region jadePipedText matchgroup=jadePipeChar start="|" end="$" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadePipedText skipnl
@ -90,6 +91,7 @@ hi def link jadeInlineDelimiter Delimiter
hi def link jadeFilter PreProc
hi def link jadeDocType PreProc
hi def link jadeComment Comment
hi def link jadeCommentBlock Comment
hi def link jadeHtmlConditionalComment jadeComment
let b:current_syntax = "jade"

View File

@ -56,7 +56,7 @@ if !exists("javascript_ignore_javaScriptdoc")
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
" tags containing a param
syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
syntax match jsDocTags contained "@\(alias\|api\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
" tags containing type and param
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
" tags containing type but no param
@ -70,7 +70,7 @@ if !exists("javascript_ignore_javaScriptdoc")
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+"
syntax match jsDocParam contained "\%(#\|\"\|{\|}\|\w\|\.\|:\|\/\)\+"
syntax match jsDocParam contained "\%(#\|\"\|{\|}\|\w\|\.\|:\|\/\|\[\|]\|=\)\+"
syntax region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags
syntax case match
@ -94,11 +94,17 @@ syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
syntax region jsRegexpGroup start="\\\@<!(" skip="\\.\|\[\(\\.\|[^]]\)*\]" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend
syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\.\|\[\(\\.\|[^]]\)*\]+ end=+/[gimy]\{,4}+ contains=jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline keepend
syntax match jsNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/
syntax match jsNumber /\<-\=\d\+\(L\|[eE][+-]\=\d\+\)\=\>\|\<0[xX]\x\+\>/
syntax keyword jsNumber Infinity
syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\)\@=/ contains=jsFunctionKey contained
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\s*function\s*\)\@=/ contained
syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\)\@=/ contains=jsFunctionKey contained
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/ contained
syntax match jsAssignmentExpr /\v%([a-zA-Z_$]\k*\.)*[a-zA-Z_$]\k*\s*\=/ contains=jsFuncAssignExpr,jsAssignExpIdent,jsPrototype,jsOperator,jsThis,jsNoise
syntax match jsAssignExpIdent /\v[a-zA-Z_$]\k*\ze%(\s*\=)/ contained
syntax match jsFuncAssignExpr /\v%(%([a-zA-Z_$]\k*\.)*[a-zA-Z_$]\k*\s*\=\s*){-1,}\ze%(function\s*\*?\s*\()/ contains=jsFuncAssignObjChain,jsFuncAssignIdent,jsFunction,jsPrototype,jsOperator,jsThis contained
syntax match jsFuncAssignObjChain /\v%([a-zA-Z_$]\k*\.)+/ contains=jsPrototype,jsNoise contained
syntax match jsFuncAssignIdent /\v[a-zA-Z_$]\k*\ze%(\s*\=)/ contained
exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '')
exe 'syntax keyword jsReturn return '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '')
@ -174,7 +180,7 @@ endif "DOM/HTML/CSS
"" Code blocks
syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsCommonJS
syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsCommonJS,jsAssignmentExpr
syntax cluster jsAll contains=@jsExpression,jsLabel,jsConditional,jsRepeat,jsReturn,jsStatement,jsTernaryIf,jsException
syntax region jsBracket matchgroup=jsBrackets start="\[" end="\]" contains=@jsAll,jsParensErrB,jsParensErrC,jsBracket,jsParen,jsBlock,@htmlPreproc fold
syntax region jsParen matchgroup=jsParens start="(" end=")" contains=@jsAll,jsParensErrA,jsParensErrC,jsParen,jsBracket,jsBlock,@htmlPreproc fold
@ -194,8 +200,9 @@ if main_syntax == "javascript"
syntax sync match jsHighlight grouphere jsBlock /{/
endif
exe 'syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
exe 'syntax match jsFunction /\<function\>/ nextgroup=jsGenerator,jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
syntax match jsGenerator contained '\*' nextgroup=jsFuncName skipwhite
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty
syntax match jsFuncArgCommas contained ','
@ -250,6 +257,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
HiLink jsKeyword Keyword
HiLink jsArrowFunction Type
HiLink jsFunction Type
HiLink jsGenerator jsFunction
HiLink jsFuncName Function
HiLink jsArgsObj Special
HiLink jsError Error

View File

@ -329,19 +329,24 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s
" XXX Any statements after the identifier are in perlString colour (i.e.
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
" seems due to the 'auto-extending nature' of regions.
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*""+ end=+$+ contains=@perlTop oneline
syn region perlHereDocStart matchgroup=perlStringStartEnd start=+<<\s*''+ end=+$+ contains=@perlTop oneline
if exists("perl_fold")
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold extend
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ fold extend
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine fold extend
syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine fold extend
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
else
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine
syn region perlHereDoc start=+<<\s*''+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpSQ,perlNotEmptyLine
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
endif

View File

@ -533,10 +533,10 @@ syn match phpOperator "&&\|\<and\>" contained display
syn match phpOperator "||\|\<x\=or\>" contained display
syn match phpOperator "[!=<>]=" contained display
syn match phpOperator "[<>]" contained display
syn match phpMemberSelector "->" contained display
syn match phpMemberSelector "->\|::" contained display
syn match phpVarSelector "\$" contained display
" highlight object variables inside strings
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble
" highlight static and object variables inside strings
syn match phpMethodsVar "\%(->\|::$\?\)\h\w*" contained contains=phpMethods,phpMemberSelector,phpIdentifier display containedin=phpStringDouble
syn match phpSplatOperator "\.\.\." contained display
" Identifier

View File

@ -3,7 +3,7 @@
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
" Maintainer: Chris Morgan <me@chrismorgan.info>
" Last Change: July 18, 2014
" Last Change: January 5, 2015
if version < 600
syntax clear
@ -56,10 +56,10 @@ syn match rustMacroRepeatCount ".\?[*+]" contained
syn match rustMacroVariable "$\w\+"
" Reserved (but not yet used) keywords {{{2
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override macro
" Built-in types {{{2
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
syn keyword rustType isize usize float char bool u8 u16 u32 u64 f32
syn keyword rustType f64 i8 i16 i32 i64 str Self
" Things from the prelude (src/libstd/prelude.rs) {{{2
@ -68,59 +68,35 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
" Reexported core operators {{{3
syn keyword rustTrait Copy Send Sized Sync
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
syn keyword rustTrait BitAnd BitOr BitXor
syn keyword rustTrait Drop Deref DerefMut
syn keyword rustTrait Shl Shr
syn keyword rustTrait Index IndexMut
syn keyword rustTrait Slice SliceMut
syn keyword rustTrait Fn FnMut FnOnce
syn keyword rustTrait Drop Fn FnMut FnOnce
" Reexported functions {{{3
"syn keyword rustFunction range repeat
"syn keyword rustFunction drop
"syn keyword rustFunction from_str
syn keyword rustFunction drop
" Reexported types and traits {{{3
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
syn keyword rustTrait IntoBytes
syn keyword rustTrait ToCStr
syn keyword rustTrait Char UnicodeChar
syn keyword rustTrait Box
syn keyword rustTrait CharExt
syn keyword rustTrait Clone
syn keyword rustTrait PartialEq PartialOrd Eq Ord
syn keyword rustEnum Ordering Equiv
syn keyword rustEnumVariant Less Equal Greater
syn keyword rustTrait FromIterator Extend ExactSizeIterator
syn keyword rustTrait Iterator DoubleEndedIterator
syn keyword rustTrait RandomAccessIterator CloneableIterator
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator
syn keyword rustTrait ToPrimitive FromPrimitive
syn keyword rustTrait Box
syn keyword rustTrait DoubleEndedIterator
syn keyword rustTrait ExactSizeIterator
syn keyword rustTrait Iterator IteratorExt Extend
syn keyword rustEnum Option
syn keyword rustEnumVariant Some None
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
syn keyword rustTrait RawPtr RawMutPtr
syn keyword rustTrait PtrExt MutPtrExt
syn keyword rustEnum Result
syn keyword rustEnumVariant Ok Err
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
syn keyword rustTrait Str StrVector StrPrelude
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude
syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude
syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude
syn keyword rustTrait IntoString String ToString
syn keyword rustTrait AsSlice
syn keyword rustTrait SliceExt SliceConcatExt
syn keyword rustTrait Str StrExt
syn keyword rustTrait String ToString
syn keyword rustTrait Vec
" Reexported runtime types {{{3
"syn keyword rustFunction sync_channel channel
syn keyword rustTrait SyncSender Sender Receiver
"syn keyword rustFunction spawn
" FIXME: remove when path reform lands
syn keyword rustTrait Path GenericPath
" FIXME: remove when I/O reform lands
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
" Other syntax {{{2
syn keyword rustSelf self
syn keyword rustBoolean true false
@ -157,14 +133,14 @@ syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustE
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDeriving
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
syn region rustDerive start="derive(" end=")" contained contains=rustTrait
" Number literals
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(8\|16\|32\|64\)\=\)\="
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
" Special case for numbers of the form "1." which are float literals, unless followed by
" an identifier, which makes them integer literals with a method call or field access,
@ -263,7 +239,7 @@ hi def link rustMacro Macro
hi def link rustType Type
hi def link rustTodo Todo
hi def link rustAttribute PreProc
hi def link rustDeriving PreProc
hi def link rustDerive PreProc
hi def link rustStorage StorageClass
hi def link rustObsoleteStorage Error
hi def link rustLifetime Special
@ -275,7 +251,7 @@ hi def link rustBoxPlacementExpr rustKeyword
" Other Suggestions:
" hi rustAttribute ctermfg=cyan
" hi rustDeriving ctermfg=cyan
" hi rustDerive ctermfg=cyan
" hi rustAssert ctermfg=yellow
" hi rustPanic ctermfg=red
" hi rustMacro ctermfg=magenta

18
syntax/tomdoc.vim Normal file
View File

@ -0,0 +1,18 @@
syn keyword tomdocKeywords
\ Returns Yields Raises Examples Signature
\ containedin=.*Comment
\ contained
syn match tomdocDescriptions
\ +\s*\(Public\|Internal\|Deprecated\):+he=e-1
\ containedin=.*Comment
\ contained
syn match tomdocArguments
\ +\s*[A-Za-z0-9_\-&\*:]*\(\s*- \)+he=e-3
\ containedin=.*Comment
\ contained
hi default link tomdocDescriptions String
hi default link tomdocKeywords String
hi default link tomdocArguments HELP