mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6745c49110 | ||
|
|
1a97304cf6 | ||
|
|
d8eaa50aed | ||
|
|
8e26e6e963 | ||
|
|
676e9dd82e | ||
|
|
23af3f70da | ||
|
|
b79385fecc | ||
|
|
03dd22587a | ||
|
|
bbc6be1099 | ||
|
|
7f2e366334 | ||
|
|
04f868b94a |
12
README.md
12
README.md
@@ -26,7 +26,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
## Language packs
|
## Language packs
|
||||||
|
|
||||||
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
|
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent, ftdetect)
|
||||||
- [blade](https://github.com/xsbeats/vim-blade) (syntax, indent, ftdetect)
|
- [blade](https://github.com/xsbeats/vim-blade) (syntax, ftdetect)
|
||||||
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
|
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
|
||||||
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
|
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
|
||||||
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
|
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
|
||||||
@@ -39,7 +39,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||||
- [emberscript](https://github.com/heartsentwined/vim-ember-script) (syntax, indent, ftplugin, ftdetect)
|
- [emberscript](https://github.com/heartsentwined/vim-ember-script) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [emblem](https://github.com/heartsentwined/vim-emblem) (syntax, indent, ftplugin, ftdetect)
|
- [emblem](https://github.com/heartsentwined/vim-emblem) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [erlang](https://github.com/oscarh/vimerl) (syntax, indent, compiler, autoload, ftplugin)
|
- [erlang](https://github.com/hcs42/vim-erlang-runtime) (syntax, indent)
|
||||||
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin, ftdetect)
|
- [git](https://github.com/tpope/vim-git) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
|
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
|
||||||
- [haml](https://github.com/tpope/vim-haml) (syntax, indent, compiler, ftplugin, ftdetect)
|
- [haml](https://github.com/tpope/vim-haml) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||||
@@ -63,6 +63,7 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [perl](https://github.com/vim-perl/vim-perl) (syntax, indent, ftplugin, ftdetect)
|
- [perl](https://github.com/vim-perl/vim-perl) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
|
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
|
||||||
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, ftplugin, ftdetect)
|
- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, ftplugin, ftdetect)
|
||||||
|
- [powershell](https://github.com/Persistent13/vim-ps1) (syntax, indent, ftplugin, ftdetect)
|
||||||
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, ftdetect)
|
- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, ftdetect)
|
||||||
- [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)
|
- [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)
|
||||||
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
|
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
|
||||||
@@ -76,14 +77,17 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [systemd](https://github.com/kurayama/systemd-vim-syntax) (syntax, ftdetect)
|
- [systemd](https://github.com/kurayama/systemd-vim-syntax) (syntax, ftdetect)
|
||||||
- [swift](https://github.com/toyamarinyon/vim-swift) (syntax, indent, ftdetect)
|
- [swift](https://github.com/toyamarinyon/vim-swift) (syntax, indent, ftdetect)
|
||||||
- [textile](https://github.com/timcharper/textile.vim) (syntax, ftplugin, ftdetect)
|
- [textile](https://github.com/timcharper/textile.vim) (syntax, ftplugin, ftdetect)
|
||||||
- [tmux](https://github.com/acustodioo/vim-tmux) (syntax, ftdetect)
|
- [tmux](https://github.com/tejr/vim-tmux) (syntax, ftdetect)
|
||||||
- [tomdoc](https://github.com/duwanis/tomdoc.vim) (syntax)
|
- [tomdoc](https://github.com/duwanis/tomdoc.vim) (syntax)
|
||||||
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
|
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
|
||||||
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
||||||
- [toml](https://github.com/cespare/vim-toml) (syntax, ftdetect)
|
- [thrift](https://github.com/solarnz/thrift.vim) (syntax, ftdetect)
|
||||||
|
- [toml](https://github.com/cespare/vim-toml) (syntax, ftplugin, ftdetect)
|
||||||
- [twig](https://github.com/beyondwords/vim-twig) (syntax, ftplugin, ftdetect)
|
- [twig](https://github.com/beyondwords/vim-twig) (syntax, ftplugin, ftdetect)
|
||||||
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
- [xls](https://github.com/vim-scripts/XSLT-syntax) (syntax)
|
||||||
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
- [yard](https://github.com/sheerun/vim-yardoc) (syntax)
|
||||||
|
- [vala](https://github.com/tkztmk/vim-vala) (syntax, indent, ftdetect)
|
||||||
|
- [vm](https://github.com/lepture/vim-velocity) (syntax, indent, ftdetect)
|
||||||
- [css-color](https://github.com/ap/vim-css-color) (autoload, syntax)
|
- [css-color](https://github.com/ap/vim-css-color) (autoload, syntax)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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.
|
" Ruby syntax extensions for highlighting YARD documentation.
|
||||||
"
|
"
|
||||||
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
||||||
|
|||||||
@@ -235,9 +235,9 @@ endfunction
|
|||||||
|
|
||||||
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
|
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
|
||||||
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
|
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
|
||||||
let s:_numval = '\(\d\{1,3}%\?\)' " submatch 3,4,5
|
|
||||||
let s:_ws_ = '\s*'
|
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:_otherargs_ = '\%(,[^)]*\)\?'
|
||||||
let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . 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
|
let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
|
||||||
|
|||||||
@@ -1,161 +0,0 @@
|
|||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Vim omni-completion script
|
|
||||||
" Author: Oscar Hellström
|
|
||||||
" Email: oscar@oscarh.net
|
|
||||||
" Version: 2010-08-10
|
|
||||||
" Contributors: kTT (http://github.com/kTT)
|
|
||||||
" Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Patterns for completions {{{1
|
|
||||||
let s:erlangLocalFuncBeg = '\(\<[0-9A-Za-z_-]*\|\s*\)$'
|
|
||||||
let s:erlangExternalFuncBeg = '\<[0-9A-Za-z_-]\+:[0-9A-Za-z_-]*$'
|
|
||||||
let s:ErlangBlankLine = '^\s*\(%.*\)\?$'
|
|
||||||
let s:erlangCompletionPath = expand('<sfile>:p:h') . '/erlang_completion.erl'
|
|
||||||
|
|
||||||
if !exists('g:erlangCompletionGrep')
|
|
||||||
let g:erlangCompletionGrep = 'grep'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangManSuffix')
|
|
||||||
let g:erlangManSuffix = ''
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangManPath')
|
|
||||||
let g:erlangManPath = '/usr/lib/erlang/man'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangCompletionDisplayDoc')
|
|
||||||
let g:erlangCompletionDisplayDoc = 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Main function for completion {{{1
|
|
||||||
function! erlangcomplete#Complete(findstart, base)
|
|
||||||
" 0) Init {{{2
|
|
||||||
let lnum = line('.')
|
|
||||||
let column = col('.')
|
|
||||||
let line = strpart(getline('.'), 0, column - 1)
|
|
||||||
|
|
||||||
" 1) First, check if completion is impossible {{{2
|
|
||||||
if line =~ '[^~\\]%'
|
|
||||||
return -1
|
|
||||||
endif
|
|
||||||
|
|
||||||
"echo "line[col - 1]:" . line[column - 1] . " line[col - 2]:" . line[column - 2] . "\n" . line . "\n"
|
|
||||||
|
|
||||||
" 2) Check if the char to the left of us are part of a function call {{{2
|
|
||||||
"
|
|
||||||
" Nothing interesting is written at the char just before the cursor
|
|
||||||
" This means _anything_ could be started here
|
|
||||||
" In this case, keyword completion should probably be used,
|
|
||||||
" for now we'll only try and complete local functions.
|
|
||||||
" TODO: Examine if we can stare Identifiers end complete on them
|
|
||||||
" Is this worth it? Is /completion/ of a "blank" wanted? Can we consider (
|
|
||||||
" interesting and check if we are in a function call etc.?
|
|
||||||
if line[column - 2] !~ '[0-9A-Za-z:_-]'
|
|
||||||
if a:findstart
|
|
||||||
return column
|
|
||||||
else
|
|
||||||
return s:erlangFindLocalFunc(a:base)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
" 3) Function in external module {{{2
|
|
||||||
if line =~ s:erlangExternalFuncBeg
|
|
||||||
let delimiter = match(line, ':[0-9A-Za-z_-]*$') + 1
|
|
||||||
if a:findstart
|
|
||||||
return delimiter
|
|
||||||
else
|
|
||||||
let module = matchstr(line[:-2], '\<\k*\>$')
|
|
||||||
return s:erlangFindExternalFunc(module, a:base)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" 4) Local function {{{2
|
|
||||||
if line =~ s:erlangLocalFuncBeg
|
|
||||||
let funcstart = match(line, ':\@<![0-9A-Za-z_-]*$')
|
|
||||||
if a:findstart
|
|
||||||
return funcstart
|
|
||||||
else
|
|
||||||
return s:erlangFindLocalFunc(a:base)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" 5) Unhandled situation {{{2
|
|
||||||
if a:findstart
|
|
||||||
return -1
|
|
||||||
else
|
|
||||||
return []
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Auxiliary functions for completion {{{1
|
|
||||||
" Find the next non-blank line {{{2
|
|
||||||
function s:erlangFindNextNonBlank(lnum)
|
|
||||||
let lnum = nextnonblank(a:lnum + 1)
|
|
||||||
let line = getline(lnum)
|
|
||||||
while line =~ s:ErlangBlankLine && 0 != lnum
|
|
||||||
let lnum = nextnonblank(lnum + 1)
|
|
||||||
let line = getline(lnum)
|
|
||||||
endwhile
|
|
||||||
return lnum
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" vim: foldmethod=marker:
|
|
||||||
" Find external function names {{{2
|
|
||||||
function s:erlangFindExternalFunc(module, base)
|
|
||||||
" If it's a local module, try to compile it
|
|
||||||
if filereadable(a:module . '.erl') && !filereadable(a:module . '.beam')
|
|
||||||
silent execute '!erlc' a:module . '.erl' '>/dev/null' '2>/dev/null'
|
|
||||||
redraw!
|
|
||||||
endif
|
|
||||||
let functions = system(s:erlangCompletionPath . ' ' . a:module)
|
|
||||||
for element in sort(split(functions, '\n'))
|
|
||||||
if match(element, a:base) == 0
|
|
||||||
let function_name = matchstr(element, a:base . '\w\+')
|
|
||||||
let number_of_args = matchstr(element, '\d\+', len(function_name))
|
|
||||||
let number_of_comma = max([number_of_args - 1, 0])
|
|
||||||
let file_path = g:erlangManPath . '/man?/' . a:module . '\.?' . g:erlangManSuffix
|
|
||||||
" [:-2] cutting some weird characters at the end
|
|
||||||
" becouse grep doesn't support multilines, we have to filter
|
|
||||||
" first by .B and next by looking via function name
|
|
||||||
" if someone have better idea, please change it
|
|
||||||
let description = ''
|
|
||||||
" Don't look man pages if the module is present in the current directory
|
|
||||||
if g:erlangCompletionDisplayDoc != 0 && !filereadable(a:module . '.erl')
|
|
||||||
let system_command = g:erlangCompletionGrep . ' -A 1 "\.B" ' . file_path . ' | grep -EZo "\<' .
|
|
||||||
\ function_name . '\>\((\w+, ){' . number_of_comma . '}[^),]*\) -> .*"'
|
|
||||||
let description = system(system_command)
|
|
||||||
let description = description[:-2]
|
|
||||||
endif
|
|
||||||
if description == ''
|
|
||||||
let description = element " if function doesn't have description e.g. lists:rmerge, put rmerge/2 instead
|
|
||||||
endif
|
|
||||||
let field = {'word': function_name . '(', 'abbr': description, 'kind': 'f', 'dup': 1} " always duplicate functions
|
|
||||||
call complete_add(field)
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
return []
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Find local function names {{{2
|
|
||||||
function s:erlangFindLocalFunc(base)
|
|
||||||
" begin at line 1
|
|
||||||
let lnum = s:erlangFindNextNonBlank(1)
|
|
||||||
if "" == a:base
|
|
||||||
let base = '\w' " used to match against word symbol
|
|
||||||
else
|
|
||||||
let base = a:base
|
|
||||||
endif
|
|
||||||
while 0 != lnum && !complete_check()
|
|
||||||
let line = getline(lnum)
|
|
||||||
let function_name = matchstr(line, '^' . base . '[0-9A-Za-z_-]\+(\@=')
|
|
||||||
if function_name != ""
|
|
||||||
call complete_add(function_name)
|
|
||||||
endif
|
|
||||||
let lnum = s:erlangFindNextNonBlank(lnum)
|
|
||||||
endwhile
|
|
||||||
return []
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
@@ -601,7 +601,7 @@ let g:xmldata_html5 = {
|
|||||||
\ ],
|
\ ],
|
||||||
\ 'meta': [
|
\ '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': [
|
\ 'meter': [
|
||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
|
|||||||
16
build
16
build
@@ -23,17 +23,18 @@ extract() {
|
|||||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||||
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
|
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
|
||||||
|
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||||
printf -- "- [$name](https://github.com/$path) ("
|
printf -- "- [$name](https://github.com/$path) ("
|
||||||
|
|
||||||
subdirs=""
|
subdirs=""
|
||||||
for subdir in ${!directories}; do
|
for subdir in ${!directories}; do
|
||||||
if [ -d "$dir/$subdir" ]; then
|
if [ -d "${dir}${subtree:-/}${subdir}" ]; then
|
||||||
base="$(basename "$subdir")"
|
base="$(basename "$subdir")"
|
||||||
if [[ "$subdirs" != *"$base"* ]]; then
|
if [[ "$subdirs" != *"$base"* ]]; then
|
||||||
subdirs="$subdirs, $base"
|
subdirs="$subdirs, $base"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
copy_dir "$dir" "$subdir"
|
copy_dir "${dir}${subtree}" "$subdir"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -45,8 +46,9 @@ extract() {
|
|||||||
name="$(printf "$pack" | cut -d ':' -f 1)"
|
name="$(printf "$pack" | cut -d ':' -f 1)"
|
||||||
path="$(printf "$pack" | cut -d ':' -f 2)"
|
path="$(printf "$pack" | cut -d ':' -f 2)"
|
||||||
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
|
||||||
|
subtree="$(printf "$pack" | cut -d ':' -f 4)"
|
||||||
|
|
||||||
if [ -d "$dir/plugin" ]; then
|
if [ -d "$dir${subtree:-/}plugin" ]; then
|
||||||
printf "Possible error (plugin directory exists): $path\n"
|
printf "Possible error (plugin directory exists): $path\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -82,7 +84,7 @@ PACKS="
|
|||||||
elixir:elixir-lang/vim-elixir
|
elixir:elixir-lang/vim-elixir
|
||||||
emberscript:heartsentwined/vim-ember-script
|
emberscript:heartsentwined/vim-ember-script
|
||||||
emblem:heartsentwined/vim-emblem
|
emblem:heartsentwined/vim-emblem
|
||||||
erlang:oscarh/vimerl
|
erlang:hcs42/vim-erlang-runtime
|
||||||
git:tpope/vim-git
|
git:tpope/vim-git
|
||||||
go:fatih/vim-go:_BASIC
|
go:fatih/vim-go:_BASIC
|
||||||
haml:tpope/vim-haml
|
haml:tpope/vim-haml
|
||||||
@@ -106,6 +108,7 @@ PACKS="
|
|||||||
perl:vim-perl/vim-perl
|
perl:vim-perl/vim-perl
|
||||||
php:StanAngeloff/php.vim
|
php:StanAngeloff/php.vim
|
||||||
puppet:rodjek/vim-puppet
|
puppet:rodjek/vim-puppet
|
||||||
|
powershell:Persistent13/vim-ps1
|
||||||
protobuf:uarun/vim-protobuf
|
protobuf:uarun/vim-protobuf
|
||||||
python:mitsuhiko/vim-python-combined
|
python:mitsuhiko/vim-python-combined
|
||||||
r-lang:vim-scripts/R.vim
|
r-lang:vim-scripts/R.vim
|
||||||
@@ -119,14 +122,17 @@ PACKS="
|
|||||||
systemd:kurayama/systemd-vim-syntax
|
systemd:kurayama/systemd-vim-syntax
|
||||||
swift:toyamarinyon/vim-swift
|
swift:toyamarinyon/vim-swift
|
||||||
textile:timcharper/textile.vim
|
textile:timcharper/textile.vim
|
||||||
tmux:acustodioo/vim-tmux
|
tmux:tejr/vim-tmux
|
||||||
tomdoc:duwanis/tomdoc.vim
|
tomdoc:duwanis/tomdoc.vim
|
||||||
typescript:leafgarland/typescript-vim
|
typescript:leafgarland/typescript-vim
|
||||||
vbnet:vim-scripts/vbnet.vim
|
vbnet:vim-scripts/vbnet.vim
|
||||||
|
thrift:solarnz/thrift.vim
|
||||||
toml:cespare/vim-toml
|
toml:cespare/vim-toml
|
||||||
twig:beyondwords/vim-twig
|
twig:beyondwords/vim-twig
|
||||||
xls:vim-scripts/XSLT-syntax
|
xls:vim-scripts/XSLT-syntax
|
||||||
yard:sheerun/vim-yardoc
|
yard:sheerun/vim-yardoc
|
||||||
|
vala:tkztmk/vim-vala
|
||||||
|
vm:lepture/vim-velocity
|
||||||
css-color:ap/vim-css-color
|
css-color:ap/vim-css-color
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
" Erlang compiler file
|
|
||||||
" Language: Erlang
|
|
||||||
" Maintainer: Pawel 'kTT' Salata <rockplayer.pl@gmail.com>
|
|
||||||
" URL: http://ktototaki.info
|
|
||||||
|
|
||||||
if exists("current_compiler")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let current_compiler = "erlang"
|
|
||||||
|
|
||||||
if exists(":CompilerSet") != 2
|
|
||||||
command -nargs=* CompilerSet setlocal <args>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangCheckFile')
|
|
||||||
let g:erlangCheckFile = "~/.vim/compiler/erlang_check_file.erl"
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangHighlightErrors')
|
|
||||||
let g:erlangHighlightErrors = 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:error_list = {}
|
|
||||||
let b:is_showing_msg = 0
|
|
||||||
|
|
||||||
function! HighlightErlangErrors()
|
|
||||||
if match(getline(1), "#!.*escript") != -1
|
|
||||||
setlocal makeprg=escript\ -s\ %
|
|
||||||
else
|
|
||||||
execute "setlocal makeprg=" . g:erlangCheckFile . "\\ \%"
|
|
||||||
endif
|
|
||||||
silent make!
|
|
||||||
call s:clear_matches()
|
|
||||||
for error in getqflist()
|
|
||||||
let item = {}
|
|
||||||
let item['lnum'] = error.lnum
|
|
||||||
let item['msg'] = error.text
|
|
||||||
let b:error_list[error.lnum] = item
|
|
||||||
call matchadd('SpellBad', "\\%" . error.lnum . "l")
|
|
||||||
endfor
|
|
||||||
if len(getqflist())
|
|
||||||
redraw!
|
|
||||||
endif
|
|
||||||
call s:show_msg()
|
|
||||||
setlocal makeprg=erlc\ %
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:show_msg()
|
|
||||||
let pos = getpos(".")
|
|
||||||
if has_key(b:error_list, pos[1])
|
|
||||||
let item = get(b:error_list, pos[1])
|
|
||||||
echo item.msg
|
|
||||||
let b:is_showing_msg = 1
|
|
||||||
else
|
|
||||||
if exists("b:is_showing_msg") && b:is_showing_msg == 1
|
|
||||||
echo
|
|
||||||
let b:is_showing_msg = 0
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endf
|
|
||||||
|
|
||||||
function! s:clear_matches()
|
|
||||||
call clearmatches()
|
|
||||||
let b:error_list = {}
|
|
||||||
if exists("b:is_showing_msg") && b:is_showing_msg == 1
|
|
||||||
echo
|
|
||||||
let b:is_showing_msg = 0
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
CompilerSet makeprg=erlc\ %
|
|
||||||
CompilerSet errorformat=%f:%l:\ %tarning:\ %m,%E%f:%l:\ %m
|
|
||||||
|
|
||||||
if g:erlangHighlightErrors
|
|
||||||
autocmd BufLeave *.erl call s:clear_matches()
|
|
||||||
autocmd BufEnter *.erl call s:clear_matches()
|
|
||||||
autocmd BufWritePost *.erl call HighlightErlangErrors()
|
|
||||||
autocmd CursorHold *.erl call s:show_msg()
|
|
||||||
autocmd CursorMoved *.erl call s:show_msg()
|
|
||||||
endif
|
|
||||||
@@ -3,11 +3,14 @@ if exists("current_compiler")
|
|||||||
endif
|
endif
|
||||||
let current_compiler = "typescript"
|
let current_compiler = "typescript"
|
||||||
|
|
||||||
|
if !exists("g:typescript_compiler_binary")
|
||||||
|
let g:typescript_compiler_binary = "tsc"
|
||||||
|
endif
|
||||||
|
|
||||||
if !exists("g:typescript_compiler_options")
|
if !exists("g:typescript_compiler_options")
|
||||||
let g:typescript_compiler_options = ""
|
let g:typescript_compiler_options = ""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
|
||||||
let &l:makeprg='tsc' . g:typescript_compiler_options . ' $* %'
|
|
||||||
|
|
||||||
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
|
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
|
|||||||
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
|
||||||
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
|
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/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
|
||||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
|
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
|
||||||
autocmd BufNewFile,BufRead */.config/git/config 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/modules/**/config set ft=gitconfig
|
||||||
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
|
||||||
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
autocmd BufNewFile,BufRead .gitsendemail.* set ft=gitsendemail
|
||||||
autocmd BufNewFile,BufRead *.git/**
|
autocmd BufNewFile,BufRead *.git/**
|
||||||
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
||||||
\ set ft=git |
|
\ set ft=git |
|
||||||
@@ -144,6 +144,10 @@ endfunction
|
|||||||
autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6()
|
autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6()
|
||||||
autocmd BufNew,BufRead *.nqp setf perl6
|
autocmd BufNew,BufRead *.nqp setf perl6
|
||||||
autocmd BufNewFile,BufRead *.proto setfiletype proto
|
autocmd BufNewFile,BufRead *.proto setfiletype proto
|
||||||
|
au BufNewFile,BufRead *.ps1 set ft=ps1
|
||||||
|
au BufNewFile,BufRead *.psd1 set ft=ps1
|
||||||
|
au BufNewFile,BufRead *.psm1 set ft=ps1
|
||||||
|
au BufNewFile,BufRead *.ps1xml set ft=ps1xml
|
||||||
au! BufRead,BufNewFile *.pp setfiletype puppet
|
au! BufRead,BufNewFile *.pp setfiletype puppet
|
||||||
au! BufRead,BufNewFile Puppetfile setfiletype ruby
|
au! BufRead,BufNewFile Puppetfile setfiletype ruby
|
||||||
function! s:setf(filetype) abort
|
function! s:setf(filetype) abort
|
||||||
@@ -195,8 +199,13 @@ au BufNewFile,BufRead *.swap set filetype=systemd
|
|||||||
au BufNewFile,BufRead *.target set filetype=systemd
|
au BufNewFile,BufRead *.target set filetype=systemd
|
||||||
au BufNewFile,BufRead *.timer set filetype=systemd
|
au BufNewFile,BufRead *.timer set filetype=systemd
|
||||||
au BufRead,BufNewFile *.textile set filetype=textile
|
au BufRead,BufNewFile *.textile set filetype=textile
|
||||||
autocmd BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
|
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 *.toml set filetype=toml
|
||||||
|
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
|
||||||
autocmd BufNewFile,BufRead *.twig set filetype=twig
|
autocmd BufNewFile,BufRead *.twig set filetype=twig
|
||||||
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
|
||||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||||
|
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||||
|
au BufRead,BufNewFile *.vala,*.vapi setfiletype vala
|
||||||
|
au BufRead,BufNewFile *.vm set ft=velocity syntax=velocity
|
||||||
|
|||||||
270
ftplugin/csv.vim
270
ftplugin/csv.vim
@@ -1,11 +1,11 @@
|
|||||||
" Filetype plugin for editing CSV files. "{{{1
|
" Filetype plugin for editing CSV files. "{{{1
|
||||||
" Author: Christian Brabandt <cb@256bit.org>
|
" Author: Christian Brabandt <cb@256bit.org>
|
||||||
" Version: 0.30
|
" Version: 0.31
|
||||||
" Script: http://www.vim.org/scripts/script.php?script_id=2830
|
" Script: http://www.vim.org/scripts/script.php?script_id=2830
|
||||||
" License: VIM License
|
" 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
|
" 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
|
" Some ideas are taken from the wiki http://vim.wikia.com/wiki/VimTip667
|
||||||
" though, implementation differs.
|
" though, implementation differs.
|
||||||
@@ -90,7 +90,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
|||||||
" - Should work with most ugly solutions that are available
|
" - Should work with most ugly solutions that are available
|
||||||
let b:col='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
let b:col='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
||||||
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
||||||
\ '[^"]\|""\)*"\)' . s:del . '\)\|\%(' .
|
\ '[^"]\|""\)*"\s*\)' . s:del . '\)\|\%(' .
|
||||||
\ '[^' . b:delimiter . ']*' . s:del . '\)\)'
|
\ '[^' . b:delimiter . ']*' . s:del . '\)\)'
|
||||||
let b:col_end='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
let b:col_end='\%(\%(\%(' . (b:delimiter !~ '\s' ? '\s*' : '') .
|
||||||
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
\ '"\%(' . (exists("g:csv_nl") ? '\_' : '' ) .
|
||||||
@@ -147,7 +147,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
|||||||
let b:undo_ftplugin .= "| unlet! b:delimiter b:col"
|
let b:undo_ftplugin .= "| unlet! b:delimiter b:col"
|
||||||
\ . "| unlet! b:csv_fixed_width_cols b:csv_filter"
|
\ . "| unlet! b:csv_fixed_width_cols b:csv_filter"
|
||||||
\ . "| unlet! b:csv_fixed_width b:csv_list b:col_width"
|
\ . "| 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:csv_thousands_sep b:csv_decimal_sep"
|
||||||
\. " | unlet! b:browsefilter b:csv_cmt"
|
\. " | unlet! b:browsefilter b:csv_cmt"
|
||||||
\. " | unlet! b:csv_arrange_leftalign"
|
\. " | unlet! b:csv_arrange_leftalign"
|
||||||
@@ -182,7 +182,7 @@ fu! <sid>Init(startline, endline) "{{{3
|
|||||||
" \ delf <sid>SaveOptions | delf <sid>CheckDuplicates |
|
" \ delf <sid>SaveOptions | delf <sid>CheckDuplicates |
|
||||||
" \ delf <sid>CompleteColumnNr | delf <sid>CSVPat | delf <sid>Transpose |
|
" \ delf <sid>CompleteColumnNr | delf <sid>CSVPat | delf <sid>Transpose |
|
||||||
" \ delf <sid>LocalSettings() | delf <sid>AddColumn | delf <sid>SubstituteInColumn
|
" \ delf <sid>LocalSettings() | delf <sid>AddColumn | delf <sid>SubstituteInColumn
|
||||||
" \ delf <sid>SetupQuitPre() | delf CSV_CloseBuffer
|
" \ delf <sid>SetupAutoCmd() | delf CSV_CloseBuffer
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>LocalSettings(type) "{{{3
|
fu! <sid>LocalSettings(type) "{{{3
|
||||||
@@ -194,11 +194,8 @@ fu! <sid>LocalSettings(type) "{{{3
|
|||||||
let b:undo_ftplugin = "setlocal sol& tw< wrap<"
|
let b:undo_ftplugin = "setlocal sol& tw< wrap<"
|
||||||
|
|
||||||
" Set browsefilter
|
" Set browsefilter
|
||||||
if (v:version > 703 || (v:version == 703 && has("patch593")))
|
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
|
||||||
\ && exists("browsefilter")
|
|
||||||
let b:browsefilter="CSV Files (*.csv, *.dat)\t*.csv;*.dat\n".
|
|
||||||
\ "All Files\t*.*\n"
|
\ "All Files\t*.*\n"
|
||||||
endif
|
|
||||||
|
|
||||||
if has("conceal")
|
if has("conceal")
|
||||||
setl cole=2 cocu=nc
|
setl cole=2 cocu=nc
|
||||||
@@ -341,7 +338,8 @@ fu! <sid>SearchColumn(arg) "{{{3
|
|||||||
endif
|
endif
|
||||||
let @/ = <sid>GetPat(colnr, maxcolnr, '\%('.pat. '\)')
|
let @/ = <sid>GetPat(colnr, maxcolnr, '\%('.pat. '\)')
|
||||||
try
|
try
|
||||||
norm! n
|
" force redraw, so that the search pattern isn't shown
|
||||||
|
exe "norm! n\<c-l>"
|
||||||
catch /^Vim\%((\a\+)\)\=:E486/
|
catch /^Vim\%((\a\+)\)\=:E486/
|
||||||
" Pattern not found
|
" Pattern not found
|
||||||
echohl Error
|
echohl Error
|
||||||
@@ -619,10 +617,6 @@ fu! <sid>ColWidth(colnr) "{{{3
|
|||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>ArrangeCol(first, last, bang, limit) range "{{{3
|
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
|
" explicitly give the range as argument to the function
|
||||||
if exists("b:csv_fixed_width_cols")
|
if exists("b:csv_fixed_width_cols")
|
||||||
" Nothing to do
|
" Nothing to do
|
||||||
@@ -713,6 +707,8 @@ fu! <sid>CalculateColumnWidth() "{{{3
|
|||||||
" delete buffer content in variable b:csv_list,
|
" delete buffer content in variable b:csv_list,
|
||||||
" this was only necessary for calculating the max width
|
" this was only necessary for calculating the max width
|
||||||
unlet! b:csv_list
|
unlet! b:csv_list
|
||||||
|
unlet! s:columnize_count
|
||||||
|
unlet! s:decimal_column
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>Columnize(field) "{{{3
|
fu! <sid>Columnize(field) "{{{3
|
||||||
@@ -736,51 +732,83 @@ fu! <sid>Columnize(field) "{{{3
|
|||||||
" Careful: Keep this fast! Using
|
" Careful: Keep this fast! Using
|
||||||
" let width=get(b:col_width,<SID>WColumn()-1,20)
|
" let width=get(b:col_width,<SID>WColumn()-1,20)
|
||||||
" is too slow, so we are using:
|
" 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 s:columnize_count += 1
|
||||||
let has_delimiter = (a:field =~# b:delimiter.'$')
|
let has_delimiter = (a:field =~# b:delimiter.'$')
|
||||||
if v:version > 703 || v:version == 703 && has("patch713")
|
if align is? 'l'
|
||||||
" printf knows about %S (e.g. can handle char length
|
" left-align content
|
||||||
if get(b:, 'csv_arrange_leftalign',0)
|
return printf("%-*S%s", width+1 ,
|
||||||
" left-align content
|
\ (has_delimiter ? a:field[:-2] : a:field),
|
||||||
return printf("%-*S%s", width+1 ,
|
\ (has_delimiter ? b:delimiter : ' '))
|
||||||
\ (has_delimiter ?
|
elseif align is? 'c'
|
||||||
\ matchstr(a:field, '.*\%('.b:delimiter.'\)\@=') : a:field),
|
" center the column
|
||||||
\ (has_delimiter ? b:delimiter : ''))
|
let t = width - len(split(a:field, '\zs'))
|
||||||
else
|
let leftwidth = t/2
|
||||||
return printf("%*S", width+1 , a:field)
|
" 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
|
endif
|
||||||
else
|
if get(s:decimal_column, colnr, 0) == 0
|
||||||
" printf only handles bytes
|
call <sid>CheckHeaderLine()
|
||||||
if !exists("g:csv_no_multibyte") &&
|
call <sid>NumberFormat()
|
||||||
\ match(a:field, '[^ -~]') != -1
|
let data = <sid>CopyCol('', colnr+1, '')[s:csv_fold_headerline : -1]
|
||||||
" match characters outside the ascii range
|
let pat1 = escape(s:nr_format[1], '.').'\zs[^'.s:nr_format[1].']*\ze'.
|
||||||
let a = split(a:field, '\zs')
|
\ (has_delimiter ? b:delimiter : '').'$'
|
||||||
let add = eval(join(map(a, 'len(v:val)'), '+'))
|
let pat2 = '\d\+\ze\%(\%('.escape(s:nr_format[1], '.'). '\d\+\)\|'.
|
||||||
let add -= len(a)
|
\ (has_delimiter ? b:delimiter : '').'$\)'
|
||||||
else
|
let data1 = map(copy(data), 'matchstr(v:val, pat1)')
|
||||||
let add = 0
|
let data2 = map(data, 'matchstr(v:val, pat2)')
|
||||||
endif
|
" strlen should be okay for decimals...
|
||||||
|
let data1 = map(data1, 'strlen(v:val)')
|
||||||
" Add one for the frame
|
let data2 = map(data2, 'strlen(v:val)')
|
||||||
" plus additional width for multibyte chars,
|
let dec = max(data1)
|
||||||
" since printf(%*s..) uses byte width!
|
let scal = max(data2)
|
||||||
let width = width + add + 1
|
if dec + scal + 1 + (has_delimiter ? 1 : 0) > width
|
||||||
|
let width = dec + scal + 1 + (has_delimiter ? 1 :0)
|
||||||
if width == strlen(a:field)
|
let b:col_width[colnr] = width
|
||||||
" 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)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let s:decimal_column[colnr] = dec
|
||||||
|
else
|
||||||
|
let dec = get(s:decimal_column, colnr)
|
||||||
endif
|
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
|
endif
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
@@ -809,14 +837,13 @@ fu! <sid>GetColPat(colnr, zs_flag) "{{{3
|
|||||||
return pat . (a:zs_flag ? '\zs' : '')
|
return pat . (a:zs_flag ? '\zs' : '')
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>SetupQuitPre(window) "{{{3
|
fu! <sid>SetupAutoCmd(window,bufnr) "{{{3
|
||||||
" Setup QuitPre autocommand to quit cleanly
|
" Setup QuitPre autocommand to quit cleanly
|
||||||
if exists("##QuitPre")
|
aug CSV_QuitPre
|
||||||
augroup CSV_QuitPre
|
au!
|
||||||
au!
|
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
|
||||||
exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")"
|
exe "au CursorHold <buffer=".a:bufnr."> call CSV_SetSplitOptions(".a:window.")"
|
||||||
augroup end
|
aug END
|
||||||
endif
|
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
||||||
@@ -837,8 +864,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
|||||||
let _sbo = &sbo
|
let _sbo = &sbo
|
||||||
let a = []
|
let a = []
|
||||||
let b=b:col
|
let b=b:col
|
||||||
|
let bufnr = bufnr('.')
|
||||||
if a:hor
|
if a:hor
|
||||||
setl scrollopt=hor scrollbind
|
setl scrollopt=hor scrollbind cursorbind
|
||||||
let _fdc = &l:fdc
|
let _fdc = &l:fdc
|
||||||
let lines = empty(a:lines) ? s:csv_fold_headerline : a:lines
|
let lines = empty(a:lines) ? s:csv_fold_headerline : a:lines
|
||||||
let a = getline(1,lines)
|
let a = getline(1,lines)
|
||||||
@@ -851,16 +879,21 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
|||||||
"setl syntax=csv
|
"setl syntax=csv
|
||||||
sil! doautocmd FileType csv
|
sil! doautocmd FileType csv
|
||||||
noa 1
|
noa 1
|
||||||
|
sil! sign unplace *
|
||||||
exe "resize" . lines
|
exe "resize" . lines
|
||||||
setl scrollopt=hor winfixheight nowrap
|
setl scrollopt=hor winfixheight nowrap cursorbind
|
||||||
"let &l:stl=repeat(' ', winwidth(0))
|
|
||||||
let &l:stl="%#Normal#".repeat(' ',winwidth(0))
|
let &l:stl="%#Normal#".repeat(' ',winwidth(0))
|
||||||
|
let s:local_stl = &l:stl
|
||||||
" set the foldcolumn to the same of the other window
|
" set the foldcolumn to the same of the other window
|
||||||
let &l:fdc = _fdc
|
let &l:fdc = _fdc
|
||||||
else
|
else
|
||||||
setl scrollopt=ver scrollbind
|
setl scrollopt=ver scrollbind cursorbind
|
||||||
noa 0
|
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?
|
" Does it make sense to use the preview window?
|
||||||
"vert sil! pedit |wincmd w | enew!
|
"vert sil! pedit |wincmd w | enew!
|
||||||
above vsp +enew
|
above vsp +enew
|
||||||
@@ -876,11 +909,14 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
|||||||
noa 0
|
noa 0
|
||||||
let b:csv_SplitWindow = winnr()
|
let b:csv_SplitWindow = winnr()
|
||||||
sil :call <sid>ArrangeCol(1,line('$'), 1, -1)
|
sil :call <sid>ArrangeCol(1,line('$'), 1, -1)
|
||||||
|
sil! sign unplace *
|
||||||
exe "vert res" . len(split(getline(1), '\zs'))
|
exe "vert res" . len(split(getline(1), '\zs'))
|
||||||
call matchadd("CSVHeaderLine", b:col)
|
call matchadd("CSVHeaderLine", b:col)
|
||||||
setl scrollopt=ver winfixwidth
|
setl scrollopt=ver winfixwidth cursorbind nonu nornu fdc=0
|
||||||
endif
|
endif
|
||||||
call <sid>SetupQuitPre(winnr())
|
call <sid>SetupAutoCmd(winnr(),bufnr)
|
||||||
|
" disable airline
|
||||||
|
let w:airline_disabled = 1
|
||||||
let win = winnr()
|
let win = winnr()
|
||||||
setl scrollbind buftype=nowrite bufhidden=wipe noswapfile nobuflisted
|
setl scrollbind buftype=nowrite bufhidden=wipe noswapfile nobuflisted
|
||||||
noa wincmd p
|
noa wincmd p
|
||||||
@@ -901,9 +937,9 @@ fu! <sid>SplitHeaderLine(lines, bang, hor) "{{{3
|
|||||||
if exists("_sbo")
|
if exists("_sbo")
|
||||||
let &sbo = _sbo
|
let &sbo = _sbo
|
||||||
endif
|
endif
|
||||||
setl noscrollbind
|
setl noscrollbind nocursorbind
|
||||||
try
|
try
|
||||||
wincmd c
|
noa wincmd c
|
||||||
catch /^Vim\%((\a\+)\)\=:E444/ " cannot close last window
|
catch /^Vim\%((\a\+)\)\=:E444/ " cannot close last window
|
||||||
catch /^Vim\%((\a\+)\)\=:E517/ " buffer already wiped
|
catch /^Vim\%((\a\+)\)\=:E517/ " buffer already wiped
|
||||||
" no-op
|
" no-op
|
||||||
@@ -959,6 +995,9 @@ fu! <sid>MoveCol(forward, line, ...) "{{{3
|
|||||||
elseif line > line('$')
|
elseif line > line('$')
|
||||||
let line=line('$')
|
let line=line('$')
|
||||||
endif
|
endif
|
||||||
|
if foldclosed(line) != -1
|
||||||
|
let line = line > line('.') ? foldclosedend(line) : foldclosed(line)
|
||||||
|
endif
|
||||||
|
|
||||||
" Generate search pattern
|
" Generate search pattern
|
||||||
if colnr == 1
|
if colnr == 1
|
||||||
@@ -1609,7 +1648,7 @@ fu! <sid>AnalyzeColumn(...) "{{{3
|
|||||||
let qty = len(data)
|
let qty = len(data)
|
||||||
let res = {}
|
let res = {}
|
||||||
for item in data
|
for item in data
|
||||||
if empty(item)
|
if empty(item) || item ==# b:delimiter
|
||||||
let item = 'NULL'
|
let item = 'NULL'
|
||||||
endif
|
endif
|
||||||
if !get(res, item)
|
if !get(res, item)
|
||||||
@@ -1906,7 +1945,7 @@ fu! <sid>CommandDefinitions() "{{{3
|
|||||||
call <sid>LocalCmd("CSVFixed", ':call <sid>InitCSVFixedWidth()', '')
|
call <sid>LocalCmd("CSVFixed", ':call <sid>InitCSVFixedWidth()', '')
|
||||||
call <sid>LocalCmd("NewRecord", ':call <sid>NewRecord(<line1>,
|
call <sid>LocalCmd("NewRecord", ':call <sid>NewRecord(<line1>,
|
||||||
\ <line2>, <q-args>)', '-nargs=? -range')
|
\ <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')
|
\ '-nargs=1')
|
||||||
call <sid>LocalCmd("Duplicates", ':call <sid>CheckDuplicates(<q-args>)',
|
call <sid>LocalCmd("Duplicates", ':call <sid>CheckDuplicates(<q-args>)',
|
||||||
\ '-nargs=1 -complete=custom,<sid>CompleteColumnNr')
|
\ '-nargs=1 -complete=custom,<sid>CompleteColumnNr')
|
||||||
@@ -1993,7 +2032,7 @@ fu! <sid>SaveOptions(list) "{{{3
|
|||||||
return save
|
return save
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
fu! <sid>NewDelimiter(newdelimiter, firstl, lastl) "{{{3
|
||||||
let save = <sid>SaveOptions(['ro', 'ma'])
|
let save = <sid>SaveOptions(['ro', 'ma'])
|
||||||
if exists("b:csv_fixed_width_cols")
|
if exists("b:csv_fixed_width_cols")
|
||||||
call <sid>Warn("NewDelimiter does not work with fixed width column!")
|
call <sid>Warn("NewDelimiter does not work with fixed width column!")
|
||||||
@@ -2005,8 +2044,12 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
|||||||
if &l:ro
|
if &l:ro
|
||||||
setl noro
|
setl noro
|
||||||
endif
|
endif
|
||||||
let line=1
|
let delimiter = a:newdelimiter
|
||||||
while line <= line('$')
|
if a:newdelimiter is '\t'
|
||||||
|
let delimiter="\t"
|
||||||
|
endif
|
||||||
|
let line=a:firstl
|
||||||
|
while line <= a:lastl
|
||||||
" Don't change delimiter for comments
|
" Don't change delimiter for comments
|
||||||
if getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\')
|
if getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\')
|
||||||
let line+=1
|
let line+=1
|
||||||
@@ -2016,7 +2059,7 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
|||||||
" Remove field delimiter
|
" Remove field delimiter
|
||||||
call map(fields, 'substitute(v:val, b: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
|
let line+=1
|
||||||
endwhile
|
endwhile
|
||||||
" reset local buffer options
|
" reset local buffer options
|
||||||
@@ -2024,7 +2067,17 @@ fu! <sid>NewDelimiter(newdelimiter) "{{{3
|
|||||||
call setbufvar('', '&'. key, value)
|
call setbufvar('', '&'. key, value)
|
||||||
endfor
|
endfor
|
||||||
"reinitialize the plugin
|
"reinitialize the plugin
|
||||||
|
if exists("g:csv_delim")
|
||||||
|
let _delim = g:csv_delim
|
||||||
|
endif
|
||||||
|
let g:csv_delim = delimiter
|
||||||
call <sid>Init(1,line('$'))
|
call <sid>Init(1,line('$'))
|
||||||
|
if exists("_delim")
|
||||||
|
let g:csv_delim = _delim
|
||||||
|
else
|
||||||
|
unlet g:csv_delim
|
||||||
|
endif
|
||||||
|
unlet! _delim
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
fu! <sid>IN(list, value) "{{{3
|
fu! <sid>IN(list, value) "{{{3
|
||||||
@@ -2207,6 +2260,23 @@ fu! <sid>Tabularize(bang, first, last) "{{{3
|
|||||||
let adjust_last = 0
|
let adjust_last = 0
|
||||||
call cursor(a:first,0)
|
call cursor(a:first,0)
|
||||||
call <sid>CheckHeaderLine()
|
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")
|
if exists("b:csv_fixed_width_cols")
|
||||||
let cols=copy(b:csv_fixed_width_cols)
|
let cols=copy(b:csv_fixed_width_cols)
|
||||||
let pat = join(map(cols, ' ''\(\%''. v:val. ''c\)'' '), '\|')
|
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
|
" don't clear column width variable, might have been set in the
|
||||||
" plugin!
|
" plugin!
|
||||||
sil call <sid>ArrangeCol(a:first, a:last, 0, -1)
|
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
|
endif
|
||||||
|
|
||||||
if empty(b:col_width)
|
if empty(b:col_width)
|
||||||
call <sid>Warn('An error occured, aborting!')
|
call <sid>Warn('An error occured, aborting!')
|
||||||
return
|
return
|
||||||
endif
|
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
|
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),
|
call <sid>NewDelimiter(s:td.vbar, a:first, a:last+adjust_last)
|
||||||
\ (exists("b:csv_fixed_width_cols") ? pat : b:delimiter ), s:td.vbar)
|
"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
|
" 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,
|
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
|
||||||
\ '^[^'. s:td.vbar. s:td.scol. ']', s:td.vbar.'&')
|
\ '^[^'. 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,
|
exe printf('sil %d,%ds/%s/%s/e', a:first, a:last+adjust_last,
|
||||||
\ '[^'. s:td.vbar. s:td.ecol. ']$', '&'. s:td.vbar)
|
\ '[^'. s:td.vbar. s:td.ecol. ']$', '&'. s:td.vbar)
|
||||||
" Make nice intersection graphs
|
" 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: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)
|
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
|
if s:csv_fold_headerline > 0
|
||||||
"call <sid>NewRecord(s:csv_fold_headerline, s:csv_fold_headerline, 1)
|
|
||||||
call append(a:first + s:csv_fold_headerline, marginline)
|
call append(a:first + s:csv_fold_headerline, marginline)
|
||||||
let adjust_last += 1
|
let adjust_last += 1
|
||||||
endif
|
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
|
if a:bang
|
||||||
exe printf('sil %d,%ds/^%s\zs\n/&%s&/e', a:first + s:csv_fold_headerline, a:last + adjust_last,
|
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
|
endtry
|
||||||
endfun
|
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
|
fu! CSV_CloseBuffer(buffer) "{{{3
|
||||||
" Setup by SetupQuitPre autocommand
|
" Setup by SetupAutoCmd autocommand
|
||||||
try
|
try
|
||||||
if bufnr((a:buffer)+0) > -1
|
if bufnr((a:buffer)+0) > -1
|
||||||
exe a:buffer. "bw"
|
exe a:buffer. "bw"
|
||||||
|
|||||||
@@ -1,154 +0,0 @@
|
|||||||
" Vim ftplugin file
|
|
||||||
" Language: Erlang
|
|
||||||
" Maintainer: Oscar Hellström <oscar@oscarh.net>
|
|
||||||
" URL: http://personal.oscarh.net
|
|
||||||
" Contributor: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
|
||||||
" Version: 2010-09-03
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Usage:
|
|
||||||
"
|
|
||||||
" To enable folding put in your vimrc:
|
|
||||||
" set foldenable
|
|
||||||
"
|
|
||||||
" Folding will make only one fold for a complete function, even though it has
|
|
||||||
" more than one function head and body.
|
|
||||||
"
|
|
||||||
" To change this behaviour put in your vimrc file:
|
|
||||||
" let g:erlangFoldSplitFunction=1
|
|
||||||
"
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Plugin init
|
|
||||||
if exists("b:did_ftplugin")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Don't load any other
|
|
||||||
let b:did_ftplugin=1
|
|
||||||
|
|
||||||
if exists('s:doneFunctionDefinitions')
|
|
||||||
call s:SetErlangOptions()
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
let s:doneFunctionDefinitions=1
|
|
||||||
|
|
||||||
" Local settings
|
|
||||||
function s:SetErlangOptions()
|
|
||||||
compiler erlang
|
|
||||||
if version >= 700
|
|
||||||
setlocal omnifunc=erlangcomplete#Complete
|
|
||||||
endif
|
|
||||||
|
|
||||||
setlocal comments=:%%%,:%%,:%
|
|
||||||
setlocal commentstring=%%s
|
|
||||||
|
|
||||||
setlocal foldmethod=expr
|
|
||||||
setlocal foldexpr=GetErlangFold(v:lnum)
|
|
||||||
setlocal foldtext=ErlangFoldText()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Define folding functions
|
|
||||||
if !exists("*GetErlangFold")
|
|
||||||
" Folding params
|
|
||||||
let s:ErlangFunBegin = '^\a\w*(.*$'
|
|
||||||
let s:ErlangFunEnd = '^[^%]*\.\s*\(%.*\)\?$'
|
|
||||||
let s:ErlangBlankLine = '^\s*\(%.*\)\?$'
|
|
||||||
|
|
||||||
" Auxiliary fold functions
|
|
||||||
function s:GetNextNonBlank(lnum)
|
|
||||||
let lnum = nextnonblank(a:lnum + 1)
|
|
||||||
let line = getline(lnum)
|
|
||||||
while line =~ s:ErlangBlankLine && 0 != lnum
|
|
||||||
let lnum = nextnonblank(lnum + 1)
|
|
||||||
let line = getline(lnum)
|
|
||||||
endwhile
|
|
||||||
return lnum
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function s:GetFunName(str)
|
|
||||||
return matchstr(a:str, '^\a\w*(\@=')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function s:GetFunArgs(str, lnum)
|
|
||||||
let str = a:str
|
|
||||||
let lnum = a:lnum
|
|
||||||
while str !~ '->\s*\(%.*\)\?$'
|
|
||||||
let lnum = s:GetNextNonBlank(lnum)
|
|
||||||
if 0 == lnum " EOF
|
|
||||||
return ""
|
|
||||||
endif
|
|
||||||
let str .= getline(lnum)
|
|
||||||
endwhile
|
|
||||||
return matchstr(str,
|
|
||||||
\ '\(^(\s*\)\@<=.*\(\s*)\(\s\+when\s\+.*\)\?\s\+->\s*\(%.*\)\?$\)\@=')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function s:CountFunArgs(arguments)
|
|
||||||
let pos = 0
|
|
||||||
let ac = 0 " arg count
|
|
||||||
let arguments = a:arguments
|
|
||||||
|
|
||||||
" Change list / tuples into just one A(rgument)
|
|
||||||
let erlangTuple = '{\([A-Za-z_,|=\-\[\]]\|\s\)*}'
|
|
||||||
let erlangList = '\[\([A-Za-z_,|=\-{}]\|\s\)*\]'
|
|
||||||
|
|
||||||
" FIXME: Use searchpair?
|
|
||||||
while arguments =~ erlangTuple
|
|
||||||
let arguments = substitute(arguments, erlangTuple, "A", "g")
|
|
||||||
endwhile
|
|
||||||
" FIXME: Use searchpair?
|
|
||||||
while arguments =~ erlangList
|
|
||||||
let arguments = substitute(arguments, erlangList, "A", "g")
|
|
||||||
endwhile
|
|
||||||
|
|
||||||
let len = strlen(arguments)
|
|
||||||
while pos < len && pos > -1
|
|
||||||
let ac += 1
|
|
||||||
let pos = matchend(arguments, ',\s*', pos)
|
|
||||||
endwhile
|
|
||||||
return ac
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Main fold function
|
|
||||||
function GetErlangFold(lnum)
|
|
||||||
let lnum = a:lnum
|
|
||||||
let line = getline(lnum)
|
|
||||||
|
|
||||||
if line =~ s:ErlangFunEnd
|
|
||||||
return '<1'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if line =~ s:ErlangFunBegin && foldlevel(lnum - 1) == 1
|
|
||||||
if exists("g:erlangFoldSplitFunction") && g:erlangFoldSplitFunction
|
|
||||||
return '>1'
|
|
||||||
else
|
|
||||||
return '1'
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if line =~ s:ErlangFunBegin
|
|
||||||
return '>1'
|
|
||||||
endif
|
|
||||||
|
|
||||||
return '='
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Erlang fold description (foldtext function)
|
|
||||||
function ErlangFoldText()
|
|
||||||
let foldlen = v:foldend - v:foldstart
|
|
||||||
if 1 < foldlen
|
|
||||||
let lines = "lines"
|
|
||||||
else
|
|
||||||
let lines = "line"
|
|
||||||
endif
|
|
||||||
let line = getline(v:foldstart)
|
|
||||||
let name = s:GetFunName(line)
|
|
||||||
let arguments = s:GetFunArgs(strpart(line, strlen(name)), v:foldstart)
|
|
||||||
let argcount = s:CountFunArgs(arguments)
|
|
||||||
let retval = "+" . v:folddashes . " " . name . "/" . argcount
|
|
||||||
let retval .= " (" . foldlen . " " . lines . ")"
|
|
||||||
return retval
|
|
||||||
endfunction
|
|
||||||
endif
|
|
||||||
|
|
||||||
call s:SetErlangOptions()
|
|
||||||
@@ -1,295 +0,0 @@
|
|||||||
" Erlang refactor file
|
|
||||||
" Language: Erlang
|
|
||||||
" Maintainer: Pawel 'kTT' Salata <rockplayer.pl@gmail.com>
|
|
||||||
" URL: http://ktototaki.info
|
|
||||||
|
|
||||||
if exists("b:did_ftplugin_erlang")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Don't load any other
|
|
||||||
let b:did_ftplugin_erlang=1
|
|
||||||
|
|
||||||
if !exists('g:erlangRefactoring') || g:erlangRefactoring == 0
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !exists('g:erlangWranglerPath')
|
|
||||||
let g:erlangWranglerPath = '/usr/share/wrangler/'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if glob(g:erlangWranglerPath) == ""
|
|
||||||
call confirm("Wrong path to wrangler dir")
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
autocmd VimLeavePre * call StopWranglerServer()
|
|
||||||
|
|
||||||
let s:erlangServerName = "wrangler_vim"
|
|
||||||
|
|
||||||
" Starting background erlang session with wrangler on
|
|
||||||
function! StartWranglerServer()
|
|
||||||
let wranglerEbinDir = g:erlangWranglerPath . "/ebin"
|
|
||||||
let command = "erl_call -s -sname " . s:erlangServerName . " -x 'erl -pa " . wranglerEbinDir . "'"
|
|
||||||
call system(command)
|
|
||||||
call s:send_rpc('application', 'start', '[wrangler_app]')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Stopping erlang session
|
|
||||||
function! StopWranglerServer()
|
|
||||||
echo s:send_rpc('erlang', 'halt', '')
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Sending rpc call to erlang session
|
|
||||||
function! s:send_rpc(module, fun, args)
|
|
||||||
let command = "erl_call -sname " . s:erlangServerName . " -a '" . a:module . " " . a:fun . " " . a:args . "'"
|
|
||||||
let result = system(command)
|
|
||||||
if match(result, 'erl_call: failed to connect to node .*') != -1
|
|
||||||
call StartWranglerServer()
|
|
||||||
return system(command)
|
|
||||||
endif
|
|
||||||
return result
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ErlangUndo()
|
|
||||||
echo s:send_rpc("wrangler_undo_server", "undo", "[]")
|
|
||||||
:e!
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:trim(text)
|
|
||||||
return substitute(a:text, "^\\s\\+\\|\\s\\+$", "", "g")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! s:get_msg(result, tuple_start)
|
|
||||||
let msg_begin = '{' . a:tuple_start . ','
|
|
||||||
let matching_start = match(a:result, msg_begin)
|
|
||||||
if matching_start != -1
|
|
||||||
return s:trim(matchstr(a:result, '[^}]*', matching_start + strlen(msg_begin)))
|
|
||||||
endif
|
|
||||||
return ""
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Check if there is an error in result
|
|
||||||
function! s:check_for_error(result)
|
|
||||||
let msg = s:get_msg(a:result, 'ok')
|
|
||||||
if msg != ""
|
|
||||||
return [0, msg]
|
|
||||||
endif
|
|
||||||
let msg = s:get_msg(a:result, 'warning')
|
|
||||||
if msg != ""
|
|
||||||
return [1, msg]
|
|
||||||
endif
|
|
||||||
let msg = s:get_msg(a:result, 'error')
|
|
||||||
if msg != ""
|
|
||||||
return [2, msg]
|
|
||||||
endif
|
|
||||||
return [-1, ""]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Sending apply changes to file
|
|
||||||
function! s:send_confirm()
|
|
||||||
let choice = confirm("What do you want?", "&Preview\n&Confirm\nCa&ncel", 0)
|
|
||||||
if choice == 1
|
|
||||||
echo "TODO: Display preview :)"
|
|
||||||
elseif choice == 2
|
|
||||||
let module = 'wrangler_preview_server'
|
|
||||||
let fun = 'commit'
|
|
||||||
let args = '[]'
|
|
||||||
return s:send_rpc(module, fun, args)
|
|
||||||
else
|
|
||||||
let module = 'wrangler_preview_server'
|
|
||||||
let fun = 'abort'
|
|
||||||
let args = '[]'
|
|
||||||
return s:send_rpc(module, fun, args)
|
|
||||||
echo "Canceled"
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Manually send confirm, for testing purpose only
|
|
||||||
function! SendConfirm()
|
|
||||||
echo s:send_confirm()
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Format and send function extracton call
|
|
||||||
function! s:call_extract(start_line, start_col, end_line, end_col, name)
|
|
||||||
let file = expand("%:p")
|
|
||||||
let module = 'wrangler'
|
|
||||||
let fun = 'fun_extraction'
|
|
||||||
let args = '["' . file . '", {' . a:start_line . ', ' . a:start_col . '}, {' . a:end_line . ', ' . a:end_col . '}, "' . a:name . '", ' . &sw . ']'
|
|
||||||
let result = s:send_rpc(module, fun, args)
|
|
||||||
let [error_code, msg] = s:check_for_error(result)
|
|
||||||
if error_code != 0
|
|
||||||
call confirm(msg)
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
echo "This files will be changed: " . matchstr(msg, "[^]]*", 1)
|
|
||||||
echo s:send_confirm()
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ErlangExtractFunction(mode) range
|
|
||||||
silent w!
|
|
||||||
let name = inputdialog("New function name: ")
|
|
||||||
if name != ""
|
|
||||||
if a:mode == "v"
|
|
||||||
let start_pos = getpos("'<")
|
|
||||||
let start_line = start_pos[1]
|
|
||||||
let start_col = start_pos[2]
|
|
||||||
|
|
||||||
let end_pos = getpos("'>")
|
|
||||||
let end_line = end_pos[1]
|
|
||||||
let end_col = end_pos[2]
|
|
||||||
elseif a:mode == "n"
|
|
||||||
let pos = getpos(".")
|
|
||||||
let start_line = pos[1]
|
|
||||||
let start_col = pos[2]
|
|
||||||
let end_line = pos[1]
|
|
||||||
let end_col = pos[2]
|
|
||||||
else
|
|
||||||
echo "Mode not supported."
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
if s:call_extract(start_line, start_col, end_line, end_col, name)
|
|
||||||
let temp = &autoread
|
|
||||||
set autoread
|
|
||||||
:e
|
|
||||||
if temp == 0
|
|
||||||
set noautoread
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
echo "Empty function name. Ignoring."
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
nmap <A-r>e :call ErlangExtractFunction("n")<ENTER>
|
|
||||||
vmap <A-r>e :call ErlangExtractFunction("v")<ENTER>
|
|
||||||
|
|
||||||
function! s:call_rename(mode, line, col, name, search_path)
|
|
||||||
let file = expand("%:p")
|
|
||||||
let module = 'wrangler'
|
|
||||||
let fun = 'rename_' . a:mode
|
|
||||||
let args = '["' . file .'", '
|
|
||||||
if a:mode != "mod"
|
|
||||||
let args = args . a:line . ', ' . a:col . ', '
|
|
||||||
endif
|
|
||||||
let args = args . '"' . a:name . '", ["' . a:search_path . '"], ' . &sw . ']'
|
|
||||||
let result = s:send_rpc(module, fun, args)
|
|
||||||
let [error_code, msg] = s:check_for_error(result)
|
|
||||||
if error_code != 0
|
|
||||||
call confirm(msg)
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
echo "This files will be changed: " . matchstr(msg, "[^]]*", 1)
|
|
||||||
echo s:send_confirm()
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ErlangRename(mode)
|
|
||||||
silent w!
|
|
||||||
if a:mode == "mod"
|
|
||||||
let name = inputdialog('Rename module to: ')
|
|
||||||
else
|
|
||||||
let name = inputdialog('Rename "' . expand("<cword>") . '" to: ')
|
|
||||||
endif
|
|
||||||
if name != ""
|
|
||||||
let search_path = expand("%:p:h")
|
|
||||||
"let search_path = inputdialog('Search path: ', expand("%:p:h"))
|
|
||||||
let pos = getpos(".")
|
|
||||||
let line = pos[1]
|
|
||||||
let col = pos[2]
|
|
||||||
let current_filename = expand("%")
|
|
||||||
let current_filepath = expand("%:p")
|
|
||||||
let new_filename = name . '.erl'
|
|
||||||
if s:call_rename(a:mode, line, col, name, search_path)
|
|
||||||
if a:mode == "mod"
|
|
||||||
execute ':bd ' . current_filename
|
|
||||||
execute ':e ' . new_filename
|
|
||||||
silent execute '!mv ' . current_filepath . ' ' . current_filepath . '.bak'
|
|
||||||
redraw!
|
|
||||||
else
|
|
||||||
let temp = &autoread
|
|
||||||
set autoread
|
|
||||||
:e
|
|
||||||
if temp == 0
|
|
||||||
set noautoread
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
echo "Empty name. Ignoring."
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ErlangRenameFunction()
|
|
||||||
call ErlangRename("fun")
|
|
||||||
endfunction
|
|
||||||
map <A-r>f :call ErlangRenameFunction()<ENTER>
|
|
||||||
|
|
||||||
function! ErlangRenameVariable()
|
|
||||||
call ErlangRename("var")
|
|
||||||
endfunction
|
|
||||||
map <A-r>v :call ErlangRenameVariable()<ENTER>
|
|
||||||
|
|
||||||
function! ErlangRenameModule()
|
|
||||||
call ErlangRename("mod")
|
|
||||||
endfunction
|
|
||||||
map <A-r>m :call ErlangRenameModule()<ENTER>
|
|
||||||
|
|
||||||
function! ErlangRenameProcess()
|
|
||||||
call ErlangRename("process")
|
|
||||||
endfunction
|
|
||||||
map <A-r>p :call ErlangRenameProcess()<ENTER>
|
|
||||||
|
|
||||||
function! s:call_tuple_fun_args(start_line, start_col, end_line, end_col, search_path)
|
|
||||||
let file = expand("%:p")
|
|
||||||
let module = 'wrangler'
|
|
||||||
let fun = 'tuple_funpar'
|
|
||||||
let args = '["' . file . '", {' . a:start_line . ', ' . a:start_col . '}, {' . a:end_line . ', ' . a:end_col . '}, ["' . a:search_path . '"], ' . &sw . ']'
|
|
||||||
let result = s:send_rpc(module, fun, args)
|
|
||||||
if s:check_for_error(result)
|
|
||||||
return 0
|
|
||||||
endif
|
|
||||||
call s:send_confirm()
|
|
||||||
return 1
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! ErlangTupleFunArgs(mode)
|
|
||||||
silent w!
|
|
||||||
let search_path = expand("%:p:h")
|
|
||||||
"let search_path = inputdialog('Search path: ', expand("%:p:h"))
|
|
||||||
if a:mode == "v"
|
|
||||||
let start_pos = getpos("'<")
|
|
||||||
let start_line = start_pos[1]
|
|
||||||
let start_col = start_pos[2]
|
|
||||||
|
|
||||||
let end_pos = getpos("'>")
|
|
||||||
let end_line = end_pos[1]
|
|
||||||
let end_col = end_pos[2]
|
|
||||||
if s:call_tuple_fun_args(start_line, start_col, end_line, end_col, search_path)
|
|
||||||
let temp = &autoread
|
|
||||||
set autoread
|
|
||||||
:e
|
|
||||||
if temp == 0
|
|
||||||
set noautoread
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
elseif a:mode == "n"
|
|
||||||
let pos = getpos(".")
|
|
||||||
let line = pos[1]
|
|
||||||
let col = pos[2]
|
|
||||||
if s:call_tuple_fun_args(line, col, line, col, search_path)
|
|
||||||
let temp = &autoread
|
|
||||||
set autoread
|
|
||||||
:e
|
|
||||||
if temp == 0
|
|
||||||
set noautoread
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
echo "Mode not supported."
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
nmap <A-r>t :call ErlangTupleFunArgs("n")<ENTER>
|
|
||||||
vmap <A-r>t :call ErlangTupleFunArgs("v")<ENTER>
|
|
||||||
|
|
||||||
" vim: set foldmethod=marker:
|
|
||||||
@@ -30,7 +30,7 @@ function! LatexBox_GetMainFileName(...)
|
|||||||
" move up the directory tree until we find a .latexmain file.
|
" 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
|
" TODO: Should we be doing this recursion by default, or should there be a
|
||||||
" setting?
|
" setting?
|
||||||
while glob('*.latexmain') == ''
|
while glob('*.latexmain',1) == ''
|
||||||
let dirmodifier = dirmodifier.':h'
|
let dirmodifier = dirmodifier.':h'
|
||||||
let dirNew = fnameescape(expand(dirmodifier))
|
let dirNew = fnameescape(expand(dirmodifier))
|
||||||
" break from the loop if we cannot go up any further.
|
" break from the loop if we cannot go up any further.
|
||||||
@@ -41,7 +41,7 @@ function! LatexBox_GetMainFileName(...)
|
|||||||
exe 'cd '.dirLast
|
exe 'cd '.dirLast
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
let lheadfile = glob('*.latexmain')
|
let lheadfile = glob('*.latexmain',1)
|
||||||
if lheadfile != ''
|
if lheadfile != ''
|
||||||
" Remove the trailing .latexmain part of the filename... We never want
|
" Remove the trailing .latexmain part of the filename... We never want
|
||||||
" that.
|
" that.
|
||||||
|
|||||||
@@ -443,10 +443,32 @@ function! LatexBox_LatexErrors(status, ...)
|
|||||||
endif
|
endif
|
||||||
endfunction
|
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)
|
function! s:log_contains_error(file)
|
||||||
let lines = readfile(a:file)
|
let lines = readfile(a:file)
|
||||||
let lines = filter(lines, 'v:val =~ ''^.*:\d\+: ''')
|
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))')
|
let lines = filter(lines, 'filereadable(fnameescape(v:val))')
|
||||||
return len(lines) > 0
|
return len(lines) > 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
@@ -5,31 +5,31 @@ if exists("g:LatexBox_no_mappings")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" latexmk {{{
|
" latexmk {{{
|
||||||
map <buffer> <LocalLeader>ll :Latexmk<CR>
|
noremap <buffer> <LocalLeader>ll :Latexmk<CR>
|
||||||
map <buffer> <LocalLeader>lL :Latexmk!<CR>
|
noremap <buffer> <LocalLeader>lL :Latexmk!<CR>
|
||||||
map <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
noremap <buffer> <LocalLeader>lc :LatexmkClean<CR>
|
||||||
map <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
noremap <buffer> <LocalLeader>lC :LatexmkClean!<CR>
|
||||||
map <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
noremap <buffer> <LocalLeader>lg :LatexmkStatus<CR>
|
||||||
map <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
noremap <buffer> <LocalLeader>lG :LatexmkStatus!<CR>
|
||||||
map <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
noremap <buffer> <LocalLeader>lk :LatexmkStop<CR>
|
||||||
map <buffer> <LocalLeader>le :LatexErrors<CR>
|
noremap <buffer> <LocalLeader>le :LatexErrors<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" View {{{
|
" View {{{
|
||||||
map <buffer> <LocalLeader>lv :LatexView<CR>
|
noremap <buffer> <LocalLeader>lv :LatexView<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" TOC {{{
|
" TOC {{{
|
||||||
map <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
noremap <silent> <buffer> <LocalLeader>lt :LatexTOC<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" List of labels {{{
|
" List of labels {{{
|
||||||
map <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
noremap <silent> <buffer> <LocalLeader>lj :LatexLabels<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Folding {{{
|
" Folding {{{
|
||||||
if g:LatexBox_Folding == 1
|
if g:LatexBox_Folding == 1
|
||||||
map <buffer> <LocalLeader>lf :LatexFold<CR>
|
noremap <buffer> <LocalLeader>lf :LatexFold<CR>
|
||||||
endif
|
endif
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
@@ -44,12 +44,12 @@ endif
|
|||||||
" Define text objects {{{
|
" Define text objects {{{
|
||||||
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
|
vmap <buffer> ie <Plug>LatexBox_SelectCurrentEnvInner
|
||||||
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
|
vmap <buffer> ae <Plug>LatexBox_SelectCurrentEnvOuter
|
||||||
omap <buffer> ie :normal vie<CR>
|
onoremap <buffer> ie :normal vie<CR>
|
||||||
omap <buffer> ae :normal vae<CR>
|
onoremap <buffer> ae :normal vae<CR>
|
||||||
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
|
vmap <buffer> i$ <Plug>LatexBox_SelectInlineMathInner
|
||||||
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
|
vmap <buffer> a$ <Plug>LatexBox_SelectInlineMathOuter
|
||||||
omap <buffer> i$ :normal vi$<CR>
|
onoremap <buffer> i$ :normal vi$<CR>
|
||||||
omap <buffer> a$ :normal va$<CR>
|
onoremap <buffer> a$ :normal va$<CR>
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Jump between sections {{{
|
" Jump between sections {{{
|
||||||
|
|||||||
34
ftplugin/ps1.vim
Normal file
34
ftplugin/ps1.vim
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: Windows PowerShell
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327
|
||||||
|
|
||||||
|
" Only do this when not done yet for this buffer
|
||||||
|
if exists("b:did_ftplugin") | finish | endif
|
||||||
|
|
||||||
|
" Don't load another plug-in for this buffer
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setlocal tw=0
|
||||||
|
setlocal commentstring=#%s
|
||||||
|
setlocal formatoptions=tcqro
|
||||||
|
" Enable autocompletion of hyphenated PowerShell commands,
|
||||||
|
" e.g. Get-Content or Get-ADUser
|
||||||
|
setlocal iskeyword+=-
|
||||||
|
|
||||||
|
" Change the browse dialog on Win32 to show mainly PowerShell-related files
|
||||||
|
if has("gui_win32")
|
||||||
|
let b:browsefilter =
|
||||||
|
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
|
||||||
|
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
|
||||||
|
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
|
||||||
|
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Undo the stuff we changed
|
||||||
|
let b:undo_ftplugin = "setlocal tw< cms< fo<" .
|
||||||
|
\ " | unlet! b:browsefilter"
|
||||||
|
|
||||||
31
ftplugin/ps1xml.vim
Normal file
31
ftplugin/ps1xml.vim
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: Windows PowerShell
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327
|
||||||
|
|
||||||
|
" Only do this when not done yet for this buffer
|
||||||
|
if exists("b:did_ftplugin") | finish | endif
|
||||||
|
|
||||||
|
" Don't load another plug-in for this buffer
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setlocal tw=0
|
||||||
|
setlocal commentstring=#%s
|
||||||
|
setlocal formatoptions=tcqro
|
||||||
|
|
||||||
|
" Change the browse dialog on Win32 to show mainly PowerShell-related files
|
||||||
|
if has("gui_win32")
|
||||||
|
let b:browsefilter =
|
||||||
|
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
|
||||||
|
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
|
||||||
|
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
|
||||||
|
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
|
||||||
|
\ "All Files (*.*)\t*.*\n"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Undo the stuff we changed
|
||||||
|
let b:undo_ftplugin = "setlocal tw< cms< fo<" .
|
||||||
|
\ " | unlet! b:browsefilter"
|
||||||
|
|
||||||
35
ftplugin/toml.vim
Normal file
35
ftplugin/toml.vim
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
" File: ftplugin/toml.vim
|
||||||
|
" Author: Kevin Ballard <kevin@sb.org>
|
||||||
|
" Description: FileType Plugin for Toml
|
||||||
|
" Last Change: Dec 09, 2014
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" Add NERDCommenter delimiters
|
||||||
|
|
||||||
|
let s:delims = { 'left': '#' }
|
||||||
|
if exists('g:NERDDelimiterMap')
|
||||||
|
if !has_key(g:NERDDelimiterMap, 'toml')
|
||||||
|
let g:NERDDelimiterMap.toml = s:delims
|
||||||
|
endif
|
||||||
|
elseif exists('g:NERDCustomDelimiters')
|
||||||
|
if !has_key(g:NERDCustomDelimiters, 'toml')
|
||||||
|
let g:NERDCustomDelimiters.toml = s:delims
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let g:NERDCustomDelimiters = { 'toml': s:delims }
|
||||||
|
endif
|
||||||
|
unlet s:delims
|
||||||
|
|
||||||
|
let b:undo_ftplugin = ""
|
||||||
|
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" vim: set et sw=4 ts=4:
|
||||||
1616
indent/erlang.vim
1616
indent/erlang.vim
File diff suppressed because it is too large
Load Diff
@@ -443,11 +443,17 @@ function! Fixedgq(lnum, count)
|
|||||||
let l:tw = &tw ? &tw : 80;
|
let l:tw = &tw ? &tw : 80;
|
||||||
|
|
||||||
let l:count = a:count
|
let l:count = a:count
|
||||||
|
let l:first_char = indent(a:lnum) + 1
|
||||||
|
|
||||||
if mode() == 'i' " gq was not pressed, but tw was set
|
if mode() == 'i' " gq was not pressed, but tw was set
|
||||||
return 1
|
return 1
|
||||||
endif
|
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
|
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
|
||||||
return 1
|
return 1
|
||||||
endif
|
endif
|
||||||
|
|||||||
20
indent/ps1.vim
Normal file
20
indent/ps1.vim
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
" Vim indent file
|
||||||
|
" Language: Windows PowerShell
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327"
|
||||||
|
|
||||||
|
" Only load this indent file when no other was loaded.
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
" smartindent is good enough for powershell
|
||||||
|
setlocal smartindent
|
||||||
|
" disable the indent removal for # marks
|
||||||
|
inoremap # X#
|
||||||
|
|
||||||
|
let b:undo_indent = "setl si<"
|
||||||
|
|
||||||
32
indent/vala.vim
Normal file
32
indent/vala.vim
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
" Copyright (c) 2012 Takezoe Tomoaki <tkztmk@outlook.com>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of
|
||||||
|
" this software and associated documentation files (the "Software"), to deal in
|
||||||
|
" the Software without restriction, including without limitation the rights to
|
||||||
|
" use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
" of
|
||||||
|
" the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
" so,
|
||||||
|
" subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in all
|
||||||
|
" copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS
|
||||||
|
" FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
" COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
" IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
" Vim indent file for Vala.
|
||||||
|
" It just sets cindent for Vala files...
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
setl cin
|
||||||
|
let b:undo_indent = "setl cin<"
|
||||||
|
|
||||||
5
indent/velocity.vim
Normal file
5
indent/velocity.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
runtime! indent/html.vim
|
||||||
@@ -106,10 +106,9 @@ fu! <sid>DoHighlight() "{{{3
|
|||||||
\ . s:col . '/ contains=CSVDelimiter'
|
\ . s:col . '/ contains=CSVDelimiter'
|
||||||
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
|
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
|
||||||
\ . s:col . '/ contains=CSVDelimiter'
|
\ . s:col . '/ contains=CSVDelimiter'
|
||||||
|
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%<'. (get(b:, 'csv_headerline', 1)+1).'l'
|
||||||
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
|
|
||||||
\. s:col . '/ contains=CSVDelimiter'
|
\. 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'
|
\. s:col . '/ contains=CSVDelimiter'
|
||||||
else
|
else
|
||||||
for i in range(len(b:csv_fixed_width_cols))
|
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 CSVColumnHeaderOdd WarningMsg
|
||||||
hi def link CSVColumnHeaderEven WarningMsg
|
hi def link CSVColumnHeaderEven WarningMsg
|
||||||
hi def link CSVColumnOdd DiffAdd
|
if get(g:, 'csv_no_column_highlight', 0)
|
||||||
hi def link CSVColumnEven DiffChange
|
hi def link CSVColumnOdd Normal
|
||||||
|
hi def link CSVColumnEven Normal
|
||||||
|
else
|
||||||
|
hi def link CSVColumnOdd DiffAdd
|
||||||
|
hi def link CSVColumnEven DiffChange
|
||||||
|
endif
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" Main: {{{2
|
" Main: {{{2
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ endif
|
|||||||
syntax case ignore
|
syntax case ignore
|
||||||
|
|
||||||
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
|
syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
|
||||||
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s/
|
syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR|COPY)\s/
|
||||||
highlight link dockerfileKeyword Keyword
|
highlight link dockerfileKeyword Keyword
|
||||||
|
|
||||||
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
|
|||||||
syn match elixirComment '#.*' contains=elixirTodo
|
syn match elixirComment '#.*' contains=elixirTodo
|
||||||
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
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 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 cond for if unless try receive send
|
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 exit raise throw after rescue catch else do end
|
||||||
syn keyword elixirKeyword quote unquote super
|
syn keyword elixirKeyword quote unquote super
|
||||||
|
|
||||||
|
|||||||
@@ -1,137 +1,271 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Erlang
|
" Language: Erlang (http://www.erlang.org)
|
||||||
" Maintainer: Oscar Hellstr<74>m <oscar@oscarh.net>
|
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||||
" URL: http://oscar.hellstrom.st
|
" Contributor: Adam Rutkowski <hq@mtod.org>
|
||||||
" Version: 2010-08-09
|
" Last Update: 2013-Nov-23
|
||||||
" ------------------------------------------------------------------------------
|
" License: Vim license
|
||||||
" {{{1
|
" URL: https://github.com/hcs42/vim-erlang
|
||||||
" Options:
|
|
||||||
"
|
" Acknowledgements: This script was originally created by Kresimir Marzic [1].
|
||||||
" Erlang BIFs
|
" The script was then revamped by Csaba Hoch [2]. During the revamp, the new
|
||||||
" g:erlangHighlightBif - highlight erlang built in functions (default: off)
|
" highlighting style and some code was taken from the Erlang syntax script
|
||||||
"
|
" that is part of vimerl [3], created by Oscar Hellström [4] and improved by
|
||||||
" }}}
|
" Ricardo Catalinas Jiménez [5].
|
||||||
" -----------------------------------------------------------------------------
|
|
||||||
|
" [1]: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
|
||||||
|
" [2]: Csaba Hoch <csaba.hoch@gmail.com>
|
||||||
|
" [3]: https://github.com/jimenezrick/vimerl
|
||||||
|
" [4]: Oscar Hellström <oscar@oscarh.net> (http://oscar.hellstrom.st)
|
||||||
|
" [5]: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||||
|
|
||||||
|
" Customization:
|
||||||
|
"
|
||||||
|
" To use the old highlighting style, add this to your .vimrc:
|
||||||
|
"
|
||||||
|
" let g:erlang_old_style_highlight = 1
|
||||||
|
"
|
||||||
|
" To highlight further module attributes, add them to
|
||||||
|
" ~/.vim/after/syntax/erlang.vim:
|
||||||
|
"
|
||||||
|
" syn keyword erlangAttribute myattr1 myattr2 contained
|
||||||
|
|
||||||
" Setup {{{1
|
|
||||||
" For version 5.x: Clear all syntax items
|
" For version 5.x: Clear all syntax items
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
elseif exists("b:current_syntax")
|
elseif exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Erlang is case sensitive
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" Case sensitive
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
" Match groups {{{1
|
if version >= 600
|
||||||
syn match erlangStringModifier /\\./ contained
|
setlocal iskeyword+=$,@-@
|
||||||
syn match erlangStringModifier /\~\%(-\?[0-9*]\+\)\?\%(\.[0-9*]\+\..\?\)\?\%(c\|f\|e\|g\|s\|w\|p\|W\|P\|B\|X\|#\|b\|+\|n\|i\)/ contained
|
endif
|
||||||
syn match erlangModifier /\$\\\?./
|
|
||||||
|
" Comments
|
||||||
syn match erlangInteger /\<\%([0-9]\+#[0-9a-fA-F]\+\|[0-9]\+\)\>/
|
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
|
||||||
syn match erlangFloat /\<[0-9]\+\.[0-9]\+\%(e-\?[0-9]\+\)\?\>/
|
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
|
||||||
|
syn match erlangCommentAnnotation /`[^']*'/ contained
|
||||||
syn keyword erlangTodo TODO FIXME XXX contained
|
syn keyword erlangTodo TODO FIXME XXX contained
|
||||||
syn match erlangComment /%.*$/ contains=@Spell,erlangTodo
|
|
||||||
|
" Numbers (minimum base is 2, maximum is 36.)
|
||||||
syn keyword erlangKeyword band bor bnot bsl bsr bxor div rem xor
|
syn match erlangNumberInteger '\<\d\+\>'
|
||||||
syn keyword erlangKeyword try catch begin receive after cond fun let query
|
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
|
||||||
|
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
|
||||||
syn keyword erlangConditional case if of end
|
|
||||||
syn keyword erlangConditional not and or andalso orelse
|
" Strings, atoms, characters
|
||||||
syn keyword erlangConditional when
|
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
|
||||||
|
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
|
||||||
syn keyword erlangBoolean true false
|
syn match erlangStringModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\|\~\%([ni~]\|\%(-\=\d\+\|\*\)\=\.\=\%(\*\|\d\+\)\=\%(\..\)\=[tl]*[cfegswpWPBX#bx+]\)' contained
|
||||||
|
syn match erlangQuotedAtomModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||||
syn keyword erlangGuard is_list is_alive is_atom is_binary is_bitstring is_boolean is_tuple is_number is_integer is_float is_function is_constant is_pid is_port is_reference is_record is_process_alive
|
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
|
||||||
|
|
||||||
syn match erlangOperator /\/\|*\|+\|-\|++\|--/
|
" Operators, separators
|
||||||
syn match erlangOperator /->\|<-\|||\||\|!\|=/
|
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
|
||||||
syn match erlangOperator /=:=\|==\|\/=\|=\/=\|<\|>\|=<\|>=/
|
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
|
||||||
syn keyword erlangOperator div rem
|
syn match erlangBracket '{\|}\|\[\|]\||\|||'
|
||||||
|
syn match erlangPipe '|'
|
||||||
syn region erlangString start=/"/ end=/"/ skip=/\\/ contains=@Spell,erlangStringModifier
|
syn match erlangRightArrow '->'
|
||||||
|
|
||||||
syn match erlangVariable /\<[A-Z_]\w*\>/
|
" Atoms, function calls (order is important)
|
||||||
syn match erlangAtom /\%(\%(^-\)\|#\)\@<!\<[a-z][A-Za-z0-9_]*\>\%(\s*[(:]\)\@!/
|
syn match erlangAtom '\<\l[[:alnum:]_@]*' contains=erlangBoolean
|
||||||
syn match erlangAtom /\\\@<!'[^']*\\\@<!'/
|
syn keyword erlangBoolean true false contained
|
||||||
|
syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
|
||||||
syn match erlangRecord /#\w\+/
|
syn match erlangLocalFuncRef '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
|
||||||
|
syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment
|
||||||
syn match erlangTuple /{\|}/
|
syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
|
||||||
syn match erlangList /\[\|\]/
|
|
||||||
|
" Variables, macros, records, maps
|
||||||
syn match erlangAttribute /^-\%(vsn\|author\|copyright\|compile\|deprecated\|module\|export\|import\|behaviour\|export_type\|ignore_xref\) *(\@=/
|
syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
|
||||||
syn match erlangInclude /^-include\%(_lib\)\?\s*(\@=/
|
syn match erlangMacro '??\=[[:alnum:]_@]\+'
|
||||||
syn match erlangRecordDef /^-record\s*(\@=/
|
syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+'
|
||||||
syn match erlangDefine /^-\%(define\|undef\)\s*(\@=/
|
syn match erlangMap '#'
|
||||||
syn match erlangPreCondit /^-\%(ifdef\|ifndef\|else\|endif\)\%(\s*(\@=\)\?/
|
syn match erlangRecord '#\s*\l[[:alnum:]_@]*'
|
||||||
|
|
||||||
syn match erlangType /^-\%(spec\|type\)[( ]\@=/
|
" Shebang (this line has to be after the ErlangMap)
|
||||||
|
syn match erlangShebang '^#!.*'
|
||||||
syn match erlangMacro /\%(-define(\)\@<=\w\+/
|
|
||||||
syn match erlangMacro /?\w\+/
|
" Bitstrings
|
||||||
|
syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
|
||||||
syn match erlangBitType /\%(\/\|-\)\@<=\%(bits\|bitstring\|binary\|integer\|float\|unit\)\>/
|
|
||||||
syn match erlangBitSize /:\@<=[0-9]\+/
|
" Constants and Directives
|
||||||
|
syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
|
||||||
syn match erlangBinary /<<\|>>/
|
syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\)\>' contains=erlangComment
|
||||||
|
syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
|
||||||
" BIFS
|
syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
|
||||||
syn match erlangBIF /\%([^:0-9A-Za-z_]\|\<erlang:\)\@<=\%(abs\|apply\|atom_to_list\|binary_part\|binary_to_list\|binary_to_term\|binary_to_atom\|binary_to_existing_atom\|bitstring_to_list\|check_process_code\|concat_binary\|date\|delete_module\|disconnect_node\|element\|erase\|error\|exit\|float\|float_to_list\|garbage_collect\|get\|get_keys\|group_leader\|halt\|hd\|integer_to_list\|iolist_to_binary\|iolist_size\|length\|link\|list_to_atom\|list_to_binary\|list_to_bitstring\|list_to_existing_atom\|list_to_float\|list_to_integer\|list_to_pid\|list_to_tuple\|load_module\|make_ref\|monitor_node\|node\|nodes\|now\|open_port\|pid_to_list\|port_close\|port_command\|port_connect\|port_control\|pre_loaded\|process_flag\|process_info\|processes\|purge_module\|put\|register\|registered\|round\|self\|setelement\|size\|bit_size\|byte_size\|spawn\|spawn_link\|spawn_opt\|split_binary\|statistics\|term_to_binary\|throw\|time\|tl\|trunc\|tuple_to_list\|unlink\|unregister\|whereis\)\((\|\/[0-9]\)\@=/
|
syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
|
||||||
syn match erlangBIF /\<\%(erlang:\)\@<=\%(append_element\|bump_reductions\|cancel_timer\|decode_packet\|demonitor\|display\|fault\|fun_info\|fun_to_list\|function_exported\|get_cookie\|get_stacktrace\|hash\|hibernate\|info\|is_builtin\|loaded\|localtime\|localtime_to_universaltime\|localtime_to_universaltime\|make_tuple\|md5\|md5_init\|md5_update\|memory\|monitor\|monitor_node\|phash\|phash2\|port_call\|port_info\|port_to_list\|ports\|process_display\|raise\|read_timer\|ref_to_list\|resume_process\|send\|send_after\|send_nosuspend\|set_cookie\|spawn_monitor\|start_timer\|suspend_process\|system_flag\|system_info\|system_monitor\|trace\|trace_delivered\|trace_info\|trace_pattern\|universaltime\|universaltime_to_localtime\|yield\)(\@=/
|
syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
|
||||||
syn match erlangGBIF /erlang\(:\w\)\@=/
|
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
|
||||||
" }}}
|
|
||||||
|
" Keywords
|
||||||
" Link Erlang stuff to Vim groups {{{1
|
syn keyword erlangKeyword after begin case catch cond end fun if let of
|
||||||
hi link erlangTodo Todo
|
syn keyword erlangKeyword receive when try
|
||||||
hi link erlangString String
|
|
||||||
hi link erlangNoSpellString String
|
" Build-in-functions (BIFs)
|
||||||
hi link erlangModifier SpecialChar
|
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained
|
||||||
hi link erlangStringModifier SpecialChar
|
syn keyword erlangBIF binary_part binary_to_atom contained
|
||||||
hi link erlangComment Comment
|
syn keyword erlangBIF binary_to_existing_atom binary_to_float contained
|
||||||
hi link erlangVariable Identifier
|
syn keyword erlangBIF binary_to_integer bitstring_to_list contained
|
||||||
hi link erlangInclude Include
|
syn keyword erlangBIF binary_to_list binary_to_term bit_size contained
|
||||||
hi link erlangRecordDef Keyword
|
syn keyword erlangBIF byte_size check_old_code check_process_code contained
|
||||||
hi link erlangAttribute Keyword
|
syn keyword erlangBIF concat_binary date delete_module demonitor contained
|
||||||
hi link erlangKeyword Keyword
|
syn keyword erlangBIF disconnect_node element erase error exit contained
|
||||||
hi link erlangMacro Macro
|
syn keyword erlangBIF float float_to_binary float_to_list contained
|
||||||
hi link erlangDefine Define
|
syn keyword erlangBIF garbage_collect get get_keys group_leader contained
|
||||||
hi link erlangPreCondit PreCondit
|
syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
|
||||||
hi link erlangPreProc PreProc
|
syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
|
||||||
hi link erlangDelimiter Delimiter
|
syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
|
||||||
hi link erlangBitDelimiter Normal
|
syn keyword erlangBIF is_float is_function is_integer is_list contained
|
||||||
hi link erlangOperator Operator
|
syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
|
||||||
hi link erlangConditional Conditional
|
syn keyword erlangBIF is_record is_reference is_tuple length link contained
|
||||||
hi link erlangGuard Conditional
|
syn keyword erlangBIF list_to_atom list_to_binary contained
|
||||||
hi link erlangBoolean Boolean
|
syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained
|
||||||
hi link erlangAtom Constant
|
syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained
|
||||||
hi link erlangRecord Structure
|
syn keyword erlangBIF list_to_tuple load_module make_ref max min contained
|
||||||
hi link erlangInteger Number
|
syn keyword erlangBIF module_loaded monitor monitor_node node contained
|
||||||
hi link erlangFloat Number
|
syn keyword erlangBIF nodes now open_port pid_to_list port_close contained
|
||||||
hi link erlangFloat Number
|
syn keyword erlangBIF port_command port_connect pre_loaded contained
|
||||||
hi link erlangFloat Number
|
syn keyword erlangBIF process_flag process_flag process_info contained
|
||||||
hi link erlangFloat Number
|
syn keyword erlangBIF process purge_module put register registered contained
|
||||||
hi link erlangHex Number
|
syn keyword erlangBIF round self setelement size spawn spawn_link contained
|
||||||
hi link erlangBIF Keyword
|
syn keyword erlangBIF spawn_monitor spawn_opt split_binary contained
|
||||||
hi link erlangFun Keyword
|
syn keyword erlangBIF statistics term_to_binary throw time tl contained
|
||||||
hi link erlangList Delimiter
|
syn keyword erlangBIF trunc tuple_size tuple_to_list unlink contained
|
||||||
hi link erlangTuple Delimiter
|
syn keyword erlangBIF unregister whereis contained
|
||||||
hi link erlangBinary Keyword
|
|
||||||
hi link erlangBitVariable Identifier
|
" Sync at the beginning of functions: if this is not used, multiline string
|
||||||
hi link erlangBitType Type
|
" are not always recognized, and the indentation script cannot use the
|
||||||
hi link erlangType Type
|
" "searchpair" (because it would not always skip strings and comments when
|
||||||
hi link erlangBitSize Number
|
" looking for keywords and opening parens/brackets).
|
||||||
" }}}
|
syn sync match erlangSync grouphere NONE "^[a-z]\s*("
|
||||||
|
let b:erlang_syntax_synced = 1
|
||||||
" Optional linkings {{{1
|
|
||||||
if exists("g:erlangHighlightBif") && g:erlangHighlightBif
|
" Define the default highlighting. See ":help group-name" for the groups and
|
||||||
hi link erlangGBIF Keyword
|
" their colors.
|
||||||
|
|
||||||
|
let s:old_style = (exists("g:erlang_old_style_highlight") &&
|
||||||
|
\g:erlang_old_style_highlight == 1)
|
||||||
|
|
||||||
|
" 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
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
HiLink erlangComment Comment
|
||||||
|
HiLink erlangCommentAnnotation Special
|
||||||
|
HiLink erlangTodo Todo
|
||||||
|
HiLink erlangShebang Comment
|
||||||
|
|
||||||
|
" Numbers
|
||||||
|
HiLink erlangNumberInteger Number
|
||||||
|
HiLink erlangNumberFloat Float
|
||||||
|
|
||||||
|
" Strings, atoms, characters
|
||||||
|
HiLink erlangString String
|
||||||
|
|
||||||
|
if s:old_style
|
||||||
|
HiLink erlangQuotedAtom Type
|
||||||
|
else
|
||||||
|
HiLink erlangQuotedAtom String
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink erlangStringModifier Special
|
||||||
|
HiLink erlangQuotedAtomModifier Special
|
||||||
|
HiLink erlangModifier Special
|
||||||
|
|
||||||
|
" Operators, separators
|
||||||
|
HiLink erlangOperator Operator
|
||||||
|
HiLink erlangRightArrow Operator
|
||||||
|
if s:old_style
|
||||||
|
HiLink erlangBracket Normal
|
||||||
|
HiLink erlangPipe Normal
|
||||||
|
else
|
||||||
|
HiLink erlangBracket Delimiter
|
||||||
|
HiLink erlangPipe Delimiter
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Atoms, functions, variables, macros
|
||||||
|
if s:old_style
|
||||||
|
HiLink erlangAtom Normal
|
||||||
|
HiLink erlangLocalFuncCall Normal
|
||||||
|
HiLink erlangLocalFuncRef Normal
|
||||||
|
HiLink erlangGlobalFuncCall Function
|
||||||
|
HiLink erlangGlobalFuncRef Function
|
||||||
|
HiLink erlangVariable Normal
|
||||||
|
HiLink erlangMacro Normal
|
||||||
|
HiLink erlangRecord Normal
|
||||||
|
HiLink erlangMap Normal
|
||||||
|
else
|
||||||
|
HiLink erlangAtom String
|
||||||
|
HiLink erlangLocalFuncCall Normal
|
||||||
|
HiLink erlangLocalFuncRef Normal
|
||||||
|
HiLink erlangGlobalFuncCall Normal
|
||||||
|
HiLink erlangGlobalFuncRef Normal
|
||||||
|
HiLink erlangVariable Identifier
|
||||||
|
HiLink erlangMacro Macro
|
||||||
|
HiLink erlangRecord Structure
|
||||||
|
HiLink erlangMap Structure
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Bitstrings
|
||||||
|
if !s:old_style
|
||||||
|
HiLink erlangBitType Type
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Constants and Directives
|
||||||
|
if s:old_style
|
||||||
|
HiLink erlangAttribute Type
|
||||||
|
HiLink erlangMacroDef Type
|
||||||
|
HiLink erlangUnknownAttribute Normal
|
||||||
|
HiLink erlangInclude Type
|
||||||
|
HiLink erlangRecordDef Type
|
||||||
|
HiLink erlangDefine Type
|
||||||
|
HiLink erlangPreCondit Type
|
||||||
|
HiLink erlangType Type
|
||||||
|
else
|
||||||
|
HiLink erlangAttribute Keyword
|
||||||
|
HiLink erlangMacroDef Macro
|
||||||
|
HiLink erlangUnknownAttribute Normal
|
||||||
|
HiLink erlangInclude Include
|
||||||
|
HiLink erlangRecordDef Keyword
|
||||||
|
HiLink erlangDefine Define
|
||||||
|
HiLink erlangPreCondit PreCondit
|
||||||
|
HiLink erlangType Type
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
HiLink erlangKeyword Keyword
|
||||||
|
|
||||||
|
" Build-in-functions (BIFs)
|
||||||
|
HiLink erlangBIF Function
|
||||||
|
|
||||||
|
if s:old_style
|
||||||
|
HiLink erlangBoolean Statement
|
||||||
|
HiLink erlangExtra Statement
|
||||||
|
HiLink erlangSignal Statement
|
||||||
|
else
|
||||||
|
HiLink erlangBoolean Boolean
|
||||||
|
HiLink erlangExtra Statement
|
||||||
|
HiLink erlangSignal Statement
|
||||||
|
endif
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
endif
|
endif
|
||||||
" }}}
|
|
||||||
|
|
||||||
let b:current_syntax = "erlang"
|
let b:current_syntax = "erlang"
|
||||||
|
|
||||||
" vim: set foldmethod=marker:
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: sw=2 et
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ if !exists("g:go_highlight_structs")
|
|||||||
let g:go_highlight_structs = 0
|
let g:go_highlight_structs = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists("g:go_highlight_build_constraints")
|
||||||
|
let g:go_highlight_build_constraints = 0
|
||||||
|
endif
|
||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn keyword goDirective package import
|
syn keyword goDirective package import
|
||||||
@@ -270,6 +274,21 @@ endif
|
|||||||
hi def link goStruct Function
|
hi def link goStruct Function
|
||||||
hi def link goStructDef 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.
|
" Search backwards for a global declaration to start processing the syntax.
|
||||||
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassCha
|
|||||||
syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
|
syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
|
||||||
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
|
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript,jadeTagBlockChar,jadeTagInlineText
|
||||||
syn match jadeComment '\s*\/\/.*$'
|
syn match jadeComment '\s*\/\/.*$'
|
||||||
|
syn region jadeCommentBlock start="\z(\s*\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" keepend
|
||||||
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
syn region jadeHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->"
|
||||||
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
|
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
|
||||||
syn match jadeClassChar "\." contained nextgroup=jadeClass
|
syn match jadeClassChar "\." contained nextgroup=jadeClass
|
||||||
@@ -45,7 +46,7 @@ syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$"
|
|||||||
syn keyword jadeHtmlArg contained href title
|
syn keyword jadeHtmlArg contained href title
|
||||||
|
|
||||||
syn match jadePlainChar "\\" contained
|
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 jadeInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
|
||||||
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
|
syn match jadeTagInlineText "\s.*$" contained contains=jadeInterpolation,jadeTextInlineJade
|
||||||
syn region jadePipedText matchgroup=jadePipeChar start="|" end="$" contained contains=jadeInterpolation,jadeTextInlineJade nextgroup=jadePipedText skipnl
|
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 jadeFilter PreProc
|
||||||
hi def link jadeDocType PreProc
|
hi def link jadeDocType PreProc
|
||||||
hi def link jadeComment Comment
|
hi def link jadeComment Comment
|
||||||
|
hi def link jadeCommentBlock Comment
|
||||||
hi def link jadeHtmlConditionalComment jadeComment
|
hi def link jadeHtmlConditionalComment jadeComment
|
||||||
|
|
||||||
let b:current_syntax = "jade"
|
let b:current_syntax = "jade"
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ if !exists("javascript_ignore_javaScriptdoc")
|
|||||||
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
|
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
|
||||||
|
|
||||||
" tags containing a param
|
" 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
|
" tags containing type and param
|
||||||
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
|
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
|
||||||
" tags containing type but no param
|
" tags containing type but no param
|
||||||
@@ -70,7 +70,7 @@ if !exists("javascript_ignore_javaScriptdoc")
|
|||||||
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
|
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
|
||||||
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
|
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
|
||||||
syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+"
|
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 region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags
|
||||||
|
|
||||||
syntax case match
|
syntax case match
|
||||||
@@ -94,11 +94,17 @@ syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
|
|||||||
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
|
syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
|
||||||
syntax region jsRegexpGroup start="\\\@<!(" skip="\\.\|\[\(\\.\|[^]]\)*\]" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend
|
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 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 keyword jsNumber Infinity
|
||||||
syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
|
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 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 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 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 : '')
|
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
|
"" 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 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 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
|
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 /{/
|
syntax sync match jsHighlight grouphere jsBlock /{/
|
||||||
endif
|
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 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 region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty
|
||||||
syntax match jsFuncArgCommas contained ','
|
syntax match jsFuncArgCommas contained ','
|
||||||
@@ -250,6 +257,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
|||||||
HiLink jsKeyword Keyword
|
HiLink jsKeyword Keyword
|
||||||
HiLink jsArrowFunction Type
|
HiLink jsArrowFunction Type
|
||||||
HiLink jsFunction Type
|
HiLink jsFunction Type
|
||||||
|
HiLink jsGenerator jsFunction
|
||||||
HiLink jsFuncName Function
|
HiLink jsFuncName Function
|
||||||
HiLink jsArgsObj Special
|
HiLink jsArgsObj Special
|
||||||
HiLink jsError Error
|
HiLink jsError Error
|
||||||
|
|||||||
@@ -39,11 +39,6 @@ endif
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
if exists('®expengine')
|
|
||||||
let s:regexpengine=®expengine
|
|
||||||
set regexpengine=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" POD starts with ^=<word> and ends with ^=cut
|
" POD starts with ^=<word> and ends with ^=cut
|
||||||
|
|
||||||
if !exists("perl_include_pod") || perl_include_pod == 1
|
if !exists("perl_include_pod") || perl_include_pod == 1
|
||||||
@@ -334,19 +329,24 @@ syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s
|
|||||||
" XXX Any statements after the identifier are in perlString colour (i.e.
|
" 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
|
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it
|
||||||
" seems due to the 'auto-extending nature' of regions.
|
" 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")
|
if exists("perl_fold")
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend
|
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend
|
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend
|
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine fold extend
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,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
|
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend
|
||||||
else
|
else
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ
|
syn region perlHereDoc start=+<<\z(\I\i*\)+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ
|
syn region perlHereDoc start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpDQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ
|
syn region perlHereDoc start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ matchgroup=perlStringStartEnd end=+^\z1$+ contains=perlHereDocStart,@perlInterpSQ
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
|
syn region perlHereDoc start=+<<\s*""+ matchgroup=perlStringStartEnd end=+^$+ contains=perlHereDocStart,@perlInterpDQ,perlNotEmptyLine
|
||||||
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,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
|
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -360,15 +360,11 @@ syn keyword perlStatementPackage package contained
|
|||||||
" sub [name] [(prototype)] {
|
" sub [name] [(prototype)] {
|
||||||
"
|
"
|
||||||
syn match perlSubError "[^[:space:];{#]" contained
|
syn match perlSubError "[^[:space:];{#]" contained
|
||||||
if v:version == 701 && !has('patch221') " XXX I hope that's the right one
|
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
||||||
syn match perlSubAttributes ":" contained
|
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
||||||
else
|
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
||||||
syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained
|
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
||||||
syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ
|
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
||||||
syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup
|
|
||||||
syn match perlSubAttributes "" contained nextgroup=perlSubError
|
|
||||||
syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe
|
|
||||||
endif
|
|
||||||
if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
|
if !exists("perl_no_subprototype_error") " Set 1 if using signatures feature in perl5.19.9
|
||||||
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
|
syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained
|
||||||
syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
|
syn match perlSubPrototype +(\_[^)]*)\_s*+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError
|
||||||
@@ -583,11 +579,6 @@ syn sync match perlSyncPOD grouphere NONE "^=cut"
|
|||||||
|
|
||||||
let b:current_syntax = "perl"
|
let b:current_syntax = "perl"
|
||||||
|
|
||||||
if exists('®expengine')
|
|
||||||
let ®expengine=s:regexpengine
|
|
||||||
unlet s:regexpengine
|
|
||||||
endif
|
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
|||||||
@@ -2245,8 +2245,6 @@ endif
|
|||||||
" know how to use them reliably)
|
" know how to use them reliably)
|
||||||
syn sync fromstart
|
syn sync fromstart
|
||||||
|
|
||||||
setlocal foldmethod=syntax
|
|
||||||
|
|
||||||
let b:current_syntax = "perl6"
|
let b:current_syntax = "perl6"
|
||||||
|
|
||||||
let &cpo = s:keepcpo
|
let &cpo = s:keepcpo
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
162
syntax/ps1.vim
Normal file
162
syntax/ps1.vim
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Windows PowerShell
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327"
|
||||||
|
"
|
||||||
|
" The following settings are available for tuning syntax highlighting:
|
||||||
|
" let ps1_nofold_blocks = 1
|
||||||
|
" let ps1_nofold_sig = 1
|
||||||
|
|
||||||
|
" Compatible VIM syntax file start
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" PowerShell doesn't care about case
|
||||||
|
syn case ignore
|
||||||
|
|
||||||
|
" Sync-ing method
|
||||||
|
syn sync minlines=100
|
||||||
|
|
||||||
|
" Certain tokens can't appear at the top level of the document
|
||||||
|
syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1Function
|
||||||
|
|
||||||
|
" Comments and special comment words
|
||||||
|
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained
|
||||||
|
syn match ps1CDocParam /.*/ contained
|
||||||
|
syn match ps1CommentDoc /^\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
|
||||||
|
syn match ps1CommentDoc /#\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
|
||||||
|
syn match ps1Comment /#.*/ contains=ps1CommentTodo,ps1CommentDoc,@Spell
|
||||||
|
syn region ps1Comment start="<#" end="#>" contains=ps1CommentTodo,ps1CommentDoc,@Spell
|
||||||
|
|
||||||
|
" Language keywords and elements
|
||||||
|
syn keyword ps1Conditional if else elseif switch default
|
||||||
|
syn keyword ps1Repeat while for do until break continue foreach in
|
||||||
|
syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Block skipwhite
|
||||||
|
syn match ps1Keyword /\<while\>/ nextgroup=ps1Block skipwhite
|
||||||
|
syn match ps1Keyword /\<where\>/ nextgroup=ps1Block skipwhite
|
||||||
|
|
||||||
|
syn keyword ps1Exception begin process end exit
|
||||||
|
syn keyword ps1Keyword try catch finally throw
|
||||||
|
syn keyword ps1Keyword return filter in trap param data dynamicparam
|
||||||
|
syn match ps1Keyword /&/
|
||||||
|
syn keyword ps1Constant $true $false $null
|
||||||
|
syn match ps1Constant +\$?+
|
||||||
|
syn match ps1Constant +\$_+
|
||||||
|
syn match ps1Constant +\$\$+
|
||||||
|
syn match ps1Constant +\$^+
|
||||||
|
|
||||||
|
" Keywords reserved for future use
|
||||||
|
syn keyword ps1Keyword class define from using var
|
||||||
|
|
||||||
|
" Functions and Cmdlets
|
||||||
|
syn match ps1Cmdlet /\w\+-\w\+/
|
||||||
|
syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
|
||||||
|
syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite
|
||||||
|
syn match ps1Function /\w\+-*\w*/ contained
|
||||||
|
|
||||||
|
" Type declarations
|
||||||
|
syn match ps1Type /\[[a-z0-9_:.]\+\(\[\]\)\?\]/
|
||||||
|
syn match ps1StandaloneType /[a-z0-9_.]\+/ contained
|
||||||
|
syn keyword ps1Scope global local private script contained
|
||||||
|
|
||||||
|
" Variables and other user defined items
|
||||||
|
syn match ps1Variable /\$\w\+/
|
||||||
|
syn match ps1Variable /\${\w\+:\\\w\+}/
|
||||||
|
syn match ps1ScopedVariable /\$\w\+:\w\+/ contains=ps1Scope
|
||||||
|
syn match ps1VariableName /\w\+/ contained
|
||||||
|
|
||||||
|
" Operators all start w/ dash
|
||||||
|
syn match ps1OperatorStart /-c\?/ nextgroup=ps1Operator
|
||||||
|
syn keyword ps1Operator eq ne ge gt lt le like notlike match notmatch replace split /contains/ notcontains contained
|
||||||
|
syn keyword ps1Operator ieq ine ige igt ile ilt ilike inotlike imatch inotmatch ireplace isplit icontains inotcontains contained
|
||||||
|
syn keyword ps1Operator ceq cne cge cgt clt cle clike cnotlike cmatch cnotmatch creplace csplit ccontains cnotcontains contained
|
||||||
|
syn keyword ps1Operator is isnot as join contained
|
||||||
|
syn keyword ps1Operator and or not xor band bor bnot bxor contained
|
||||||
|
syn keyword ps1Operator f contained
|
||||||
|
|
||||||
|
" Regular Strings
|
||||||
|
" These aren't precisely correct and could use some work
|
||||||
|
syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial
|
||||||
|
syn region ps1String start=/'/ skip=/''/ end=/'/
|
||||||
|
|
||||||
|
" Here-Strings
|
||||||
|
syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial
|
||||||
|
syn region ps1String start=/@'$/ end=/^'@/
|
||||||
|
|
||||||
|
" Interpolation
|
||||||
|
syn match ps1Escape /`./ contained
|
||||||
|
syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop
|
||||||
|
syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained
|
||||||
|
syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn
|
||||||
|
|
||||||
|
" Numbers
|
||||||
|
syn match ps1Number "\<\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\>"
|
||||||
|
syn match ps1Number "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\="
|
||||||
|
syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>"
|
||||||
|
syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>"
|
||||||
|
|
||||||
|
" Constants
|
||||||
|
syn match ps1Boolean "$\%(true\|false\)\>"
|
||||||
|
syn match ps1Constant /\$null\>/
|
||||||
|
syn match ps1BuiltIn "$^\|$?\|$_\|$\$"
|
||||||
|
syn match ps1BuiltIn "$\%(args\|error\|foreach\|home\|input\)\>"
|
||||||
|
syn match ps1BuiltIn "$\%(match\(es\)\?\|myinvocation\|host\|lastexitcode\)\>"
|
||||||
|
syn match ps1BuiltIn "$\%(ofs\|shellid\|stacktrace\)\>"
|
||||||
|
|
||||||
|
" Folding blocks
|
||||||
|
if !exists('g:ps1_nofold_blocks')
|
||||||
|
syn region ps1Block start=/{/ end=/}/ transparent fold
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:ps1_nofold_sig')
|
||||||
|
syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Setup default color highlighting
|
||||||
|
if version >= 508 || !exists("did_ps1_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_ps1_syn_inits = 1
|
||||||
|
command -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink ps1Number Number
|
||||||
|
HiLink ps1Block Block
|
||||||
|
HiLink ps1Exception Exception
|
||||||
|
HiLink ps1Constant Constant
|
||||||
|
HiLink ps1String String
|
||||||
|
HiLink ps1Escape SpecialChar
|
||||||
|
HiLink ps1InterpolationDelimiter Delimiter
|
||||||
|
HiLink ps1Conditional Conditional
|
||||||
|
HiLink ps1Function Function
|
||||||
|
HiLink ps1Variable Identifier
|
||||||
|
HiLink ps1ScopedVariable Identifier
|
||||||
|
HiLink ps1VariableName Identifier
|
||||||
|
HiLink ps1Boolean Boolean
|
||||||
|
HiLink ps1Constant Constant
|
||||||
|
HiLink ps1BuiltIn StorageClass
|
||||||
|
HiLink ps1Type Type
|
||||||
|
HiLink ps1Scope Type
|
||||||
|
HiLink ps1StandaloneType Type
|
||||||
|
HiLink ps1Number Number
|
||||||
|
HiLink ps1Comment Comment
|
||||||
|
HiLink ps1CommentTodo Todo
|
||||||
|
HiLink ps1CommentDoc Tag
|
||||||
|
HiLink ps1CDocParam Todo
|
||||||
|
HiLink ps1Operator Operator
|
||||||
|
HiLink ps1Repeat Repeat
|
||||||
|
HiLink ps1RepeatAndCmdlet Repeat
|
||||||
|
HiLink ps1Keyword Keyword
|
||||||
|
HiLink ps1KeywordAndCmdlet Keyword
|
||||||
|
HiLink ps1Cmdlet Statement
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "ps1"
|
||||||
|
|
||||||
56
syntax/ps1xml.vim
Normal file
56
syntax/ps1xml.vim
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Windows PowerShell XML
|
||||||
|
" Maintainer: Peter Provost <peter@provost.org>
|
||||||
|
" Version: 2.10
|
||||||
|
" Project Repository: https://github.com/PProvost/vim-ps1
|
||||||
|
" Vim Script Page: http://www.vim.org/scripts/script.php?script_id=1327"
|
||||||
|
|
||||||
|
" Compatible VIM syntax file start
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:ps1xml_cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
doau syntax xml
|
||||||
|
unlet b:current_syntax
|
||||||
|
|
||||||
|
syn case ignore
|
||||||
|
syn include @ps1xmlScriptBlock <sfile>:p:h/ps1.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
|
||||||
|
syn region ps1xmlScriptBlock
|
||||||
|
\ matchgroup=xmlTag start="<Script>"
|
||||||
|
\ matchgroup=xmlEndTag end="</Script>"
|
||||||
|
\ fold
|
||||||
|
\ contains=@ps1xmlScriptBlock
|
||||||
|
\ keepend
|
||||||
|
syn region ps1xmlScriptBlock
|
||||||
|
\ matchgroup=xmlTag start="<ScriptBlock>"
|
||||||
|
\ matchgroup=xmlEndTag end="</ScriptBlock>"
|
||||||
|
\ fold
|
||||||
|
\ contains=@ps1xmlScriptBlock
|
||||||
|
\ keepend
|
||||||
|
syn region ps1xmlScriptBlock
|
||||||
|
\ matchgroup=xmlTag start="<GetScriptBlock>"
|
||||||
|
\ matchgroup=xmlEndTag end="</GetScriptBlock>"
|
||||||
|
\ fold
|
||||||
|
\ contains=@ps1xmlScriptBlock
|
||||||
|
\ keepend
|
||||||
|
syn region ps1xmlScriptBlock
|
||||||
|
\ matchgroup=xmlTag start="<SetScriptBlock>"
|
||||||
|
\ matchgroup=xmlEndTag end="</SetScriptBlock>"
|
||||||
|
\ fold
|
||||||
|
\ contains=@ps1xmlScriptBlock
|
||||||
|
\ keepend
|
||||||
|
|
||||||
|
syn cluster xmlRegionHook add=ps1xmlScriptBlock
|
||||||
|
|
||||||
|
let b:current_syntax = "ps1xml"
|
||||||
|
|
||||||
|
let &cpo = s:ps1xml_cpo_save
|
||||||
|
unlet s:ps1xml_cpo_save
|
||||||
|
|
||||||
@@ -130,8 +130,8 @@ syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][io
|
|||||||
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold
|
||||||
|
|
||||||
" Normal String and Shell Command Output
|
" Normal String and Shell Command Output
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
|
||||||
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
|
||||||
|
|
||||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
|
||||||
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
" Maintainer: Ben Blum <bblum@cs.cmu.edu>
|
||||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||||
" Last Change: July 18, 2014
|
" Last Change: January 5, 2015
|
||||||
|
|
||||||
if version < 600
|
if version < 600
|
||||||
syntax clear
|
syntax clear
|
||||||
@@ -24,7 +24,7 @@ syn keyword rustKeyword continue
|
|||||||
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
|
||||||
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
|
||||||
syn keyword rustKeyword for in if impl let
|
syn keyword rustKeyword for in if impl let
|
||||||
syn keyword rustKeyword loop once proc pub
|
syn keyword rustKeyword loop once pub
|
||||||
syn keyword rustKeyword return super
|
syn keyword rustKeyword return super
|
||||||
syn keyword rustKeyword unsafe virtual where while
|
syn keyword rustKeyword unsafe virtual where while
|
||||||
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
|
||||||
@@ -56,10 +56,10 @@ syn match rustMacroRepeatCount ".\?[*+]" contained
|
|||||||
syn match rustMacroVariable "$\w\+"
|
syn match rustMacroVariable "$\w\+"
|
||||||
|
|
||||||
" Reserved (but not yet used) keywords {{{2
|
" 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
|
" 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
|
syn keyword rustType f64 i8 i16 i32 i64 str Self
|
||||||
|
|
||||||
" Things from the prelude (src/libstd/prelude.rs) {{{2
|
" 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
|
" Reexported core operators {{{3
|
||||||
syn keyword rustTrait Copy Send Sized Sync
|
syn keyword rustTrait Copy Send Sized Sync
|
||||||
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
|
syn keyword rustTrait Drop Fn FnMut FnOnce
|
||||||
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
|
|
||||||
|
|
||||||
" Reexported functions {{{3
|
" Reexported functions {{{3
|
||||||
"syn keyword rustFunction range repeat
|
syn keyword rustFunction drop
|
||||||
"syn keyword rustFunction drop
|
|
||||||
"syn keyword rustFunction from_str
|
|
||||||
|
|
||||||
" Reexported types and traits {{{3
|
" Reexported types and traits {{{3
|
||||||
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr
|
syn keyword rustTrait Box
|
||||||
syn keyword rustTrait IntoBytes
|
syn keyword rustTrait CharExt
|
||||||
syn keyword rustTrait ToCStr
|
|
||||||
syn keyword rustTrait Char UnicodeChar
|
|
||||||
syn keyword rustTrait Clone
|
syn keyword rustTrait Clone
|
||||||
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
syn keyword rustTrait PartialEq PartialOrd Eq Ord
|
||||||
syn keyword rustEnum Ordering Equiv
|
syn keyword rustTrait DoubleEndedIterator
|
||||||
syn keyword rustEnumVariant Less Equal Greater
|
syn keyword rustTrait ExactSizeIterator
|
||||||
syn keyword rustTrait FromIterator Extend ExactSize
|
syn keyword rustTrait Iterator IteratorExt Extend
|
||||||
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 rustEnum Option
|
syn keyword rustEnum Option
|
||||||
syn keyword rustEnumVariant Some None
|
syn keyword rustEnumVariant Some None
|
||||||
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
|
syn keyword rustTrait PtrExt MutPtrExt
|
||||||
syn keyword rustTrait RawPtr RawMutPtr
|
|
||||||
syn keyword rustEnum Result
|
syn keyword rustEnum Result
|
||||||
syn keyword rustEnumVariant Ok Err
|
syn keyword rustEnumVariant Ok Err
|
||||||
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
syn keyword rustTrait AsSlice
|
||||||
syn keyword rustTrait Str StrVector StrPrelude
|
syn keyword rustTrait SliceExt SliceConcatExt
|
||||||
syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude
|
syn keyword rustTrait Str StrExt
|
||||||
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
|
syn keyword rustTrait String ToString
|
||||||
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 Vec
|
syn keyword rustTrait Vec
|
||||||
|
" FIXME: remove when path reform lands
|
||||||
" Reexported runtime types {{{3
|
syn keyword rustTrait Path GenericPath
|
||||||
"syn keyword rustFunction sync_channel channel
|
" FIXME: remove when I/O reform lands
|
||||||
syn keyword rustTrait SyncSender Sender Receiver
|
syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude
|
||||||
"syn keyword rustFunction spawn
|
|
||||||
|
|
||||||
" Other syntax {{{2
|
" Other syntax {{{2
|
||||||
|
|
||||||
syn keyword rustSelf self
|
syn keyword rustSelf self
|
||||||
syn keyword rustBoolean true false
|
syn keyword rustBoolean true false
|
||||||
|
|
||||||
@@ -151,19 +127,20 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic
|
|||||||
syn match rustEscapeError display contained /\\./
|
syn match rustEscapeError display contained /\\./
|
||||||
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/
|
||||||
syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
|
syn match rustEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{8}\)/
|
||||||
|
syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/
|
||||||
syn match rustStringContinuation display contained /\\\n\s*/
|
syn match rustStringContinuation display contained /\\\n\s*/
|
||||||
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation
|
||||||
syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell
|
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 rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
|
||||||
|
|
||||||
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDeriving
|
syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive
|
||||||
syn region rustDeriving start="deriving(" end=")" contained contains=rustTrait
|
syn region rustDerive start="derive(" end=")" contained contains=rustTrait
|
||||||
|
|
||||||
" Number literals
|
" Number literals
|
||||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([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]\%(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]\%(8\|16\|32\|64\)\=\)\="
|
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
|
||||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(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
|
" 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,
|
" an identifier, which makes them integer literals with a method call or field access,
|
||||||
@@ -187,7 +164,7 @@ syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
|||||||
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
" The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII).
|
||||||
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||||
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode
|
||||||
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{8}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid
|
||||||
|
|
||||||
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell
|
||||||
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell
|
||||||
@@ -262,7 +239,7 @@ hi def link rustMacro Macro
|
|||||||
hi def link rustType Type
|
hi def link rustType Type
|
||||||
hi def link rustTodo Todo
|
hi def link rustTodo Todo
|
||||||
hi def link rustAttribute PreProc
|
hi def link rustAttribute PreProc
|
||||||
hi def link rustDeriving PreProc
|
hi def link rustDerive PreProc
|
||||||
hi def link rustStorage StorageClass
|
hi def link rustStorage StorageClass
|
||||||
hi def link rustObsoleteStorage Error
|
hi def link rustObsoleteStorage Error
|
||||||
hi def link rustLifetime Special
|
hi def link rustLifetime Special
|
||||||
@@ -274,7 +251,7 @@ hi def link rustBoxPlacementExpr rustKeyword
|
|||||||
|
|
||||||
" Other Suggestions:
|
" Other Suggestions:
|
||||||
" hi rustAttribute ctermfg=cyan
|
" hi rustAttribute ctermfg=cyan
|
||||||
" hi rustDeriving ctermfg=cyan
|
" hi rustDerive ctermfg=cyan
|
||||||
" hi rustAssert ctermfg=yellow
|
" hi rustAssert ctermfg=yellow
|
||||||
" hi rustPanic ctermfg=red
|
" hi rustPanic ctermfg=red
|
||||||
" hi rustMacro ctermfg=magenta
|
" hi rustMacro ctermfg=magenta
|
||||||
|
|||||||
97
syntax/tap.vim
Normal file
97
syntax/tap.vim
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Verbose TAP Output
|
||||||
|
" Maintainer: Rufus Cable <rufus@threebytesfull.com>
|
||||||
|
" Remark: Simple syntax highlighting for TAP output
|
||||||
|
" License:
|
||||||
|
" Copyright: (c) 2008-2013 Rufus Cable
|
||||||
|
" Last Change: {{LAST_CHANGE}}
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn match tapTestDiag /^ *#.*/ contains=tapTestTodo
|
||||||
|
syn match tapTestTime /^ *\[\d\d:\d\d:\d\d\].*/ contains=tapTestFile
|
||||||
|
syn match tapTestFile /\w\+\/[^. ]*/ contained
|
||||||
|
syn match tapTestFileWithDot /\w\+\/[^ ]*/ contained
|
||||||
|
|
||||||
|
syn match tapTestPlan /^ *\d\+\.\.\d\+$/
|
||||||
|
|
||||||
|
" tapTest is a line like 'ok 1', 'not ok 2', 'ok 3 - xxxx'
|
||||||
|
syn match tapTest /^ *\(not \)\?ok \d\+.*/ contains=tapTestStatusOK,tapTestStatusNotOK,tapTestLine
|
||||||
|
|
||||||
|
" tapTestLine is the line without the ok/not ok status - i.e. number and
|
||||||
|
" optional message
|
||||||
|
syn match tapTestLine /\d\+\( .*\|$\)/ contains=tapTestNumber,tapTestLoadMessage,tapTestTodo,tapTestSkip contained
|
||||||
|
|
||||||
|
" turn ok/not ok messages green/red respectively
|
||||||
|
syn match tapTestStatusOK /ok/ contained
|
||||||
|
syn match tapTestStatusNotOK /not ok/ contained
|
||||||
|
|
||||||
|
" highlight todo tests
|
||||||
|
syn match tapTestTodo /\(# TODO\|Failed (TODO)\) .*$/ contained contains=tapTestTodoRev
|
||||||
|
syn match tapTestTodoRev /\<TODO\>/ contained
|
||||||
|
|
||||||
|
" highlight skipped tests
|
||||||
|
syn match tapTestSkip /# skip .*$/ contained contains=tapTestSkipTag
|
||||||
|
syn match tapTestSkipTag /\(# \)\@<=skip\>/ contained
|
||||||
|
|
||||||
|
" look behind so "ok 123" and "not ok 124" match test number
|
||||||
|
syn match tapTestNumber /\(ok \)\@<=\d\d*/ contained
|
||||||
|
syn match tapTestLoadMessage /\*\*\*.*\*\*\*/ contained contains=tapTestThreeStars,tapTestFileWithDot
|
||||||
|
syn match tapTestThreeStars /\*\*\*/ contained
|
||||||
|
|
||||||
|
syn region tapTestRegion start=/^ *\(not \)\?ok.*$/me=e+1 end=/^\(\(not \)\?ok\|# Looks like you planned \|All tests successful\|Bailout called\)/me=s-1 fold transparent excludenl
|
||||||
|
syn region tapTestResultsOKRegion start=/^\(All tests successful\|Result: PASS\)/ end=/$/
|
||||||
|
syn region tapTestResultsNotOKRegion start=/^\(# Looks like you planned \|Bailout called\|# Looks like you failed \|Result: FAIL\)/ end=/$/
|
||||||
|
syn region tapTestResultsSummaryRegion start=/^Test Summary Report/ end=/^Files=.*$/ contains=tapTestResultsSummaryHeading,tapTestResultsSummaryNotOK
|
||||||
|
|
||||||
|
syn region tapTestResultsSummaryHeading start=/^Test Summary Report/ end=/^-\+$/ contained
|
||||||
|
syn region tapTestResultsSummaryNotOK start=/TODO passed:/ end=/$/ contained
|
||||||
|
|
||||||
|
syn region tapTestInstructionsRegion start=/\%1l/ end=/^$/
|
||||||
|
|
||||||
|
set foldtext=TAPTestLine_foldtext()
|
||||||
|
function! TAPTestLine_foldtext()
|
||||||
|
let line = getline(v:foldstart)
|
||||||
|
let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
|
||||||
|
return sub
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
set foldminlines=5
|
||||||
|
set foldcolumn=2
|
||||||
|
set foldenable
|
||||||
|
set foldmethod=syntax
|
||||||
|
syn sync fromstart
|
||||||
|
|
||||||
|
if !exists("did_tapverboseoutput_syntax_inits")
|
||||||
|
let did_tapverboseoutput_syntax_inits = 1
|
||||||
|
|
||||||
|
hi tapTestStatusOK term=bold ctermfg=green guifg=Green
|
||||||
|
hi tapTestStatusNotOK term=reverse ctermfg=black ctermbg=red guifg=Black guibg=Red
|
||||||
|
hi tapTestTodo term=bold ctermfg=yellow ctermbg=black guifg=Yellow guibg=Black
|
||||||
|
hi tapTestTodoRev term=reverse ctermfg=black ctermbg=yellow guifg=Black guibg=Yellow
|
||||||
|
hi tapTestSkip term=bold ctermfg=lightblue guifg=LightBlue
|
||||||
|
hi tapTestSkipTag term=reverse ctermfg=black ctermbg=lightblue guifg=Black guibg=LightBlue
|
||||||
|
hi tapTestTime term=bold ctermfg=blue guifg=Blue
|
||||||
|
hi tapTestFile term=reverse ctermfg=black ctermbg=yellow guibg=Black guifg=Yellow
|
||||||
|
hi tapTestLoadedFile term=bold ctermfg=black ctermbg=cyan guibg=Cyan guifg=Black
|
||||||
|
hi tapTestThreeStars term=reverse ctermfg=blue guifg=Blue
|
||||||
|
hi tapTestPlan term=bold ctermfg=yellow guifg=Yellow
|
||||||
|
|
||||||
|
hi link tapTestFileWithDot tapTestLoadedFile
|
||||||
|
hi link tapTestNumber Number
|
||||||
|
hi link tapTestDiag Comment
|
||||||
|
|
||||||
|
hi tapTestRegion ctermbg=green
|
||||||
|
|
||||||
|
hi tapTestResultsOKRegion ctermbg=green ctermfg=black
|
||||||
|
hi tapTestResultsNotOKRegion ctermbg=red ctermfg=black
|
||||||
|
|
||||||
|
hi tapTestResultsSummaryHeading ctermbg=blue ctermfg=white
|
||||||
|
hi tapTestResultsSummaryNotOK ctermbg=red ctermfg=black
|
||||||
|
|
||||||
|
hi tapTestInstructionsRegion ctermbg=lightmagenta ctermfg=black
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax="tapVerboseOutput"
|
||||||
98
syntax/thrift.vim
Normal file
98
syntax/thrift.vim
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Thrift
|
||||||
|
" Maintainer: Martin Smith <martin@facebook.com>
|
||||||
|
" Last Change: $Date: $
|
||||||
|
"
|
||||||
|
" $Id: $
|
||||||
|
"
|
||||||
|
" Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
" or more contributor license agreements. See the NOTICE file
|
||||||
|
" distributed with this work for additional information
|
||||||
|
" regarding copyright ownership. The ASF licenses this file
|
||||||
|
" to you under the Apache License, Version 2.0 (the
|
||||||
|
" "License"); you may not use this file except in compliance
|
||||||
|
" with the License. You may obtain a copy of the License at
|
||||||
|
"
|
||||||
|
" http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
"
|
||||||
|
" Unless required by applicable law or agreed to in writing,
|
||||||
|
" software distributed under the License is distributed on an
|
||||||
|
" "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
" KIND, either express or implied. See the License for the
|
||||||
|
" specific language governing permissions and limitations
|
||||||
|
" under the License.
|
||||||
|
"
|
||||||
|
|
||||||
|
if version < 600
|
||||||
|
syntax clear
|
||||||
|
elseif exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Todo
|
||||||
|
syn keyword thriftTodo TODO todo FIXME fixme XXX xxx contained
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn match thriftComment "#.*" contains=thriftTodo,@Spell
|
||||||
|
syn region thriftComment start="/\*" end="\*/" contains=thriftTodo,@Spell
|
||||||
|
syn match thriftComment "//.\{-}\(?>\|$\)\@="
|
||||||
|
|
||||||
|
" String
|
||||||
|
syn region thriftStringDouble matchgroup=None start=+"+ end=+"+
|
||||||
|
|
||||||
|
" Number
|
||||||
|
syn match thriftNumber "-\=\<\d\+\>" contained
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
syn keyword thriftStatement namespace
|
||||||
|
syn keyword thriftInclude include
|
||||||
|
syn keyword thriftKeyword xsd_all xsd_optional xsd_nillable xsd_attrs
|
||||||
|
syn keyword thriftKeyword cpp_include cpp_type const optional required
|
||||||
|
syn keyword thriftStatement throws typedef
|
||||||
|
syn keyword thriftBasicTypes void bool byte string binary
|
||||||
|
syn keyword thriftBasicTypes i16 i32 i64 double
|
||||||
|
syn keyword thriftType map list set
|
||||||
|
syn keyword thriftClass struct exception enum
|
||||||
|
syn region thriftString start=+"+ end=+"+
|
||||||
|
|
||||||
|
" Special
|
||||||
|
syn match thriftNumber "\d\+:"
|
||||||
|
|
||||||
|
" Structure
|
||||||
|
syn keyword thriftStructure service oneway extends
|
||||||
|
"async" { return tok_async; }
|
||||||
|
"exception" { return tok_xception; }
|
||||||
|
"extends" { return tok_extends; }
|
||||||
|
"throws" { return tok_throws; }
|
||||||
|
"service" { return tok_service; }
|
||||||
|
"enum" { return tok_enum; }
|
||||||
|
"const" { return tok_const; }
|
||||||
|
|
||||||
|
if version >= 508 || !exists("did_thrift_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_thrift_syn_inits = 1
|
||||||
|
command! -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command! -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink thriftComment Comment
|
||||||
|
HiLink thriftKeyword Special
|
||||||
|
HiLink thriftBasicTypes Type
|
||||||
|
HiLink thriftType Type
|
||||||
|
HiLink thriftStructure StorageClass
|
||||||
|
HiLink thriftTodo Todo
|
||||||
|
HiLink thriftString String
|
||||||
|
HiLink thriftNumber Number
|
||||||
|
HiLink thriftSpecial Special
|
||||||
|
HiLink thriftStructure Structure
|
||||||
|
HiLink thriftStatement Statement
|
||||||
|
HiLink thriftInclude Include
|
||||||
|
HiLink thriftClass Type
|
||||||
|
HiLink thriftString String
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "thrift"
|
||||||
|
|
||||||
111
syntax/tmux.vim
111
syntax/tmux.vim
@@ -1,6 +1,6 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: tmux(1) configuration file
|
" Language: tmux(1) configuration file
|
||||||
" Maintainer: Tiago Cunha <me@tiagocunha.org>
|
" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net>
|
||||||
" Last Change: $Date: 2010-07-27 18:29:07 $
|
" Last Change: $Date: 2010-07-27 18:29:07 $
|
||||||
" License: This file is placed in the public domain.
|
" License: This file is placed in the public domain.
|
||||||
|
|
||||||
@@ -16,64 +16,61 @@ syntax case match
|
|||||||
syn keyword tmuxAction any current none
|
syn keyword tmuxAction any current none
|
||||||
syn keyword tmuxBoolean off on
|
syn keyword tmuxBoolean off on
|
||||||
|
|
||||||
syn keyword tmuxCmds detach[-client] ls list-sessions neww new-window
|
syn keyword tmuxCmds
|
||||||
syn keyword tmuxCmds bind[-key] unbind[-key] prev[ious-window] last[-window]
|
\ attach[-session] detach[-client] has[-session] kill-server
|
||||||
syn keyword tmuxCmds lsk list-keys set[-option] renamew rename-window selectw
|
\ kill-session lsc list-clients lscm list-commands ls list-sessions
|
||||||
syn keyword tmuxCmds select-window lsw list-windows attach[-session]
|
\ lockc lock-client locks lock-session new[-session] refresh[-client]
|
||||||
syn keyword tmuxCmds send-prefix refresh[-client] killw kill-window lsc
|
\ rename[-session] showmsgs show-messages source[-file] start[-server]
|
||||||
syn keyword tmuxCmds list-clients linkw link-window unlinkw unlink-window
|
\ suspendc suspend-client switchc switch-client copy-mode
|
||||||
syn keyword tmuxCmds next[-window] send[-keys] swapw swap-window
|
\ breakp break-pane capturep capture-pane choose-client choose-session
|
||||||
syn keyword tmuxCmds rename[-session] kill-session switchc switch-client
|
\ choose-tree choose-window displayp display-panes findw find-window
|
||||||
syn keyword tmuxCmds has[-session] copy-mode pasteb paste-buffer
|
\ joinp join-pane killp kill-pane killw kill-window lastp last-pane
|
||||||
syn keyword tmuxCmds new[-session] start[-server] kill-server setw
|
\ last[-window] linkw link-window lsp list-panes lsw list-windows movep
|
||||||
syn keyword tmuxCmds set-window-option show[-options] showw show-window-options
|
\ move-pane movew move-window neww new-window nextl next-layout
|
||||||
syn keyword tmuxCmds command-prompt setb set-buffer showb show-buffer lsb
|
\ next[-window] pipep pipe-pane prevl previous-layout prev[ious-window]
|
||||||
syn keyword tmuxCmds list-buffers deleteb delete-buffer lscm list-commands
|
\ renamew rename-window resizep resize-pane respawnp respawn-pane
|
||||||
syn keyword tmuxCmds movew move-window respawnw respawn-window
|
\ respawnw respawn-window rotatew rotate-window selectl select-layout
|
||||||
syn keyword tmuxCmds source[-file] info server-info clock-mode lock[-server]
|
\ selectp select-pane selectw select-window splitw split-window swapp
|
||||||
syn keyword tmuxCmds saveb save-buffer killp
|
\ swap-pane swapw swap-window unlinkw unlink-window
|
||||||
syn keyword tmuxCmds kill-pane resizep resize-pane selectp select-pane swapp
|
\ bind[-key] lsk list-keys send[-keys] send-prefix unbind[-key]
|
||||||
syn keyword tmuxCmds swap-pane splitw split-window choose-session
|
\ set[-option] setw set-window-option show[-options] showw
|
||||||
syn keyword tmuxCmds choose-window loadb load-buffer copyb copy-buffer suspendc
|
\ show-window-options setenv set-environment showenv show-environment
|
||||||
syn keyword tmuxCmds suspend-client findw find-window breakp break-pane nextl
|
\ command-prompt confirm[-before] display[-message]
|
||||||
syn keyword tmuxCmds next-layout rotatew rotate-window confirm[-before]
|
\ choose-buffer clearhist clear-history deleteb delete-buffer lsb
|
||||||
syn keyword tmuxCmds clearhist clear-history selectl select-layout if[-shell]
|
\ list-buffers loadb load-buffer pasteb paste-buffer saveb save-buffer
|
||||||
syn keyword tmuxCmds display[-message] setenv set-environment showenv
|
\ setb set-buffer showb show-buffer
|
||||||
syn keyword tmuxCmds show-environment choose-client displayp display-panes
|
\ clock-mode if[-shell] lock[-server] run[-shell] [server-]info
|
||||||
syn keyword tmuxCmds run[-shell] lockc lock-client locks lock-session lsp
|
|
||||||
syn keyword tmuxCmds list-panes pipep pipe-pane showmsgs show-messages capturep
|
|
||||||
syn keyword tmuxCmds capture-pane joinp join-pane choose-buffer
|
|
||||||
|
|
||||||
syn keyword tmuxOptsSet prefix status status-fg status-bg bell-action
|
syn keyword tmuxOptsSet
|
||||||
syn keyword tmuxOptsSet default-command history-limit status-left status-right
|
\ buffer-limit escape-time exit-unattached exit-unattached quiet
|
||||||
syn keyword tmuxOptsSet status-interval set-titles display-time buffer-limit
|
\ set-clipboard
|
||||||
syn keyword tmuxOptsSet status-left-length status-right-length
|
\ base-index bell-action bell-on-alert default-command default-path
|
||||||
syn keyword tmuxOptsSet message-[command-]bg lock-after-time default-path
|
\ default-shell default-terminal destroy-unattached detach-on-destroy
|
||||||
syn keyword tmuxOptsSet message-[command-]attr status-attr set-remain-on-exit
|
\ display-panes-[active-]colour display-[panes-]time history-limit
|
||||||
syn keyword tmuxOptsSet status-utf8 default-terminal visual-activity repeat-time
|
\ lock-after-time lock-command lock-server message-[command-]attr
|
||||||
syn keyword tmuxOptsSet visual-bell visual-content status-justify status-keys
|
\ message-[command-]bg message-[command-]fg message-limit
|
||||||
syn keyword tmuxOptsSet terminal-overrides status-left-attr status-left-bg
|
\ mouse-resize-pane mouse-select-pane mouse-select-window mouse-utf8
|
||||||
syn keyword tmuxOptsSet status-left-fg status-right-attr status-right-bg
|
\ pane-[active-]border-style prefix prefix2
|
||||||
syn keyword tmuxOptsSet status-right-fg update-environment base-index
|
\ renumber-windows repeat-time set-remain-on-exit set-titles
|
||||||
syn keyword tmuxOptsSet display-panes-colour display-panes-time default-shell
|
\ set-titles-string status status-style
|
||||||
syn keyword tmuxOptsSet set-titles-string lock-command lock-server
|
\ status-interval status-justify status-keys status-left
|
||||||
syn keyword tmuxOptsSet mouse-select-pane message-limit quiet escape-time
|
\ status-left-style status-left-length status-position status-right
|
||||||
syn keyword tmuxOptsSet pane-active-border-bg pane-active-border-fg
|
\ status-right-style status-right-length status-utf8 terminal-overrides
|
||||||
syn keyword tmuxOptsSet pane-border-bg pane-border-fg message-[command-]fg
|
\ update-environment visual-activity visual-bell visual-content
|
||||||
syn keyword tmuxOptsSet display-panes-active-colour alternate-screen
|
\ visual-silence word-separators
|
||||||
syn keyword tmuxOptsSet detach-on-destroy
|
|
||||||
|
|
||||||
syn keyword tmuxOptsSetw monitor-activity aggressive-resize force-width
|
syn keyword tmuxOptsSetw
|
||||||
syn keyword tmuxOptsSetw force-height remain-on-exit uft8 mode-fg mode-bg
|
\ aggressive-resize alternate-screen automatic-rename
|
||||||
syn keyword tmuxOptsSetw mode-keys clock-mode-colour clock-mode-style
|
\ c0-change-interval c0-change-trigger clock-mode-colour
|
||||||
syn keyword tmuxOptsSetw xterm-keys mode-attr window-status-attr
|
\ clock-mode-style force-height force-width layout-history-limit
|
||||||
syn keyword tmuxOptsSetw window-status-bg window-status-fg automatic-rename
|
\ main-pane-height main-pane-width mode-style move-keys
|
||||||
syn keyword tmuxOptsSetw main-pane-width main-pane-height monitor-content
|
\ mode-mouse monitor-activity monitor-content monitor-silence
|
||||||
syn keyword tmuxOptsSetw window-status-current-attr window-status-current-bg
|
\ other-pane-height other-pane-width pane-base-index remain-on-exit
|
||||||
syn keyword tmuxOptsSetw window-status-current-fg mode-mouse synchronize-panes
|
\ synchronize-panes utf8 window-status-bell-style
|
||||||
syn keyword tmuxOptsSetw window-status-format window-status-current-format
|
\ window-status-content-style window-status-activity-style
|
||||||
syn keyword tmuxOptsSetw word-separators window-status-alert-attr
|
\ window-status-[current-]attr window-status-[current-]bg
|
||||||
syn keyword tmuxOptsSetw window-status-alert-bg window-status-alert-fg
|
\ window-status-[current-]fg window-status-[current-]format
|
||||||
|
\ window-status-separator xterm-keys wrap-search
|
||||||
|
|
||||||
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
|
||||||
|
|
||||||
|
|||||||
18
syntax/tomdoc.vim
Normal file
18
syntax/tomdoc.vim
Normal 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
|
||||||
200
syntax/vala.vim
Normal file
200
syntax/vala.vim
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Vala
|
||||||
|
" Maintainers: Emmanuele Bassi <ebassi@gnome.org>
|
||||||
|
" Hans Vercammen <hveso3@gmail.com>
|
||||||
|
" pancake <pancake@nopcode.org>
|
||||||
|
" Sebastian Reichel <sre@ring0.de>
|
||||||
|
" Last Change: 2012-02-19
|
||||||
|
" Filenames: *.vala *.vapi
|
||||||
|
"
|
||||||
|
" REFERENCES:
|
||||||
|
" [1] http://live.gnome.org/Vala
|
||||||
|
"
|
||||||
|
" TODO: Possibly when reaching vala 1.0 release
|
||||||
|
" - validate code attributes
|
||||||
|
" - better error checking for known errors
|
||||||
|
" - full support for valadoc
|
||||||
|
"
|
||||||
|
" add vala in /usr/share/vim/vim73/scripts.vim below ruby
|
||||||
|
" to have shebang support
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:vala_cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
" Types
|
||||||
|
syn keyword valaType bool char double float size_t ssize_t string unichar void
|
||||||
|
syn keyword valaType int int8 int16 int32 int64 long short
|
||||||
|
syn keyword valaType uint uint8 uint16 uint32 uint64 ulong ushort
|
||||||
|
" Storage keywords
|
||||||
|
syn keyword valaStorage class delegate enum errordomain interface namespace struct
|
||||||
|
" repeat / condition / label
|
||||||
|
syn keyword valaRepeat break continue do for foreach return while
|
||||||
|
syn keyword valaConditional else if switch assert
|
||||||
|
" User Labels
|
||||||
|
syn keyword valaLabel case default
|
||||||
|
|
||||||
|
" Modifiers
|
||||||
|
syn keyword valaModifier abstract const dynamic ensures extern inline internal override
|
||||||
|
syn keyword valaModifier private protected public requires signal static virtual volatile weak
|
||||||
|
syn keyword valaModifier async owned unowned
|
||||||
|
" Constants
|
||||||
|
syn keyword valaConstant false null true
|
||||||
|
" Exceptions
|
||||||
|
syn keyword valaException try catch finally throw
|
||||||
|
" Unspecified Statements
|
||||||
|
syn keyword valaUnspecifiedStatement as base construct delete get in is lock new out params ref sizeof set this throws typeof using value var yield
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn cluster valaCommentGroup contains=valaTodo
|
||||||
|
syn keyword valaTodo contained TODO FIXME XXX NOTE
|
||||||
|
|
||||||
|
" valadoc Comments (ported from javadoc comments in java.vim)
|
||||||
|
" TODO: need to verify valadoc syntax
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn cluster valaDocCommentGroup contains=valaDocTags,valaDocSeeTag
|
||||||
|
syn region valaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
|
||||||
|
syn match valaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=valaDocParam
|
||||||
|
syn match valaDocParam contained "\s\S\+"
|
||||||
|
syn match valaDocTags contained "@\(author\|brief\|version\|return\|deprecated\)\>"
|
||||||
|
syn region valaDocSeeTag contained matchgroup=valaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=valaDocSeeTagParam
|
||||||
|
syn match valaDocSeeTagParam contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Comment Strings (ported from c.vim)
|
||||||
|
if exists("vala_comment_strings")
|
||||||
|
syn match valaCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||||
|
syn region valaCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=valaSpecialChar,valaCommentSkip
|
||||||
|
syn region valaComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=valaSpecialChar
|
||||||
|
syn cluster valaCommentStringGroup contains=valaCommentString,valaCharacter,valaNumber
|
||||||
|
|
||||||
|
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaComment2String,valaCharacter,valaNumber,valaSpaceError,@Spell
|
||||||
|
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell extend fold
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,@valaCommentStringGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
syn region valaCommentL start="//" end="$" keepend contains=@valaCommentGroup,valaSpaceError,@Spell
|
||||||
|
syn region valaComment matchgroup=valaCommentStart start="/\*" end="\*/" contains=@valaCommentGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
if !exists("vala_ignore_valadoc")
|
||||||
|
syn region valaDocComment matchgroup=valaCommentStart start="/\*\*" end="\*/" keepend contains=@valaCommentGroup,@valaDocCommentGroup,valaCommentStartError,valaSpaceError,@Spell
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn region valaPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1
|
||||||
|
syn match valaPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
|
||||||
|
|
||||||
|
" Comment if 0 blocks (ported from c.vim)
|
||||||
|
if !exists("vala_no_if0")
|
||||||
|
syn region valaCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=valaCppOut2 fold
|
||||||
|
syn region valaCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=valaSpaceError,valaCppSkip
|
||||||
|
syn region valaCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=valaSpaceError,valaCppSkip
|
||||||
|
endif
|
||||||
|
|
||||||
|
" match comment errors
|
||||||
|
syntax match valaCommentError display "\*/"
|
||||||
|
syntax match valaCommentStartError display "/\*"me=e-1 contained
|
||||||
|
" match the special comment /**/
|
||||||
|
syn match valaComment "/\*\*/"
|
||||||
|
|
||||||
|
" Vala Code Attributes
|
||||||
|
syn region valaAttribute start="^\s*\[" end="\]$" contains=valaComment,valaString keepend
|
||||||
|
syn region valaAttribute start="\[CCode" end="\]" contains=valaComment,valaString
|
||||||
|
|
||||||
|
" Avoid escaped keyword matching
|
||||||
|
syn match valaUserContent display "@\I*"
|
||||||
|
|
||||||
|
" Strings and constants
|
||||||
|
syn match valaSpecialError contained "\\."
|
||||||
|
syn match valaSpecialCharError contained "[^']"
|
||||||
|
syn match valaSpecialChar contained +\\["\\'0abfnrtvx]+
|
||||||
|
syn region valaString start=+"+ end=+"+ end=+$+ contains=valaSpecialChar,valaSpecialError,valaUnicodeNumber,@Spell
|
||||||
|
syn region valaVerbatimString start=+"""+ end=+"""+ contains=@Spell
|
||||||
|
syn match valaUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=valaUnicodeSpecifier
|
||||||
|
syn match valaUnicodeSpecifier +\\[uU]+ contained
|
||||||
|
syn match valaCharacter "'[^']*'" contains=valaSpecialChar,valaSpecialCharError
|
||||||
|
syn match valaCharacter "'\\''" contains=valaSpecialChar
|
||||||
|
syn match valaCharacter "'[^\\]'"
|
||||||
|
syn match valaNumber display "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
|
||||||
|
syn match valaNumber display "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
|
||||||
|
syn match valaNumber display "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
|
||||||
|
syn match valaNumber display "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
|
||||||
|
|
||||||
|
" when wanted, highlight trailing white space
|
||||||
|
if exists("vala_space_errors")
|
||||||
|
if !exists("vala_no_trail_space_error")
|
||||||
|
syn match valaSpaceError display excludenl "\s\+$"
|
||||||
|
endif
|
||||||
|
if !exists("vala_no_tab_space_error")
|
||||||
|
syn match valaSpaceError display " \+\t"me=e-1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" when wanted, set minimum lines for comment syntax syncing
|
||||||
|
if exists("vala_minlines")
|
||||||
|
let b:vala_minlines = vala_minlines
|
||||||
|
else
|
||||||
|
let b:vala_minlines = 50
|
||||||
|
endif
|
||||||
|
exec "syn sync ccomment valaComment minlines=" . b:vala_minlines
|
||||||
|
|
||||||
|
" code folding
|
||||||
|
syn region valaBlock start="{" end="}" transparent fold
|
||||||
|
|
||||||
|
" The default highlighting.
|
||||||
|
hi def link valaType Type
|
||||||
|
hi def link valaStorage StorageClass
|
||||||
|
hi def link valaRepeat Repeat
|
||||||
|
hi def link valaConditional Conditional
|
||||||
|
hi def link valaLabel Label
|
||||||
|
hi def link valaModifier StorageClass
|
||||||
|
hi def link valaConstant Constant
|
||||||
|
hi def link valaException Exception
|
||||||
|
hi def link valaUnspecifiedStatement Statement
|
||||||
|
hi def link valaUnspecifiedKeyword Keyword
|
||||||
|
hi def link valaContextualStatement Statement
|
||||||
|
|
||||||
|
hi def link valaCommentError Error
|
||||||
|
hi def link valaCommentStartError Error
|
||||||
|
hi def link valaSpecialError Error
|
||||||
|
hi def link valaSpecialCharError Error
|
||||||
|
hi def link valaSpaceError Error
|
||||||
|
|
||||||
|
hi def link valaTodo Todo
|
||||||
|
hi def link valaCommentL valaComment
|
||||||
|
hi def link valaCommentStart valaComment
|
||||||
|
hi def link valaCommentSkip valaComment
|
||||||
|
hi def link valaComment Comment
|
||||||
|
hi def link valaDocComment Comment
|
||||||
|
hi def link valaDocTags Special
|
||||||
|
hi def link valaDocParam Function
|
||||||
|
hi def link valaDocSeeTagParam Function
|
||||||
|
hi def link valaAttribute PreCondit
|
||||||
|
|
||||||
|
hi def link valaCommentString valaString
|
||||||
|
hi def link valaComment2String valaString
|
||||||
|
hi def link valaString String
|
||||||
|
hi def link valaVerbatimString String
|
||||||
|
hi def link valaCharacter Character
|
||||||
|
hi def link valaSpecialChar SpecialChar
|
||||||
|
hi def link valaNumber Number
|
||||||
|
hi def link valaUnicodeNumber SpecialChar
|
||||||
|
hi def link valaUnicodeSpecifier SpecialChar
|
||||||
|
|
||||||
|
hi def link valaPreCondit PreCondit
|
||||||
|
|
||||||
|
if !exists("vala_no_if0")
|
||||||
|
hi def link valaCppSkip valaCppOut
|
||||||
|
hi def link valaCppOut2 valaCppOut
|
||||||
|
hi def link valaCppOut Comment
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "vala"
|
||||||
|
|
||||||
|
let &cpo = s:vala_cpo_save
|
||||||
|
unlet s:vala_cpo_save
|
||||||
|
|
||||||
|
" vim: ts=8
|
||||||
67
syntax/velocity.vim
Normal file
67
syntax/velocity.vim
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Velocity HTML template
|
||||||
|
" Maintainer: Hsiaoming Young <http://lepture.com>
|
||||||
|
" Last Change: 2012 Jan 09
|
||||||
|
|
||||||
|
" 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("main_syntax")
|
||||||
|
let main_syntax = 'html'
|
||||||
|
endif
|
||||||
|
|
||||||
|
if version < 600
|
||||||
|
so <sfile>:p:h/html.vim
|
||||||
|
else
|
||||||
|
runtime! syntax/html.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn keyword velocityTodo FIXME TODO contained
|
||||||
|
syn region velocitySpec start="@" end=" " oneline contained
|
||||||
|
syn region velocityComment start="#\*" end="\*#" contains=velocityTodo,velocitySpec
|
||||||
|
syn match velocityComment /##.*/ contains=velocityTodo,velocitySpec
|
||||||
|
syn region velocityString start='"' end='"' oneline display
|
||||||
|
syn region velocityString start="'" end="'" oneline display
|
||||||
|
syn match velocityNumber "[-+]\=\d\+\(\.\d*\)\=" display
|
||||||
|
syn region velocityList start='\[' end='\]' oneline contained contains=velocityString,velocityNumber
|
||||||
|
syn match velocityMath /=\|-\|+\|\/\|\*\|%/ contained
|
||||||
|
syn match velocityBlock /#[a-z]\{2,\}/ contains=velocityStatement
|
||||||
|
syn match velocityBlock /#[a-z]\{2,\}(.\+)/ contains=velocityStatement,velocityVar,velocityString,velocityNumber,velocityMath,velocityList
|
||||||
|
syn keyword velocityStatement in set if else elseif end foreach include parse macro cmsparse stop break evaluate define contained
|
||||||
|
|
||||||
|
syn match velocityVar /$!\?[a-zA-Z][a-zA-Z0-9_-]\+\(\.\?[a-zA-Z0-9]*\)\+/ contains=velocityFunction display containedin=ALL
|
||||||
|
syn match velocityVar /$!\?{[a-zA-Z][a-zA-Z0-9_-]\+}/ display containedin=ALL
|
||||||
|
syn match velocityFunction /[a-zA-Z][a-zA-Z0-9_-]\+\(\.[a-zA-Z][a-zA-Z0-9_-]\+\)\+([^)]*)/ contains=velocityString,velocityNumber,velocityList,velocityMath,velocityVar,velocityFunction display containedin=velocityBlock
|
||||||
|
|
||||||
|
" 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_velocity_syn_inits")
|
||||||
|
if version < 508
|
||||||
|
let did_velocity_syn_inits = 1
|
||||||
|
command -nargs=+ HiLink hi link <args>
|
||||||
|
else
|
||||||
|
command -nargs=+ HiLink hi def link <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
HiLink velocityString String
|
||||||
|
HiLink velocityNumber Number
|
||||||
|
HiLink velocityList Constant
|
||||||
|
HiLink velocityBlock PreProc
|
||||||
|
HiLink velocitySpec Special
|
||||||
|
HiLink velocityVar Identifier
|
||||||
|
HiLink velocityFunction Function
|
||||||
|
HiLink velocityStatement Statement
|
||||||
|
HiLink velocityComment Comment
|
||||||
|
HiLink velocityTodo Todo
|
||||||
|
|
||||||
|
delcommand HiLink
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:current_syntax = "velocity"
|
||||||
Reference in New Issue
Block a user