mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -142,7 +142,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 +180,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
|
||||||
|
|||||||
@@ -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 =
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
" - general line splits (line ends in an operator)
|
" - general line splits (line ends in an operator)
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|
||||||
@@ -21,46 +21,58 @@ setlocal indentexpr=GoIndent(v:lnum)
|
|||||||
setlocal indentkeys+=<:>,0=},0=)
|
setlocal indentkeys+=<:>,0=},0=)
|
||||||
|
|
||||||
if exists("*GoIndent")
|
if exists("*GoIndent")
|
||||||
finish
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" use shiftwidth function only if it's available
|
||||||
|
if exists('*shiftwidth')
|
||||||
|
func s:sw()
|
||||||
|
return shiftwidth()
|
||||||
|
endfunc
|
||||||
|
else
|
||||||
|
func s:sw()
|
||||||
|
return &sw
|
||||||
|
endfunc
|
||||||
endif
|
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
|
||||||
" top of file
|
" top of file
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" grab the previous and current line, stripping comments.
|
" grab the previous and current line, stripping comments.
|
||||||
let prevl = substitute(getline(prevlnum), '//.*$', '', '')
|
let prevl = substitute(getline(prevlnum), '//.*$', '', '')
|
||||||
let thisl = substitute(getline(a:lnum), '//.*$', '', '')
|
let thisl = substitute(getline(a: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.
|
||||||
" We want to outdent if it's part of a switch ("case foo:" or "default:").
|
" We want to outdent if it's part of a switch ("case foo:" or "default:").
|
||||||
" 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')
|
||||||
|
|||||||
@@ -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, '\|') . '\)}'
|
||||||
|
|
||||||
|
|||||||
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
|
||||||
|
endif
|
||||||
|
|
||||||
|
" cCppString: same as cString, but ends at end of line
|
||||||
|
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||||
|
" ISO C++11
|
||||||
|
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||||
|
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||||
|
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
|
||||||
|
" ISO C99
|
||||||
|
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||||
|
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||||
|
else
|
||||||
|
" older C or C++
|
||||||
|
syn match cFormat display "%%" contained
|
||||||
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||||
" cCppString: same as cString, but ends at end of line
|
|
||||||
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,14 +32,21 @@ 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 region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
|
||||||
|
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
|
||||||
|
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
|
||||||
|
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
||||||
|
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
||||||
|
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
||||||
|
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" The minimum and maximum operators in GNU C++
|
" The minimum and maximum operators in GNU C++
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
1930
syntax/perl6.vim
1930
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
|
||||||
|
|||||||
Reference in New Issue
Block a user