Mercurial > vim
comparison runtime/syntax/vim.vim @ 2473:d55e70cabe2c vim73
Syntax file updates. (Charles Campbell)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 02 Aug 2010 22:12:46 +0200 |
parents | d706822076b1 |
children | ed997d0ceb26 |
comparison
equal
deleted
inserted
replaced
2472:3567e0d56891 | 2473:d55e70cabe2c |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Vim 7.3 script | 2 " Language: Vim 7.3 script |
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> | 3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> |
4 " Last Change: Jul 19, 2010 | 4 " Last Change: Jul 28, 2010 |
5 " Version: 7.3-02 | 5 " Version: 7.3-03 |
6 " Automatically generated keyword lists: {{{1 | 6 " Automatically generated keyword lists: {{{1 |
7 | 7 |
8 " Quit when a syntax file was already loaded {{{2 | 8 " Quit when a syntax file was already loaded {{{2 |
9 if exists("b:current_syntax") | 9 if exists("b:current_syntax") |
10 finish | 10 finish |
530 syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' | 530 syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' |
531 syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' | 531 syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' |
532 | 532 |
533 " Scripts : perl,ruby : Benoit Cerrina {{{2 | 533 " Scripts : perl,ruby : Benoit Cerrina {{{2 |
534 " ======= python,tcl: Johannes Zellner | 534 " ======= python,tcl: Johannes Zellner |
535 " lua | |
535 | 536 |
536 " Allows users to specify the type of embedded script highlighting | 537 " Allows users to specify the type of embedded script highlighting |
537 " they want: (perl/python/ruby/tcl support) | 538 " they want: (perl/python/ruby/tcl support) |
538 " g:vimsyn_embed == 0 : don't embed any scripts | 539 " g:vimsyn_embed == 0 : don't embed any scripts |
540 " g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it) | |
539 " g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it) | 541 " g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it) |
540 " g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it) | 542 " g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it) |
541 " g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it) | 543 " g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it) |
542 " g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it) | 544 " g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it) |
543 " g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it) | 545 " g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it) |
544 if !exists("g:vimsyn_embed") | 546 if !exists("g:vimsyn_embed") |
545 let g:vimsyn_embed= "mpPr" | 547 let g:vimsyn_embed= "lmpPr" |
546 endif | 548 endif |
549 | |
550 " [-- lua --] {{{3 | |
551 let s:luapath= expand("<sfile>:p:h")."/lua.vim" | |
552 if !filereadable(s:luapath) | |
553 let s:luapath= globpath(&rtp,"syntax/lua.vim") | |
554 endif | |
555 if (g:vimsyn_embed =~ 'p' && has("lua")) && filereadable(s:luapath) | |
556 unlet! b:current_syntax | |
557 exe "syn include @vimLuaScript ".s:luapath | |
558 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l' | |
559 syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript | |
560 syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript | |
561 else | |
562 syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript | |
563 syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript | |
564 endif | |
565 syn cluster vimFuncBodyList add=vimLuaRegion | |
566 else | |
567 syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
568 syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+ | |
569 endif | |
570 unlet s:luapath | |
547 | 571 |
548 " [-- perl --] {{{3 | 572 " [-- perl --] {{{3 |
549 let s:perlpath= expand("<sfile>:p:h")."/perl.vim" | 573 let s:perlpath= expand("<sfile>:p:h")."/perl.vim" |
550 if !filereadable(s:perlpath) | 574 if !filereadable(s:perlpath) |
551 let s:perlpath= globpath(&rtp,"syntax/perl.vim") | 575 let s:perlpath= globpath(&rtp,"syntax/perl.vim") |