mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 03:53:52 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acd7ce5950 | ||
|
|
f24fecc338 | ||
|
|
23913e0598 | ||
|
|
1c21231175 |
@@ -33,7 +33,6 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
|||||||
- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, autoload, ftplugin, ftdetect)
|
- [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)
|
- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, compiler, autoload, ftplugin, ftdetect)
|
||||||
- [css](https://github.com/JulesWang/css.vim) (syntax)
|
- [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)
|
- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||||
- [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, ftdetect)
|
- [dockerfile](https://github.com/honza/dockerfile.vim) (syntax, ftdetect)
|
||||||
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, compiler, ftplugin, ftdetect)
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
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')
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
|||||||
" lessVariableValue | lessDefinition | cssComment | lessComment | https://github.com/groenewege/vim-less
|
" lessVariableValue | lessDefinition | cssComment | lessComment | https://github.com/groenewege/vim-less
|
||||||
" lessVariableDefinition | cssDefinition | cssComment | lessComment | https://github.com/lunaru/vim-less
|
" lessVariableDefinition | cssDefinition | cssComment | lessComment | https://github.com/lunaru/vim-less
|
||||||
|
|
||||||
call css_color#init('css', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment')
|
call css_color#init('css', 'extended', 'lessVariableValue,lessVariableDefinition,lessDefinition,lessCssAttribute,lessAttribute,cssDefinition,cssComment,lessCssComment,lessComment')
|
||||||
|
|||||||
6
after/syntax/lua.vim
Normal file
6
after/syntax/lua.vim
Normal 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
6
after/syntax/moon.vim
Normal 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')
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
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')
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
||||||
|
|
||||||
call css_color#init('css', 'scssAttribute,scssComment,scssVariableValue,sassCssAttribute,cssComment')
|
call css_color#init('css', 'extended', 'scssAttribute,scssComment,scssVariableValue,sassCssAttribute,cssComment')
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
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')
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
if !( has('gui_running') || &t_Co==256 ) | finish | endif
|
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')
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ function! s:parse_css_screen()
|
|||||||
call s:clear_matches()
|
call s:clear_matches()
|
||||||
call s:create_matches()
|
call s:create_matches()
|
||||||
endfunction
|
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 substitute( join( getline('w0','w$'), "\n" ), s:_hexcolor, '\=s:create_syn_match()', 'g' )
|
||||||
call s:clear_matches()
|
call s:clear_matches()
|
||||||
call s:create_matches()
|
call s:create_matches()
|
||||||
@@ -258,7 +258,7 @@ endfunction
|
|||||||
|
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
function! css_color#init(type, groups)
|
function! css_color#init(type, keywords, groups)
|
||||||
exe 'syn cluster colorableGroup contains=' . a:groups
|
exe 'syn cluster colorableGroup contains=' . a:groups
|
||||||
|
|
||||||
let b:has_color_hi = {}
|
let b:has_color_hi = {}
|
||||||
@@ -273,23 +273,58 @@ function! css_color#init(type, groups)
|
|||||||
|
|
||||||
exe 'call s:parse_'.a:type.'_screen()'
|
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 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 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 BG00008b guibg=#00008B guifg=#FFFFFF ctermbg=4 ctermfg=231
|
||||||
hi BG0000cd guibg=#0000CD 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 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 BG008b8b guibg=#008B8B guifg=#FFFFFF ctermbg=30 ctermfg=231
|
||||||
hi BG00bfff guibg=#00BFFF guifg=#000000 ctermbg=6 ctermfg=16
|
hi BG00bfff guibg=#00BFFF guifg=#000000 ctermbg=6 ctermfg=16
|
||||||
hi BG00ced1 guibg=#00CED1 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 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 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 BG191970 guibg=#191970 guifg=#FFFFFF ctermbg=237 ctermfg=231
|
||||||
hi BG1e90ff guibg=#1E90FF guifg=#000000 ctermbg=12 ctermfg=16
|
hi BG1e90ff guibg=#1E90FF guifg=#000000 ctermbg=12 ctermfg=16
|
||||||
hi BG20b2aa guibg=#20B2AA guifg=#000000 ctermbg=37 ctermfg=16
|
hi BG20b2aa guibg=#20B2AA guifg=#000000 ctermbg=37 ctermfg=16
|
||||||
@@ -317,10 +352,6 @@ function! css_color#init(type, groups)
|
|||||||
hi BG7cfc00 guibg=#7CFC00 guifg=#000000 ctermbg=3 ctermfg=16
|
hi BG7cfc00 guibg=#7CFC00 guifg=#000000 ctermbg=3 ctermfg=16
|
||||||
hi BG7fff00 guibg=#7FFF00 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 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 BG87ceeb guibg=#87CEEB guifg=#000000 ctermbg=117 ctermfg=16
|
||||||
hi BG87cefa guibg=#87CEFA 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
|
hi BG8a2be2 guibg=#8A2BE2 guifg=#FFFFFF ctermbg=12 ctermfg=231
|
||||||
@@ -347,7 +378,6 @@ function! css_color#init(type, groups)
|
|||||||
hi BGba55d3 guibg=#BA55D3 guifg=#000000 ctermbg=5 ctermfg=16
|
hi BGba55d3 guibg=#BA55D3 guifg=#000000 ctermbg=5 ctermfg=16
|
||||||
hi BGbc8f8f guibg=#BC8F8F guifg=#000000 ctermbg=138 ctermfg=16
|
hi BGbc8f8f guibg=#BC8F8F guifg=#000000 ctermbg=138 ctermfg=16
|
||||||
hi BGbdb76b guibg=#BDB76B guifg=#000000 ctermbg=247 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 BGc71585 guibg=#C71585 guifg=#FFFFFF ctermbg=5 ctermfg=231
|
||||||
hi BGcd5c5c guibg=#CD5C5C guifg=#000000 ctermbg=167 ctermfg=16
|
hi BGcd5c5c guibg=#CD5C5C guifg=#000000 ctermbg=167 ctermfg=16
|
||||||
hi BGcd853f guibg=#CD853F guifg=#000000 ctermbg=173 ctermfg=16
|
hi BGcd853f guibg=#CD853F guifg=#000000 ctermbg=173 ctermfg=16
|
||||||
@@ -383,8 +413,6 @@ function! css_color#init(type, groups)
|
|||||||
hi BGfaf0e6 guibg=#FAF0E6 guifg=#000000 ctermbg=255 ctermfg=16
|
hi BGfaf0e6 guibg=#FAF0E6 guifg=#000000 ctermbg=255 ctermfg=16
|
||||||
hi BGfafad2 guibg=#FAFAD2 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 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 BGff1493 guibg=#FF1493 guifg=#FFFFFF ctermbg=5 ctermfg=231
|
||||||
hi BGff4500 guibg=#FF4500 guifg=#FFFFFF ctermbg=9 ctermfg=231
|
hi BGff4500 guibg=#FF4500 guifg=#FFFFFF ctermbg=9 ctermfg=231
|
||||||
hi BGff6347 guibg=#FF6347 guifg=#000000 ctermbg=203 ctermfg=16
|
hi BGff6347 guibg=#FF6347 guifg=#000000 ctermbg=203 ctermfg=16
|
||||||
@@ -409,30 +437,9 @@ function! css_color#init(type, groups)
|
|||||||
hi BGfffacd guibg=#FFFACD guifg=#000000 ctermbg=255 ctermfg=16
|
hi BGfffacd guibg=#FFFACD guifg=#000000 ctermbg=255 ctermfg=16
|
||||||
hi BGfffaf0 guibg=#FFFAF0 guifg=#000000 ctermbg=15 ctermfg=16
|
hi BGfffaf0 guibg=#FFFAF0 guifg=#000000 ctermbg=15 ctermfg=16
|
||||||
hi BGfffafa guibg=#FFFAFA 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 BGffffe0 guibg=#FFFFE0 guifg=#000000 ctermbg=255 ctermfg=16
|
||||||
hi BGfffff0 guibg=#FFFFF0 guifg=#000000 ctermbg=15 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 BGf0f8ff AliceBlue contained containedin=@colorableGroup
|
||||||
syn keyword BGfaebd7 AntiqueWhite contained containedin=@colorableGroup
|
syn keyword BGfaebd7 AntiqueWhite contained containedin=@colorableGroup
|
||||||
syn keyword BG7fffd4 Aquamarine contained containedin=@colorableGroup
|
syn keyword BG7fffd4 Aquamarine contained containedin=@colorableGroup
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ let g:xmldata_html5 = {
|
|||||||
\ ],
|
\ ],
|
||||||
\ 'iframe': [
|
\ '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': [
|
\ 'img': [
|
||||||
\ [],
|
\ [],
|
||||||
@@ -659,6 +659,10 @@ let g:xmldata_html5 = {
|
|||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
\ extend(copy(global_attributes), {'cite': []})
|
\ extend(copy(global_attributes), {'cite': []})
|
||||||
\ ],
|
\ ],
|
||||||
|
\ 'rb': [
|
||||||
|
\ phrasing_elements,
|
||||||
|
\ global_attributes
|
||||||
|
\ ],
|
||||||
\ 'rp': [
|
\ 'rp': [
|
||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
@@ -667,10 +671,14 @@ let g:xmldata_html5 = {
|
|||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
\ ],
|
\ ],
|
||||||
\ 'ruby': [
|
\ 'rtc': [
|
||||||
\ phrasing_elements + ['rp', 'rt'],
|
\ phrasing_elements + ['rp', 'rt'],
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
\ ],
|
\ ],
|
||||||
|
\ 'ruby': [
|
||||||
|
\ phrasing_elements + ['rb', 'rp', 'rt', 'rtc'],
|
||||||
|
\ global_attributes
|
||||||
|
\ ],
|
||||||
\ 'samp': [
|
\ 'samp': [
|
||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
|
|||||||
2
build
2
build
@@ -93,7 +93,7 @@ PACKS="
|
|||||||
jade:digitaltoad/vim-jade
|
jade:digitaltoad/vim-jade
|
||||||
jasmine:glanotte/vim-jasmine
|
jasmine:glanotte/vim-jasmine
|
||||||
javascript:pangloss/vim-javascript
|
javascript:pangloss/vim-javascript
|
||||||
json:leshill/vim-json
|
json:sheerun/vim-json
|
||||||
jst:briancollins/vim-jst
|
jst:briancollins/vim-jst
|
||||||
latex:LaTeX-Box-Team/LaTeX-Box
|
latex:LaTeX-Box-Team/LaTeX-Box
|
||||||
less:groenewege/vim-less
|
less:groenewege/vim-less
|
||||||
|
|||||||
@@ -76,12 +76,7 @@ fun! s:SelectJavascript()
|
|||||||
endfun
|
endfun
|
||||||
au BufNewFile,BufRead * call s:SelectJavascript()
|
au BufNewFile,BufRead * call s:SelectJavascript()
|
||||||
autocmd BufNewFile,BufRead *.json set filetype=json
|
autocmd BufNewFile,BufRead *.json set filetype=json
|
||||||
augroup json_autocmd
|
autocmd BufNewFile,BufRead *.jsonp set filetype=json
|
||||||
autocmd!
|
|
||||||
autocmd FileType json setlocal autoindent
|
|
||||||
autocmd FileType json setlocal formatoptions=tcq2l
|
|
||||||
autocmd FileType json setlocal foldmethod=syntax
|
|
||||||
augroup END
|
|
||||||
au BufNewFile,BufRead *.ejs set filetype=jst
|
au BufNewFile,BufRead *.ejs set filetype=jst
|
||||||
au BufNewFile,BufRead *.jst set filetype=jst
|
au BufNewFile,BufRead *.jst set filetype=jst
|
||||||
au BufNewFile,BufRead *.hamljs set filetype=jst
|
au BufNewFile,BufRead *.hamljs set filetype=jst
|
||||||
@@ -142,7 +137,7 @@ function! s:DetectPerl6()
|
|||||||
endwhile
|
endwhile
|
||||||
endfunction
|
endfunction
|
||||||
autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6()
|
autocmd BufReadPost *.pl,*.pm,*.t call s:DetectPerl6()
|
||||||
autocmd BufNew,BufRead *.nqp setf perl6
|
autocmd BufNew,BufNewFile,BufRead *.nqp setf perl6
|
||||||
autocmd BufNewFile,BufRead *.proto setfiletype proto
|
autocmd BufNewFile,BufRead *.proto setfiletype proto
|
||||||
au BufNewFile,BufRead *.ps1 set ft=ps1
|
au BufNewFile,BufRead *.ps1 set ft=ps1
|
||||||
au BufNewFile,BufRead *.psd1 set ft=ps1
|
au BufNewFile,BufRead *.psd1 set ft=ps1
|
||||||
@@ -180,7 +175,7 @@ au BufNewFile,BufRead Podfile,*.podspec call s:setf('ruby')
|
|||||||
au BufRead,BufNewFile *.rs set filetype=rust
|
au BufRead,BufNewFile *.rs set filetype=rust
|
||||||
au BufRead,BufNewFile *.sbt set filetype=sbt.scala
|
au BufRead,BufNewFile *.sbt set filetype=sbt.scala
|
||||||
fun! s:DetectScala()
|
fun! s:DetectScala()
|
||||||
if getline(1) == '#!/usr/bin/env scala'
|
if getline(1) =~# '^#!\(/usr\)\?/bin/env\s\+scalas\?'
|
||||||
set filetype=scala
|
set filetype=scala
|
||||||
endif
|
endif
|
||||||
endfun
|
endfun
|
||||||
@@ -202,6 +197,7 @@ au BufNewFile,BufRead *.timer set filetype=systemd
|
|||||||
au BufRead,BufNewFile *.textile set filetype=textile
|
au BufRead,BufNewFile *.textile set filetype=textile
|
||||||
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
|
au BufNewFile,BufRead *.thrift setlocal filetype=thrift
|
||||||
autocmd BufNewFile,BufRead {.,}tmux.conf{.*,} setlocal filetype=tmux
|
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 *.toml set filetype=toml
|
||||||
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
|
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
|
||||||
autocmd BufNewFile,BufRead *.twig set filetype=twig
|
autocmd BufNewFile,BufRead *.twig set filetype=twig
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
|
|||||||
if len(tree) > 3 && empty(tree[1])
|
if len(tree) > 3 && empty(tree[1])
|
||||||
call remove(tree, 1)
|
call remove(tree, 1)
|
||||||
endif
|
endif
|
||||||
if len(tree) > 1 && type(tree[0]) == type("") && 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 = LatexBox_TreeToTex(tree[1])
|
||||||
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
|
let secnum = substitute(secnum, '\\\S\+\s', '', 'g')
|
||||||
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
|
let secnum = substitute(secnum, '\\\S\+{\(.\{-}\)}', '\1', 'g')
|
||||||
@@ -359,7 +359,7 @@ function! s:ReadTOC(auxfile, texfile, ...)
|
|||||||
" parse section title
|
" parse section title
|
||||||
let text = LatexBox_TreeToTex(tree)
|
let text = LatexBox_TreeToTex(tree)
|
||||||
let text = substitute(text, '^{\+\|}\+$', '', 'g')
|
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')
|
let text = substitute(text, '\*', '', 'g')
|
||||||
|
|
||||||
" add TOC entry
|
" add TOC entry
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ setlocal define=[^A-Za-z_]
|
|||||||
" after/ftplugin/perl6.vim file that contains
|
" after/ftplugin/perl6.vim file that contains
|
||||||
" set isfname-=:
|
" set isfname-=:
|
||||||
set isfname+=:
|
set isfname+=:
|
||||||
setlocal iskeyword=48-57,_,A-Z,a-z,:,-
|
setlocal iskeyword=@,48-57,_,192-255,:,-,'
|
||||||
|
|
||||||
" Set this once, globally.
|
" Set this once, globally.
|
||||||
if !exists("perlpath")
|
if !exists("perlpath")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
|||||||
\ ':' .
|
\ ':' .
|
||||||
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
|
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
|
||||||
\ ':' .
|
\ ':' .
|
||||||
\ '\<end\>' .
|
\ '\%(^\|[^.\:@$]\)\@<=\<end\:\@!\>' .
|
||||||
\ ',{:},\[:\],(:)'
|
\ ',{:},\[:\],(:)'
|
||||||
|
|
||||||
let b:match_skip =
|
let b:match_skip =
|
||||||
|
|||||||
@@ -10,35 +10,19 @@ endif
|
|||||||
|
|
||||||
let g:tagbar_type_scala = {
|
let g:tagbar_type_scala = {
|
||||||
\ 'ctagstype' : 'scala',
|
\ 'ctagstype' : 'scala',
|
||||||
|
\ 'sro' : '.',
|
||||||
\ 'kinds' : [
|
\ 'kinds' : [
|
||||||
\ 'p:packages:1',
|
\ 'p:packages',
|
||||||
\ 'V:values',
|
\ 'T:types:1',
|
||||||
\ 'v:variables',
|
|
||||||
\ 'T:types',
|
|
||||||
\ 't:traits',
|
\ 't:traits',
|
||||||
\ 'o:objects',
|
\ 'o:objects',
|
||||||
\ 'a:aclasses',
|
\ 'O:case objects',
|
||||||
\ 'c:classes',
|
\ 'c:classes',
|
||||||
\ 'r:cclasses',
|
\ 'C:case classes',
|
||||||
\ 'm:methods'
|
\ 'm:methods',
|
||||||
\ ],
|
\ 'V:values:1',
|
||||||
\ 'sro' : '.',
|
\ 'v:variables:1'
|
||||||
\ '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'
|
|
||||||
\ }
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" In case you've updated/customized your ~/.ctags and prefer to use it.
|
" In case you've updated/customized your ~/.ctags and prefer to use it.
|
||||||
|
|||||||
@@ -1,2 +1,19 @@
|
|||||||
|
if exists("b:did_ftplugin")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
compiler typescript
|
compiler typescript
|
||||||
setlocal commentstring=//\ %s
|
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
|
||||||
|
|||||||
@@ -24,6 +24,17 @@ if exists("*GoIndent")
|
|||||||
finish
|
finish
|
||||||
endif
|
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)
|
function! GoIndent(lnum)
|
||||||
let prevlnum = prevnonblank(a:lnum-1)
|
let prevlnum = prevnonblank(a:lnum-1)
|
||||||
if prevlnum == 0
|
if prevlnum == 0
|
||||||
@@ -37,21 +48,20 @@ function! GoIndent(lnum)
|
|||||||
let previ = indent(prevlnum)
|
let previ = indent(prevlnum)
|
||||||
|
|
||||||
let ind = previ
|
let ind = previ
|
||||||
let s:shiftwidth = shiftwidth()
|
|
||||||
|
|
||||||
if prevl =~ '[({]\s*$'
|
if prevl =~ '[({]\s*$'
|
||||||
" previous line opened a block
|
" previous line opened a block
|
||||||
let ind += s:shiftwidth
|
let ind += s:sw()
|
||||||
endif
|
endif
|
||||||
if prevl =~# '^\s*\(case .*\|default\):$'
|
if prevl =~# '^\s*\(case .*\|default\):$'
|
||||||
" previous line is part of a switch statement
|
" previous line is part of a switch statement
|
||||||
let ind += s:shiftwidth
|
let ind += s:sw()
|
||||||
endif
|
endif
|
||||||
" TODO: handle if the previous line is a label.
|
" TODO: handle if the previous line is a label.
|
||||||
|
|
||||||
if thisl =~ '^\s*[)}]'
|
if thisl =~ '^\s*[)}]'
|
||||||
" this line closed a block
|
" this line closed a block
|
||||||
let ind -= s:shiftwidth
|
let ind -= s:sw()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Colons are tricky.
|
" Colons are tricky.
|
||||||
@@ -59,8 +69,10 @@ function! GoIndent(lnum)
|
|||||||
" We ignore trying to deal with jump labels because (a) they're rare, and
|
" 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.
|
" (b) they're hard to disambiguate from a composite literal key.
|
||||||
if thisl =~# '^\s*\(case .*\|default\):$'
|
if thisl =~# '^\s*\(case .*\|default\):$'
|
||||||
let ind -= s:shiftwidth
|
let ind -= s:sw()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return ind
|
return ind
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" vim:ts=4:sw=4:et
|
||||||
|
|||||||
@@ -128,8 +128,10 @@ call add(s:tags, 'nav')
|
|||||||
call add(s:tags, 'output')
|
call add(s:tags, 'output')
|
||||||
call add(s:tags, 'progress')
|
call add(s:tags, 'progress')
|
||||||
call add(s:tags, 'picture')
|
call add(s:tags, 'picture')
|
||||||
|
call add(s:tags, 'rb')
|
||||||
call add(s:tags, 'rp')
|
call add(s:tags, 'rp')
|
||||||
call add(s:tags, 'rt')
|
call add(s:tags, 'rt')
|
||||||
|
call add(s:tags, 'rtc')
|
||||||
call add(s:tags, 'ruby')
|
call add(s:tags, 'ruby')
|
||||||
call add(s:tags, 'section')
|
call add(s:tags, 'section')
|
||||||
call add(s:tags, 'source')
|
call add(s:tags, 'source')
|
||||||
|
|||||||
169
indent/json.vim
Normal file
169
indent/json.vim
Normal 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:
|
||||||
|
|
||||||
@@ -440,10 +440,14 @@ function GetRubyIndent(...)
|
|||||||
|
|
||||||
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
|
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
|
||||||
\ strpart(line, col('.') - 1, 2) !~ 'do'
|
\ strpart(line, col('.') - 1, 2) !~ 'do'
|
||||||
|
" assignment to case/begin/etc, on the same line, hanging indent
|
||||||
let ind = virtcol('.') - 1
|
let ind = virtcol('.') - 1
|
||||||
elseif getline(msl) =~ '=\s*\(#.*\)\=$'
|
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('.'))
|
let ind = indent(line('.'))
|
||||||
else
|
else
|
||||||
|
" align to the msl
|
||||||
let ind = indent(msl)
|
let ind = indent(msl)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -508,7 +512,16 @@ function GetRubyIndent(...)
|
|||||||
|
|
||||||
" If the previous line ended with a block opening, add a level of indent.
|
" If the previous line ended with a block opening, add a level of indent.
|
||||||
if s:Match(lnum, s:block_regex)
|
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
|
endif
|
||||||
|
|
||||||
" If the previous line started with a leading operator, use its MSL's level
|
" If the previous line started with a leading operator, use its MSL's level
|
||||||
|
|||||||
@@ -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 [
|
" 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:open_pat = '\\\@<!\%(\\begin\|\\left\a\@!\|\\(\|\\\[\|{\)'
|
||||||
let s:close_pat = '\\\@<!\%(\\end\|\\right\|\\)\|\\\]\|}\)'
|
let s:close_pat = '\\\@<!\%(\\end\|\\right\a\@!\|\\)\|\\\]\|}\)'
|
||||||
let s:list_open_pat = '\\\@<!\\begin{\%(' . join(s:list_envs, '\|') . '\)}'
|
let s:list_open_pat = '\\\@<!\\begin{\%(' . join(s:list_envs, '\|') . '\)}'
|
||||||
let s:list_close_pat = '\\\@<!\\end{\%(' . join(s:list_envs, '\|') . '\)}'
|
let s:list_close_pat = '\\\@<!\\end{\%(' . join(s:list_envs, '\|') . '\)}'
|
||||||
|
|
||||||
|
|||||||
79
indent/typescript.vim
Normal file
79
indent/typescript.vim
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
" Vim indent file, taken from indent/java.vim
|
||||||
|
" Language: Typescript
|
||||||
|
" Maintainer: None! Wanna improve this?
|
||||||
|
" Last Change: 2015 Mar 07
|
||||||
|
|
||||||
|
" 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
|
||||||
|
|
||||||
|
" 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
|
||||||
70
syntax/c.vim
70
syntax/c.vim
@@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C
|
" Language: C
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" 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
|
" Quit when a (custom) syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -35,28 +35,37 @@ syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
|
|||||||
if !exists("c_no_utf")
|
if !exists("c_no_utf")
|
||||||
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
|
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
|
||||||
endif
|
endif
|
||||||
if exists("c_no_cformat")
|
|
||||||
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
if !exists("c_no_cformat")
|
||||||
" cCppString: same as cString, but ends at end of line
|
" Highlight % items in strings.
|
||||||
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_c99") " ISO C99
|
if !exists("c_no_c99") " ISO C99
|
||||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||||
else
|
else
|
||||||
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
|
||||||
endif
|
endif
|
||||||
syn match cFormat display "%%" contained
|
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
|
" 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
|
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||||
endif
|
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\='[^\\]'"
|
||||||
syn match cCharacter "L'[^']*'" contains=cSpecial
|
syn match cCharacter "L'[^']*'" contains=cSpecial
|
||||||
if exists("c_gnu")
|
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 "'\\x\x\{1,2}'"
|
||||||
syn match cSpecialCharacter display "L'\\x\x\+'"
|
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")
|
if exists("c_no_cformat")
|
||||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
||||||
else
|
else
|
||||||
@@ -102,24 +112,24 @@ endif
|
|||||||
" This should be before cErrInParen to avoid problems with #define ({ xxx })
|
" This should be before cErrInParen to avoid problems with #define ({ xxx })
|
||||||
if exists("c_curly_error")
|
if exists("c_curly_error")
|
||||||
syn match cCurlyError "}"
|
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
|
else
|
||||||
syn region cBlock start="{" end="}" transparent fold
|
syn region cBlock start="{" end="}" transparent fold
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"catch errors caused by wrong parenthesis and brackets
|
" Catch errors caused by wrong parenthesis and brackets.
|
||||||
" also accept <% for {, %> for }, <: for [ and :> for ] (C99)
|
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99)
|
||||||
" But avoid matching <::.
|
" 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
|
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 exists("c_no_curly_error")
|
||||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
syn match cErrInParen display contained "^^<%\|^%>"
|
syn match cErrInParen display contained "^^<%\|^%>"
|
||||||
else
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
@@ -127,13 +137,13 @@ if exists("c_no_curly_error")
|
|||||||
endif
|
endif
|
||||||
elseif exists("c_no_bracket_error")
|
elseif exists("c_no_bracket_error")
|
||||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
syn match cErrInParen display contained "<%\|%>"
|
syn match cErrInParen display contained "<%\|%>"
|
||||||
else
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
@@ -141,19 +151,19 @@ elseif exists("c_no_bracket_error")
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||||
syn match cParenError display "[\])]"
|
syn match cParenError display "[\])]"
|
||||||
syn match cErrInParen display contained "<%\|%>"
|
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
|
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
|
" 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 region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
|
||||||
syn match cParenError display "[\])]"
|
syn match cParenError display "[\])]"
|
||||||
syn match cErrInParen display contained "[\]{}]\|<%\|%>"
|
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
|
endif
|
||||||
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine
|
" 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
|
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 SEEK_CUR SEEK_END SEEK_SET
|
||||||
syn keyword cConstant TMP_MAX stderr stdin stdout
|
syn keyword cConstant TMP_MAX stderr stdin stdout
|
||||||
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
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
|
" Add POSIX errors as well
|
||||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
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
|
" 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
|
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")
|
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
|
endif
|
||||||
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
|
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':'
|
||||||
syn cluster cLabelGroup contains=cUserLabel
|
syn cluster cLabelGroup contains=cUserLabel
|
||||||
@@ -458,8 +473,7 @@ hi def link cTodo Todo
|
|||||||
hi def link cBadContinuation Error
|
hi def link cBadContinuation Error
|
||||||
hi def link cCppOutSkip cCppOutIf2
|
hi def link cCppOutSkip cCppOutIf2
|
||||||
hi def link cCppInElse2 cCppOutIf2
|
hi def link cCppInElse2 cCppOutIf2
|
||||||
hi def link cCppOutIf2 cCppOut2 " Old syntax group for #if 0 body
|
hi def link cCppOutIf2 cCppOut
|
||||||
hi def link cCppOut2 cCppOut " Old syntax group for #if of #if 0
|
|
||||||
hi def link cCppOut Comment
|
hi def link cCppOut Comment
|
||||||
|
|
||||||
let b:current_syntax = "c"
|
let b:current_syntax = "c"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C++
|
" 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>
|
" 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 5.x: Clear all syntax items
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
@@ -32,13 +32,20 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
|
|||||||
syn keyword cppStorageClass mutable
|
syn keyword cppStorageClass mutable
|
||||||
syn keyword cppStructure class typename template namespace
|
syn keyword cppStructure class typename template namespace
|
||||||
syn keyword cppBoolean true false
|
syn keyword cppBoolean true false
|
||||||
|
syn keyword cppConstant __cplusplus
|
||||||
|
|
||||||
" C++ 11 extensions
|
" C++ 11 extensions
|
||||||
if !exists("cpp_no_cpp11")
|
if !exists("cpp_no_cpp11")
|
||||||
syn keyword cppType override final
|
syn keyword cppType override final
|
||||||
syn keyword cppExceptions noexcept
|
syn keyword cppExceptions noexcept
|
||||||
syn keyword cppStorageClass constexpr decltype
|
syn keyword cppStorageClass constexpr decltype thread_local
|
||||||
syn keyword cppConstant nullptr
|
syn keyword cppConstant nullptr
|
||||||
|
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=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
syn keyword htmlTagName contained article aside audio canvas command
|
syn keyword htmlTagName contained article aside audio canvas command
|
||||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
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 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 template content shadow
|
||||||
syn keyword htmlTagName contained wbr bdi
|
syn keyword htmlTagName contained wbr bdi
|
||||||
syn keyword htmlTagName contained picture
|
syn keyword htmlTagName contained picture
|
||||||
@@ -76,12 +76,14 @@ syn keyword htmlArg contained label icon open datetime pubdate
|
|||||||
syn keyword htmlArg contained async
|
syn keyword htmlArg contained async
|
||||||
" <content>
|
" <content>
|
||||||
syn keyword htmlArg contained select
|
syn keyword htmlArg contained select
|
||||||
|
" <iframe>
|
||||||
|
syn keyword htmlArg contained seamless srcdoc sandbox
|
||||||
" <picture>
|
" <picture>
|
||||||
syn keyword htmlArg contained srcset sizes
|
syn keyword htmlArg contained srcset sizes
|
||||||
|
|
||||||
" Custom Data Attributes
|
" Custom Data Attributes
|
||||||
" http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data
|
" 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
|
" Microdata
|
||||||
" http://dev.w3.org/html5/md/
|
" http://dev.w3.org/html5/md/
|
||||||
|
|||||||
@@ -68,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 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 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
|
syn match jadeError "\$" contained
|
||||||
|
|
||||||
|
|||||||
126
syntax/json.vim
126
syntax/json.vim
@@ -1,13 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: JSON
|
" Language: JSON
|
||||||
" Maintainer: Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
|
" Maintainer: Eli Parra <eli@elzr.com> https://github.com/elzr/vim-json
|
||||||
" Last Change: 2009-06-16
|
" Last Change: 2014-12-20 Load ftplugin/json.vim
|
||||||
" Version: 0.4
|
|
||||||
" {{{1
|
|
||||||
|
|
||||||
" Syntax setup {{{2
|
|
||||||
" For version 5.x: Clear all syntax items
|
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
|
||||||
|
|
||||||
if !exists("main_syntax")
|
if !exists("main_syntax")
|
||||||
if version < 600
|
if version < 600
|
||||||
@@ -18,54 +12,95 @@ if !exists("main_syntax")
|
|||||||
let main_syntax = 'json'
|
let main_syntax = 'json'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Syntax: Strings {{{2
|
syntax match jsonNoise /\%(:\|,\)/
|
||||||
syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape
|
|
||||||
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
|
|
||||||
syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+
|
|
||||||
|
|
||||||
" Syntax: Escape sequences {{{3
|
" Syntax: Strings
|
||||||
|
" Separated into a match and region because a region by itself is always greedy
|
||||||
|
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
|
||||||
|
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
|
||||||
|
|
||||||
|
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
|
||||||
|
syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+
|
||||||
|
|
||||||
|
" Syntax: JSON Keywords
|
||||||
|
" Separated into a match and region because a region by itself is always greedy
|
||||||
|
syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
|
||||||
|
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contains=jsonEscape contained
|
||||||
|
|
||||||
|
" Syntax: Escape sequences
|
||||||
syn match jsonEscape "\\["\\/bfnrt]" contained
|
syn match jsonEscape "\\["\\/bfnrt]" contained
|
||||||
syn match jsonEscape "\\u\x\{4}" contained
|
syn match jsonEscape "\\u\x\{4}" contained
|
||||||
|
|
||||||
" Syntax: Strings should always be enclosed with quotes.
|
" Syntax: Numbers
|
||||||
syn match jsonNoQuotes "\<\a\+\>"
|
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n]*[,}\]]"
|
||||||
|
|
||||||
" Syntax: Numbers {{{2
|
" ERROR WARNINGS **********************************************
|
||||||
syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
|
" Syntax: Strings should always be enclosed with quotes.
|
||||||
|
syn match jsonNoQuotesError "\<[[:alpha:]][[:alnum:]]*\>"
|
||||||
|
syn match jsonTripleQuotesError /"""/
|
||||||
|
|
||||||
" Syntax: An integer part of 0 followed by other digits is not allowed.
|
" Syntax: An integer part of 0 followed by other digits is not allowed.
|
||||||
syn match jsonNumError "-\=\<0\d\.\d*\>"
|
syn match jsonNumError "-\=\<0\d\.\d*\>"
|
||||||
|
|
||||||
" Syntax: Boolean {{{2
|
" Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1).
|
||||||
syn keyword jsonBoolean true false
|
syn match jsonNumError "\:\@<=[[:blank:]\r\n]*\zs\.\d\+"
|
||||||
|
|
||||||
" Syntax: Null {{{2
|
" Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file
|
||||||
|
syn match jsonCommentError "//.*"
|
||||||
|
syn match jsonCommentError "\(/\*\)\|\(\*/\)"
|
||||||
|
|
||||||
|
" Syntax: No semicolons in JSON
|
||||||
|
syn match jsonSemicolonError ";"
|
||||||
|
|
||||||
|
" Syntax: No trailing comma after the last element of arrays or objects
|
||||||
|
syn match jsonTrailingCommaError ",\_s*[}\]]"
|
||||||
|
|
||||||
|
" Syntax: Watch out for missing commas between elements
|
||||||
|
syn match jsonMissingCommaError /\("\|\]\|\d\)\zs\_s\+\ze"/
|
||||||
|
syn match jsonMissingCommaError /\(\]\|\}\)\_s\+\ze"/ "arrays/objects as values
|
||||||
|
syn match jsonMissingCommaError /}\_s\+\ze{/ "objects as elements in an array
|
||||||
|
syn match jsonMissingCommaError /\(true\|false\)\_s\+\ze"/ "true/false as value
|
||||||
|
|
||||||
|
" ********************************************** END OF ERROR WARNINGS
|
||||||
|
" Allowances for JSONP: function call at the beginning of the file,
|
||||||
|
" parenthesis and semicolon at the end.
|
||||||
|
" Function name validation based on
|
||||||
|
" http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name/2008444#2008444
|
||||||
|
syn match jsonPadding "\%^[[:blank:]\r\n]*[_$[:alpha:]][_$[:alnum:]]*[[:blank:]\r\n]*("
|
||||||
|
syn match jsonPadding ");[[:blank:]\r\n]*\%$"
|
||||||
|
|
||||||
|
" Syntax: Boolean
|
||||||
|
syn match jsonBoolean /\(true\|false\)\(\_s\+\ze"\)\@!/
|
||||||
|
|
||||||
|
" Syntax: Null
|
||||||
syn keyword jsonNull null
|
syn keyword jsonNull null
|
||||||
|
|
||||||
" Syntax: Braces {{{2
|
" Syntax: Braces
|
||||||
syn match jsonBraces "[{}\[\]]"
|
syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold
|
||||||
|
syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold
|
||||||
|
|
||||||
" Define the default highlighting. {{{1
|
" Define the default highlighting.
|
||||||
" For version 5.7 and earlier: only when not done already
|
|
||||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
||||||
if version >= 508 || !exists("did_json_syn_inits")
|
if version >= 508 || !exists("did_json_syn_inits")
|
||||||
if version < 508
|
hi def link jsonPadding Operator
|
||||||
let did_json_syn_inits = 1
|
hi def link jsonString String
|
||||||
command -nargs=+ HiLink hi link <args>
|
hi def link jsonTest Label
|
||||||
else
|
hi def link jsonEscape Special
|
||||||
command -nargs=+ HiLink hi def link <args>
|
hi def link jsonNumber Number
|
||||||
endif
|
hi def link jsonBraces Delimiter
|
||||||
HiLink jsonString String
|
hi def link jsonNull Function
|
||||||
HiLink jsonEscape Special
|
hi def link jsonBoolean Boolean
|
||||||
HiLink jsonNumber Number
|
hi def link jsonKeyword Label
|
||||||
HiLink jsonBraces Operator
|
|
||||||
HiLink jsonNull Function
|
|
||||||
HiLink jsonBoolean Boolean
|
|
||||||
|
|
||||||
HiLink jsonNumError Error
|
hi def link jsonNumError Error
|
||||||
HiLink jsonStringSQ Error
|
hi def link jsonCommentError Error
|
||||||
HiLink jsonNoQuotes Error
|
hi def link jsonSemicolonError Error
|
||||||
delcommand HiLink
|
hi def link jsonTrailingCommaError Error
|
||||||
|
hi def link jsonMissingCommaError Error
|
||||||
|
hi def link jsonStringSQError Error
|
||||||
|
hi def link jsonNoQuotesError Error
|
||||||
|
hi def link jsonTripleQuotesError Error
|
||||||
|
hi def link jsonQuote Quote
|
||||||
|
hi def link jsonNoise Noise
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "json"
|
let b:current_syntax = "json"
|
||||||
@@ -73,5 +108,12 @@ if main_syntax == 'json'
|
|||||||
unlet main_syntax
|
unlet main_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Vim settings {{{2
|
" Vim settings
|
||||||
" vim: ts=8 fdm=marker
|
" vim: ts=8 fdm=marker
|
||||||
|
|
||||||
|
" MIT License
|
||||||
|
" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra
|
||||||
|
"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.
|
||||||
|
"See https://twitter.com/elzr/status/294964017926119424
|
||||||
|
|||||||
1668
syntax/perl6.vim
1668
syntax/perl6.vim
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,9 @@ syn match scalaSymbol /'[_A-Za-z0-9$]\+/
|
|||||||
hi link scalaSymbol Number
|
hi link scalaSymbol Number
|
||||||
|
|
||||||
syn match scalaChar /'.'/
|
syn match scalaChar /'.'/
|
||||||
syn match scalaEscapedChar /\\[\\"ntbrf]/
|
syn match scalaChar /'\\[\\"'ntbrf]'/ contains=scalaEscapedChar
|
||||||
|
syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar
|
||||||
|
syn match scalaEscapedChar /\\[\\"'ntbrf]/
|
||||||
syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
|
syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
|
||||||
hi link scalaChar Character
|
hi link scalaChar Character
|
||||||
hi link scalaEscapedChar Function
|
hi link scalaEscapedChar Function
|
||||||
@@ -132,28 +134,31 @@ syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scala
|
|||||||
hi link scalaString String
|
hi link scalaString String
|
||||||
hi link scalaStringEmbeddedQuote String
|
hi link scalaStringEmbeddedQuote String
|
||||||
|
|
||||||
syn region scalaIString matchgroup=Special start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||||
syn region scalaTripleIString matchgroup=Special start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||||
hi link scalaIString String
|
hi link scalaIString String
|
||||||
hi link scalaTripleIString String
|
hi link scalaTripleIString String
|
||||||
|
|
||||||
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
|
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
|
||||||
exe 'syn region scalaInterpolationB matchgroup=scalaInterpolation start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
|
exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
|
||||||
hi link scalaInterpolation Function
|
hi link scalaInterpolation Function
|
||||||
hi link scalaInterpolationB Normal
|
hi link scalaInterpolationB Normal
|
||||||
|
|
||||||
syn region scalaFString matchgroup=Special start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||||
syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
|
syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
|
||||||
exe 'syn region scalaFInterpolationB matchgroup=scalaFInterpolation start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
|
exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
|
||||||
hi link scalaFString String
|
hi link scalaFString String
|
||||||
hi link scalaFInterpolation Function
|
hi link scalaFInterpolation Function
|
||||||
hi link scalaFInterpolationB Normal
|
hi link scalaFInterpolationB Normal
|
||||||
|
|
||||||
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
|
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
|
||||||
syn region scalaTripleFString matchgroup=Special start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||||
hi link scalaTripleString String
|
hi link scalaTripleString String
|
||||||
hi link scalaTripleFString String
|
hi link scalaTripleFString String
|
||||||
|
|
||||||
|
hi link scalaInterpolationBrackets Special
|
||||||
|
hi link scalaInterpolationBoundary Function
|
||||||
|
|
||||||
syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0
|
syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0
|
||||||
syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala
|
syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala
|
||||||
syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number
|
syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number
|
||||||
@@ -164,29 +169,35 @@ hi link scalaNumber Number
|
|||||||
|
|
||||||
syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets
|
syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets
|
||||||
|
|
||||||
syn region scalaSquareBrackets matchgroup=Type start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter
|
syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter
|
||||||
syn match scalaTypeOperator /[-+=:<>]\+/ contained
|
syn match scalaTypeOperator /[-+=:<>]\+/ contained
|
||||||
syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
|
syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
|
||||||
|
hi link scalaSquareBracketsBrackets Type
|
||||||
hi link scalaTypeOperator Keyword
|
hi link scalaTypeOperator Keyword
|
||||||
hi link scalaTypeAnnotationParameter Function
|
hi link scalaTypeAnnotationParameter Function
|
||||||
|
|
||||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaCommentCodeBlock,@scalaHtml,@Spell keepend
|
syn match scalaShebang "\%^#!.*" display
|
||||||
|
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@scalaHtml,@Spell keepend
|
||||||
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained
|
||||||
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
|
syn match scalaParameterAnnotation "@param" nextgroup=scalaParamAnnotationValue skipwhite contained
|
||||||
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained
|
syn match scalaParamAnnotationValue /[`_A-Za-z0-9$]\+/ contained
|
||||||
syn region scalaDocLinks start="\[\[" end="\]\]" contained
|
syn region scalaDocLinks start="\[\[" end="\]\]" contained
|
||||||
syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained
|
syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained
|
||||||
|
syn match scalaTodo "\vTODO|FIXME|XXX" contained
|
||||||
|
hi link scalaShebang Comment
|
||||||
hi link scalaMultilineComment Comment
|
hi link scalaMultilineComment Comment
|
||||||
hi link scalaDocLinks Function
|
hi link scalaDocLinks Function
|
||||||
hi link scalaParameterAnnotation Function
|
hi link scalaParameterAnnotation Function
|
||||||
hi link scalaParamAnnotationValue Keyword
|
hi link scalaParamAnnotationValue Keyword
|
||||||
hi link scalaCommentAnnotation Function
|
hi link scalaCommentAnnotation Function
|
||||||
|
hi link scalaCommentCodeBlockBrackets String
|
||||||
hi link scalaCommentCodeBlock String
|
hi link scalaCommentCodeBlock String
|
||||||
|
hi link scalaTodo Todo
|
||||||
|
|
||||||
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
||||||
hi link scalaAnnotation PreProc
|
hi link scalaAnnotation PreProc
|
||||||
|
|
||||||
syn match scalaTrailingComment "//.*$" contains=@Spell
|
syn match scalaTrailingComment "//.*$" contains=scalaTodo,@Spell
|
||||||
hi link scalaTrailingComment Comment
|
hi link scalaTrailingComment Comment
|
||||||
|
|
||||||
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
||||||
|
|||||||
@@ -72,28 +72,28 @@ syntax match typeScriptFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\
|
|||||||
" syntax match typeScriptLabel /\(?\s*\)\@<!\<\w\+\(\s*:\)\@=/
|
" syntax match typeScriptLabel /\(?\s*\)\@<!\<\w\+\(\s*:\)\@=/
|
||||||
"}}}
|
"}}}
|
||||||
"" typeScript Prototype"{{{
|
"" typeScript Prototype"{{{
|
||||||
syntax keyword typeScriptPrototype prototype
|
syntax keyword typeScriptPrototype contained prototype
|
||||||
"}}}
|
"}}}
|
||||||
" DOM, Browser and Ajax Support {{{
|
" DOM, Browser and Ajax Support {{{
|
||||||
""""""""""""""""""""""""
|
""""""""""""""""""""""""
|
||||||
syntax keyword typeScriptBrowserObjects window navigator screen history location
|
syntax keyword typeScriptBrowserObjects window navigator screen history location
|
||||||
|
|
||||||
syntax keyword typeScriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
|
syntax keyword typeScriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
|
||||||
syntax keyword typeScriptDOMMethods createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
|
syntax keyword typeScriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
|
||||||
syntax keyword typeScriptDOMProperties nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
|
syntax keyword typeScriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
|
||||||
|
|
||||||
syntax keyword typeScriptAjaxObjects XMLHttpRequest
|
syntax keyword typeScriptAjaxObjects XMLHttpRequest
|
||||||
syntax keyword typeScriptAjaxProperties readyState responseText responseXML statusText
|
syntax keyword typeScriptAjaxProperties contained readyState responseText responseXML statusText
|
||||||
syntax keyword typeScriptAjaxMethods onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
|
syntax keyword typeScriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
|
||||||
|
|
||||||
syntax keyword typeScriptPropietaryObjects ActiveXObject
|
syntax keyword typeScriptPropietaryObjects ActiveXObject
|
||||||
syntax keyword typeScriptPropietaryMethods attachEvent detachEvent cancelBubble returnValue
|
syntax keyword typeScriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
|
||||||
|
|
||||||
syntax keyword typeScriptHtmlElemProperties className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
|
syntax keyword typeScriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
|
||||||
|
|
||||||
syntax keyword typeScriptEventListenerKeywords blur click focus mouseover mouseout load item
|
syntax keyword typeScriptEventListenerKeywords contained blur click focus mouseover mouseout load item
|
||||||
|
|
||||||
syntax keyword typeScriptEventListenerMethods scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
|
syntax keyword typeScriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
|
||||||
" }}}
|
" }}}
|
||||||
"" Programm Keywords"{{{
|
"" Programm Keywords"{{{
|
||||||
syntax keyword typeScriptSource import export
|
syntax keyword typeScriptSource import export
|
||||||
@@ -165,11 +165,12 @@ if exists("typeScript_enable_domhtmlcss")
|
|||||||
syntax keyword typeScriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
|
syntax keyword typeScriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
|
||||||
syntax keyword typeScriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
|
syntax keyword typeScriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
|
||||||
"}}}
|
"}}}
|
||||||
|
endif "DOM/HTML/CSS
|
||||||
|
|
||||||
" Highlight ways"{{{
|
" Highlight ways"{{{
|
||||||
syntax match typeScriptDotNotation "\." nextgroup=typeScriptPrototype,typeScriptDomElemAttrs,typeScriptDomElemFuncs,typeScriptHtmlElemAttrs,typeScriptHtmlElemFuncs
|
syntax match typeScriptDotNotation "\." nextgroup=typeScriptPrototype,typeScriptDomElemAttrs,typeScriptDomElemFuncs,typeScriptDOMMethods,typeScriptDOMProperties,typeScriptHtmlElemAttrs,typeScriptHtmlElemFuncs,typeScriptHtmlElemProperties,typeScriptAjaxProperties,typeScriptAjaxMethods,typeScriptPropietaryMethods,typeScriptEventListenerMethods skipwhite skipnl
|
||||||
syntax match typeScriptDotNotation "\.style\." nextgroup=typeScriptCssStyles
|
syntax match typeScriptDotNotation "\.style\." nextgroup=typeScriptCssStyles
|
||||||
"}}}
|
"}}}
|
||||||
endif "DOM/HTML/CSS
|
|
||||||
|
|
||||||
"" end DOM/HTML/CSS specified things""}}}
|
"" end DOM/HTML/CSS specified things""}}}
|
||||||
|
|
||||||
@@ -177,16 +178,16 @@ endif "DOM/HTML/CSS
|
|||||||
"" Code blocks
|
"" Code blocks
|
||||||
syntax cluster typeScriptAll contains=typeScriptComment,typeScriptLineComment,typeScriptDocComment,typeScriptStringD,typeScriptStringS,typeScriptRegexpString,typeScriptNumber,typeScriptFloat,typeScriptLabel,typeScriptSource,typeScriptType,typeScriptOperator,typeScriptBoolean,typeScriptNull,typeScriptFuncKeyword,typeScriptConditional,typeScriptGlobal,typeScriptRepeat,typeScriptBranch,typeScriptStatement,typeScriptGlobalObjects,typeScriptMessage,typeScriptIdentifier,typeScriptExceptions,typeScriptReserved,typeScriptDeprecated,typeScriptDomErrNo,typeScriptDomNodeConsts,typeScriptHtmlEvents,typeScriptDotNotation,typeScriptBrowserObjects,typeScriptDOMObjects,typeScriptAjaxObjects,typeScriptPropietaryObjects,typeScriptDOMMethods,typeScriptHtmlElemProperties,typeScriptDOMProperties,typeScriptEventListenerKeywords,typeScriptEventListenerMethods,typeScriptAjaxProperties,typeScriptAjaxMethods,typeScriptFuncArg
|
syntax cluster typeScriptAll contains=typeScriptComment,typeScriptLineComment,typeScriptDocComment,typeScriptStringD,typeScriptStringS,typeScriptRegexpString,typeScriptNumber,typeScriptFloat,typeScriptLabel,typeScriptSource,typeScriptType,typeScriptOperator,typeScriptBoolean,typeScriptNull,typeScriptFuncKeyword,typeScriptConditional,typeScriptGlobal,typeScriptRepeat,typeScriptBranch,typeScriptStatement,typeScriptGlobalObjects,typeScriptMessage,typeScriptIdentifier,typeScriptExceptions,typeScriptReserved,typeScriptDeprecated,typeScriptDomErrNo,typeScriptDomNodeConsts,typeScriptHtmlEvents,typeScriptDotNotation,typeScriptBrowserObjects,typeScriptDOMObjects,typeScriptAjaxObjects,typeScriptPropietaryObjects,typeScriptDOMMethods,typeScriptHtmlElemProperties,typeScriptDOMProperties,typeScriptEventListenerKeywords,typeScriptEventListenerMethods,typeScriptAjaxProperties,typeScriptAjaxMethods,typeScriptFuncArg
|
||||||
|
|
||||||
if main_syntax == "typeScript"
|
if main_syntax == "typescript"
|
||||||
syntax sync clear
|
syntax sync clear
|
||||||
syntax sync ccomment typeScriptComment minlines=200
|
syntax sync ccomment typeScriptComment minlines=200
|
||||||
" syntax sync match typeScriptHighlight grouphere typeScriptBlock /{/
|
" syntax sync match typeScriptHighlight grouphere typeScriptBlock /{/
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syntax keyword typeScriptFuncKeyword function contained
|
syntax keyword typeScriptFuncKeyword function
|
||||||
syntax region typeScriptFuncDef start="function" end="\([^)]*\)" contains=typeScriptFuncKeyword,typeScriptFuncArg keepend
|
"syntax region typeScriptFuncDef start="function" end="\(.*\)" contains=typeScriptFuncKeyword,typeScriptFuncArg keepend
|
||||||
syntax match typeScriptFuncArg "\(([^()]*)\)" contains=typeScriptParens,typeScriptFuncComma contained
|
"syntax match typeScriptFuncArg "\(([^()]*)\)" contains=typeScriptParens,typeScriptFuncComma contained
|
||||||
syntax match typeScriptFuncComma /,/ contained
|
"syntax match typeScriptFuncComma /,/ contained
|
||||||
" syntax region typeScriptFuncBlock contained matchgroup=typeScriptFuncBlock start="{" end="}" contains=@typeScriptAll,typeScriptParensErrA,typeScriptParensErrB,typeScriptParen,typeScriptBracket,typeScriptBlock fold
|
" syntax region typeScriptFuncBlock contained matchgroup=typeScriptFuncBlock start="{" end="}" contains=@typeScriptAll,typeScriptParensErrA,typeScriptParensErrB,typeScriptParen,typeScriptBracket,typeScriptBlock fold
|
||||||
|
|
||||||
syn match typeScriptBraces "[{}\[\]]"
|
syn match typeScriptBraces "[{}\[\]]"
|
||||||
@@ -204,7 +205,7 @@ syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
|
|||||||
setl foldtext=FoldText()
|
setl foldtext=FoldText()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
au FileType typeScript call TypeScriptFold()
|
au FileType typescript call TypeScriptFold()
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
@@ -250,7 +251,7 @@ if version >= 508 || !exists("did_typeScript_syn_inits")
|
|||||||
HiLink typeScriptIdentifier Identifier
|
HiLink typeScriptIdentifier Identifier
|
||||||
HiLink typeScriptRepeat Repeat
|
HiLink typeScriptRepeat Repeat
|
||||||
HiLink typeScriptStatement Statement
|
HiLink typeScriptStatement Statement
|
||||||
HiLink typeScriptFuncKeyword Type
|
HiLink typeScriptFuncKeyword Function
|
||||||
HiLink typeScriptMessage Keyword
|
HiLink typeScriptMessage Keyword
|
||||||
HiLink typeScriptDeprecated Exception
|
HiLink typeScriptDeprecated Exception
|
||||||
HiLink typeScriptError Error
|
HiLink typeScriptError Error
|
||||||
@@ -280,23 +281,24 @@ if version >= 508 || !exists("did_typeScript_syn_inits")
|
|||||||
HiLink typeScriptHtmlElemFuncs PreProc
|
HiLink typeScriptHtmlElemFuncs PreProc
|
||||||
|
|
||||||
HiLink typeScriptCssStyles Label
|
HiLink typeScriptCssStyles Label
|
||||||
|
|
||||||
" Ajax Highlighting
|
" Ajax Highlighting
|
||||||
HiLink typeScriptBrowserObjects Constant
|
HiLink typeScriptBrowserObjects Constant
|
||||||
|
|
||||||
HiLink typeScriptDOMObjects Constant
|
HiLink typeScriptDOMObjects Constant
|
||||||
HiLink typeScriptDOMMethods Exception
|
HiLink typeScriptDOMMethods Function
|
||||||
HiLink typeScriptDOMProperties Type
|
HiLink typeScriptDOMProperties Special
|
||||||
|
|
||||||
HiLink typeScriptAjaxObjects htmlH1
|
HiLink typeScriptAjaxObjects Constant
|
||||||
HiLink typeScriptAjaxMethods Exception
|
HiLink typeScriptAjaxMethods Function
|
||||||
HiLink typeScriptAjaxProperties Type
|
HiLink typeScriptAjaxProperties Special
|
||||||
|
|
||||||
HiLink typeScriptFuncDef Title
|
HiLink typeScriptFuncDef Title
|
||||||
HiLink typeScriptFuncArg Special
|
HiLink typeScriptFuncArg Special
|
||||||
HiLink typeScriptFuncComma Operator
|
HiLink typeScriptFuncComma Operator
|
||||||
|
|
||||||
HiLink typeScriptHtmlEvents Special
|
HiLink typeScriptHtmlEvents Special
|
||||||
HiLink typeScriptHtmlElemProperties Type
|
HiLink typeScriptHtmlElemProperties Special
|
||||||
|
|
||||||
HiLink typeScriptEventListenerKeywords Keyword
|
HiLink typeScriptEventListenerKeywords Keyword
|
||||||
|
|
||||||
@@ -312,8 +314,8 @@ endif
|
|||||||
syntax cluster htmltypeScript contains=@typeScriptAll,typeScriptBracket,typeScriptParen,typeScriptBlock,typeScriptParenError
|
syntax cluster htmltypeScript contains=@typeScriptAll,typeScriptBracket,typeScriptParen,typeScriptBlock,typeScriptParenError
|
||||||
syntax cluster typeScriptExpression contains=@typeScriptAll,typeScriptBracket,typeScriptParen,typeScriptBlock,typeScriptParenError,@htmlPreproc
|
syntax cluster typeScriptExpression contains=@typeScriptAll,typeScriptBracket,typeScriptParen,typeScriptBlock,typeScriptParenError,@htmlPreproc
|
||||||
|
|
||||||
let b:current_syntax = "typeScript"
|
let b:current_syntax = "typescript"
|
||||||
if main_syntax == 'typeScript'
|
if main_syntax == 'typescript'
|
||||||
unlet main_syntax
|
unlet main_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user