Compare commits

...

24 Commits

Author SHA1 Message Date
Adam Stankiewicz
d1e95cbc98 Add julia and ragel syntax 2015-06-11 17:02:51 +02:00
Adam Stankiewicz
7ffa793f19 Update 2015-06-11 16:52:26 +02:00
Adam Stankiewicz
4203435c48 Update 2015-05-24 23:42:59 +02:00
Adam Stankiewicz
271b63d717 Update 2015-05-11 15:05:13 +02:00
Adam Stankiewicz
acd7ce5950 Update 2015-03-10 21:56:33 -07:00
Adam Stankiewicz
f24fecc338 Change JSON provider to sheerun/vim-json, closes #51 2015-03-08 21:50:10 -07:00
Adam Stankiewicz
23913e0598 Update 2015-03-08 21:32:50 -07:00
Adam Stankiewicz
1c21231175 Remove CSV also from README 2015-02-11 11:31:37 -08:00
Adam Stankiewicz
4541e98466 Remove CSV syntax (it is ugly and not useful) 2015-02-11 11:29:11 -08:00
Adam Stankiewicz
6cd2d5417d Update 2015-02-11 11:27:11 -08:00
Adam Stankiewicz
b7a30b1f1a Remove c-extensions plugin, it broke folding, #52 2015-01-23 23:24:25 +01:00
Adam Stankiewicz
6745c49110 Update all packages 2015-01-23 21:09:23 +01:00
Adam Stankiewicz
1a97304cf6 Add velocity templates support 2014-12-22 22:01:38 +01:00
Adam Stankiewicz
d8eaa50aed Update 2014-12-22 21:57:06 +01:00
Adam Stankiewicz
8e26e6e963 Allow selecting subtree of git repository 2014-12-22 21:56:09 +01:00
Adam Stankiewicz
676e9dd82e Add powershell support, closes #40 2014-12-11 23:16:49 +01:00
Adam Stankiewicz
23af3f70da Forgot about updating README (tmux source) 2014-12-11 23:12:19 +01:00
Adam Stankiewicz
b79385fecc Change tmux source to tejr/vim-tmux, closes #45 2014-12-11 23:11:43 +01:00
Adam Stankiewicz
03dd22587a Add vala support, closes #41 2014-12-11 23:09:07 +01:00
Adam Stankiewicz
bbc6be1099 Add thrift language support, closes #49 2014-12-11 23:02:50 +01:00
Adam Stankiewicz
7f2e366334 Change erlang provider to hcs42/vim-erlang-runtime 2014-12-11 22:58:14 +01:00
Adam Stankiewicz
04f868b94a Update toml and php 2014-12-11 22:56:56 +01:00
Adam Stankiewicz
4071c094c6 Update 2014-12-09 23:09:20 +01:00
Adam Stankiewicz
617b01a5b6 Update 2014-11-11 02:37:21 +01:00
127 changed files with 6587 additions and 6122 deletions

View File

@@ -29,17 +29,15 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [blade](https://github.com/xsbeats/vim-blade) (syntax, indent, ftdetect)
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
- [c/c++](https://github.com/vim-jp/cpp-vim) (syntax)
- [c-extensions](https://github.com/kergoth/aftersyntaxc.vim) (syntax)
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin, ftdetect)
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
- [css](https://github.com/JulesWang/css.vim) (syntax)
- [csv](https://github.com/chrisbra/csv.vim) (syntax, ftplugin, ftdetect)
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin, ftdetect)
- [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, 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)
- [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)
- [go](https://github.com/fatih/vim-go) (syntax, indent, ftdetect)
- [haml](https://github.com/tpope/vim-haml) (syntax, indent, compiler, ftplugin, ftdetect)
@@ -50,7 +48,8 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [jade](https://github.com/digitaltoad/vim-jade) (syntax, indent, ftplugin, ftdetect)
- [jasmine](https://github.com/glanotte/vim-jasmine) (syntax, ftdetect)
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, ftdetect)
- [json](https://github.com/leshill/vim-json) (syntax, ftdetect)
- [julia](https://github.com/dcjones/julia-minimalist-vim) (syntax, indent, ftdetect)
- [json](https://github.com/sheerun/vim-json) (syntax, indent, ftdetect)
- [jst](https://github.com/briancollins/vim-jst) (syntax, indent, ftdetect)
- [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin)
- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin, ftdetect)
@@ -63,6 +62,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)
- [php](https://github.com/StanAngeloff/php.vim) (syntax)
- [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)
- [python](https://github.com/mitsuhiko/vim-python-combined) (syntax, indent)
- [r-lang](https://github.com/vim-scripts/R.vim) (syntax, ftplugin)
@@ -70,20 +70,23 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
- [rust](https://github.com/wting/rust.vim) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax, ftdetect)
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, ftplugin, ftdetect)
- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, compiler, ftplugin, ftdetect)
- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftdetect)
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin, ftdetect)
- [systemd](https://github.com/kurayama/systemd-vim-syntax) (syntax, ftdetect)
- [swift](https://github.com/toyamarinyon/vim-swift) (syntax, indent, 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)
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, compiler, ftplugin, ftdetect)
- [typescript](https://github.com/leafgarland/typescript-vim) (syntax, indent, compiler, ftplugin, ftdetect)
- [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)
- [xls](https://github.com/vim-scripts/XSLT-syntax) (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)
## Contributing

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View File

@@ -1,10 +1,13 @@
" Vim syntax file
" Language: C Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com>
" Contributor: Mikhail Wolfson <mywolfson@gmail.com>
" URL: http://www.haeggblad.com
" Last Change: 9 Aug 2014
" Version: 0.1
" Last Change: 6 Sep 2014
" Version: 0.3
" Changelog:
" 0.3 - integration of aftersyntaxc.vim
" 0.2 - Cleanup
" 0.1 - initial version.
"
" Syntax highlighting for functions in C.
@@ -13,31 +16,15 @@
" http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim
" -----------------------------------------------------------------------------
" Highlight Class and Function names.
" Highlight function names.
" -----------------------------------------------------------------------------
syn match cCustomParen "(" contains=cParen contains=cCppParen
syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomFunc Function
" Vim syntax file
" Language: C Additions
" Maintainer: Mikhail Wolfson <mywolfson@gmail.com>
" URL: http://web.mit.edu/wolfsonm
" Last Change: 2010 Dec. 3
" Version: 0.4
"
" Changelog:
" 0.4 - updates and fixes to cDelimiter to fix break with foldmethod=syntax,
" entirely suggested and solved by Ivan Freitas
" <ivansichfreitas@gmail.com>
" 0.3 - updates and fixes to cUserFunctionPointer, thanks to
" Alexei <lxmzhv@gmail.com>
" 0.2 - change [] to operator
" 0.1 - initial upload, modification from vimscript#1201, Extended c.vim
" -----------------------------------------------------------------------------
" Source: aftersyntaxc.vim
" -----------------------------------------------------------------------------
" Common ANSI-standard functions
syn keyword cAnsiFunction MULU_ DIVU_ MODU_ MUL_ DIV_ MOD_
@@ -262,42 +249,43 @@ syn keyword cAnsiName bitand not or_eq
hi def link cAnsiFunction cFunction
hi def link cAnsiName cIdentifier
" Operators
syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
syn match cOperator "[.!~*&%<>^|=,+-]"
syn match cOperator "/[^/*=]"me=e-1
syn match cOperator "/$"
syn match cOperator "&&\|||"
syn match cOperator "[][]"
" Preprocs
syn keyword cDefined defined contained containedin=cDefine
hi def link cDefined cDefine
" Functions
syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator
hi def link cUserFunction cFunction
hi def link cUserFunctionPointer cFunction
" Delimiters
syn match cDelimiter "[();\\]"
" foldmethod=syntax fix, courtesy of Ivan Freitas
syn match cBraces display "[{}]"
hi def link cFunction Function
hi def link cIdentifier Identifier
" Booleans
syn keyword cBoolean true false TRUE FALSE
" Links
hi def link cFunction Function
hi def link cIdentifier Identifier
hi def link cDelimiter Delimiter
" foldmethod=syntax fix, courtesy of Ivan Freitas
hi def link cBraces Delimiter
hi def link cBoolean Boolean
" -----------------------------------------------------------------------------
" Additional optional highlighting
" -----------------------------------------------------------------------------
" Operators
"syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)="
"syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->"
"syn match cOperator "[.!~*&%<>^|=,+-]"
"syn match cOperator "/[^/*=]"me=e-1
"syn match cOperator "/$"
"syn match cOperator "&&\|||"
"syn match cOperator "[][]"
"
"" Preprocs
"syn keyword cDefined defined contained containedin=cDefine
"hi def link cDefined cDefine
"" Functions
"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
"syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator
"
"hi def link cUserFunction cFunction
"hi def link cUserFunctionPointer cFunction
"
"" Delimiters
"syn match cDelimiter "[();\\]"
"" foldmethod=syntax fix, courtesy of Ivan Freitas
"syn match cBraces display "[{}]"
" Links
"hi def link cDelimiter Delimiter
" foldmethod=syntax fix, courtesy of Ivan Freitas
"hi def link cBraces Delimiter

View File

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

View File

@@ -2,16 +2,18 @@
" Language: C++ Additions
" Maintainer: Jon Haggblad <jon@haeggblad.com>
" URL: http://www.haeggblad.com
" Last Change: 21 Apr 2014
" Version: 0.3
" Last Change: 21 Sep 2014
" Version: 0.5
" Changelog:
" 0.1 - initial version.
" 0.2 - C++14
" 0.3 - Incorporate lastest changes from Mizuchi/STL-Syntax
" 0.4 - Add template function highlight
" 0.5 - Redo template function highlight to be more robust. Add options.
"
" Additional Vim syntax highlighting for C++ (including C++11)
" Additional Vim syntax highlighting for C++ (including C++11/14)
"
" This file contains additional syntax highlighting that I use for my C++11/14
" This file contains additional syntax highlighting that I use for C++11/14
" development in Vim. Compared to the standard syntax highlighting for C++ it
" adds highlighting of (user defined) functions and the containers and types
" in the standard library / boost.
@@ -29,21 +31,35 @@
" Based on the discussion in:
" http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim
" -----------------------------------------------------------------------------
" Functions
syn match cCustomParen "(" contains=cParen contains=cCppParen
syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomFunc Function
" Uncomment this to also highlight 'class::' and 'namespace::'
"hi def link cCustomClass Function
" Template functions
if exists('g:cpp_experimental_template_highlight') && g:cpp_experimental_template_highlight
syn region cCustomAngleBrackets matchgroup=AngleBracketContents start="\v%(<operator\_s*)@<!%(%(\_i|template\_s*)@<=\<[<=]@!|\<@<!\<[[:space:]<=]@!)" end='>' contains=@cppSTLgroup,cppStructure,cType,cCustomClass,cCustomAngleBrackets,cNumbers
syn match cCustomBrack "<\|>" contains=cCustomAngleBrackets
syn match cCustomTemplateFunc "\w\+\s*<.*>(\@=" contains=cCustomBrack,cCustomAngleBrackets
hi def link cCustomTemplateFunc Function
endif
" Class and namespace scope
if exists('g:cpp_class_scope_highlight') && g:cpp_class_scope_highlight
syn match cCustomScope "::"
syn match cCustomClass "\w\+\s*::" contains=cCustomScope
hi def link cCustomClass Function " disabled for now
endif
" Alternative syntax that is used in:
" http://www.vim.org/scripts/script.php?script_id=3064
"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine
"hi def link cCustomFunc Function
" Cluster for all the stdlib functions defined below
syn cluster cppSTLgroup contains=cppSTLfunction,cppSTLfunctional,cppSTLconstant,cppSTLnamespace,cppSTLtype,cppSTLexception,cppSTLiterator,cppSTLiterator_tagcppSTLenumcppSTLioscppSTLcast
" -----------------------------------------------------------------------------
" Standard library types and functions.
"
@@ -154,7 +170,7 @@ syntax keyword cppSTLfunction back
syntax keyword cppSTLfunction back_inserter
syntax keyword cppSTLfunction bad
syntax keyword cppSTLfunction beg
syntax keyword cppSTLfunction begin
"syntax keyword cppSTLfunction begin
syntax keyword cppSTLfunction binary_compose
syntax keyword cppSTLfunction binary_negate
syntax keyword cppSTLfunction binary_search
@@ -188,7 +204,7 @@ syntax keyword cppSTLfunction difftime
syntax keyword cppSTLfunction distance
syntax keyword cppSTLfunction div
syntax keyword cppSTLfunction empty
syntax keyword cppSTLfunction end
"syntax keyword cppSTLfunction end
syntax keyword cppSTLfunction eof
syntax keyword cppSTLfunction epsilon
syntax keyword cppSTLfunction equal
@@ -401,7 +417,7 @@ syntax keyword cppSTLfunction signal
syntax keyword cppSTLfunction signaling_NaN
syntax keyword cppSTLfunction sin
syntax keyword cppSTLfunction sinh
syntax keyword cppSTLfunction size
"syntax keyword cppSTLfunction size
syntax keyword cppSTLfunction sort
syntax keyword cppSTLfunction sort_heap
syntax keyword cppSTLfunction splice
@@ -448,8 +464,8 @@ syntax keyword cppSTLfunction tan
syntax keyword cppSTLfunction tanh
syntax keyword cppSTLfunction tellg
syntax keyword cppSTLfunction tellp
syntax keyword cppSTLfunction test
syntax keyword cppSTLfunction time
"syntax keyword cppSTLfunction test
"syntax keyword cppSTLfunction time
syntax keyword cppSTLfunction tmpfile
syntax keyword cppSTLfunction tmpnam
syntax keyword cppSTLfunction tolower
@@ -744,6 +760,7 @@ syntax keyword cppSTLconstant WCHAR_MAX
if !exists("cpp_no_cpp11")
syntax keyword cppSTLtype nullptr_t max_align_t
syntax keyword cppSTLtype type_index
syntax keyword cppSTLconstant nullptr
" type_traits
syntax keyword cppSTLtype is_void
@@ -1294,6 +1311,10 @@ if !exists("cpp_no_cpp11")
syntax keyword cppSTLtype minutes
syntax keyword cppSTLtype hours
"raw string literals
syntax region cppRawString matchgroup=cppRawDelimiter start=@\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(@ end=/)\z1"/ contains=@Spell
syn match cNumber "0b[01]\+"
endif " C++11
if !exists("cpp_no_cpp14")
@@ -1338,5 +1359,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppSTLenum Typedef
HiLink cppSTLios Function
HiLink cppSTLcast Statement " be consistent with official syntax
HiLink cppRawString String
HiLink cppRawDelimiter Delimiter
delcommand HiLink
endif

View File

@@ -3,4 +3,4 @@
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment')
call css_color#init('css', 'extended', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment')

View File

@@ -1,6 +1,12 @@
let b:current_syntax = ''
unlet b:current_syntax
" Extends standard help syntax with highlighting of Scala code.
"
" Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is
" built with conceal support.
unlet! b:current_syntax
syntax include @ScalaCode syntax/scala.vim
if has('conceal')
syntax region rgnScala matchgroup=Ignore concealends start='!sc!' end='!/sc!' contains=@ScalaCode
else

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
@@ -18,8 +18,10 @@ if !g:less_html_style_tags
endif
" Unset (but preserve) so that less will run.
if exists("b:current_syntax")
let s:pre_less_cur_syn = b:current_syntax
unlet b:current_syntax
endif
" Inspired by code from github.com/kchmck/vim-coffee-script
" and the html syntax file included with vim 7.4.
@@ -30,7 +32,9 @@ syn include @htmlLess syntax/less.vim
syn region lessStyle start=+<style [^>]*type *=[^>]*text/less[^>]*>+ keepend end=+</style>+ contains=@htmlLess,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc containedin=htmlHead
" Reset since 'less' isn't really the current_syntax.
if exists("s:pre_less_cur_syn")
let b:current_syntax = s:pre_less_cur_syn
endif
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>

6
after/syntax/json.vim Normal file
View File

@@ -0,0 +1,6 @@
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'none', 'jsonString')

View File

@@ -3,4 +3,11 @@
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'lessVariableValue,lessDefinition,lessComment')
" variable | property | multiline | end-of-line | plugin
" -----------------------+----------------+----------------+-------------+---------
" lessCssAttribute | lessCssComment | lessComment | https://github.com/genoma/vim-less
" lessAttribute | lessCssComment | lessComment | https://github.com/KohPoll/vim-less
" lessVariableValue | lessDefinition | cssComment | lessComment | https://github.com/groenewege/vim-less
" lessVariableDefinition | cssDefinition | cssComment | lessComment | https://github.com/lunaru/vim-less
call css_color#init('css', 'extended', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment')

6
after/syntax/lua.vim Normal file
View File

@@ -0,0 +1,6 @@
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('hex', 'extended', 'luaComment,luaString')

6
after/syntax/moon.vim Normal file
View File

@@ -0,0 +1,6 @@
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('hex', 'extended', 'moonComment,moonString')

View File

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

View File

@@ -3,4 +3,4 @@
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'sassCssAttribute,sassComment,sassCssComment')
call css_color#init('css', 'extended', 'sassCssAttribute,sassComment,sassCssComment')

6
after/syntax/scss.vim Normal file
View File

@@ -0,0 +1,6 @@
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'extended', 'scssAttribute,scssComment,scssVariableValue,sassCssAttribute,cssComment')

View File

@@ -3,4 +3,4 @@
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('css', 'stylusCssAttribute,stylusComment,cssComment')
call css_color#init('css', 'extended', 'stylusCssAttribute,stylusComment,cssComment')

View File

@@ -3,4 +3,4 @@
if !( has('gui_running') || &t_Co==256 ) | finish | endif
call css_color#init('any', 'vimHiGuiRgb,vimComment,vimLineComment')
call css_color#init('hex', 'none', 'vimHiGuiRgb,vimComment,vimLineComment')

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View File

@@ -1,8 +1,7 @@
" Language: Colorful CSS Color Preview
" Author: Aristotle Pagaltzis <pagaltzis@gmx.de>
" Last Change: 2014-01-14
" Licence: No Warranties. WTFPL. But please tell me!
" Version: 1.0
" Commit: $Format:%H$
" Licence: The MIT License (MIT)
if v:version < 700
echoerr printf('Vim 7 is required for css-color (this is only %d.%d)',v:version/100,v:version%100)
@@ -174,6 +173,8 @@ function! s:create_syn_match()
let s:pattern_color[pattern] = rgb_color
endif
let group = 'BG' . rgb_color
if ! has_key( b:has_color_hi, rgb_color )
" check GUI flag early here to avoid pure-overhead caching
let syn_bg = s:is_gui ? rgb_color : get( s:color_bg, rgb_color, '' )
@@ -190,11 +191,7 @@ function! s:create_syn_match()
let syn_fg = r*30 + g*59 + b*11 > 12000 ? s:black : s:white
let s:color_fg[rgb_color] = syn_fg
endif
endif
let group = 'BG' . rgb_color
if ! has_key( b:has_color_hi, rgb_color )
exe printf( s:hi_cmd, group, syn_bg, syn_fg )
let b:has_color_hi[rgb_color] = 1
endif
@@ -206,33 +203,39 @@ function! s:create_syn_match()
return ''
endfunction
function! s:update_matches()
call filter(b:color_match_id, 'matchdelete(v:val)')
if &l:cursorline
function! s:clear_matches()
if exists('w:color_match_id')
call filter(w:color_match_id, 'matchdelete(v:val)')
unlet w:color_match_id
endif
endfunction
function! s:create_matches()
if ! &l:cursorline | return | endif
" adds matches based that duplicate the highlighted colors on the current line
let lnr = line('.')
let group = ''
let groupstart = 0
let endcol = col('$')
let w:color_match_id = []
for col in range( 1, endcol )
let nextgroup = col < endcol ? synIDattr( synID( lnr, col, 1 ), 'name' ) : ''
if group == nextgroup | continue | endif
if group =~ '^BG\x\{6}$'
let regex = '\%'.lnr.'l\%'.groupstart.'c'.repeat( '.', col - groupstart )
let match = matchadd( group, regex, -1 )
let b:color_match_id += [ match ]
let w:color_match_id += [ match ]
endif
let group = nextgroup
let groupstart = col
endfor
endif
endfunction
let s:_hexcolor = '#\(\x\{3}\|\x\{6}\)\>' " submatch 1
let s:_funcname = '\(rgb\|hsl\)a\?' " submatch 2
let s:_numval = '\(\d\{1,3}%\?\)' " submatch 3,4,5
let s:_ws_ = '\s*'
let s:_listsep = s:_ws_ . ',' . s:_ws_
let s:_numval = s:_ws_ . '\(\d\{1,3}%\?\)' " submatch 3,4,5
let s:_listsep = s:_ws_ . ','
let s:_otherargs_ = '\%(,[^)]*\)\?'
let s:_funcexpr = s:_funcname . '[(]' . s:_numval . s:_listsep . s:_numval . s:_listsep . s:_numval . s:_ws_ . s:_otherargs_ . '[)]'
let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
@@ -242,46 +245,84 @@ let s:_csscolor = s:_hexcolor . '\|' . s:_funcexpr
" scan without examining the start of the string over and over
function! s:parse_css_screen()
call substitute( join( getline('w0','w$'), "\n" ), s:_csscolor, '\=s:create_syn_match()', 'g' )
call s:update_matches()
call s:clear_matches()
call s:create_matches()
endfunction
function! s:parse_any_screen()
function! s:parse_hex_screen()
call substitute( join( getline('w0','w$'), "\n" ), s:_hexcolor, '\=s:create_syn_match()', 'g' )
call s:update_matches()
call s:clear_matches()
call s:create_matches()
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! css_color#init(type, groups)
function! css_color#init(type, keywords, groups)
exe 'syn cluster colorableGroup contains=' . a:groups
let b:has_color_hi = {}
let b:has_pattern_syn = {}
let b:color_match_id = []
augroup CSSColor
autocmd! * <buffer>
exe 'autocmd CursorMoved,CursorMovedI <buffer> call s:parse_'.a:type.'_screen()'
autocmd BufWinEnter <buffer> call s:create_matches()
autocmd BufWinLeave <buffer> call s:clear_matches()
augroup END
do CSSColor CursorMoved <buffer>
exe 'call s:parse_'.a:type.'_screen()'
if a:type != 'css' | return | endif
if a:keywords == 'none' | return | endif
syn case ignore
" W3C basic colors
hi BG000000 guibg=#000000 guifg=#FFFFFF ctermbg=16 ctermfg=231
hi BGc0c0c0 guibg=#C0C0C0 guifg=#000000 ctermbg=250 ctermfg=16
hi BG808080 guibg=#808080 guifg=#000000 ctermbg=244 ctermfg=16
hi BGffffff guibg=#FFFFFF guifg=#000000 ctermbg=231 ctermfg=16
hi BG800000 guibg=#800000 guifg=#FFFFFF ctermbg=88 ctermfg=231
hi BGff0000 guibg=#FF0000 guifg=#FFFFFF ctermbg=196 ctermfg=231
hi BG800080 guibg=#800080 guifg=#FFFFFF ctermbg=240 ctermfg=231
hi BGff00ff guibg=#FF00FF guifg=#FFFFFF ctermbg=13 ctermfg=231
hi BG008000 guibg=#008000 guifg=#FFFFFF ctermbg=2 ctermfg=231
hi BG00ff00 guibg=#00FF00 guifg=#000000 ctermbg=10 ctermfg=16
hi BG808000 guibg=#808000 guifg=#FFFFFF ctermbg=240 ctermfg=231
hi BGffff00 guibg=#FFFF00 guifg=#000000 ctermbg=11 ctermfg=16
hi BG000080 guibg=#000080 guifg=#FFFFFF ctermbg=235 ctermfg=231
hi BG0000ff guibg=#0000FF guifg=#FFFFFF ctermbg=4 ctermfg=231
hi BG008080 guibg=#008080 guifg=#FFFFFF ctermbg=30 ctermfg=231
hi BG00ffff guibg=#00FFFF guifg=#000000 ctermbg=51 ctermfg=16
syn keyword BG000000 black contained containedin=@colorableGroup
syn keyword BGc0c0c0 silver contained containedin=@colorableGroup
syn keyword BG808080 gray contained containedin=@colorableGroup
syn match BGffffff "\c\<white\(-\)\@!\>" contained containedin=@colorableGroup
syn keyword BG800000 maroon contained containedin=@colorableGroup
syn keyword BGff0000 red contained containedin=@colorableGroup
syn keyword BG800080 purple contained containedin=@colorableGroup
syn keyword BGff00ff fuchsia contained containedin=@colorableGroup
syn keyword BG008000 green contained containedin=@colorableGroup
syn keyword BG00ff00 lime contained containedin=@colorableGroup
syn keyword BG808000 olive contained containedin=@colorableGroup
syn keyword BGffff00 yellow contained containedin=@colorableGroup
syn keyword BG000080 navy contained containedin=@colorableGroup
syn keyword BG0000ff blue contained containedin=@colorableGroup
syn keyword BG008080 teal contained containedin=@colorableGroup
syn keyword BG00ffff aqua contained containedin=@colorableGroup
if a:keywords == 'basic' | return | endif
" W3C extended colors
hi BG00008b guibg=#00008B guifg=#FFFFFF ctermbg=4 ctermfg=231
hi BG0000cd guibg=#0000CD guifg=#FFFFFF ctermbg=4 ctermfg=231
hi BG0000ff guibg=#0000FF guifg=#FFFFFF ctermbg=4 ctermfg=231
hi BG006400 guibg=#006400 guifg=#FFFFFF ctermbg=235 ctermfg=231
hi BG008000 guibg=#008000 guifg=#FFFFFF ctermbg=2 ctermfg=231
hi BG008080 guibg=#008080 guifg=#FFFFFF ctermbg=30 ctermfg=231
hi BG008b8b guibg=#008B8B guifg=#FFFFFF ctermbg=30 ctermfg=231
hi BG00bfff guibg=#00BFFF guifg=#000000 ctermbg=6 ctermfg=16
hi BG00ced1 guibg=#00CED1 guifg=#000000 ctermbg=6 ctermfg=16
hi BG00fa9a guibg=#00FA9A guifg=#000000 ctermbg=6 ctermfg=16
hi BG00ff00 guibg=#00FF00 guifg=#000000 ctermbg=10 ctermfg=16
hi BG00ff7f guibg=#00FF7F guifg=#000000 ctermbg=6 ctermfg=16
hi BG00ffff guibg=#00FFFF guifg=#000000 ctermbg=51 ctermfg=16
hi BG191970 guibg=#191970 guifg=#FFFFFF ctermbg=237 ctermfg=231
hi BG1e90ff guibg=#1E90FF guifg=#000000 ctermbg=12 ctermfg=16
hi BG20b2aa guibg=#20B2AA guifg=#000000 ctermbg=37 ctermfg=16
@@ -309,10 +350,6 @@ function! css_color#init(type, groups)
hi BG7cfc00 guibg=#7CFC00 guifg=#000000 ctermbg=3 ctermfg=16
hi BG7fff00 guibg=#7FFF00 guifg=#000000 ctermbg=3 ctermfg=16
hi BG7fffd4 guibg=#7FFFD4 guifg=#000000 ctermbg=122 ctermfg=16
hi BG800000 guibg=#800000 guifg=#FFFFFF ctermbg=88 ctermfg=231
hi BG800080 guibg=#800080 guifg=#FFFFFF ctermbg=240 ctermfg=231
hi BG808000 guibg=#808000 guifg=#FFFFFF ctermbg=240 ctermfg=231
hi BG808080 guibg=#808080 guifg=#000000 ctermbg=244 ctermfg=16
hi BG87ceeb guibg=#87CEEB guifg=#000000 ctermbg=117 ctermfg=16
hi BG87cefa guibg=#87CEFA guifg=#000000 ctermbg=117 ctermfg=16
hi BG8a2be2 guibg=#8A2BE2 guifg=#FFFFFF ctermbg=12 ctermfg=231
@@ -339,7 +376,6 @@ function! css_color#init(type, groups)
hi BGba55d3 guibg=#BA55D3 guifg=#000000 ctermbg=5 ctermfg=16
hi BGbc8f8f guibg=#BC8F8F guifg=#000000 ctermbg=138 ctermfg=16
hi BGbdb76b guibg=#BDB76B guifg=#000000 ctermbg=247 ctermfg=16
hi BGc0c0c0 guibg=#C0C0C0 guifg=#000000 ctermbg=250 ctermfg=16
hi BGc71585 guibg=#C71585 guifg=#FFFFFF ctermbg=5 ctermfg=231
hi BGcd5c5c guibg=#CD5C5C guifg=#000000 ctermbg=167 ctermfg=16
hi BGcd853f guibg=#CD853F guifg=#000000 ctermbg=173 ctermfg=16
@@ -375,8 +411,6 @@ function! css_color#init(type, groups)
hi BGfaf0e6 guibg=#FAF0E6 guifg=#000000 ctermbg=255 ctermfg=16
hi BGfafad2 guibg=#FAFAD2 guifg=#000000 ctermbg=255 ctermfg=16
hi BGfdf5e6 guibg=#FDF5E6 guifg=#000000 ctermbg=255 ctermfg=16
hi BGff0000 guibg=#FF0000 guifg=#FFFFFF ctermbg=196 ctermfg=231
hi BGff00ff guibg=#FF00FF guifg=#FFFFFF ctermbg=13 ctermfg=231
hi BGff1493 guibg=#FF1493 guifg=#FFFFFF ctermbg=5 ctermfg=231
hi BGff4500 guibg=#FF4500 guifg=#FFFFFF ctermbg=9 ctermfg=231
hi BGff6347 guibg=#FF6347 guifg=#000000 ctermbg=203 ctermfg=16
@@ -401,30 +435,9 @@ function! css_color#init(type, groups)
hi BGfffacd guibg=#FFFACD guifg=#000000 ctermbg=255 ctermfg=16
hi BGfffaf0 guibg=#FFFAF0 guifg=#000000 ctermbg=15 ctermfg=16
hi BGfffafa guibg=#FFFAFA guifg=#000000 ctermbg=15 ctermfg=16
hi BGffff00 guibg=#FFFF00 guifg=#000000 ctermbg=11 ctermfg=16
hi BGffffe0 guibg=#FFFFE0 guifg=#000000 ctermbg=255 ctermfg=16
hi BGfffff0 guibg=#FFFFF0 guifg=#000000 ctermbg=15 ctermfg=16
hi BGffffff guibg=#FFFFFF guifg=#000000 ctermbg=231 ctermfg=16
" W3C Colors
syn keyword BG000000 black contained containedin=@colorableGroup
syn keyword BGc0c0c0 silver contained containedin=@colorableGroup
syn keyword BG808080 gray contained containedin=@colorableGroup
syn match BGffffff "\<white\(-\)\@!\>" contained containedin=@colorableGroup
syn keyword BG800000 maroon contained containedin=@colorableGroup
syn keyword BGff0000 red contained containedin=@colorableGroup
syn keyword BG800080 purple contained containedin=@colorableGroup
syn keyword BGff00ff fuchsia contained containedin=@colorableGroup
syn keyword BG008000 green contained containedin=@colorableGroup
syn keyword BG00ff00 lime contained containedin=@colorableGroup
syn keyword BG808000 olive contained containedin=@colorableGroup
syn keyword BGffff00 yellow contained containedin=@colorableGroup
syn keyword BG000080 navy contained containedin=@colorableGroup
syn keyword BG0000ff blue contained containedin=@colorableGroup
syn keyword BG008080 teal contained containedin=@colorableGroup
syn keyword BG00ffff aqua contained containedin=@colorableGroup
" extra colors
syn keyword BGf0f8ff AliceBlue contained containedin=@colorableGroup
syn keyword BGfaebd7 AntiqueWhite contained containedin=@colorableGroup
syn keyword BG7fffd4 Aquamarine contained containedin=@colorableGroup

View File

@@ -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

View File

@@ -704,7 +704,9 @@ class VimRubyCompletion
cv = eval("self.class.constants")
vartype = get_var_type( receiver )
dprint "vartype: %s" % vartype
if vartype != ''
invalid_vartype = ['', "gets"]
if !invalid_vartype.include?(vartype)
load_buffer_class( vartype )
begin
@@ -732,7 +734,7 @@ class VimRubyCompletion
methods.concat m.instance_methods(false)
}
end
variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0
variables += add_rails_columns( "#{vartype}" ) if vartype && !invalid_vartype.include?(vartype)
when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/
message = $1

View File

@@ -178,14 +178,14 @@ function! s:WithPath(func, ...)
call mkdir(tmpdir)
let save_cwd = getcwd()
silent exe 'lcd' tmpdir
silent exe 'lcd' fnameescape(tmpdir)
let path = 'unnamed.rs'
let save_mod = &mod
set nomod
silent exe 'keepalt write! ' . path
silent exe 'keepalt write! ' . fnameescape(path)
if pathisempty
silent keepalt 0file
endif
@@ -197,7 +197,7 @@ function! s:WithPath(func, ...)
finally
if exists("save_mod") | let &mod = save_mod | endif
if exists("save_write") | let &write = save_write | endif
if exists("save_cwd") | silent exe 'lcd' save_cwd | endif
if exists("save_cwd") | silent exe 'lcd' fnameescape(save_cwd) | endif
if exists("tmpdir") | silent call s:RmDir(tmpdir) | endif
endtry
endfunction

View File

@@ -324,7 +324,7 @@ endif
" Ref: http://dev.w3.org/html5/markup/
" Version: Draft 05 April 2011
let phrasing_elements = ['a', 'em', 'strong', 'small', 'mark', 'abbr', 'dfn', 'i', 'b', 'u', 'code', 'var', 'samp', 'kbd', 'sup', 'sub', 'q', 'cite', 'span', 'bdo', 'bdi', 'br', 'wbr', 'ins', 'del', 'img', 'embed', 'object', 'iframe', 'map', 'area', 'script', 'noscript', 'ruby', 'video', 'audio', 'input', 'textarea', 'select', 'button', 'label', 'output', 'datalist', 'keygen', 'progress', 'command', 'canvas', 'time', 'meter', 'data', 'content', 'shadow']
let phrasing_elements = ['a', 'em', 'strong', 'small', 'mark', 'abbr', 'dfn', 'i', 'b', 'u', 'code', 'var', 'samp', 'kbd', 'sup', 'sub', 'q', 'cite', 'span', 'bdo', 'bdi', 'br', 'wbr', 'ins', 'del', 'img', 'picture', 'embed', 'object', 'iframe', 'map', 'area', 'script', 'noscript', 'ruby', 'video', 'audio', 'input', 'textarea', 'select', 'button', 'label', 'output', 'datalist', 'keygen', 'progress', 'command', 'canvas', 'time', 'meter', 'data', 'content', 'shadow']
let metadata_elements = ['link', 'style', 'meta', 'script', 'noscript', 'command']
@@ -545,7 +545,7 @@ let g:xmldata_html5 = {
\ ],
\ 'iframe': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', '']})
\ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', '']})
\ ],
\ 'img': [
\ [],
@@ -601,7 +601,7 @@ let g:xmldata_html5 = {
\ ],
\ 'meta': [
\ [],
\ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
\ extend(copy(global_attributes), {'name': ['application-name', 'author', 'description', 'generator', 'referrer', 'creator', 'googlebot', 'publisher', 'robots', 'slurp', 'viewport', 'theme-color'], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
\ ],
\ 'meter': [
\ phrasing_elements,
@@ -643,6 +643,10 @@ let g:xmldata_html5 = {
\ [],
\ extend(copy(global_attributes), {'name': [], 'value': []})
\ ],
\ 'picture': [
\ flow_elements + ['source'],
\ global_attributes
\ ],
\ 'pre': [
\ phrasing_elements,
\ global_attributes
@@ -655,6 +659,10 @@ let g:xmldata_html5 = {
\ phrasing_elements,
\ extend(copy(global_attributes), {'cite': []})
\ ],
\ 'rb': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'rp': [
\ phrasing_elements,
\ global_attributes
@@ -663,10 +671,14 @@ let g:xmldata_html5 = {
\ phrasing_elements,
\ global_attributes
\ ],
\ 'ruby': [
\ 'rtc': [
\ phrasing_elements + ['rp', 'rt'],
\ global_attributes
\ ],
\ 'ruby': [
\ phrasing_elements + ['rb', 'rp', 'rt', 'rtc'],
\ global_attributes
\ ],
\ 'samp': [
\ phrasing_elements,
\ global_attributes
@@ -693,7 +705,7 @@ let g:xmldata_html5 = {
\ ],
\ 'source': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'type': [], 'media': []})
\ extend(copy(global_attributes), {'src': [], 'type': [], 'media': [], 'srcset': [], 'sizes': []})
\ ],
\ 'span': [
\ phrasing_elements,

22
build
View File

@@ -23,17 +23,18 @@ extract() {
path="$(printf "$pack" | cut -d ':' -f 2)"
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
subtree="$(printf "$pack" | cut -d ':' -f 4)"
printf -- "- [$name](https://github.com/$path) ("
subdirs=""
for subdir in ${!directories}; do
if [ -d "$dir/$subdir" ]; then
if [ -d "${dir}${subtree:-/}${subdir}" ]; then
base="$(basename "$subdir")"
if [[ "$subdirs" != *"$base"* ]]; then
subdirs="$subdirs, $base"
fi
copy_dir "$dir" "$subdir"
copy_dir "${dir}${subtree}" "$subdir"
fi
done
@@ -45,8 +46,9 @@ extract() {
name="$(printf "$pack" | cut -d ':' -f 1)"
path="$(printf "$pack" | 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"
fi
done
@@ -72,17 +74,15 @@ PACKS="
blade:xsbeats/vim-blade
c++11:octol/vim-cpp-enhanced-highlight
c/c++:vim-jp/cpp-vim
c-extensions:kergoth/aftersyntaxc.vim
clojure:guns/vim-clojure-static
coffee-script:kchmck/vim-coffee-script
css:JulesWang/css.vim
csv:chrisbra/csv.vim
cucumber:tpope/vim-cucumber
dockerfile:honza/dockerfile.vim
elixir:elixir-lang/vim-elixir
emberscript:heartsentwined/vim-ember-script
emblem:heartsentwined/vim-emblem
erlang:oscarh/vimerl
erlang:hcs42/vim-erlang-runtime
git:tpope/vim-git
go:fatih/vim-go:_BASIC
haml:tpope/vim-haml
@@ -93,7 +93,8 @@ PACKS="
jade:digitaltoad/vim-jade
jasmine:glanotte/vim-jasmine
javascript:pangloss/vim-javascript
json:leshill/vim-json
julia:dcjones/julia-minimalist-vim
json:sheerun/vim-json
jst:briancollins/vim-jst
latex:LaTeX-Box-Team/LaTeX-Box
less:groenewege/vim-less
@@ -106,9 +107,11 @@ PACKS="
perl:vim-perl/vim-perl
php:StanAngeloff/php.vim
puppet:rodjek/vim-puppet
powershell:Persistent13/vim-ps1
protobuf:uarun/vim-protobuf
python:mitsuhiko/vim-python-combined
r-lang:vim-scripts/R.vim
ragel:jneen/ragel.vim
rspec:sheerun/rspec.vim
ruby:vim-ruby/vim-ruby
rust:wting/rust.vim
@@ -119,14 +122,17 @@ PACKS="
systemd:kurayama/systemd-vim-syntax
swift:toyamarinyon/vim-swift
textile:timcharper/textile.vim
tmux:acustodioo/vim-tmux
tmux:tejr/vim-tmux
tomdoc:duwanis/tomdoc.vim
typescript:leafgarland/typescript-vim
vbnet:vim-scripts/vbnet.vim
thrift:solarnz/thrift.vim
toml:cespare/vim-toml
twig:beyondwords/vim-twig
xls:vim-scripts/XSLT-syntax
yard:sheerun/vim-yardoc
vala:tkztmk/vim-vala
vm:lepture/vim-velocity
css-color:ap/vim-css-color
"

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

65
compiler/cargo.vim Normal file
View File

@@ -0,0 +1,65 @@
" Vim compiler file
" Compiler: Cargo Compiler
" Maintainer: Damien Radtke <damienradtke@gmail.com>
" Latest Revision: 2014 Sep 24
if exists('current_compiler')
finish
endif
runtime compiler/rustc.vim
let current_compiler = "cargo"
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
if exists('g:cargo_makeprg_params')
execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*'
else
CompilerSet makeprg=cargo\ $*
endif
" Allow a configurable global Cargo.toml name. This makes it easy to
" support variations like 'cargo.toml'.
let s:cargo_manifest_name = get(g:, 'cargo_manifest_name', 'Cargo.toml')
function! s:is_absolute(path)
return a:path[0] == '/' || a:path =~ '[A-Z]\+:'
endfunction
let s:local_manifest = findfile(s:cargo_manifest_name, '.;')
if s:local_manifest != ''
let s:local_manifest = fnamemodify(s:local_manifest, ':p:h').'/'
augroup cargo
au!
au QuickfixCmdPost make call s:FixPaths()
augroup END
" FixPaths() is run after Cargo, and is used to change the file paths
" to be relative to the current directory instead of Cargo.toml.
function! s:FixPaths()
let qflist = getqflist()
let manifest = s:local_manifest
for qf in qflist
if !qf.valid
let m = matchlist(qf.text, '(file://\(.*\))$')
if !empty(m)
let manifest = m[1].'/'
" Manually strip another slash if needed; usually just an
" issue on Windows.
if manifest =~ '^/[A-Z]\+:/'
let manifest = manifest[1:]
endif
endif
continue
endif
let filename = bufname(qf.bufnr)
if s:is_absolute(filename)
continue
endif
let qf.filename = simplify(manifest.filename)
call remove(qf, 'bufnr')
endfor
call setqflist(qflist, 'r')
endfunction
endif

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View File

@@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber
CompilerSet errorformat=
\%W%m\ (Cucumber::Undefined),
\%E%m\ (%.%#),
\%E%m\ (%\\S%#),
\%Z%f:%l,
\%Z%f:%l:%.%#

View File

@@ -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

30
compiler/sbt.vim Normal file
View File

@@ -0,0 +1,30 @@
" Vim compiler file
" Language: Scala SBT (http://www.scala-sbt.org/)
" Maintainer: Derek Wyatt
" URL: https://github.com/derekwyatt/vim-scala
" License: Apache 2
" ----------------------------------------------------------------------------
if exists('current_compiler')
finish
endif
let current_compiler = 'sbt'
if exists(':CompilerSet') != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=sbt\ -Dsbt.log.noformat=true\ compile
CompilerSet errorformat=
\%E\ %#[error]\ %f:%l:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z,
\%W\ %#[warn]\ %f:%l:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 et:

View File

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

View File

@@ -1,5 +1,5 @@
au BufRead,BufNewFile *.ino,*.pde set filetype=arduino
autocmd BufRead,BufNewFile *.blade.php set filetype=blade
au BufNewFile,BufRead *.blade.php set filetype=blade
autocmd BufNewFile,BufRead *.clj,*.cljs,*.edn setlocal filetype=clojure
autocmd BufNewFile,BufRead *.coffee set filetype=coffee
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
@@ -11,19 +11,24 @@ function! s:DetectCoffee()
endif
endfunction
autocmd BufNewFile,BufRead * call s:DetectCoffee()
au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv
autocmd BufNewFile,BufReadPost *.feature,*.story set filetype=cucumber
au BufNewFile,BufRead Dockerfile set filetype=dockerfile
au BufRead,BufNewFile *.eex set filetype=eelixir
au FileType eelixir setl sw=2 sts=2 et iskeyword+=!,?
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
au FileType elixir setl sw=2 sts=2 et iskeyword+=!,?
function! s:DetectElixir()
if getline(1) =~ '^#!.*\<elixir\>'
set filetype=elixir
endif
endfunction
autocmd BufNewFile,BufRead * call s:DetectElixir()
autocmd BufNewFile,BufRead *.em set filetype=ember-script
autocmd FileType ember-script set tabstop=2|set shiftwidth=2|set expandtab
autocmd BufNewFile,BufRead *.emblem set filetype=emblem
autocmd FileType emblem set tabstop=2|set shiftwidth=2|set expandtab
autocmd BufNewFile,BufRead *.git/{,modules/**/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead *.git/config,.gitconfig,gitconfig,.gitmodules set ft=gitconfig
autocmd BufNewFile,BufRead */.config/git/config set ft=gitconfig
autocmd BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig
autocmd BufNewFile,BufRead git-rebase-todo set ft=gitrebase
@@ -55,6 +60,7 @@ endfunction
au BufNewFile *.go setlocal filetype=go fileencoding=utf-8 fileformat=unix
au BufRead *.go call s:gofiletype_pre()
au BufReadPost *.go call s:gofiletype_post()
au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl
autocmd BufNewFile,BufRead *.haml,*.hamlbars,*.hamlc setf haml
autocmd BufNewFile,BufRead *.sass setf sass
autocmd BufNewFile,BufRead *.scss setf scss
@@ -71,15 +77,14 @@ fun! s:SelectJavascript()
endfun
au BufNewFile,BufRead * call s:SelectJavascript()
autocmd BufNewFile,BufRead *.json set filetype=json
augroup json_autocmd
autocmd!
autocmd FileType json setlocal autoindent
autocmd FileType json setlocal formatoptions=tcq2l
autocmd FileType json setlocal foldmethod=syntax
augroup END
autocmd BufNewFile,BufRead *.jsonp set filetype=json
au BufNewFile,BufRead *.ejs set filetype=jst
au BufNewFile,BufRead *.jst set filetype=jst
au BufNewFile,BufRead *.djs set filetype=jst
au BufNewFile,BufRead *.hamljs set filetype=jst
au BufNewFile,BufRead *.ect set filetype=jst
au BufRead,BufNewFile *.jl let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp<"
au BufRead,BufNewFile *.jl set filetype=julia
autocmd BufNewFile,BufRead *.less setf less
au BufNewFile,BufRead *.liquid set ft=liquid
au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid
@@ -104,7 +109,8 @@ autocmd BufRead *.html
\ set filetype=mason |
\ endif
if has("autocmd")
au BufNewFile,BufRead *.mustache,*.handlebars,*.hbs,*.hogan,*.hulk,*.hjs set filetype=html syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
au BufNewFile,BufRead *.mustache,*.hogan,*.hulk,*.hjs set filetype=html.mustache syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
au BufNewFile,BufRead *.handlebars,*.hbs set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
endif
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/*,*/nginx/vhosts.d/*,nginx.conf if &ft == '' | setfiletype nginx | endif
au BufRead,BufNewFile *.cl set filetype=opencl
@@ -126,7 +132,7 @@ function! s:DetectPerl6()
endif
if line =~ '^\s*\%(use\s\+\)\=v6\%(\.\d\%(\.\d\)\=\)\=;'
set filetype=perl6 " we matched a 'use v6' declaration
elseif line =~ '^\s*\%(\%(my\|our\)\s\+\)\=\(module\|class\|role\|enum\|grammar\)'
elseif line =~ '^\s*\%(\%(my\|our\)\s\+\)\=\%(unit\s\+\)\=\(module\|class\|role\|enum\|grammar\)'
set filetype=perl6 " we found a class, role, module, enum, or grammar declaration
endif
break " we either found what we needed, or we found a non-POD, non-comment,
@@ -135,8 +141,12 @@ function! s:DetectPerl6()
endwhile
endfunction
autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6()
autocmd BufNew,BufRead *.nqp setf perl6
autocmd BufNew,BufNewFile,BufRead *.nqp setf perl6
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 Puppetfile setfiletype ruby
function! s:setf(filetype) abort
@@ -167,14 +177,15 @@ au BufNewFile,BufRead [Bb]uildfile call s:setf('ruby')
au BufNewFile,BufRead Appraisals call s:setf('ruby')
au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
au BufRead,BufNewFile *.rs set filetype=rust
au BufRead,BufNewFile *.sbt set filetype=sbt
au BufRead,BufNewFile *.sbt set filetype=sbt.scala
fun! s:DetectScala()
if getline(1) == '#!/usr/bin/env scala'
if getline(1) =~# '^#!\(/usr\)\?/bin/env\s\+scalas\?'
set filetype=scala
endif
endfun
au BufRead,BufNewFile *.scala,*.sbt set filetype=scala
au BufRead,BufNewFile *.scala set filetype=scala
au BufRead,BufNewFile * call s:DetectScala()
au BufRead,BufNewFile *.sbt setfiletype sbt.scala
autocmd BufNewFile,BufRead *.slim set filetype=slim
autocmd BufNewFile,BufReadPost *.styl set filetype=stylus
autocmd BufNewFile,BufReadPost *.stylus set filetype=stylus
@@ -188,8 +199,14 @@ au BufNewFile,BufRead *.swap set filetype=systemd
au BufNewFile,BufRead *.target set filetype=systemd
au BufNewFile,BufRead *.timer set filetype=systemd
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 {.,}tmux.conf{.*,} setlocal commentstring=#\ %s
autocmd BufNewFile,BufRead *.toml set filetype=toml
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
autocmd BufNewFile,BufRead *.twig set filetype=twig
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
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

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
@@ -13,6 +13,7 @@ call coffee#CoffeeSetUpVariables()
setlocal formatoptions-=t formatoptions+=croql
setlocal comments=:# commentstring=#\ %s
setlocal omnifunc=javascriptcomplete#CompleteJS
setlocal suffixesadd+=coffee
" Create custom augroups.
augroup CoffeeBufUpdate | augroup END
@@ -330,7 +331,7 @@ function! s:CoffeeLint(startline, endline, bang, args)
endif
let output = system(g:coffee_linter .
\ ' -s --csv' .
\ ' -s --reporter csv' .
\ ' ' . b:coffee_litcoffee .
\ ' ' . g:coffee_lint_options .
\ ' ' . a:args .
@@ -394,11 +395,11 @@ if !exists('b:coffee_run_buf')
call s:CoffeeRunResetVars()
endif
command! -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete
command! -buffer -range=% -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeCompile call s:CoffeeCompile(<line1>, <line2>, <q-args>)
command! -bar -nargs=* -complete=customlist,s:CoffeeComplete
command! -buffer -bar -nargs=* -complete=customlist,s:CoffeeComplete
\ CoffeeWatch call s:CoffeeWatch(<q-args>)
command! -range=% -bar -nargs=* CoffeeRun
command! -buffer -range=% -bar -nargs=* CoffeeRun
\ call s:CoffeeRun(<line1>, <line2>, <q-args>)
command! -range=% -bang -bar -nargs=* CoffeeLint
command! -buffer -range=% -bang -bar -nargs=* CoffeeLint
\ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>)

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,9 @@ setlocal omnifunc=CucumberComplete
let b:undo_ftplugin = "setl fo< com< cms< ofu<"
let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??')
if !exists("b:cucumber_steps_glob")
let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb'
endif
if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps")
cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>exe 'norm! zv'<Bar>endif
@@ -52,7 +55,7 @@ endfunction
function! s:allsteps()
let step_pattern = '\C^\s*\K\k*\>\s*(\=\s*\zs\S.\{-\}\ze\s*)\=\s*\%(do\|{\)\s*\%(|[^|]*|\s*\)\=\%($\|#\)'
let steps = []
for file in split(glob(b:cucumber_root.'/**/*.rb'),"\n")
for file in split(glob(b:cucumber_steps_glob),"\n")
let lines = readfile(file)
let num = 0
for line in lines

View File

@@ -1,151 +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 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()

View File

@@ -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:

View File

@@ -27,7 +27,7 @@ elseif !exists("b:eruby_subtype")
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'

View File

@@ -4,4 +4,4 @@
" License: MIT
" Changes: Add - to keyword
setlocal iskeyword+=-
" setlocal iskeyword+=-

View File

@@ -11,6 +11,8 @@ endif
let s:save_cpo = &cpo
set cpo-=C
setlocal iskeyword+=-
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "All Files (*.*)\t*.*\n"

View File

@@ -64,14 +64,24 @@ setlocal efm+=%-G%.%#
" Vim Windows {{{
" Width of vertical splits
" Type of split, "new" for horiz. "vnew" for vert.
if !exists('g:LatexBox_split_type')
let g:LatexBox_split_type = "vnew"
endif
" Length of vertical splits
if !exists('g:LatexBox_split_length')
let g:LatexBox_split_length = 15
endif
" Width of horizontal splits
if !exists('g:LatexBox_split_width')
let g:LatexBox_split_width = 30
endif
" Where vertical splits appear
" Where splits appear
if !exists('g:LatexBox_split_side')
let g:LatexBox_split_side = "leftabove"
let g:LatexBox_split_side = "aboveleft"
endif
" Resize when split?
@@ -169,7 +179,13 @@ function! LatexBox_GetTexRoot()
return fnamemodify(LatexBox_GetMainTexFile(), ':h')
endfunction
function! LatexBox_GetTexBasename(with_dir)
function! LatexBox_GetBuildBasename(with_dir)
" 1. Check for g:LatexBox_jobname
if exists('g:LatexBox_jobname')
return g:LatexBox_jobname
endif
" 2. Get the basename from the main tex file
if a:with_dir
return fnamemodify(LatexBox_GetMainTexFile(), ':r')
else
@@ -180,48 +196,48 @@ endfunction
function! LatexBox_GetAuxFile()
" 1. check for b:build_dir variable
if exists('b:build_dir') && isdirectory(b:build_dir)
return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux'
return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'
endif
" 2. check for g:LatexBox_build_dir variable
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux'
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'
endif
" 3. use the base name of main tex file
return LatexBox_GetTexBasename(1) . '.aux'
return LatexBox_GetBuildBasename(1) . '.aux'
endfunction
function! LatexBox_GetLogFile()
" 1. check for b:build_dir variable
if exists('b:build_dir') && isdirectory(b:build_dir)
return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.log'
return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'
endif
" 2. check for g:LatexBox_build_dir variable
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.log'
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'
endif
" 3. use the base name of main tex file
return LatexBox_GetTexBasename(1) . '.log'
return LatexBox_GetBuildBasename(1) . '.log'
endfunction
function! LatexBox_GetOutputFile()
" 1. check for b:build_dir variable
if exists('b:build_dir') && isdirectory(b:build_dir)
return b:build_dir . '/' . LatexBox_GetTexBasename(0)
return b:build_dir . '/' . LatexBox_GetBuildBasename(0)
\ . '.' . g:LatexBox_output_type
endif
" 2. check for g:LatexBox_build_dir variable
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0)
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0)
\ . '.' . g:LatexBox_output_type
endif
" 3. use the base name of main tex file
return LatexBox_GetTexBasename(1) . '.' . g:LatexBox_output_type
return LatexBox_GetBuildBasename(1) . '.' . g:LatexBox_output_type
endfunction
" }}}
@@ -229,13 +245,19 @@ endfunction
" Default pdf viewer
if !exists('g:LatexBox_viewer')
if has('win32')
" On windows, 'running' a file will open it with the default program
let g:LatexBox_viewer = ''
let s:viewer = ''
if has('unix')
" echo -n necessary as uname -s will append \n otherwise
let s:uname = system('echo -n $(uname -s)')
if s:uname == "Darwin"
let s:viewer = 'open'
else
let g:LatexBox_viewer = 'xdg-open'
let s:viewer = 'xdg-open'
endif
endif
let g:LatexBox_viewer = s:viewer
endif
function! LatexBox_View(...)
let lvargs = join(a:000, ' ')
@@ -248,7 +270,12 @@ function! LatexBox_View(...)
if has('win32')
let cmd = '!start /b ' . cmd . ' >nul'
else
let cmd = '!' . cmd . ' &>/dev/null &'
let cmd = '!' . cmd . ' '
if fnamemodify(&shell, ':t') ==# 'fish'
let cmd .= ' >/dev/null ^/dev/null &'
else
let cmd .= ' &>/dev/null &'
endif
endif
silent execute cmd
if !has("gui_running")

View File

@@ -24,7 +24,7 @@ if !exists('g:LatexBox_cite_pattern')
let g:LatexBox_cite_pattern = '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{'
endif
if !exists('g:LatexBox_ref_pattern')
let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\)\?ref\*\?\_\s*{'
let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\|name\|auto\)\?ref\*\?\_\s*{'
endif
if !exists('g:LatexBox_completion_environments')
@@ -255,14 +255,14 @@ function! LatexBox_BibSearch(regexp)
if has('win32')
let l:old_shellslash = &l:shellslash
setlocal noshellslash
silent execute '! cd ' shellescape(LatexBox_GetTexRoot()) .
call system('cd ' . shellescape(LatexBox_GetTexRoot()) .
\ ' & bibtex -terse '
\ . fnamemodify(auxfile, ':t') . ' >nul'
\ . fnamemodify(auxfile, ':t') . ' >nul')
let &l:shellslash = l:old_shellslash
else
silent execute '! cd ' shellescape(LatexBox_GetTexRoot()) .
call system('cd ' . shellescape(LatexBox_GetTexRoot()) .
\ ' ; bibtex -terse '
\ . fnamemodify(auxfile, ':t') . ' >/dev/null'
\ . fnamemodify(auxfile, ':t') . ' >/dev/null')
endif
let lines = split(substitute(join(readfile(bblfile), "\n"),
@@ -367,6 +367,7 @@ function! s:ExtractLabels()
" Ignore cref entries (because they are duplicates)
if curname =~# "@cref$"
let [lblline, lblbegin] = searchpos( '\\newlabel{', 'ecW' )
continue
endif
@@ -458,7 +459,8 @@ function! s:GetLabelCache(file)
if !has_key(s:LabelCache , a:file) || s:LabelCache[a:file][0] != getftime(a:file)
" Open file in temporary split window for label extraction.
silent execute '1sp +let\ labels=s:ExtractLabels()|let\ inputs=s:ExtractInputs()|quit! ' . fnameescape(a:file)
let main_tex_file = LatexBox_GetMainTexFile()
silent execute '1sp +let\ b:main_tex_file=main_tex_file|let\ labels=s:ExtractLabels()|let\ inputs=s:ExtractInputs()|quit! ' . fnameescape(a:file)
let s:LabelCache[a:file] = [ getftime(a:file), labels, inputs ]
endif

View File

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

View File

@@ -75,8 +75,8 @@ if g:LatexBox_fold_automatic == 1
"
augroup FastFold
autocmd!
autocmd InsertEnter *.tex setlocal foldmethod=manual
autocmd InsertLeave *.tex setlocal foldmethod=expr
autocmd InsertEnter *.tex if !&diff | setlocal foldmethod=manual | endif
autocmd InsertLeave *.tex if !&diff | setlocal foldmethod=expr | endif
augroup end
else
setl foldmethod=manual
@@ -156,7 +156,7 @@ let s:notcomment = '\%(\%(\\\@<!\%(\\\\\)*\)\@<=%.*\)\@<!'
let s:envbeginpattern = s:notcomment . s:notbslash . '\\begin\s*{.\{-}}'
let s:envendpattern = s:notcomment . s:notbslash . '\\end\s*{.\{-}}'
let s:foldparts = '^\s*\\\%(' . join(g:LatexBox_fold_parts, '\|') . '\)'
let s:folded = '\(% Fake\|\\\(document\|begin\|end\|'
let s:folded = '\(% Fake\|\\\(document\|begin\|end\|paragraph\|'
\ . 'front\|main\|back\|app\|sub\|section\|chapter\|part\)\)'
function! LatexBox_FoldLevel(lnum)
@@ -193,6 +193,10 @@ function! LatexBox_FoldLevel(lnum)
endif
" Fold environments
if line =~# s:envbeginpattern && line =~# s:envendpattern
" If the begin and end pattern are on the same line , do not fold
return "="
else
if line =~# s:envbeginpattern
if g:LatexBox_fold_envs == 1
return "a1"
@@ -216,6 +220,7 @@ function! LatexBox_FoldLevel(lnum)
endif
endif
endif
endif
" Return foldlevel of previous line
return "="
@@ -288,7 +293,7 @@ function! LatexBox_FoldText_title()
endif
" Parts, sections and fakesections
let sections = '\(\(sub\)*section\|part\|chapter\)'
let sections = '\(\(sub\)*\(section\|paragraph\)\|part\|chapter\)'
let secpat1 = '^\s*\\' . sections . '\*\?\s*{'
let secpat2 = '^\s*\\' . sections . '\*\?\s*\['
if line =~ '\\frontmatter'

View File

@@ -23,6 +23,9 @@ endif
if ! exists('g:LatexBox_quickfix')
let g:LatexBox_quickfix = 1
endif
if ! exists('g:LatexBox_personal_latexmkrc')
let g:LatexBox_personal_latexmkrc = 0
endif
" }}}
@@ -138,7 +141,7 @@ endfunction
function! LatexBox_Latexmk(force)
" Define often used names
let basepath = LatexBox_GetTexBasename(1)
let basepath = LatexBox_GetBuildBasename(1)
let basename = fnamemodify(basepath, ':t')
let texroot = shellescape(LatexBox_GetTexRoot())
let mainfile = fnameescape(fnamemodify(LatexBox_GetMainTexFile(), ':t'))
@@ -162,9 +165,13 @@ function! LatexBox_Latexmk(force)
let env = 'set max_print_line=' . max_print_line . ' & '
elseif match(&shell, '/tcsh$') >= 0
let env = 'setenv max_print_line ' . max_print_line . '; '
else
if fnamemodify(&shell, ':t') ==# 'fish'
let env = 'set max_print_line ' . max_print_line . '; and '
else
let env = 'max_print_line=' . max_print_line
endif
endif
" Set environment options
let env .= ' ' . g:LatexBox_latexmk_env . ' '
@@ -173,11 +180,17 @@ function! LatexBox_Latexmk(force)
if has('win32')
" Make sure to switch drive as well as directory
let cmd = 'cd /D ' . texroot . ' && '
else
if fnamemodify(&shell, ':t') ==# 'fish'
let cmd = 'cd ' . texroot . '; and '
else
let cmd = 'cd ' . texroot . ' && '
endif
endif
let cmd .= env . ' latexmk'
if ! g:LatexBox_personal_latexmkrc
let cmd .= ' -' . g:LatexBox_output_type
endif
let cmd .= ' -quiet '
let cmd .= g:LatexBox_latexmk_options
if a:force
@@ -197,9 +210,13 @@ function! LatexBox_Latexmk(force)
" Redirect output to null
if has('win32')
let cmd .= ' >nul'
else
if fnamemodify(&shell, ':t') ==# 'fish'
let cmd .= ' >/dev/null ^/dev/null'
else
let cmd .= ' &>/dev/null'
endif
endif
if g:LatexBox_latexmk_async
" Check if VIM server exists
@@ -352,7 +369,7 @@ function! LatexBox_LatexmkClean(cleanall)
return
endif
let basename = LatexBox_GetTexBasename(1)
let basename = LatexBox_GetBuildBasename(1)
if has_key(g:latexmk_running_pids, basename)
echomsg "don't clean when latexmk is running"
@@ -438,10 +455,32 @@ function! LatexBox_LatexErrors(status, ...)
endif
endfunction
" Redefine uniq() for compatibility with older Vim versions (< 7.4.218)
function! s:uniq(list)
if exists('*uniq')
return uniq(a:list)
elseif len(a:list) <= 1
return a:list
endif
let last_element = get(a:list,0)
let uniq_list = [last_element]
for i in range(1, len(a:list)-1)
let next_element = get(a:list, i)
if last_element == next_element
continue
endif
let last_element = next_element
call add(uniq_list, next_element)
endfor
return uniq_list
endfunction
function! s:log_contains_error(file)
let lines = readfile(a:file)
let lines = filter(lines, 'v:val =~ ''^.*:\d\+: ''')
let lines = uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
let lines = s:uniq(map(lines, 'matchstr(v:val, ''^.*\ze:\d\+:'')'))
let lines = filter(lines, 'filereadable(fnameescape(v:val))')
return len(lines) > 0
endfunction
@@ -463,7 +502,7 @@ function! LatexBox_LatexmkStatus(detailed)
echo "latexmk is running (" . plist . ")"
endif
else
let basename = LatexBox_GetTexBasename(1)
let basename = LatexBox_GetBuildBasename(1)
if has_key(g:latexmk_running_pids, basename)
echo "latexmk is running"
else
@@ -477,12 +516,12 @@ endfunction
function! LatexBox_LatexmkStop(silent)
if empty(g:latexmk_running_pids)
if !a:silent
let basepath = LatexBox_GetTexBasename(1)
let basepath = LatexBox_GetBuildBasename(1)
let basename = fnamemodify(basepath, ':t')
echoerr "latexmk is not running for `" . basename . "'"
endif
else
let basepath = LatexBox_GetTexBasename(1)
let basepath = LatexBox_GetBuildBasename(1)
let basename = fnamemodify(basepath, ':t')
if has_key(g:latexmk_running_pids, basepath)
call s:kill_latexmk_process(g:latexmk_running_pids[basepath])

View File

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

View File

@@ -349,7 +349,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
if len(tree) > 3 && empty(tree[1])
call remove(tree, 1)
endif
if len(tree) > 1 && tree[0] =~ '^\\\(numberline\|tocsection\)'
if len(tree) > 1 && type(tree[0]) == type("") && tree[0] =~ '^\\\(\(chapter\)\?numberline\|tocsection\)'
let secnum = LatexBox_TreeToTex(tree[1])
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
@@ -359,7 +359,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
" parse section title
let text = LatexBox_TreeToTex(tree)
let text = substitute(text, '^{\+\|}\+$', '', 'g')
let text = substitute(text, '\m^\\\(no\)\?numberline\s*', '', '')
let text = substitute(text, '\m^\\\(no\)\?\(chapter\)\?numberline\s*', '', '')
let text = substitute(text, '\*', '', 'g')
" add TOC entry
@@ -379,6 +379,21 @@ function! LatexBox_TOC(...)
" Check if window already exists
let winnr = bufwinnr(bufnr('LaTeX TOC'))
" Two types of splits, horizontal and vertical
let l:hori = "new"
let l:vert = "vnew"
" Set General Vars and initialize size
let l:type = g:LatexBox_split_type
let l:size = 10
" Size detection
if l:type == l:hori
let l:size = g:LatexBox_split_length
elseif l:type == l:vert
let l:size = g:LatexBox_split_width
endif
if winnr >= 0
if a:0 == 0
silent execute winnr . 'wincmd w'
@@ -386,13 +401,12 @@ function! LatexBox_TOC(...)
" Supplying an argument to this function causes toggling instead
" of jumping to the TOC window
if g:LatexBox_split_resize
silent exe "set columns-=" . g:LatexBox_split_width
silent exe "set columns-=" . l:size
endif
silent execute 'bwipeout' . bufnr('LaTeX TOC')
endif
return
endif
" Read TOC
let [toc, fileindices] = s:ReadTOC(LatexBox_GetAuxFile(),
\ LatexBox_GetMainTexFile())
@@ -403,9 +417,10 @@ function! LatexBox_TOC(...)
" Create TOC window and set local settings
if g:LatexBox_split_resize
silent exe "set columns+=" . g:LatexBox_split_width
silent exe "set columns+=" . l:size
endif
silent exe g:LatexBox_split_side g:LatexBox_split_width . 'vnew LaTeX\ TOC'
silent exe g:LatexBox_split_side l:size . l:type . ' LaTeX\ TOC'
let b:toc = toc
let b:toc_numbers = 1
let b:calling_win = bufwinnr(calling_buf)

View File

@@ -87,8 +87,12 @@ function! s:TOCActivate(close)
endfor
" Find section in buffer (or inputted files)
call s:TOCFindMatch('\\' . entry['level'] . '\_\s*{' . titlestr . '}',
\ duplicates, files)
if entry['level'] == 'label'
let re = '\(\\label\_\s*{\|label\s*=\s*\)' . titlestr . '\>'
else
let re = '\\' . entry['level'] . '\_\s*{' . titlestr . '}'
endif
call s:TOCFindMatch(re, duplicates, files)
if a:close
if g:LatexBox_split_resize

View File

@@ -13,12 +13,13 @@ let b:did_ftplugin = 1
let b:undo_ftplugin = "setl cms< def< inc< inex< ofu< sua<"
setlocal iskeyword+=-
setlocal commentstring=//\ %s
setlocal commentstring=//%s
setlocal define=^\\s*\\%(@mixin\\\|=\\)
setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')
setlocal omnifunc=csscomplete#CompleteCSS
setlocal suffixesadd=.less
setlocal comments=s1:/*,mb:*,ex:*/
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,://
setlocal fo=jcroql
let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='

View File

@@ -1,3 +1,8 @@
if exists('g:loaded_mustache_handlebars') && g:loaded_mustache_handlebars
finish
endif
let g:loaded_mustache_handlebars = 1
let s:cpo_save = &cpo
set cpo&vim

View File

@@ -77,7 +77,7 @@ endif
"---------------------------------------------
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp< path<" .
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk< isf< kp< path<" .
\ " | unlet! b:browsefilter"
" proper matching for matchit plugin

View File

@@ -20,7 +20,7 @@ setlocal formatoptions-=t
setlocal formatoptions+=crqol
setlocal keywordprg=p6doc
setlocal comments=:#
setlocal comments=:#\|,:#=,:#
setlocal commentstring=#%s
" Change the browse dialog on Win32 to show mainly Perl-related files
@@ -43,7 +43,7 @@ setlocal define=[^A-Za-z_]
" after/ftplugin/perl6.vim file that contains
" set isfname-=:
set isfname+=:
setlocal iskeyword=48-57,_,A-Z,a-z,:,-
setlocal iskeyword=@,48-57,_,192-255,:,-,'
" Set this once, globally.
if !exists("perlpath")
@@ -65,11 +65,22 @@ if !exists("perlpath")
endif
endif
" Append perlpath to the existing path value, if it is set. Since we don't
" use += to do it because of the commas in perlpath, we have to handle the
" global / local settings, too.
if &l:path == ""
if &g:path == ""
let &l:path=perlpath
else
let &l:path=&g:path.",".perlpath
endif
else
let &l:path=&l:path.",".perlpath
endif
"---------------------------------------------
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path<" .
\ " | unlet! b:browsefilter"
" Restore the saved compatibility options.

34
ftplugin/ps1.vim Normal file
View 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
View 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"

View File

@@ -28,7 +28,7 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ ':' .
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
\ ':' .
\ '\<end\>' .
\ '\%(^\|[^.\:@$]\)\@<=\<end\:\@!\>' .
\ ',{:},\[:\],(:)'
let b:match_skip =
@@ -277,12 +277,12 @@ function! RubyBalloonexpr()
endfunction
function! s:searchsyn(pattern,syn,flags,mode)
let cnt = v:count1
norm! m'
if a:mode ==# 'v'
norm! gv
endif
let i = 0
let cnt = v:count ? v:count : 1
while i < cnt
let i = i + 1
let line = line('.')

View File

@@ -35,9 +35,10 @@ silent! setlocal formatoptions+=j
" otherwise it's better than nothing.
setlocal smartindent nocindent
if !exists("g:rust_recommended_style") || g:rust_recommended_style == 1
setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab
setlocal textwidth=99
endif
" This includeexpr isn't perfect, but it's a good start
setlocal includeexpr=substitute(v:fname,'::','/','g')

View File

@@ -1,14 +1,33 @@
setlocal formatoptions+=ro
setlocal commentstring=//%s
let &l:include = '^\s*import'
let &l:includeexpr = 'substitute(v:fname,"\\.","/","g")'
" Vim filetype plugin
" Language: Scala
" Maintainer: Derek Wyatt
" URL: https://github.com/derekwyatt/vim-scala
" License: Apache 2
" ----------------------------------------------------------------------------
if exists('b:did_ftplugin') || &cp
finish
endif
let b:did_ftplugin = 1
" j is fairly new in Vim, so don't complain if it's not there
setlocal formatoptions-=t formatoptions+=croqnl
silent! setlocal formatoptions+=j
" Just like c.vim, but additionally doesn't wrap text onto /** line when
" formatting. Doesn't bungle bulleted lists when formatting.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal shiftwidth=2 softtabstop=2 expandtab
setlocal include='^\s*import'
setlocal includeexpr='substitute(v:fname,"\\.","/","g")'
setlocal path+=src/main/scala,src/test/scala
setlocal suffixesadd=.scala
set makeprg=sbt\ -Dsbt.log.noformat=true\ compile
set efm=%E\ %#[error]\ %f:%l:\ %m,%C\ %#[error]\ %p^,%-C%.%#,%Z,
\%W\ %#[warn]\ %f:%l:\ %m,%C\ %#[warn]\ %p^,%-C%.%#,%Z,
\%-G%.%#
compiler sbt
if globpath(&rtp, 'plugin/fuf.vim') != ''
"
@@ -127,49 +146,6 @@ if globpath(&rtp, 'plugin/fuf.vim') != ''
endif
endif
" If you want to disable the default key mappings, write the following line in
" your ~/.vimrc
" let g:scala_use_default_keymappings = 0
if get(g:, 'scala_use_default_keymappings', 1)
nnoremap <buffer> <Leader>jt :call JustifyCurrentLine()<cr>
endif
"
" TagBar
"
let g:tagbar_type_scala = {
\ 'ctagstype' : 'scala',
\ 'kinds' : [
\ 'p:packages:1',
\ 'V:values',
\ 'v:variables',
\ 'T:types',
\ 't:traits',
\ 'o:objects',
\ 'a:aclasses',
\ 'c:classes',
\ 'r:cclasses',
\ 'm:methods'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 'T' : 'type',
\ 't' : 'trait',
\ 'o' : 'object',
\ 'a' : 'abstract class',
\ 'c' : 'class',
\ 'r' : 'case class'
\ },
\ 'scope2kind' : {
\ 'type' : 'T',
\ 'trait' : 't',
\ 'object' : 'o',
\ 'abstract class' : 'a',
\ 'class' : 'c',
\ 'case class' : 'r'
\ }
\ }
function! s:CreateOrExpression(keywords)
return '('.join(a:keywords, '|').')'
endfunction
@@ -191,5 +167,6 @@ function! s:NextSection(backwards)
endfunction
noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr>
noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr>
" vim:set sw=2 sts=2 ts=8 et:

31
ftplugin/scala/tagbar.vim Normal file
View File

@@ -0,0 +1,31 @@
"
" Support for Tagbar -- https://github.com/majutsushi/tagbar
"
" Hat tip to Leonard Ehrenfried for the built-in ctags deffile:
" https://leonard.io/blog/2013/04/editing-scala-with-vim/
"
if !exists(':Tagbar')
finish
endif
let g:tagbar_type_scala = {
\ 'ctagstype' : 'scala',
\ 'sro' : '.',
\ 'kinds' : [
\ 'p:packages',
\ 'T:types:1',
\ 't:traits',
\ 'o:objects',
\ 'O:case objects',
\ 'c:classes',
\ 'C:case classes',
\ 'm:methods',
\ 'V:values:1',
\ 'v:variables:1'
\ ]
\ }
" In case you've updated/customized your ~/.ctags and prefer to use it.
if get(g:, 'scala_use_builtin_tagbar_defs', 1)
let g:tagbar_type_scala.deffile = expand('<sfile>:p:h:h:h') . '/ctags/scala.ctags'
endif

37
ftplugin/toml.vim Normal file
View File

@@ -0,0 +1,37 @@
" 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
setlocal commentstring=#\ %s
" 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:

View File

@@ -1,10 +1,19 @@
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo-=C
compiler typescript
setlocal autoindent
setlocal smartindent
setlocal indentexpr&
setlocal cindent
setlocal cino=j1J1
setlocal commentstring=//\ %s
" Set 'formatoptions' to break comment lines but not other lines,
" " and insert the comment leader when hitting <CR> or using "o".
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< ofu< com< cms<"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,12 +1,62 @@
" Language: Blade (Laravel)
" Maintainer: xsbeats <jwalton512@gmail.com>
" URL: http://github.com/xsbeats/vim-blade
" License: WTFPL
" Language: Blade
" Author: Barry Deeney <sitemaster16@gmail.com>
" Version: 0.1
" Description: BLADE indent file based on HTML indentation...
" Check if this file has already been loaded
if exists("b:did_indent")
finish
endif
" Include HTML
runtime! indent/html.vim
runtime! indent/php.vim
silent! unlet b:did_indent
" What function do we need to use to detect indentation?
setlocal indentexpr=BladeIndent()
" What keys would trigger indentation?
setlocal indentkeys=o,O,<Return>,<>>,{,},!^F,0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
func! BladeIndent()
" What is the current line?
let current_line = v:lnum
" What is the current text?
let current_text = tolower(getline(current_line))
" What was the last non blank line?
let previous_line = prevnonblank(current_line)
" What was the last non blank text?
let previous_text = tolower(getline(previous_line))
" How large are indents??
let indent_size = &sw
" Check if we have a PHPIndent value...
let indent = GetPhpIndent()
" check if we have indent
if indent == -1
" Check if we have BLADE
if current_text =~ '^\s*@' || previous_text =~ '^\s*@'
" We need to add to the indent
return indent_size * indent(previous_text)
endif
" Check if we have HTML
if current_text =~ '^\s*<' || previous_text =~ '^\s*<'
" We now give the honors to HtmlIndent()
let indent = HtmlIndent()
endif
endif
" Give the indent back!
return indent
endfunc
" Make sure we store that flag!
let b:did_indent = 1

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL

View File

@@ -11,7 +11,7 @@ let b:did_indent = 1
setlocal nosmartindent
setlocal indentexpr=GetElixirIndent()
setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue:
setlocal indentkeys+=0=end,0=else,0=match,0=elsif,0=catch,0=after,0=rescue
if exists("*GetElixirIndent")
finish
@@ -25,6 +25,7 @@ let s:block_skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" . s:s
let s:block_start = 'do\|fn'
let s:block_middle = 'else\|match\|elsif\|catch\|after\|rescue'
let s:block_end = 'end'
let s:symbols_end = '\]\|}'
let s:arrow = '^.*->$'
let s:pipeline = '^\s*|>.*$'
@@ -59,7 +60,11 @@ function! GetElixirIndent()
let ind += opened_symbol * &sw
if current_line =~ '^\s*\(\]\|}\)'
if last_line =~ '^\s*\(' . s:symbols_end . '\)'
let ind += &sw
endif
if current_line =~ '^\s*\(' . s:symbols_end . '\)'
let ind -= &sw
endif
@@ -67,10 +72,17 @@ function! GetElixirIndent()
let ind += &sw
endif
" if line starts with pipeline
" and last line contains pipeline(s)
" align them
if last_line =~ '|>.*$' &&
\ current_line =~ s:pipeline
let ind = float2nr(match(last_line, '|>') / &sw) * &sw
" if line starts with pipeline
" and last line is an attribution
" indents pipeline in same level as attribution
if current_line =~ s:pipeline &&
elseif current_line =~ s:pipeline &&
\ last_line =~ '^[^=]\+=.\+$'
let b:old_ind = ind
let ind = float2nr(matchend(last_line, '=\s*[^ ]') / &sw) * &sw

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,13 @@ if exists("*GetErubyIndent")
endif
function! GetErubyIndent(...)
" The value of a single shift-width
if exists('*shiftwidth')
let sw = shiftwidth()
else
let sw = &sw
endif
if a:0 && a:1 == '.'
let v:lnum = line('.')
elseif a:0 && a:1 =~ '^\d'
@@ -70,24 +77,24 @@ function! GetErubyIndent(...)
let line = getline(lnum)
let cline = getline(v:lnum)
if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
let ind = ind - sw
endif
if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
let ind = ind - sw
endif
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>'
let ind = ind + &sw
let ind = ind + sw
elseif line =~# '<%[-=]\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>'
let ind = ind + &sw
let ind = ind + sw
endif
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
let ind = ind + &sw
let ind = ind + sw
endif
if line !~# '^\s*<%' && line =~# '%>\s*$'
let ind = ind - &sw
let ind = ind - sw
endif
if cline =~# '^\s*[-=]\=%>\s*$'
let ind = ind - &sw
let ind = ind - sw
endif
return ind
endfunction

View File

@@ -24,6 +24,17 @@ if exists("*GoIndent")
finish
endif
" use shiftwidth function only if it's available
if exists('*shiftwidth')
func s:sw()
return shiftwidth()
endfunc
else
func s:sw()
return &sw
endfunc
endif
function! GoIndent(lnum)
let prevlnum = prevnonblank(a:lnum-1)
if prevlnum == 0
@@ -40,17 +51,17 @@ function! GoIndent(lnum)
if prevl =~ '[({]\s*$'
" previous line opened a block
let ind += &sw
let ind += s:sw()
endif
if prevl =~# '^\s*\(case .*\|default\):$'
" previous line is part of a switch statement
let ind += &sw
let ind += s:sw()
endif
" TODO: handle if the previous line is a label.
if thisl =~ '^\s*[)}]'
" this line closed a block
let ind -= &sw
let ind -= s:sw()
endif
" Colons are tricky.
@@ -58,8 +69,10 @@ function! GoIndent(lnum)
" We ignore trying to deal with jump labels because (a) they're rare, and
" (b) they're hard to disambiguate from a composite literal key.
if thisl =~# '^\s*\(case .*\|default\):$'
let ind -= &sw
let ind -= s:sw()
endif
return ind
endfunction
" vim:ts=4:sw=4:et

5
indent/gohtmltmpl.vim Normal file
View File

@@ -0,0 +1,5 @@
if exists("b:did_indent")
finish
endif
runtime! indent/html.vim

View File

@@ -55,7 +55,7 @@ function! HIndent(lnum)
" This is the wrong thing if you are deeply indented already and want to put
" a where clause on the top-level construct, but there isn't much that can
" be done about that case...
if thisl =~ '^\s*where\s*$'
if thisl =~ '^\s*where\s*'
return previ + &sw
endif
@@ -175,11 +175,11 @@ function! HIndent(lnum)
return previ - &sw
endif
" On the other hand, if the previous line is a where with some bindings
" On the other hand, if the previous line is a do or where with some bindings
" following it on the same line, accommodate and align with the first non-ws
" char after the where
if prevl =~ '\Wwhere\s\+\w'
let bindStart = match(prevl, '\(\Wwhere\s\+\)\@<=\w')
if prevl =~ '\W\(do\|where\)\s\+\w'
let bindStart = match(prevl, '\(\W\(do\|where\)\s\+\)\@<=\w')
if bindStart != -1
return bindStart
endif
@@ -248,7 +248,7 @@ function! s:GetAndStripTrailingComments(lnum)
let aline = getline(a:lnum)
" We can't just remove the string literal since that leaves us with a
" trailing operator (=), so replace it with a fake identifier
let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', 's', '')
let noStrings = substitute(aline, '"\([^"]\|\\"\)*"', '\=repeat("s", len(submatch(0)))', '')
let noLineCom = substitute(noStrings, '--.*$', '', '')
" If there are no fancy block comments involved, skip some of this extra

View File

@@ -127,10 +127,14 @@ call add(s:tags, 'meter')
call add(s:tags, 'nav')
call add(s:tags, 'output')
call add(s:tags, 'progress')
call add(s:tags, 'picture')
call add(s:tags, 'rb')
call add(s:tags, 'rp')
call add(s:tags, 'rt')
call add(s:tags, 'rtc')
call add(s:tags, 'ruby')
call add(s:tags, 'section')
call add(s:tags, 'source')
call add(s:tags, 'summary')
call add(s:tags, 'time')
call add(s:tags, 'video')
@@ -187,6 +191,7 @@ if exists('g:html_exclude_tags')
endfor
endif
let s:html_indent_tags = join(s:tags, '\|')
let s:html_indent_tags = s:html_indent_tags.'\|\w\+\(-\w\+\)\+'
if exists('g:html_indent_tags')
let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags
endif
@@ -281,7 +286,7 @@ fun! HtmlIndentGet(lnum)
if 0 < searchpair(js, '', jse, 'nWb')
\ && 0 < searchpair(js, '', jse, 'nW')
" we're inside javascript
if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|template\)'
if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|\(ng-\)\?template\)'
\ && getline(lnum) !~ js && getline(a:lnum) !~ jse
if restore_ic == 0
setlocal noic

View File

@@ -15,6 +15,7 @@ setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJavascriptIndent()
setlocal formatexpr=Fixedgq(v:lnum,v:count)
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e
" Only define the function once.
@@ -48,11 +49,11 @@ let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_st
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
" Regex that defines continuation lines, not including (, {, or [.
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' . s:line_term
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=].*,\)' . s:line_term
" Regex that defines continuation lines.
" TODO: this needs to deal with if ...: and so on
let s:msl_regex = '\%([\\*+/.:([]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\)' . s:line_term
let s:msl_regex = s:continuation_regex
let s:one_line_scope_regex = '\<\%(if\|else\|for\|while\)\>[^{;]*' . s:line_term
@@ -437,3 +438,64 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
function! Fixedgq(lnum, count)
let l:tw = &tw ? &tw : 80;
let l:count = a:count
let l:first_char = indent(a:lnum) + 1
if mode() == 'i' " gq was not pressed, but tw was set
return 1
endif
" This gq is only meant to do code with strings, not comments
if s:IsLineComment(a:lnum, l:first_char) || s:IsInMultilineComment(a:lnum, l:first_char)
return 1
endif
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
return 1
endif
" Put all the lines on one line and do normal spliting after that
if l:count > 1
while l:count > 1
let l:count -= 1
normal J
endwhile
endif
let l:winview = winsaveview()
call cursor(a:lnum, l:tw + 1)
let orig_breakpoint = searchpairpos(' ', '', '\.', 'bcW', '', a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos(' ', '', '\.', 'bcW', s:skip_expr, a:lnum)
" No need for special treatment, normal gq handles edgecases better
if breakpoint[1] == orig_breakpoint[1]
call winrestview(l:winview)
return 1
endif
" Try breaking after string
if breakpoint[1] <= indent(a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos('\.', '', ' ', 'cW', s:skip_expr, a:lnum)
endif
if breakpoint[1] != 0
call feedkeys("r\<CR>")
else
let l:count = l:count - 1
endif
" run gq on new lines
if l:count == 1
call feedkeys("gqq")
endif
return 0
endfunction

169
indent/json.vim Normal file
View File

@@ -0,0 +1,169 @@
" Vim indent file
" Language: JSON
" Mantainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
" Last Change: 2014-05-13: merged Fix for square bracket matching by Jakar
" https://github.com/jakar/vim-json/commit/20b650e22aa750c4ab6a66aa646bdd95d7cd548a#diff-e81fc111b2052e306d126bd9989f7b7c
" Original Author: Rogerz Zhang <rogerz.zhang at gmail.com> http://github.com/rogerz/vim-json
" Acknowledgement: Based off of vim-javascript maintained by Darrick Wiebe
" http://www.vim.org/scripts/script.php?script_id=2765
" 0. Initialization {{{1
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJSONIndent()
setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
" Only define the function once.
if exists("*GetJSONIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
" Regex that defines blocks.
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
" 2. Auxiliary Functions {{{1
" ======================
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == jsonString
endfunction
" Find line above 'lnum' that isn't empty, or in a string.
function s:PrevNonBlankNonString(lnum)
let lnum = prevnonblank(a:lnum)
while lnum > 0
" If the line isn't empty or in a string, end search.
let line = getline(lnum)
if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while pos != -1
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), a:regex) + 1
return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
endfunction
" 3. GetJSONIndent Function {{{1
" =========================
function GetJSONIndent()
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let ind = -1
" If we got a closing bracket on an empty line, find its match and indent
" according to it.
let col = matchend(line, '^\s*[]}]')
if col > 0 && !s:IsInString(v:lnum, col)
call cursor(v:lnum, col)
let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
let pairstart = escape(bs[0], '[')
let pairend = escape(bs[1], ']')
let pairline = searchpair(pairstart, '', pairend, 'bW')
if pairline > 0
let ind = indent(pairline)
else
let ind = virtcol('.') - 1
endif
return ind
endif
" If we are in a multi-line string, don't do anything to it.
if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
" If the previous line ended with a block opening, add a level of indent.
" if s:Match(lnum, s:block_regex)
" return indent(lnum) + shiftwidth()
" endif
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' || counts[1] == '1' || counts[2] == '1'
return ind + shiftwidth()
else
call cursor(v:lnum, vcol)
end
endif
" }}}2
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:

198
indent/julia.vim Normal file
View File

@@ -0,0 +1,198 @@
" Vim indent file
" Language: Julia
" Maintainer: Carlo Baldassi <carlobaldassi@gmail.com>
" Last Change: 2011 dec 11
" Notes: based on Bram Moneaar's indent file for vim
setlocal autoindent
setlocal indentexpr=GetJuliaIndent()
setlocal indentkeys+==end,=else,=catch,=finally
setlocal indentkeys-=0#
setlocal indentkeys-=:
setlocal indentkeys-=0{
setlocal indentkeys-=0}
setlocal nosmartindent
" Only define the function once.
if exists("*GetJuliaIndent")
finish
endif
let s:skipPatterns = '\<julia\%(Comment\)\>'
function JuliaMatch(lnum, str, regex, st)
let s = a:st
while 1
let f = match(a:str, a:regex, s)
if f >= 0
let attr = synIDattr(synID(a:lnum,f+1,1),"name")
if attr =~ s:skipPatterns
let s = f+1
continue
endif
endif
break
endwhile
return f
endfunction
function GetJuliaNestingStruct(lnum)
" Auxiliary function to inspect the block structure of a line
let line = getline(a:lnum)
let s = 0
let blocks_stack = []
let num_closed_blocks = 0
while 1
let fb = JuliaMatch(a:lnum, line, '@\@<!\<\%(if\|else\%(if\)\=\|while\|for\|try\|catch\|finally\|function\|macro\|begin\|type\|immutable\|let\|\%(bare\)\?module\|quote\|do\)\>', s)
let fe = JuliaMatch(a:lnum, line, '@\@<!\<end\>', s)
if fb < 0 && fe < 0
" No blocks found
break
end
if fb >= 0 && (fb < fe || fe < 0)
" The first occurrence is an opening block keyword
" Note: some keywords (elseif,else,catch,finally) are both
" closing blocks and opening new ones
let i = JuliaMatch(a:lnum, line, '@\@<!\<if\>', s)
if i >= 0 && i == fb
let s = i+1
call add(blocks_stack, 'if')
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<elseif\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] == 'if'
let blocks_stack[-1] = 'elseif'
elseif (len(blocks_stack) > 0 && blocks_stack[-1] != 'elseif') || len(blocks_stack) == 0
call add(blocks_stack, 'elseif')
let num_closed_blocks += 1
endif
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<else\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] =~ '\<\%(else\)\=if\>'
let blocks_stack[-1] = 'else'
else
call add(blocks_stack, 'else')
let num_closed_blocks += 1
endif
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<try\>', s)
if i >= 0 && i == fb
let s = i+1
call add(blocks_stack, 'try')
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<catch\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && blocks_stack[-1] == 'try'
let blocks_stack[-1] = 'catch'
else
call add(blocks_stack, 'catch')
let num_closed_blocks += 1
endif
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<finally\>', s)
if i >= 0 && i == fb
let s = i+1
if len(blocks_stack) > 0 && (blocks_stack[-1] == 'try' || blocks_stack[-1] == 'catch')
let blocks_stack[-1] = 'finally'
else
call add(blocks_stack, 'finally')
let num_closed_blocks += 1
endif
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(bare\)\?module\>', s)
if i >= 0 && i == fb
let s = i+1
if i == 0
call add(blocks_stack, 'col1module')
else
call add(blocks_stack, 'other')
endif
continue
endif
let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(while\|for\|function\|macro\|begin\|type\|immutable\|let\|quote\|do\)\>', s)
if i >= 0 && i == fb
let s = i+1
call add(blocks_stack, 'other')
continue
endif
" Note: it should be impossible to get here
break
else
" The first occurrence is an 'end'
let s = fe+1
if len(blocks_stack) == 0
let num_closed_blocks += 1
else
call remove(blocks_stack, -1)
endif
continue
endif
" Note: it should be impossible to get here
break
endwhile
let num_open_blocks = len(blocks_stack) - count(blocks_stack, 'col1module')
return [num_open_blocks, num_closed_blocks]
endfunction
function GetJuliaIndent()
let s:save_ignorecase = &ignorecase
set noignorecase
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" At the start of the file use zero indent.
if lnum == 0
let &ignorecase = s:save_ignorecase
unlet s:save_ignorecase
return 0
endif
let ind = indent(lnum)
" Analyse previous line
let [num_open_blocks, num_closed_blocks] = GetJuliaNestingStruct(lnum)
" Increase indentation for each newly opened block
" in the previous line
while num_open_blocks > 0
let ind += &sw
let num_open_blocks -= 1
endwhile
" Analyse current line
let [num_open_blocks, num_closed_blocks] = GetJuliaNestingStruct(v:lnum)
" Decrease indentation for each closed block
" in the current line
while num_closed_blocks > 0
let ind -= &sw
let num_closed_blocks -= 1
endwhile
let &ignorecase = s:save_ignorecase
unlet s:save_ignorecase
return ind
endfunction

View File

@@ -48,11 +48,6 @@ function! GetPerlIndent()
return 0
endif
" Don't reindent comments on first column
if cline =~ '^#.'
return 0
endif
" Get current syntax item at the line's first char
let csynid = ''
if b:indent_use_syntax

View File

@@ -60,11 +60,6 @@ function! GetPerl6Indent()
return 0
endif
" Don't reindent coments on first column
if cline =~ '^#'
return 0
endif
" Get current syntax item at the line's first char
let csynid = ''
if b:indent_use_syntax

20
indent/ps1.vim Normal file
View 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<"

View File

@@ -369,6 +369,13 @@ function GetRubyIndent(...)
" 3.1. Setup {{{2
" ----------
" The value of a single shift-width
if exists('*shiftwidth')
let sw = shiftwidth()
else
let sw = &sw
endif
" For the current line, use the first argument if given, else v:lnum
let clnum = a:0 ? a:1 : v:lnum
@@ -388,7 +395,7 @@ function GetRubyIndent(...)
if s:Match(clnum, s:access_modifier_regex)
let class_line = s:FindContainingClass()
if class_line > 0
return indent(class_line) + &sw
return indent(class_line) + sw
endif
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
@@ -433,10 +440,14 @@ function GetRubyIndent(...)
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do'
" assignment to case/begin/etc, on the same line, hanging indent
let ind = virtcol('.') - 1
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the msl, align to the starting line,
" not to the msl
let ind = indent(line('.'))
else
" align to the msl
let ind = indent(msl)
endif
endif
@@ -458,7 +469,7 @@ function GetRubyIndent(...)
" If the current line starts with a leading operator, add a level of indent.
if s:Match(clnum, s:leading_operator_regex)
return indent(s:GetMSL(clnum)) + &sw
return indent(s:GetMSL(clnum)) + sw
endif
" 3.3. Work on the previous line. {{{2
@@ -485,23 +496,32 @@ function GetRubyIndent(...)
" If the previous line was a private/protected keyword, add a
" level of indent.
if s:Match(lnum, s:indent_access_modifier_regex)
return indent(lnum) + &sw
return indent(lnum) + sw
endif
elseif g:ruby_indent_access_modifier_style == 'outdent'
" If the previous line was a private/protected/public keyword, add
" a level of indent, since the keyword has been out-dented.
if s:Match(lnum, s:access_modifier_regex)
return indent(lnum) + &sw
return indent(lnum) + sw
endif
endif
if s:Match(lnum, s:continuable_regex) && s:Match(lnum, s:continuation_regex)
return indent(s:GetMSL(lnum)) + &sw + &sw
return indent(s:GetMSL(lnum)) + sw + sw
endif
" If the previous line ended with a block opening, add a level of indent.
if s:Match(lnum, s:block_regex)
return indent(s:GetMSL(lnum)) + &sw
let msl = s:GetMSL(lnum)
if getline(msl) =~ '=\s*\(#.*\)\=$'
" in the case of assignment to the msl, align to the starting line,
" not to the msl
let ind = indent(lnum) + sw
else
let ind = indent(msl) + sw
endif
return ind
endif
" If the previous line started with a leading operator, use its MSL's level
@@ -512,7 +532,7 @@ function GetRubyIndent(...)
" If the previous line ended with the "*" of a splat, add a level of indent
if line =~ s:splat_regex
return indent(lnum) + &sw
return indent(lnum) + sw
endif
" If the previous line contained unclosed opening brackets and we are still
@@ -527,20 +547,20 @@ function GetRubyIndent(...)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return ind + &sw
return ind + sw
else
return virtcol('.')
endif
else
let nonspace = matchend(line, '\S', opening.pos + 1) - 1
return nonspace > 0 ? nonspace : ind + &sw
return nonspace > 0 ? nonspace : ind + sw
endif
elseif closing.pos != -1
call cursor(lnum, closing.pos + 1)
normal! %
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + &sw
return indent('.') + sw
else
return indent('.')
endif
@@ -569,7 +589,7 @@ function GetRubyIndent(...)
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)
let ind = virtcol('.') - 1 + &sw
let ind = virtcol('.') - 1 + sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
@@ -606,9 +626,9 @@ function GetRubyIndent(...)
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
if s:Match(lnum, s:ruby_indent_keywords)
let ind = msl_ind + &sw
let ind = msl_ind + sw
if s:Match(lnum, s:end_end_regex)
let ind = ind - &sw
let ind = ind - sw
endif
return ind
endif
@@ -617,7 +637,7 @@ function GetRubyIndent(...)
" closing bracket, indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\([\])}]\|end\)')
if lnum == p_lnum
let ind = msl_ind + &sw
let ind = msl_ind + sw
else
let ind = msl_ind
endif

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Rust
" Author: Chris Morgan <me@chrismorgan.info>
" Last Change: 2013 Oct 29
" Last Change: 2014 Sep 13
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -10,7 +10,7 @@ endif
let b:did_indent = 1
setlocal cindent
setlocal cinoptions=L0,(0,Ws,JN,j1
setlocal cinoptions=L0,(0,Ws,J1,j1
setlocal cinkeys=0{,0},!^F,o,O,0[,0]
" Don't think cinwords will actually do anything at all... never mind
setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern
@@ -151,10 +151,11 @@ function GetRustIndent(lnum)
"
" There are probably other cases where we don't want to do this as
" well. Add them as needed.
return GetRustIndent(a:lnum - 1)
return indent(prevlinenum)
endif
" cindent doesn't do the module scope well at all; e.g.::
if !has("patch-7.4.355")
" cindent before 7.4.355 doesn't do the module scope well at all; e.g.::
"
" static FOO : &'static [bool] = [
" true,
@@ -188,6 +189,7 @@ function GetRustIndent(lnum)
endif
endif
endif
endif
" Fall back on cindent, which does it mostly right
return cindent(a:lnum)

View File

@@ -9,13 +9,9 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
setlocal autoindent
setlocal indentexpr=GetScalaIndent()
setlocal indentkeys=0{,0},0),!^F,<>>,o,O,e,=case,<CR>
setlocal autoindent
setlocal softtabstop=2
setlocal tabstop=2
setlocal shiftwidth=2
setlocal expandtab
if exists("*GetScalaIndent")
finish
@@ -543,7 +539,7 @@ function! GetScalaIndent()
let ind = ind - 1
endif
if scala#LineEndsInIncomplete(curline)
if scala#LineEndsInIncomplete(prevline)
call scala#ConditionalConfirm("19")
return ind
endif
@@ -597,5 +593,6 @@ function! GetScalaIndent()
return ind
endfunction
" vim:set ts=2 sts=2 sw=2:
" vim:set sw=2 sts=2 ts=8 et:
" vim600:fdm=marker fdl=1 fdc=0:

View File

@@ -17,8 +17,8 @@ let s:list_envs = ['itemize', 'enumerate', 'description']
" indent on \left( and on \(, but not on (
" indent on \left[ and on \[, but not on [
" indent on \left\{ and on {, but not on \{
let s:open_pat = '\\\@<!\%(\\begin\|\\left\|\\(\|\\\[\|{\)'
let s:close_pat = '\\\@<!\%(\\end\|\\right\|\\)\|\\\]\|}\)'
let s:open_pat = '\\\@<!\%(\\begin\|\\left\a\@!\|\\(\|\\\[\|{\)'
let s:close_pat = '\\\@<!\%(\\end\|\\right\a\@!\|\\)\|\\\]\|}\)'
let s:list_open_pat = '\\\@<!\\begin{\%(' . join(s:list_envs, '\|') . '\)}'
let s:list_close_pat = '\\\@<!\\end{\%(' . join(s:list_envs, '\|') . '\)}'
@@ -90,4 +90,47 @@ function! LatexBox_TexIndent()
endfunction
" }}}
" Restore cursor position, window position, and last search after running a
" command.
function! Latexbox_CallIndent()
" Save the current cursor position.
let cursor = getpos('.')
" Save the current window position.
normal! H
let window = getpos('.')
call setpos('.', cursor)
" Get first non-whitespace character of current line.
let line_start_char = matchstr(getline('.'), '\S')
" Get initial tab position.
let initial_tab = stridx(getline('.'), line_start_char)
" Execute the command.
execute 'normal! =='
" Get tab position difference.
let difference = stridx(getline('.'), line_start_char) - initial_tab
" Set new cursor Y position based on calculated difference.
let cursor[2] = cursor[2] + difference
" Restore the previous window position.
call setpos('.', window)
normal! zt
" Restore the previous cursor position.
call setpos('.', cursor)
endfunction
" autocmd to call indent after completion
" 7.3.598
if v:version > 703 || (v:version == 703 && has('patch598'))
augroup LatexBox_Completion
autocmd!
autocmd CompleteDone <buffer> call Latexbox_CallIndent()
augroup END
endif
" vim:fdm=marker:ff=unix:noet:ts=4:sw=4

89
indent/typescript.vim Normal file
View File

@@ -0,0 +1,89 @@
" Vim indent file, taken from indent/java.vim
" Language: Typescript
" Maintainer: None! Wanna improve this?
" Last Change: 2015 Mar 07
if get(g:, 'typescript_indent_disable')
finish
endif
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" Use javascript cindent options
setlocal cindent cinoptions& cinoptions+=j1,J1
setlocal indentkeys&
" Load typescript indent function
setlocal indentexpr=GetTypescriptIndent()
let b:undo_indent = "setl cin< cino< indentkeys< indentexpr<"
" Only define the function once
if exists("*GetTypescriptIndent")
finish
endif
" Make sure we have vim capabilities
let s:keepcpo = &cpo
set cpo&vim
function! TypescriptPrevNonBlankOrComment(lnum)
let pnum = prevnonblank(a:lnum)
" skip any comments (either `//`, `/*` or `*`)
while getline(pnum) =~ '^\s*\(\/\/\|\/\*\|\*\)'
let pnum = prevnonblank(pnum-1)
endwhile
return pnum
endfunction
function GetTypescriptIndent()
" default value: trust cindent
let ind = cindent(v:lnum)
if getline(v:lnum) =~ '^\s*[{}\*]'
return ind
endif
" The last non-empty line
let prev = TypescriptPrevNonBlankOrComment(v:lnum-1)
" Check if the previous line consists of a single `<variable> : <type>;`
" declaration (e.g. in interface definitions)
if getline(prev) =~ '^\s*\w\+\s*:[^{]\+;\s*$'
return indent(prev)
endif
" If a variable was declared and the semicolon omitted, do not indent
" the next line
if getline(prev) =~ '^\s*var\s\+\w\+'
return indent(prev)
endif
" Try to find out whether the last `}` ended a `<variable> : {` block
if getline(prev) =~ '};\s*$'
" jump to matching `{` bracket
call cursor(prev, 1)
silent normal %
" See if current line is type annotation without closing ';' but open
" `{` bracket
let lnum = line('.')
if getline(lnum) =~ '^\s*\w\+\s*:[^;]\+{'
let ind = indent(lnum)
endif
endif
return ind
endfunction
" Restore compatibility mode
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: et

32
indent/vala.vim Normal file
View 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
View File

@@ -0,0 +1,5 @@
if exists("b:did_indent")
finish
endif
runtime! indent/html.vim

View File

@@ -2,16 +2,13 @@
" Language: Arduino
" Maintainer: Sudar <sudar@sudarmuthu.com>
" Original Author: Johannes Hoff <johannes@johanneshoff.com>
" Last Change: 19 February 2013
" Last Change: 27 April 2015
" License: VIM license (:help license, replace vim by arduino.vim)
" Syntax highlighting like in the Arduino IDE
" Automatically generated by the script available at
" https://bitbucket.org/johannes/arduino-vim-syntax
" Using keywords from <arduino>/lib/keywords.txt
" From version:
" Thanks to original author Johannes Hoff and Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback!
" Thanks to Rafi Khan for Arduino 1.5.x support
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -28,33 +25,142 @@ else
runtime! syntax/cpp.vim
endif
syn keyword arduinoConstant BIN CHANGE DEC DEFAULT EXTERNAL FALLING HALF_PI HEX
syn keyword arduinoConstant HIGH INPUT INPUT_PULLUP INTERNAL INTERNAL1V1
syn keyword arduinoConstant INTERNAL2V56 LOW LSBFIRST MSBFIRST OCT OUTPUT PI
syn keyword arduinoConstant RISING TWO_PI
syn keyword arduinoFunc analogRead analogReference analogWrite
syn keyword arduinoFunc attachInterrupt bit bitClear bitRead bitSet
syn keyword arduinoFunc bitWrite delay delayMicroseconds detachInterrupt
syn keyword arduinoFunc digitalRead digitalWrite highByte interrupts
syn keyword arduinoFunc lowByte micros millis noInterrupts noTone pinMode
syn keyword arduinoFunc pulseIn shiftIn shiftOut tone
syn keyword arduinoMethod available begin end find findUntil flush loop
syn keyword arduinoMethod parseFloat parseInt peek print println read
syn keyword arduinoMethod readBytes readBytesUntil setTimeout setup
syn keyword arduinoModule Serial Serial1 Serial2 Serial3
syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain cos degrees
syn keyword arduinoStdFunc exp floor log map max min radians random randomSeed
syn keyword arduinoStdFunc round sin sq sqrt tan
syn keyword arduinoType boolean byte null String word
"C:/Program Files (x86)/Arduino\hardware\arduino\avr\libraries\EEPROM\keywords.txt{{{
syn keyword arduinoConstant EEPROM
"}}}
"C:/Program Files (x86)/Arduino\hardware\arduino\avr\libraries\SoftwareSerial\keywords.txt{{{
syn keyword arduinoFunc SoftwareSerial begin end read write available isListening overflow flush listen
syn keyword arduinoFunc peek
"}}}
"C:/Program Files (x86)/Arduino\hardware\arduino\avr\libraries\SPI\keywords.txt{{{
syn keyword arduinoConstant SPI SPI_CLOCK_DIV4 SPI_CLOCK_DIV16 SPI_CLOCK_DIV64 SPI_CLOCK_DIV128 SPI_CLOCK_DIV2 SPI_CLOCK_DIV8 SPI_CLOCK_DIV32 SPI_CLOCK_DIV64 SPI_MODE0
syn keyword arduinoConstant SPI_MODE1 SPI_MODE2 SPI_MODE3
syn keyword arduinoFunc begin end transfer setBitOrder setDataMode setClockDivider
"}}}
"C:/Program Files (x86)/Arduino\hardware\arduino\avr\libraries\Wire\keywords.txt{{{
syn keyword arduinoFunc begin setClock beginTransmission endTransmission requestFrom send receive onReceive onRequest Wire
"}}}
"C:/Program Files (x86)/Arduino\hardware\arduino\sam\libraries\SPI\keywords.txt{{{
syn keyword arduinoConstant SPI SPI_MODE0 SPI_MODE1 SPI_MODE2 SPI_MODE3 SPI_CONTINUE SPI_LAST
syn keyword arduinoFunc begin end transfer setDataMode setClockDivider
"}}}
"C:/Program Files (x86)/Arduino\hardware\arduino\sam\libraries\Wire\keywords.txt{{{
syn keyword arduinoFunc begin setClock beginTransmission endTransmission requestFrom send receive onReceive onRequest Wire
syn keyword arduinoFunc Wire1
"}}}
"C:/Program Files (x86)/Arduino\lib\keywords.txt{{{
syn keyword arduinoConstant HIGH LOW INPUT INPUT_PULLUP OUTPUT DEC BIN HEX OCT PI
syn keyword arduinoConstant HALF_PI TWO_PI LSBFIRST MSBFIRST CHANGE FALLING RISING DEFAULT EXTERNAL INTERNAL
syn keyword arduinoConstant INTERNAL1V1 INTERNAL2V56
syn keyword arduinoType boolean break byte case char class const continue default do
syn keyword arduinoType double else false float for if int long new null
syn keyword arduinoType private protected public register return short signed static String switch
syn keyword arduinoType this throw try true unsigned void while word boolean byte
syn keyword arduinoType char float int long word
syn keyword arduinoFunc abs acos asin atan atan2 ceil constrain cos degrees exp
syn keyword arduinoFunc floor log map max min radians random randomSeed round sin
syn keyword arduinoFunc sq sqrt tan pow bitRead bitWrite bitSet bitClear bit highByte
syn keyword arduinoFunc lowByte analogReference analogRead analogWrite attachInterrupt detachInterrupt delay delayMicroseconds digitalWrite digitalRead
syn keyword arduinoFunc interrupts millis micros noInterrupts noTone pinMode pulseIn shiftIn shiftOut tone
syn keyword arduinoFunc yield
syn keyword arduinoIdentifier Serial Serial1 Serial2 Serial3
syn keyword arduinoFunc SerialUSB begin end peek read
syn keyword arduinoFunc print println available availableForWrite flush setTimeout find findUntil parseInt parseFloat
syn keyword arduinoFunc readBytes readBytesUntil readString readStringUntil trim toUpperCase toLowerCase charAt compareTo concat
syn keyword arduinoFunc endsWith startsWith equals equalsIgnoreCase getBytes indexOf lastIndexOf length replace setCharAt
syn keyword arduinoFunc substring toCharArray toInt Keyboard Mouse press release releaseAll accept click
syn keyword arduinoFunc move isPressed setup loop
"}}}
"C:/Program Files (x86)/Arduino\libraries\Audio\keywords.txt{{{
syn keyword arduinoFunc Audio prepare write
"}}}
"C:/Program Files (x86)/Arduino\libraries\Bridge\keywords.txt{{{
syn keyword arduinoConstant FILE_READ FILE_WRITE FILE_APPEND
syn keyword arduinoFunc Bridge FileIO FileSystem Console Process Mailbox HttpClient YunServer YunClient begin
syn keyword arduinoFunc end available read peek write flush bool transfer put get
syn keyword arduinoFunc buffer noBuffer connected File seek position size close name isDirectory
syn keyword arduinoFunc openNextFile rewindDirectory addParameter runAsynchronously run running exitValue runShellCommand runShellCommandAsynchronously readMessage
syn keyword arduinoFunc writeMessage writeJSON message Available getAsynchronously ready getResult accept stop connect connected
"}}}
"C:/Program Files (x86)/Arduino\libraries\Esplora\keywords.txt{{{
syn keyword arduinoConstant JOYSTICK_BASE MAX_CHANNELS CH_SWITCH_1 CH_SWITCH_2 CH_SWITCH_3 CH_SWITCH_4 CH_SLIDER CH_LIGHT CH_TEMPERATURE CH_MIC
syn keyword arduinoConstant CH_JOYSTICK_SW CH_JOYSTICK_X CH_JOYSTICK_Y SWITCH_1 SWITCH_2 SWITCH_3 SWITCH_4 SWITCH_DOWN SWITCH_LEFT SWITCH_UP
syn keyword arduinoConstant SWITCH_RIGHT JOYSTICK_DOWN JOYSTICK_LEFT JOYSTICK_UP PRESSED RELEASED DEGREES_C DEGREES_F X_AXIS Y_AXIS
syn keyword arduinoConstant Z_AXIS
syn keyword arduinoFunc Esplora begin readSlider readLightSensor readTemperature readMicrophone readJoystickSwitch readJoystickButton readJoystickX readJoystickY
syn keyword arduinoFunc readAccelerometer readButton writeRGB writeRed writeGreen writeBlue readRed readGreen readBlue readBlue
syn keyword arduinoFunc readBlue readBlue tone noTone
"}}}
"C:/Program Files (x86)/Arduino\libraries\Ethernet\keywords.txt{{{
syn keyword arduinoFunc Ethernet EthernetClient EthernetServer IPAddress status connect write available read peek
syn keyword arduinoFunc flush stop connected begin beginPacket endPacket parsePacket remoteIP remotePort
"}}}
"C:/Program Files (x86)/Arduino\libraries\Firmata\keywords.txt{{{
syn keyword arduinoConstant MAX_DATA_BYTES DIGITAL_MESSAGE ANALOG_MESSAGE REPORT_ANALOG REPORT_DIGITAL REPORT_VERSION SET_PIN_MODE SYSTEM_RESET START_SYSEX END_SYSEX
syn keyword arduinoConstant PWM TOTAL_ANALOG_PINS TOTAL_DIGITAL_PINS TOTAL_PORTS ANALOG_PORT
syn keyword arduinoFunc Firmata callbackFunction systemResetCallbackFunction stringCallbackFunction sysexCallbackFunction begin begin printVersion blinkVersion printFirmwareVersion
syn keyword arduinoFunc setFirmwareVersion setFirmwareNameAndVersion available processInput sendAnalog sendDigital sendDigitalPortPair sendDigitalPort sendString sendString
syn keyword arduinoFunc sendSysex attach detach flush
"}}}
"C:/Program Files (x86)/Arduino\libraries\GSM\keywords.txt{{{
syn keyword arduinoConstant GSM GSM_SMS GPRS GSMPIN GSMPIN ERROR IDLE CONNECTING GSM_READY GPRS_READY
syn keyword arduinoConstant TRANSPARENT_CONNECTED IDLE_CALL CALLING RECEIVINGCALL TALKING GSM_MODE_UNDEFINED GSM_MODE_EGSM GSM_MODE_DCS GSM_MODE_PCS GSM_MODE_EGSM_DCS
syn keyword arduinoConstant GSM_MODE_GSM850_PCS GSM_MODE_GSM850_EGSM_DCS_PCS
syn keyword arduinoFunc GSMVoiceCall GSMClient GSMServer GSMModem GSMScanner begin shutdown gatVoiceCallStatus ready voiceCall
syn keyword arduinoFunc answerCall hangCall retrieveCallingNumber beginSMS endSMS remoteNumber attachGPRS begnWrite endWrite getIMEI
syn keyword arduinoFunc getCurrentCarrier getSignalStrength readNetworks isPIN checkPIN checkPUK changePIN switchPIN checkReg getPINUsed
syn keyword arduinoFunc setPINUsed getBand setBand getvoiceCallStatus
"}}}
"C:/Program Files (x86)/Arduino\libraries\LiquidCrystal\keywords.txt{{{
syn keyword arduinoFunc LiquidCrystal begin clear home print setCursor cursor noCursor blink noBlink
syn keyword arduinoFunc display noDisplay autoscroll noAutoscroll leftToRight rightToLeft scrollDisplayLeft scrollDisplayRight createChar setRowOffsets
"}}}
"C:/Program Files (x86)/Arduino\libraries\Scheduler\keywords.txt{{{
syn keyword arduinoFunc Scheduler startLoop
"}}}
"C:/Program Files (x86)/Arduino\libraries\SD\keywords.txt{{{
syn keyword arduinoConstant SD FILE_READ FILE_WRITE
syn keyword arduinoFunc File begin exists mkdir remove rmdir open close seek position
syn keyword arduinoFunc size
"}}}
"C:/Program Files (x86)/Arduino\libraries\Servo\keywords.txt{{{
syn keyword arduinoFunc Servo attach detach write read attached writeMicroseconds readMicroseconds
"}}}
"C:/Program Files (x86)/Arduino\libraries\SpacebrewYun\keywords.txt{{{
syn keyword arduinoFunc SpacebrewYun addPublish addSubscribe connect verbose monitor onMessage send onRangeMessage onStringMessage
syn keyword arduinoFunc onBooleanMessage onCustomMessage onOpen onClose onError
"}}}
"C:/Program Files (x86)/Arduino\libraries\Stepper\keywords.txt{{{
syn keyword arduinoFunc Stepper step setSpeed version direction speed
"}}}
"C:/Program Files (x86)/Arduino\libraries\Temboo\keywords.txt{{{
syn keyword arduinoFunc Temboo TembooChoreo begin setAccountName setAppKeyName setAppKey setChoreo setCredential setSavedInputs addInput
syn keyword arduinoFunc addOutputFilter setSettingsFileToWrite setSettingsFileToRead
"}}}
"C:/Program Files (x86)/Arduino\libraries\TFT\keywords.txt{{{
syn keyword arduinoConstant TFT
syn keyword arduinoFunc EsploraTFT
"}}}
"C:/Program Files (x86)/Arduino\libraries\TFT\src\utility\keywords.txt{{{
syn keyword arduinoFunc Adafruit_GFX Adafruit_ST7735 PImage drawPixel invertDisplay drawLine drawFastVLine drawFastHLine drawRect fillRect
syn keyword arduinoFunc fillScreen drawCircle drawCircleHelper fillCircle fillCircleHelper drawTriangle fillTriangle drawRoundRect fillRoundRect drawBitmap
syn keyword arduinoFunc drawChar setCursor setTextColor setTextSize setTextWrap height width setRotation getRotation newColor
syn keyword arduinoFunc background fill noFill stroke noStroke text textWrap textSize circle point
syn keyword arduinoFunc quad rect triangle loadImage image draw isValid
"}}}
"C:/Program Files (x86)/Arduino\libraries\USBHost\keywords.txt{{{
syn keyword arduinoFunc MouseController USBHost KeyboardController Task mouseMoved mouseDragged mousePressed mouseReleased getXChange getYChange
syn keyword arduinoFunc getButton keyPressed keyReleased getModifiers getKey getOemKey
"}}}
"C:/Program Files (x86)/Arduino\libraries\WiFi\keywords.txt{{{
syn keyword arduinoConstant SSID BSSID RSSI
syn keyword arduinoFunc WiFi WiFiUdp Client Server firmwareVersion status connect write available config
syn keyword arduinoFunc setDNS read flush stop connected begin disconnect macAddress localIP subnetMask
syn keyword arduinoFunSec gatewayIP encryptionType getResult getSocket WiFiClient WiFiServer WiFiUDP beginPacket endPacket parsePacket
syn keyword arduinoFunc remoteIP remotePort
"}}}
hi def link arduinoType Type
hi def link arduinoConstant Constant
hi def link arduinoStdFunc Function
hi def link arduinoFunc Function
hi def link arduinoMethod Function
hi def link arduinoModule Identifier
hi def link arduinoIdentifier Identifier

View File

@@ -1,35 +1,41 @@
" Language: Blade (Laravel)
" Maintainer: xsbeats <jwalton512@gmail.com>
" URL: http://github.com/xsbeats/vim-blade
" License: WTFPL
" Language: Blade
" Maintainer: Jason Walton <jwalton512@gmail.com>
" URL: https://github.com/xsbeats/vim-blade
" License: DBAD
if exists("b:current_syntax")
" Check if our syntax is already loaded
if exists('b:current_syntax') && b:current_syntax == 'blade'
finish
endif
runtime! syntax/html.vim
unlet b:current_syntax
" Include PHP
runtime! syntax/php.vim
unlet b:current_syntax
silent! unlet b:current_syntax
syn match bladeConditional /@\(choice\|each\|elseif\|extends\|for\|foreach\|if\|include\|lang\|section\|unless\|while\|yield\)\>\s*/ nextgroup=bladeParenBlock containedin=ALLBUT,bladeComment
" Echos
syn region bladeUnescapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{!!/ end=/!!}\s*/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn region bladeEscapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{{{\@!/ end=/}}\s*/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn region bladeEscapedEcho matchgroup=bladeEchoDelim start=/@\@<!\s*{{{{\@!/ end=/}}}/ oneline contains=@phpClTop containedin=ALLBUT,bladeComment
syn match bladeKeyword /@\(else\|endfor\|endforeach\|endif\|endsection\|endunless\|endwhile\|overwrite\|parent\|show\|stop\)\>/ containedin=ALL,bladeComment
" Structures
syn match bladeStructure /\s*@\(else\|empty\|endfor\|endforeach\|endforelse\|endif\|endpush\|endsection\|endunless\|endwhile\|overwrite\|show\|stop\)\>/
syn match bladeStructure /\s*@\(append\|choice\|each\|elseif\|extends\|for\|foreach\|forelse\|if\|include\|lang\|push\|section\|stack\|unless\|while\|yield\|\)\>\s*/ nextgroup=bladeParens
syn region bladeParens matchgroup=bladeParen start=/(/ end=/)/ contained contains=@bladeAll,@phpClTop
syn region bladeCommentBlock start="{{--" end="--}}" contains=bladeComment keepend containedin=TOP
syn match bladeComment /.*/ contained containedin=bladeCommentBlock
" Comments
syn region bladeComments start=/\s*{{--/ end=/--}}/ contains=bladeComment keepend
syn match bladeComment /.*/ contained containedin=bladeComments
syn region bladeEchoUnescaped matchgroup=bladeEchoDelim start="\([@|{]\)\@<!{{\(--\)\@!" end="}}" contains=@phpClInside containedin=ALLBUT,bladeComment
syn region bladeEchoEscaped matchgroup=bladeEchoDelim start="\(@\)\@<!{{{" end="}}}" contains=@phpClInside containedin=ALLBUT,bladeComment
syn cluster bladeStatement contains=bladeConditional,bladeKeyword
syn region bladeParenBlock start="(" end=")" contained oneline contains=bladeParenBlock,@phpClInside,@bladeStatement extend keepend
" Clusters
syn cluster bladeAll contains=bladeStructure,bladeParens
" Highlighting
hi def link bladeComment Comment
hi def link bladeConditional Conditional
hi def link bladeKeyword Keyword
hi def link bladeEchoDelim Delimiter
hi def link bladeParen Delimiter
hi def link bladeStructure Keyword
if !exists('b:current_syntax')
let b:current_syntax = 'blade'
endif

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Jul 05
" Last Change: 2015 Mar 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -35,28 +35,37 @@ syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
if !exists("c_no_utf")
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
endif
if exists("c_no_cformat")
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
" cCppString: same as cString, but ends at end of line
if !exists("cpp_no_cpp11") " ISO C++11
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
else
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
else
if !exists("c_no_cformat")
" Highlight % items in strings.
if !exists("c_no_c99") " ISO C99
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
else
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
endif
syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
endif
" cCppString: same as cString, but ends at end of line
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
" ISO C99
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
else
" older C or C++
syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
syn cluster cStringGroup contains=cCppString,cCppSkip
syn match cCharacter "L\='[^\\]'"
syn match cCharacter "L'[^']*'" contains=cSpecial
if exists("c_gnu")
@@ -70,7 +79,8 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
syn match cSpecialCharacter display "'\\x\x\{1,2}'"
syn match cSpecialCharacter display "L'\\x\x\+'"
if !exists("c_no_c11") " ISO C11
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11
if exists("c_no_cformat")
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
else
@@ -102,24 +112,24 @@ endif
" This should be before cErrInParen to avoid problems with #define ({ xxx })
if exists("c_curly_error")
syn match cCurlyError "}"
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell fold
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold
else
syn region cBlock start="{" end="}" transparent fold
endif
"catch errors caused by wrong parenthesis and brackets
" also accept <% for {, %> for }, <: for [ and :> for ] (C99)
" Catch errors caused by wrong parenthesis and brackets.
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99)
" But avoid matching <::.
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
if exists("c_no_curly_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "^^<%\|^%>"
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
@@ -127,13 +137,13 @@ if exists("c_no_curly_error")
endif
elseif exists("c_no_bracket_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "<%\|%>"
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cCppString,@Spell
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
@@ -141,19 +151,19 @@ elseif exists("c_no_bracket_error")
endif
else
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
syn match cParenError display "[\])]"
syn match cErrInParen display contained "<%\|%>"
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
else
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
syn match cParenError display "[\])]"
syn match cErrInParen display contained "[\]{}]\|<%\|%>"
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell
endif
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine
syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
@@ -322,6 +332,11 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
syn keyword cConstant TMP_MAX stderr stdin stdout
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
" POSIX 2001
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
" non-POSIX signals
syn keyword cConstant SIGWINCH SIGINFO
" Add POSIX errors as well
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
@@ -373,7 +388,7 @@ syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>
" Highlight User Labels
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
if s:ft ==# 'c' || exists("cpp_no_cpp11")
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup
endif
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
syn cluster cLabelGroup contains=cUserLabel
@@ -458,8 +473,7 @@ hi def link cTodo Todo
hi def link cBadContinuation Error
hi def link cCppOutSkip cCppOutIf2
hi def link cCppInElse2 cCppOutIf2
hi def link cCppOutIf2 cCppOut2 " Old syntax group for #if 0 body
hi def link cCppOut2 cCppOut " Old syntax group for #if of #if 0
hi def link cCppOutIf2 cCppOut
hi def link cCppOut Comment
let b:current_syntax = "c"

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
" Language: CoffeeScript
" Maintainer: Mick Koch <kchmck@gmail.com>
" Maintainer: Mick Koch <mick@kochm.co>
" URL: http://github.com/kchmck/vim-coffee-script
" License: WTFPL
@@ -32,7 +32,7 @@ hi def link coffeeConditional Conditional
syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
hi def link coffeeException Exception
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/
syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\|yield\)\>/
\ display
" The `own` keyword is only a keyword after `for`.
syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
@@ -92,7 +92,7 @@ syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/
hi def link coffeeString String
" A integer, including a leading plus or minus
syn match coffeeNumber /\%(\i\|\$\)\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/ display
syn match coffeeNumber /\%(\i\|\$\)\@<![-+]\?\d\+\%(e[+-]\?\d\+\)\?/ display
" A hex, binary, or octal number
syn match coffeeNumber /\<0[xX]\x\+\>/ display
syn match coffeeNumber /\<0[bB][01]\+\>/ display
@@ -107,7 +107,7 @@ hi def link coffeeFloat Float
" An error for reserved keywords, taken from the RESERVED array:
" http://coffeescript.org/documentation/docs/lexer.html#section-67
syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\|implements\|interface\|package\|private\|protected\|public\|static\|yield\)\>/
syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\|implements\|interface\|package\|private\|protected\|public\|static\)\>/
\ display
hi def link coffeeReservedError Error

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2014 May 13
" Last Change: 2015 Mar 1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -32,14 +32,21 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
syn keyword cppStorageClass mutable
syn keyword cppStructure class typename template namespace
syn keyword cppBoolean true false
syn keyword cppConstant __cplusplus
" C++ 11 extensions
if !exists("cpp_no_cpp11")
syn keyword cppType override final
syn keyword cppExceptions noexcept
syn keyword cppStorageClass constexpr decltype
syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" The minimum and maximum operators in GNU C++
@@ -63,7 +70,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppStructure Structure
HiLink cppBoolean Boolean
HiLink cppConstant Constant
HiLink cppRawDelimiter Delimiter
HiLink cppRawStringDelimiter Delimiter
HiLink cppRawString String
delcommand HiLink
endif

View File

@@ -6,7 +6,7 @@
" Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim
" Last Change: 2013 Nov.27
" Last Change: 2015 Apr.17
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -26,18 +26,19 @@ set cpo&vim
syn case ignore
" All HTML4 tags
syn keyword cssTagName abbr acronym address applet area a b base
syn keyword cssTagName basefont bdo big blockquote body br button
syn keyword cssTagName caption center cite code col colgroup dd del
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
syn keyword cssTagName iframe img input ins isindex kbd label legend li
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
syn keyword cssTagName option p param pre q s samp script select small
syn keyword cssTagName span strike strong style sub sup table tbody td
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
" HTML4 tags
syn keyword cssTagName abbr address area a b base
syn keyword cssTagName bdo blockquote body br button
syn keyword cssTagName caption cite code col colgroup dd del
syn keyword cssTagName dfn div dl dt em fieldset form
syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i
syn keyword cssTagName iframe input ins isindex kbd label legend li
syn keyword cssTagName link map menu meta noscript ol optgroup
syn keyword cssTagName option p param pre q s samp script small
syn keyword cssTagName span strong sub sup tbody td
syn keyword cssTagName textarea tfoot th thead title tr ul u var
syn keyword cssTagName object svg
syn match cssTagName /\<select\>\|\<style\>\|\<table\>/
" 34 HTML5 tags
syn keyword cssTagName article aside audio bdi canvas command data
@@ -47,8 +48,8 @@ syn keyword cssTagName output progress rt rp ruby section
syn keyword cssTagName source summary time track video wbr
" Tags not supported in HTML5
syn keyword cssDeprecated acronym applet basefont big center dir
syn keyword cssDeprecated font frame frameset noframes strike tt
" acronym applet basefont big center dir
" font frame frameset noframes strike tt
syn match cssTagName "\*"
@@ -70,10 +71,10 @@ endtry
" digits
syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)" contains=cssUnitDecorators
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" contains=cssUnitDecorators
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" contains=cssUnitDecorators
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" contains=cssUnitDecorators
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
@@ -116,15 +117,27 @@ syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssSt
" @font-face
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr,cssNoise
"syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
"syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise
syn match cssFontDescriptorProp contained "\<font-family\>"
syn keyword cssFontDescriptorProp contained src
syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>"
syn match cssFontDescriptorProp contained "\<unicode-range\>"
syn keyword cssFontDescriptorAttr contained all
syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>"
" src functions
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
syn match cssUnicodeRange contained "U+\x\+-\x\+"
" font-sytle and font-weight attributes
syn keyword cssFontDescriptorAttr contained normal italic oblique bold
" font-stretch attributes
syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" unicode-range attributes
syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
" font-feature-settings attributes
syn keyword cssFontDescriptorAttr contained on off
" The 16 basic color names
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
@@ -133,23 +146,23 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na
syn keyword cssColor contained aliceblue antiquewhite aquamarine azure
syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood
syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
syn match cssColor contained /dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)/
syn match cssColor contained /dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)/
syn match cssColor contained /darkslate\(blue\|gray\|grey\)/
syn match cssColor contained /dark\(turquoise\|violet\)/
syn match cssColor contained /\<dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/
syn match cssColor contained /\<dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/
syn match cssColor contained /\<darkslate\(blue\|gray\|grey\)\>/
syn match cssColor contained /\<dark\(turquoise\|violet\)\>/
syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick
syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold
syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink
syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen
syn keyword cssColor contained lemonchiffon limegreen linen magenta
syn match cssColor contained /light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)/
syn match cssColor contained /light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)/
syn match cssColor contained /light\(slategray\|slategrey\|steelblue\)/
syn match cssColor contained /medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)/
syn match cssColor contained /medium\(slateblue\|springgreen\|turquoise\|violetred\)/
syn match cssColor contained /\<light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/
syn match cssColor contained /\<light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/
syn match cssColor contained /\<light\(slategray\|slategrey\|steelblue\)\>/
syn match cssColor contained /\<medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/
syn match cssColor contained /\<medium\(slateblue\|springgreen\|turquoise\|violetred\)\>/
syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite
syn keyword cssColor contained oldlace olivedrab orange orangered orchid
syn match cssColor contained /pale\(goldenrod\|green\|turquoise\|violetred\)/
syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
@@ -265,6 +278,7 @@ syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
" CSS Fonts Module Level 3
" http://www.w3.org/TR/css-fonts-3/
syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
" font attributes
syn keyword cssFontAttr contained icon menu caption
syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
@@ -272,27 +286,21 @@ syn match cssFontAttr contained "\<message-box\>"
syn match cssFontAttr contained "\<status-bar\>"
syn keyword cssFontAttr contained larger smaller
syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>"
" font-family attributes
syn match cssFontAttr contained "\<\(sans-\)\=serif\>"
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Unicode Verdana Webdings Wingdings York Zapf
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf
syn keyword cssFontAttr contained cursive fantasy monospace
" font-feature-settings attributes
syn keyword cssFontAttr contained on off
" font-stretch attributes
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" font-style attributes
syn keyword cssFontAttr contained italic oblique
" font-variant-caps attributes
syn match cssFontAttr contained "\<\(all-\)\=\(small-\|petite-\|titling-\)caps\>"
syn keyword cssFontAttr contained unicase
" font-synthesis attributes
syn keyword cssFontAttr contained weight style
" font-weight attributes
syn keyword cssFontAttr contained bold bolder lighter
" TODO: font-variant-* attributes
"------------------------------------------------
" Webkit specific property/attributes
@@ -471,7 +479,7 @@ syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>"
syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>"
" Misc highlight groups
syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
syntax match cssNoise contained /\(:\|;\|\/\)/
" Comment

View File

@@ -1,188 +0,0 @@
" A simple syntax highlighting, simply alternate colors between two
" adjacent columns
" Init {{{2
let s:cpo_save = &cpo
set cpo&vim
scriptencoding utf8
if version < 600
syn clear
elseif exists("b:current_syntax")
finish
endif
" Helper functions "{{{2
fu! <sid>Warning(msg) "{{{3
" Don't redraw, so we are not overwriting messages from the ftplugin
" script
"redraw!
echohl WarningMsg
echomsg "CSV Syntax:" . a:msg
echohl Normal
endfu
fu! <sid>Esc(val, char) "{{2
return '\V'.escape(a:val, '\\'.a:char).'\m'
endfu
fu! <sid>CheckSaneSearchPattern() "{{{3
let s:del_def = ','
let s:col_def = '\%([^' . s:del_def . ']*' . s:del_def . '\|$\)'
let s:col_def_end = '\%([^' . s:del_def . ']*' . s:del_def . '\)'
" First:
" Check for filetype plugin. This syntax script relies on the filetype
" plugin, else, it won't work properly.
redir => s:a |sil filetype | redir end
let s:a=split(s:a, "\n")[0]
if match(s:a, '\cplugin:off') > 0
call <sid>Warning("No filetype support, only simple highlighting using"
\ . s:del_def . " as delimiter! See :h csv-installation")
endif
" Check Comment setting
if !exists("g:csv_comment")
let b:csv_cmt = split(&cms, '%s')
else
let b:csv_cmt = split(g:csv_comment, '%s')
endif
" Second: Check for sane defaults for the column pattern
" Not necessary to check for fixed width columns
if exists("b:csv_fixed_width_cols")
return
endif
" Try a simple highlighting, if the defaults from the ftplugin
" don't exist
let s:col = exists("b:col") && !empty(b:col) ? b:col
\ : s:col_def
let s:col_end = exists("b:col_end") && !empty(b:col_end) ? b:col_end
\ : s:col_def_end
let s:del = exists("b:delimiter") && !empty(b:delimiter) ? b:delimiter
\ : s:del_def
let s:cmts = exists("b:csv_cmt") ? b:csv_cmt[0] : split(&cms, '&s')[0]
let s:cmte = exists("b:csv_cmt") && len(b:csv_cmt) == 2 ? b:csv_cmt[1]
\ : ''
if line('$') > 1 && (!exists("b:col") || empty(b:col))
" check for invalid pattern, ftplugin hasn't been loaded yet
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
endif
endfu
" Syntax rules {{{2
fu! <sid>DoHighlight() "{{{3
if has("conceal") && !exists("g:csv_no_conceal") &&
\ !exists("b:csv_fixed_width_cols")
" old val
"\ '\%(.\)\@=/ms=e,me=e contained conceal cchar=' .
" Has a problem with the last line!
exe "syn match CSVDelimiter /" . s:col_end .
\ '/ms=e,me=e contained conceal cchar=' .
\ (&enc == "utf-8" ? "│" : '|')
"exe "syn match CSVDelimiterEOL /" . s:del .
" \ '\?$/ contained conceal cchar=' .
" \ (&enc == "utf-8" ? "│" : '|')
hi def link CSVDelimiter Conceal
elseif !exists("b:csv_fixed_width_cols")
" The \%(.\)\@<= makes sure, the last char won't be concealed,
" if it isn't a delimiter
"exe "syn match CSVDelimiter /" . s:col . '\%(.\)\@<=/ms=e,me=e contained'
exe "syn match CSVDelimiter /" . s:col_end . '/ms=e,me=e contained'
"exe "syn match CSVDelimiterEOL /" . s:del . '\?$/ contained'
if has("conceal")
hi def link CSVDelimiter Conceal
else
hi def link CSVDelimiter Ignore
endif
endif " There is no delimiter for csv fixed width columns
if !exists("b:csv_fixed_width_cols")
exe 'syn match CSVColumnEven nextgroup=CSVColumnOdd /'
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
\. s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%1l'
\. s:col . '/ contains=CSVDelimiter'
else
for i in range(len(b:csv_fixed_width_cols))
let pat = '/\%' . b:csv_fixed_width_cols[i] . 'v.*' .
\ ((i == len(b:csv_fixed_width_cols)-1) ? '/' :
\ '\%' . b:csv_fixed_width_cols[i+1] . 'v/')
let group = "CSVColumn" . (i%2 ? "Odd" : "Even" )
let ngroup = "CSVColumn" . (i%2 ? "Even" : "Odd" )
exe "syn match " group pat " nextgroup=" . ngroup
endfor
endif
" Comment regions
exe 'syn match CSVComment /'. <sid>Esc(s:cmts, '/'). '.*'.
\ (!empty(s:cmte) ? '\%('. <sid>Esc(s:cmte, '/'). '\)\?'
\: ''). '/'
hi def link CSVComment Comment
endfun
fu! <sid>DoSyntaxDefinitions() "{{{3
syn spell toplevel
" Not really needed
syn case ignore
hi def link CSVColumnHeaderOdd WarningMsg
hi def link CSVColumnHeaderEven WarningMsg
hi def link CSVColumnOdd DiffAdd
hi def link CSVColumnEven DiffChange
" Old Version
if 0
if &t_Co < 88
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderOdd ctermfg=DarkRed ctermbg=15
\ guibg=grey80 guifg=black term=underline cterm=standout,bold
\ gui=bold,underline
endif
hi default CSVColumnOdd ctermfg=DarkRed ctermbg=15 guibg=grey80
\ guifg=black term=underline cterm=bold gui=underline
else
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderOdd ctermfg=darkblue ctermbg=white
\ guibg=grey80 guifg=black cterm=standout,underline
\ gui=bold,underline
endif
hi default CSVColumnOdd ctermfg=darkblue ctermbg=white guibg=grey80
\ guifg=black cterm=reverse,underline gui=underline
endif
" ctermbg=8 should be safe, even in 8 color terms
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderEven ctermfg=white ctermbg=darkgrey
\ guibg=grey50 guifg=black term=bold cterm=standout,underline
\ gui=bold,underline
endif
hi default CSVColumnEven ctermfg=white ctermbg=darkgrey guibg=grey50
\ guifg=black term=bold cterm=underline gui=bold,underline
endif
endfun
" Main: {{{2
" Make sure, we are using a sane, valid pattern for syntax
" highlighting
call <sid>CheckSaneSearchPattern()
" Define all necessary syntax groups
call <sid>DoSyntaxDefinitions()
" Highlight the file
call <sid>DoHighlight()
" Set the syntax variable {{{2
let b:current_syntax="csv"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -7,12 +7,10 @@ if exists("b:current_syntax")
finish
endif
let b:current_syntax = "dockerfile"
syntax case ignore
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
syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
@@ -20,3 +18,14 @@ highlight link dockerfileString String
syntax match dockerfileComment "\v^\s*#.*$"
highlight link dockerfileComment Comment
syntax include @DockerSh syntax/sh.vim
try
syntax include @DockerSh after/syntax/sh.vim
catch
endtry
syntax region dockerShSnip matchgroup=DockerShGroup start="^\s*\%(RUN\|CMD\)\s\+" end="$" contains=@DockerSh
highlight link DockerShGroup dockerfileKeyword
let b:current_syntax = "dockerfile"

View File

@@ -15,13 +15,24 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
syn match elixirComment '#.*' contains=elixirTodo
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_record is_reference is_tuple is_exception
syn keyword elixirKeyword case cond for if unless try receive send
syn keyword elixirKeyword case when cond for if unless try receive send
syn keyword elixirKeyword exit raise throw after rescue catch else do end
syn keyword elixirKeyword quote unquote super
" Functions used on guards
syn keyword elixirKeyword contained is_atom is_binary is_bitstring is_boolean
syn keyword elixirKeyword contained is_float is_function is_integer is_list
syn keyword elixirKeyword contained is_map is_number is_pid is_port is_record
syn keyword elixirKeyword contained is_reference is_tuple is_exception abs
syn keyword elixirKeyword contained bit_size byte_size div elem hd length
syn keyword elixirKeyword contained map_size node rem round tl trunc tuple_size
syn match elixirGuard '.*when.*' contains=ALLBUT,@elixirNotTop
syn keyword elixirInclude import require alias use
syn keyword elixirSelf self
syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>'
" This unfortunately also matches function names in function calls
@@ -63,14 +74,14 @@ syn match elixirRegexQuantifier "[*?+][?+]\=" contained display
syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display
syn region elixirRegex matchgroup=elixirDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
syn region elixirString matchgroup=elixirDelimiter start="'" end="'" skip="\\'"
syn region elixirString matchgroup=elixirDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained
syn region elixirInterpolation matchgroup=elixirDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop
syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'\|\\\\"
syn region elixirString matchgroup=elixirStringDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained
syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop
syn region elixirDocStringStart matchgroup=elixirDocString start=+"""+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
syn region elixirDocStringStart matchgroup=elixirDocString start=+'''+ end=+$+ oneline contains=ALLBUT,@elixirNotTop
@@ -83,25 +94,25 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|
syn region elixirBlock matchgroup=elixirKeyword start="\<do\>\(:\)\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirKeyword start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirDelimiter
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter
syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l<" end=">" skip="\\\\\|\\>" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\[" end="\]" skip="\\\\\|\\\]" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l(" end=")" skip="\\\\\|\\)" fold contains=@elixirStringContained,elixirRegexEscapePunctuation
" Sigils surrounded with docString
syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\zs\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\zs\z1+ skip=+\\'+ fold
" Defines
syn keyword elixirDefine def nextgroup=elixirFunctionDeclaration skipwhite skipnl
@@ -160,6 +171,7 @@ hi def link elixirPseudoVariable Constant
hi def link elixirAlias Type
hi def link elixirBoolean Boolean
hi def link elixirVariable Identifier
hi def link elixirSelf Identifier
hi def link elixirUnusedVariable Comment
hi def link elixirNumber Number
hi def link elixirDocString String
@@ -172,4 +184,7 @@ hi def link elixirRegexQuantifier elixirSpecial
hi def link elixirSpecial Special
hi def link elixirString String
hi def link elixirSigil String
hi def link elixirDelimiter Delimiter
hi def link elixirStringDelimiter Delimiter
hi def link elixirRegexDelimiter Delimiter
hi def link elixirInterpolationDelimiter Delimiter
hi def link elixirSigilDelimiter Delimiter

View File

@@ -1,19 +1,34 @@
" Vim syntax file
" Language: Erlang
" Maintainer: Oscar Hellstr<74>m <oscar@oscarh.net>
" URL: http://oscar.hellstrom.st
" Version: 2010-08-09
" ------------------------------------------------------------------------------
" {{{1
" Options:
"
" Erlang BIFs
" g:erlangHighlightBif - highlight erlang built in functions (default: off)
"
" }}}
" -----------------------------------------------------------------------------
" Language: Erlang (http://www.erlang.org)
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Contributor: Adam Rutkowski <hq@mtod.org>
" Last Update: 2013-Nov-23
" License: Vim license
" URL: https://github.com/hcs42/vim-erlang
" Acknowledgements: This script was originally created by Kresimir Marzic [1].
" The script was then revamped by Csaba Hoch [2]. During the revamp, the new
" 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 6.x: Quit when a syntax file was already loaded
if version < 600
@@ -22,116 +37,235 @@ elseif exists("b:current_syntax")
finish
endif
" Erlang is case sensitive
let s:cpo_save = &cpo
set cpo&vim
" Case sensitive
syn case match
" Match groups {{{1
syn match erlangStringModifier /\\./ contained
syn match erlangStringModifier /\~\%(-\?[0-9*]\+\)\?\%(\.[0-9*]\+\..\?\)\?\%(c\|f\|e\|g\|s\|w\|p\|W\|P\|B\|X\|#\|b\|+\|n\|i\)/ contained
syn match erlangModifier /\$\\\?./
syn match erlangInteger /\<\%([0-9]\+#[0-9a-fA-F]\+\|[0-9]\+\)\>/
syn match erlangFloat /\<[0-9]\+\.[0-9]\+\%(e-\?[0-9]\+\)\?\>/
syn keyword erlangTodo TODO FIXME XXX contained
syn match erlangComment /%.*$/ contains=@Spell,erlangTodo
syn keyword erlangKeyword band bor bnot bsl bsr bxor div rem xor
syn keyword erlangKeyword try catch begin receive after cond fun let query
syn keyword erlangConditional case if of end
syn keyword erlangConditional not and or andalso orelse
syn keyword erlangConditional when
syn keyword erlangBoolean true false
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 erlangOperator /\/\|*\|+\|-\|++\|--/
syn match erlangOperator /->\|<-\|||\||\|!\|=/
syn match erlangOperator /=:=\|==\|\/=\|=\/=\|<\|>\|=<\|>=/
syn keyword erlangOperator div rem
syn region erlangString start=/"/ end=/"/ skip=/\\/ contains=@Spell,erlangStringModifier
syn match erlangVariable /\<[A-Z_]\w*\>/
syn match erlangAtom /\%(\%(^-\)\|#\)\@<!\<[a-z][A-Za-z0-9_]*\>\%(\s*[(:]\)\@!/
syn match erlangAtom /\\\@<!'[^']*\\\@<!'/
syn match erlangRecord /#\w\+/
syn match erlangTuple /{\|}/
syn match erlangList /\[\|\]/
syn match erlangAttribute /^-\%(vsn\|author\|copyright\|compile\|deprecated\|module\|export\|import\|behaviour\|export_type\|ignore_xref\) *(\@=/
syn match erlangInclude /^-include\%(_lib\)\?\s*(\@=/
syn match erlangRecordDef /^-record\s*(\@=/
syn match erlangDefine /^-\%(define\|undef\)\s*(\@=/
syn match erlangPreCondit /^-\%(ifdef\|ifndef\|else\|endif\)\%(\s*(\@=\)\?/
syn match erlangType /^-\%(spec\|type\)[( ]\@=/
syn match erlangMacro /\%(-define(\)\@<=\w\+/
syn match erlangMacro /?\w\+/
syn match erlangBitType /\%(\/\|-\)\@<=\%(bits\|bitstring\|binary\|integer\|float\|unit\)\>/
syn match erlangBitSize /:\@<=[0-9]\+/
syn match erlangBinary /<<\|>>/
" BIFS
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 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 erlangGBIF /erlang\(:\w\)\@=/
" }}}
" Link Erlang stuff to Vim groups {{{1
hi link erlangTodo Todo
hi link erlangString String
hi link erlangNoSpellString String
hi link erlangModifier SpecialChar
hi link erlangStringModifier SpecialChar
hi link erlangComment Comment
hi link erlangVariable Identifier
hi link erlangInclude Include
hi link erlangRecordDef Keyword
hi link erlangAttribute Keyword
hi link erlangKeyword Keyword
hi link erlangMacro Macro
hi link erlangDefine Define
hi link erlangPreCondit PreCondit
hi link erlangPreProc PreProc
hi link erlangDelimiter Delimiter
hi link erlangBitDelimiter Normal
hi link erlangOperator Operator
hi link erlangConditional Conditional
hi link erlangGuard Conditional
hi link erlangBoolean Boolean
hi link erlangAtom Constant
hi link erlangRecord Structure
hi link erlangInteger Number
hi link erlangFloat Number
hi link erlangFloat Number
hi link erlangFloat Number
hi link erlangFloat Number
hi link erlangHex Number
hi link erlangBIF Keyword
hi link erlangFun Keyword
hi link erlangList Delimiter
hi link erlangTuple Delimiter
hi link erlangBinary Keyword
hi link erlangBitVariable Identifier
hi link erlangBitType Type
hi link erlangType Type
hi link erlangBitSize Number
" }}}
" Optional linkings {{{1
if exists("g:erlangHighlightBif") && g:erlangHighlightBif
hi link erlangGBIF Keyword
if version >= 600
setlocal iskeyword+=$,@-@
endif
" Comments
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
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
" Numbers (minimum base is 2, maximum is 36.)
syn match erlangNumberInteger '\<\d\+\>'
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
" Strings, atoms, characters
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
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 match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
" Operators, separators
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
syn match erlangBracket '{\|}\|\[\|]\||\|||'
syn match erlangPipe '|'
syn match erlangRightArrow '->'
" Atoms, function calls (order is important)
syn match erlangAtom '\<\l[[:alnum:]_@]*' contains=erlangBoolean
syn keyword erlangBoolean true false contained
syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
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 erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
" Variables, macros, records, maps
syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
syn match erlangMacro '??\=[[:alnum:]_@]\+'
syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+'
syn match erlangMap '#'
syn match erlangRecord '#\s*\l[[:alnum:]_@]*'
" Shebang (this line has to be after the ErlangMap)
syn match erlangShebang '^#!.*'
" 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
" Constants and Directives
syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
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
syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
" Keywords
syn keyword erlangKeyword after begin case catch cond end fun if let of
syn keyword erlangKeyword receive when try
" Build-in-functions (BIFs)
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained
syn keyword erlangBIF binary_part binary_to_atom contained
syn keyword erlangBIF binary_to_existing_atom binary_to_float contained
syn keyword erlangBIF binary_to_integer bitstring_to_list contained
syn keyword erlangBIF binary_to_list binary_to_term bit_size contained
syn keyword erlangBIF byte_size check_old_code check_process_code contained
syn keyword erlangBIF concat_binary date delete_module demonitor contained
syn keyword erlangBIF disconnect_node element erase error exit contained
syn keyword erlangBIF float float_to_binary float_to_list contained
syn keyword erlangBIF garbage_collect get get_keys group_leader contained
syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
syn keyword erlangBIF is_float is_function is_integer is_list contained
syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
syn keyword erlangBIF is_record is_reference is_tuple length link contained
syn keyword erlangBIF list_to_atom list_to_binary contained
syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained
syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained
syn keyword erlangBIF list_to_tuple load_module make_ref max min contained
syn keyword erlangBIF module_loaded monitor monitor_node node contained
syn keyword erlangBIF nodes now open_port pid_to_list port_close contained
syn keyword erlangBIF port_command port_connect pre_loaded contained
syn keyword erlangBIF process_flag process_flag process_info contained
syn keyword erlangBIF process purge_module put register registered contained
syn keyword erlangBIF round self setelement size spawn spawn_link contained
syn keyword erlangBIF spawn_monitor spawn_opt split_binary contained
syn keyword erlangBIF statistics term_to_binary throw time tl contained
syn keyword erlangBIF trunc tuple_size tuple_to_list unlink contained
syn keyword erlangBIF unregister whereis contained
" Sync at the beginning of functions: if this is not used, multiline string
" are not always recognized, and the indentation script cannot use the
" "searchpair" (because it would not always skip strings and comments when
" looking for keywords and opening parens/brackets).
syn sync match erlangSync grouphere NONE "^[a-z]\s*("
let b:erlang_syntax_synced = 1
" Define the default highlighting. See ":help group-name" for the groups and
" 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
" }}}
let b:current_syntax = "erlang"
" vim: set foldmethod=marker:
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: sw=2 et

View File

@@ -22,7 +22,7 @@ elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
if b:eruby_subtype == ''
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$')
let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$')
endif
if b:eruby_subtype == 'rhtml'
let b:eruby_subtype = 'html'

View File

@@ -10,7 +10,9 @@
" let OPTION_NAME = 0
" in your ~/.vimrc file to disable particular options. You can also write:
" let OPTION_NAME = 1
" to enable particular options. At present, all options default to on.
" to enable particular options.
" At present, all options default to on, except highlight of:
" functions, methods and structs.
"
" - go_highlight_array_whitespace_error
" Highlights white space after "[]".
@@ -29,40 +31,44 @@ if exists("b:current_syntax")
finish
endif
if !exists("go_highlight_array_whitespace_error")
let go_highlight_array_whitespace_error = 1
if !exists("g:go_highlight_array_whitespace_error")
let g:go_highlight_array_whitespace_error = 1
endif
if !exists("go_highlight_chan_whitespace_error")
let go_highlight_chan_whitespace_error = 1
if !exists("g:go_highlight_chan_whitespace_error")
let g:go_highlight_chan_whitespace_error = 1
endif
if !exists("go_highlight_extra_types")
let go_highlight_extra_types = 1
if !exists("g:go_highlight_extra_types")
let g:go_highlight_extra_types = 1
endif
if !exists("go_highlight_space_tab_error")
let go_highlight_space_tab_error = 1
if !exists("g:go_highlight_space_tab_error")
let g:go_highlight_space_tab_error = 1
endif
if !exists("go_highlight_trailing_whitespace_error")
let go_highlight_trailing_whitespace_error = 1
if !exists("g:go_highlight_trailing_whitespace_error")
let g:go_highlight_trailing_whitespace_error = 1
endif
if !exists("go_highlight_operators")
let go_highlight_operators = 0
if !exists("g:go_highlight_operators")
let g:go_highlight_operators = 0
endif
if !exists("go_highlight_functions")
let go_highlight_functions = 0
if !exists("g:go_highlight_functions")
let g:go_highlight_functions = 0
endif
if !exists("go_highlight_methods")
let go_highlight_methods = 0
if !exists("g:go_highlight_methods")
let g:go_highlight_methods = 0
endif
if !exists("go_highlight_structs")
let go_highlight_structs = 0
if !exists("g:go_highlight_structs")
let g:go_highlight_structs = 0
endif
if !exists("g:go_highlight_build_constraints")
let g:go_highlight_build_constraints = 0
endif
syn case match
@@ -107,10 +113,10 @@ syn match goDeclaration /\<func\>/
" Predefined functions and values
syn keyword goBuiltins append cap close complex copy delete imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goConstants iota true false nil
syn keyword goBoolean iota true false nil
hi def link goBuiltins Keyword
hi def link goConstants Keyword
hi def link goBoolean Boolean
" Comments; their contents
syn keyword goTodo contained TODO FIXME XXX BUG
@@ -141,9 +147,11 @@ hi def link goEscapeError Error
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
syn match goFormatSpecifier /%[-#0 +]*\%(\*\|\d\+\)\=\%(\.\%(\*\|\d\+\)\)*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString
hi def link goString String
hi def link goRawString String
hi def link goFormatSpecifier goSpecialString
" Characters; their contents
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
@@ -182,12 +190,12 @@ syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>"
hi def link goImaginary Number
" Spaces after "[]"
if go_highlight_array_whitespace_error != 0
if g:go_highlight_array_whitespace_error != 0
syn match goSpaceError display "\(\[\]\)\@<=\s\+"
endif
" Spacing errors around the 'chan' keyword
if go_highlight_chan_whitespace_error != 0
if g:go_highlight_chan_whitespace_error != 0
" receive-only annotation on chan type
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
" send-only annotation on chan type
@@ -197,20 +205,20 @@ if go_highlight_chan_whitespace_error != 0
endif
" Extra types commonly seen
if go_highlight_extra_types != 0
if g:go_highlight_extra_types != 0
syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/
syn match goExtraType /\<io\.\(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
syn match goExtraType /\<unsafe\.Pointer\>/
endif
" Space-tab error
if go_highlight_space_tab_error != 0
if g:go_highlight_space_tab_error != 0
syn match goSpaceError display " \+\t"me=e-1
endif
" Trailing white space error
if go_highlight_trailing_whitespace_error != 0
if g:go_highlight_trailing_whitespace_error != 0
syn match goSpaceError display excludenl "\s\+$"
endif
@@ -227,45 +235,58 @@ hi def link goTodo Todo
" Operators;
if go_highlight_operators != 0
syn match goOperator /:=/
syn match goOperator />=/
syn match goOperator /<=/
syn match goOperator /==/
syn match goOperator /!=/
syn match goOperator /+=/
syn match goOperator /-=/
syn match goOperator /\s>\s/
syn match goOperator /\s<\s/
syn match goOperator /\s+\s/
syn match goOperator /\s-\s/
syn match goOperator /\s\*\s/
syn match goOperator /\s\/\s/
syn match goOperator /\s%\s/
if g:go_highlight_operators != 0
" match single-char operators: - + % < > ! & | ^ * =
" and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= ==
syn match goOperator /[-+%<>!&|^*=]=\?/
" match / and /=
syn match goOperator /\/\%(=\|\ze[^/*]\)/
" match two-char operators: << >> &^
" and corresponding three-char operators: <<= >>= &^=
syn match goOperator /\%(<<\|>>\|&^\)=\?/
" match remaining two-char operators: := && || <- ++ --
syn match goOperator /:=\|||\|<-\|++\|--/
" match ...
syn match goOperator /\.\.\./
endif
hi def link goOperator Operator
" Functions;
if go_highlight_functions != 0
if g:go_highlight_functions != 0
syn match goFunction /\(func\s\+\)\@<=\w\+\((\)\@=/
syn match goFunction /\()\s\+\)\@<=\w\+\((\)\@=/
endif
hi def link goFunction Function
" Methods;
if go_highlight_methods != 0
if g:go_highlight_methods != 0
syn match goMethod /\(\.\)\@<=\w\+\((\)\@=/
endif
hi def link goMethod Type
" Structs;
if go_highlight_structs != 0
if g:go_highlight_structs != 0
syn match goStruct /\(.\)\@<=\w\+\({\)\@=/
syn match goStructDef /\(type\s\+\)\@<=\w\+\(\s\+struct\s\+{\)\@=/
endif
hi def link goStruct Function
hi def link goStructDef Function
" Build Constraints
if g:go_highlight_build_constraints != 0
syn keyword goBuildOs contained ignore cgo android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows
syn keyword goBuildArch contained 386 amd64 amd64p32 arm
syn match goBuildDirective display contained "+build"
syn region goBuildComment start="//\s*+build" end="$" contains=goBuildDirective,goBuildOs,goBuildArch
syn region goBuildComment start="/\*\s*+build" end="\*/" contains=goBuildDirective,goBuildOs,goBuildArch
endif
hi def link goBuildComment Comment
hi def link goBuildOs Type
hi def link goBuildArch Type
hi def link goBuildDirective PreProc
" Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/

15
syntax/gohtmltmpl.vim Normal file
View File

@@ -0,0 +1,15 @@
if exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'html'
endif
runtime! syntax/gotexttmpl.vim
runtime! syntax/html.vim
unlet b:current_syntax
let b:current_syntax = "gohtmltmpl"
" vim:ts=4:sw=4:et

85
syntax/gotexttmpl.vim Normal file
View File

@@ -0,0 +1,85 @@
" Copyright 2011 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" gotexttmpl.vim: Vim syntax file for Go templates.
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syn case match
" Go escapes
syn match goEscapeOctal display contained "\\[0-7]\{3}"
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
syn match goEscapeX display contained "\\x\x\{2}"
syn match goEscapeU display contained "\\u\x\{4}"
syn match goEscapeBigU display contained "\\U\x\{8}"
syn match goEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
hi def link goEscapeOctal goSpecialString
hi def link goEscapeC goSpecialString
hi def link goEscapeX goSpecialString
hi def link goEscapeU goSpecialString
hi def link goEscapeBigU goSpecialString
hi def link goSpecialString Special
hi def link goEscapeError Error
" Strings and their contents
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString contained start=+`+ end=+`+
hi def link goString String
hi def link goRawString String
" Characters; their contents
syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU
syn region goCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@goCharacterGroup
hi def link goCharacter Character
" Integers
syn match goDecimalInt contained "\<\d\+\([Ee]\d\+\)\?\>"
syn match goHexadecimalInt contained "\<0x\x\+\>"
syn match goOctalInt contained "\<0\o\+\>"
syn match goOctalError contained "\<0\o*[89]\d*\>"
syn cluster goInt contains=goDecimalInt,goHexadecimalInt,goOctalInt
" Floating point
syn match goFloat contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
syn match goFloat contained "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
syn match goFloat contained "\<\d\+[Ee][-+]\d\+\>"
" Imaginary literals
syn match goImaginary contained "\<\d\+i\>"
syn match goImaginary contained "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary contained "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary contained "\<\d\+[Ee][-+]\d\+i\>"
hi def link goInt Number
hi def link goFloat Number
hi def link goImaginary Number
" Token groups
syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goInt,goFloat,goImaginary
syn keyword gotplControl contained if else end range with template
syn keyword gotplFunctions contained and html index js len not or print printf println urlquery eq ne lt le gt ge
syn match gotplVariable contained /\$[^ ]*\>/
syn match goTplIdentifier contained /\.[^ ]*\>/
hi def link gotplControl Keyword
hi def link gotplFunctions Function
hi def link goTplVariable Special
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display
syn region goTplComment start="{{/\*" end="\*/}}" display
syn region goTplComment start="\[\[/\*" end="\*/\]\]" display
hi def link gotplAction PreProc
hi def link goTplComment Comment
let b:current_syntax = "gotexttmpl"
" vim:ts=4:sw=4:et

View File

@@ -21,9 +21,10 @@
syn keyword htmlTagName contained article aside audio canvas command
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
syn keyword htmlTagName contained header hgroup keygen main mark meter menu nav output
syn keyword htmlTagName contained progress ruby rt rp section source summary time track video data
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
syn keyword htmlTagName contained template content shadow
syn keyword htmlTagName contained wbr bdi
syn keyword htmlTagName contained picture
" SVG tags
" http://www.w3.org/TR/SVG/
@@ -42,7 +43,7 @@ syn keyword htmlTagName contained missing-glyph mpath
syn keyword htmlTagName contained text textPath tref tspan vkern
" Custom Element
syn match htmlTagName contained "\<[a-z_]\+\(\-[a-z_]\+\)\+\>"
syn match htmlTagName contained "\<[a-z_]\([a-z0-9_.]\+\)\?\(\-[a-z0-9_.]\+\)\+\>"
" HTML 5 arguments
" Core Attributes
@@ -68,17 +69,21 @@ syn keyword htmlArg contained autoplay preload controls loop poster media kind c
" <form>, <input>, <button>
syn keyword htmlArg contained form autocomplete autofocus list min max step
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
syn keyword htmlArg contained required placeholder
syn keyword htmlArg contained required placeholder pattern
" <command>, <details>, <time>
syn keyword htmlArg contained label icon open datetime pubdate
" <script>
syn keyword htmlArg contained async
" <content>
syn keyword htmlArg contained select
" <iframe>
syn keyword htmlArg contained seamless srcdoc sandbox
" <picture>
syn keyword htmlArg contained srcset sizes
" Custom Data Attributes
" http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data
syn match htmlArg "\<\(data\(\-[a-z]\+\)\+\)\=\>" contained
syn match htmlArg "\<\(data\-\([a-z_][a-z0-9_.\-]*\)\+\)\=\>" contained
" Microdata
" http://dev.w3.org/html5/md/

View File

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

Some files were not shown because too many files have changed in this diff Show More