1
0
forked from aniani/vim

updated for version 7.0d04

This commit is contained in:
Bram Moolenaar
2006-04-14 20:42:25 +00:00
parent 7fc904b610
commit 9e54a0e753
32 changed files with 676 additions and 4424 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network " netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION " AUTOLOAD PORTION
" Date: Apr 12, 2006 " Date: Apr 14, 2006
" Version: 87 " Version: 88
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> " Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw") if &cp || exists("g:loaded_netrw")
finish finish
endif endif
let g:loaded_netrw = "v87" let g:loaded_netrw = "v88"
if v:version < 700 if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish finish
@@ -929,7 +929,7 @@ fun! netrw#NetWrite(...) range
"......................................... ".........................................
" ftp + <.netrc>: NetWrite Method #2 {{{3 " ftp + <.netrc>: NetWrite Method #2 {{{3
elseif b:netrw_method == 2 elseif b:netrw_method == 2
let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) let netrw_fname= b:netrw_fname
new new
setlocal ff=unix setlocal ff=unix
exe "put ='".g:netrw_ftpmode."'" exe "put ='".g:netrw_ftpmode."'"
@@ -957,7 +957,7 @@ fun! netrw#NetWrite(...) range
"......................................... ".........................................
" ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3 " ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3
elseif b:netrw_method == 3 elseif b:netrw_method == 3
let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) let netrw_fname= b:netrw_fname
new new
setlocal ff=unix setlocal ff=unix
if exists("g:netrw_port") && g:netrw_port != "" if exists("g:netrw_port") && g:netrw_port != ""
@@ -1408,7 +1408,7 @@ fun! s:NetBrowse(dirname)
" set up syntax highlighting " set up syntax highlighting
if has("syntax") if has("syntax")
setlocal ft=netrwlist setlocal ft=netrw
if !exists("g:syntax_on") || !g:syntax_on if !exists("g:syntax_on") || !g:syntax_on
setlocal ft= setlocal ft=
" Ugly workaround -- when syntax highlighting is off and laststatus==2, " Ugly workaround -- when syntax highlighting is off and laststatus==2,
@@ -1923,8 +1923,8 @@ endfun
" This function assumes that a long listing will be received. Size, time, " This function assumes that a long listing will be received. Size, time,
" and reverse sorts will be requested of the server but not otherwise " and reverse sorts will be requested of the server but not otherwise
" enforced here. " enforced here.
fun! s:NetBrowseFtpCmd(path,cmd) fun! s:NetBrowseFtpCmd(path,listcmd)
" call Dfunc("NetBrowseFtpCmd(path<".a:path."> cmd<".a:cmd.">) netrw_method=".w:netrw_method) " call Dfunc("NetBrowseFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method)
" because WinXX ftp uses unix style input " because WinXX ftp uses unix style input
" curline is one more than the bannercnt in order to account " curline is one more than the bannercnt in order to account
@@ -1942,7 +1942,7 @@ fun! s:NetBrowseFtpCmd(path,cmd)
put ='cd \"'.a:path.'\"' put ='cd \"'.a:path.'\"'
" call Decho('ftp: '.getline(".")) " call Decho('ftp: '.getline("."))
endif endif
exe "put ='".a:cmd."'" exe "put ='".a:listcmd."'"
" call Decho("ftp: ".getline(".")) " call Decho("ftp: ".getline("."))
" redraw!|call inputsave()|call input("Pausing...")|call inputrestore() " redraw!|call inputsave()|call input("Pausing...")|call inputrestore()
if exists("g:netrw_port") && g:netrw_port != "" if exists("g:netrw_port") && g:netrw_port != ""
@@ -1973,7 +1973,7 @@ fun! s:NetBrowseFtpCmd(path,cmd)
if a:path != "" if a:path != ""
put ='cd \"'.a:path.'\"' put ='cd \"'.a:path.'\"'
endif endif
exe "put ='".a:cmd."'" exe "put ='".a:listcmd."'"
" perform ftp: " perform ftp:
" -i : turns off interactive prompting from ftp " -i : turns off interactive prompting from ftp
@@ -1991,7 +1991,7 @@ fun! s:NetBrowseFtpCmd(path,cmd)
if has("win32") || has("win95") || has("win64") || has("win16") if has("win32") || has("win95") || has("win64") || has("win16")
silent! keepjumps! %s/\r$//e silent! keepjumps! %s/\r$//e
endif endif
if a:cmd == "dir" if a:listcmd == "dir"
" infer directory/link based on the file permission string " infer directory/link based on the file permission string
silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@ silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@
silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/ silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/
@@ -2137,9 +2137,9 @@ endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" NetrwWideListing: {{{2 " NetrwWideListing: {{{2
fun! s:NetrwWideListing() fun! s:NetrwWideListing()
" call Dfunc("NetrwWideListing() w:netrw_longlist=".w:netrw_longlist)
if w:netrw_longlist == 2 if w:netrw_longlist == 2
" call Dfunc("NetrwWideListing() w:netrw_longlist=".w:netrw_longlist)
" look for longest filename (cpf=characters per filename) " look for longest filename (cpf=characters per filename)
" cpf: characters per file " cpf: characters per file
" fpl: files per line " fpl: files per line
@@ -2182,9 +2182,9 @@ fun! s:NetrwWideListing()
endwhile endwhile
exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e' exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e'
setlocal noma nomod setlocal noma nomod
" call Dret("NetrwWideListing")
endif endif
" call Dret("NetrwWideListing")
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
@@ -2650,6 +2650,10 @@ endfun
" NetMenu: generates the menu for gvim and netrw {{{2 " NetMenu: generates the menu for gvim and netrw {{{2
fun! s:NetMenu(domenu) fun! s:NetMenu(domenu)
if !exists("g:NetrwMenuPriority")
let g:NetrwMenuPriority= 80
endif
if has("menu") && has("gui_running") && &go =~ 'm' if has("menu") && has("gui_running") && &go =~ 'm'
" call Dfunc("NetMenu(domenu=".a:domenu.")") " call Dfunc("NetMenu(domenu=".a:domenu.")")
if !exists("s:netrw_menu_enabled") && a:domenu if !exists("s:netrw_menu_enabled") && a:domenu
@@ -2658,32 +2662,32 @@ fun! s:NetMenu(domenu)
if !exists("g:NetrwTopLvlMenu") if !exists("g:NetrwTopLvlMenu")
let g:NetrwTopLvlMenu= "Netrw." let g:NetrwTopLvlMenu= "Netrw."
endif endif
exe 'silent! menu '.g:NetrwTopLvlMenu.'Help<tab><F1> <F1>' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Help<tab><F1> <F1>'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x x' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x x'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory<tab>b Nb' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory<tab>b Nb'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>- -' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>- -'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory<tab>B NB' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory<tab>B NB'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory<tab>u u' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory<tab>u u'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory<tab>U U' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory<tab>U U'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D D' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D D'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List<tab>'."<ctrl-h> \<c-h>" exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List<tab>'."<ctrl-h> \<c-h>"
exe 'silent! menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory<tab><cr> '."\<cr>" exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory<tab><cr> '."\<cr>"
exe 'silent! menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window<tab>o o' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window<tab>o o'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window<tab>v v' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window<tab>v v'
exe 'silent! menu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History<tab>q q' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History<tab>q q'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)<tab>i i' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)<tab>i i'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d d' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d d'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Normal-Hide-Show<tab>a a' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Normal-Hide-Show<tab>a a'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O O' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O O'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Preview\ File/Directory<tab>p p' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Preview\ File/Directory<tab>p p'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser<tab>P P' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser<tab>P P'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Refresh\ Listing<tab>'."<ctrl-l> \<c-l>" exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Refresh\ Listing<tab>'."<ctrl-l> \<c-l>"
exe 'silent! menu '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R R' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R R'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order<tab>'."r r" exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order<tab>'."r r"
exe 'silent! menu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style<tab>s s' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style<tab>s s'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit<tab>S S' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit<tab>S S'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c c' exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c c'
exe 'silent! menu '.g:NetrwTopLvlMenu.'Settings/Options<tab>:NetrwSettings '.":NetrwSettings\<cr>" exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Settings/Options<tab>:NetrwSettings '.":NetrwSettings\<cr>"
elseif !a:domenu elseif !a:domenu
let s:netrwcnt = 0 let s:netrwcnt = 0
let curwin = winnr() let curwin = winnr()
@@ -2972,7 +2976,7 @@ fun! netrw#DirBrowse(dirname)
" set up syntax highlighting " set up syntax highlighting
if has("syntax") if has("syntax")
setlocal ft=netrwlist setlocal ft=netrw
if !exists("g:syntax_on") || !g:syntax_on if !exists("g:syntax_on") || !g:syntax_on
setlocal ft= setlocal ft=
endif endif

View File

@@ -1,3 +1,5 @@
" HTML context data
"function! htmlcomplete#LoadData() " {{{
let g:xmldata_xhtml10s = { let g:xmldata_xhtml10s = {
\ 'vimxmlentities' : ["AElig", "Aacute", "Acirc", "Agrave", "Alpha", "Aring", "Atilde", "Auml", "Beta", "Ccedil", "Chi", "Dagger", "Delta", "ETH", "Eacute", "Ecirc", "Egrave", "Epsilon", "Eta", "Euml", "Gamma", "Iacute", "Icirc", "Igrave", "Iota", "Iuml", "Kappa", "Lambda", "Mu", "Ntilde", "Nu", "OElig", "Oacute", "Ocirc", "Ograve", "Omega", "Omicron", "Oslash", "Otilde", "Ouml", "Phi", "Pi", "Prime", "Psi", "Rho", "Scaron", "Sigma", "THORN", "TITY", "Tau", "Theta", "Uacute", "Ucirc", "Ugrave", "Upsilon", "Uuml", "Xi", "Yacute", "Yuml", "Zeta", "amp", "aacute", "acirc", "acute", "aelig", "agrave", "alefsym", "alpha", "and", "ang", "apos", "aring", "asymp", "atilde", "auml", "bdquo", "beta", "brvbar", "bull", "cap", "ccedil", "cedil", "cent", "chi", "circ", "clubs", "copy", "cong", "crarr", "cup", "curren", "dArr", "dagger", "darr", "deg", "delta", "diams", "divide", "eacute", "ecirc", "egrave", "empty", "ensp", "emsp", "epsilon", "equiv", "eta", "eth", "euro", "euml", "exist", "fnof", "forall", "frac12", "frac14", "frac34", "frasl", "gt", "gamma", "ge", "hArr", "harr", "hearts", "hellip", "iacute", "icirc", "iexcl", "igrave", "image", "infin", "int", "iota", "iquest", "isin", "iuml", "kappa", "lt", "laquo", "lArr", "lambda", "lang", "larr", "lceil", "ldquo", "le", "lfloor", "lowast", "loz", "lrm", "lsaquo", "lsquo", "macr", "mdash", "micro", "middot", "minus", "mu", "nbsp", "nabla", "ndash", "ne", "ni", "not", "notin", "nsub", "ntilde", "nu", "oacute", "ocirc", "oelig", "ograve", "oline", "omega", "omicron", "oplus", "or", "ordf", "ordm", "oslash", "otilde", "otimes", "ouml", "para", "part", "permil", "perp", "phi", "pi", "piv", "plusmn", "pound", "prime", "prod", "prop", "psi", "quot", "rArr", "raquo", "radic", "rang", "rarr", "rceil", "rdquo", "real", "reg", "rfloor", "rho", "rlm", "rsaquo", "rsquo", "sbquo", "scaron", "sdot", "sect", "shy", "sigma", "sigmaf", "sim", "spades", "sub", "sube", "sum", "sup", "sup1", "sup2", "sup3", "supe", "szlig", "tau", "there4", "theta", "thetasym", "thinsp", "thorn", "tilde", "times", "trade", "uArr", "uacute", "uarr", "ucirc", "ugrave", "uml", "upsih", "upsilon", "uuml", "weierp", "xi", "yacute", "yen", "yuml", "zeta", "zwj", "zwnj"], \ 'vimxmlentities' : ["AElig", "Aacute", "Acirc", "Agrave", "Alpha", "Aring", "Atilde", "Auml", "Beta", "Ccedil", "Chi", "Dagger", "Delta", "ETH", "Eacute", "Ecirc", "Egrave", "Epsilon", "Eta", "Euml", "Gamma", "Iacute", "Icirc", "Igrave", "Iota", "Iuml", "Kappa", "Lambda", "Mu", "Ntilde", "Nu", "OElig", "Oacute", "Ocirc", "Ograve", "Omega", "Omicron", "Oslash", "Otilde", "Ouml", "Phi", "Pi", "Prime", "Psi", "Rho", "Scaron", "Sigma", "THORN", "TITY", "Tau", "Theta", "Uacute", "Ucirc", "Ugrave", "Upsilon", "Uuml", "Xi", "Yacute", "Yuml", "Zeta", "amp", "aacute", "acirc", "acute", "aelig", "agrave", "alefsym", "alpha", "and", "ang", "apos", "aring", "asymp", "atilde", "auml", "bdquo", "beta", "brvbar", "bull", "cap", "ccedil", "cedil", "cent", "chi", "circ", "clubs", "copy", "cong", "crarr", "cup", "curren", "dArr", "dagger", "darr", "deg", "delta", "diams", "divide", "eacute", "ecirc", "egrave", "empty", "ensp", "emsp", "epsilon", "equiv", "eta", "eth", "euro", "euml", "exist", "fnof", "forall", "frac12", "frac14", "frac34", "frasl", "gt", "gamma", "ge", "hArr", "harr", "hearts", "hellip", "iacute", "icirc", "iexcl", "igrave", "image", "infin", "int", "iota", "iquest", "isin", "iuml", "kappa", "lt", "laquo", "lArr", "lambda", "lang", "larr", "lceil", "ldquo", "le", "lfloor", "lowast", "loz", "lrm", "lsaquo", "lsquo", "macr", "mdash", "micro", "middot", "minus", "mu", "nbsp", "nabla", "ndash", "ne", "ni", "not", "notin", "nsub", "ntilde", "nu", "oacute", "ocirc", "oelig", "ograve", "oline", "omega", "omicron", "oplus", "or", "ordf", "ordm", "oslash", "otilde", "otimes", "ouml", "para", "part", "permil", "perp", "phi", "pi", "piv", "plusmn", "pound", "prime", "prod", "prop", "psi", "quot", "rArr", "raquo", "radic", "rang", "rarr", "rceil", "rdquo", "real", "reg", "rfloor", "rho", "rlm", "rsaquo", "rsquo", "sbquo", "scaron", "sdot", "sect", "shy", "sigma", "sigmaf", "sim", "spades", "sub", "sube", "sum", "sup", "sup1", "sup2", "sup3", "supe", "szlig", "tau", "there4", "theta", "thetasym", "thinsp", "thorn", "tilde", "times", "trade", "uArr", "uacute", "uarr", "ucirc", "ugrave", "uml", "upsih", "upsilon", "uuml", "weierp", "xi", "yacute", "yen", "yuml", "zeta", "zwj", "zwnj"],
\ 'vimxmlattrinfo' : { \ 'vimxmlattrinfo' : {
@@ -15,7 +17,7 @@ let g:xmldata_xhtml10s = {
\ 'charoff' : ['Length', ''], \ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''], \ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''], \ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', 'Name of class, used for connecting element with style'], \ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''], \ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''], \ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''], \ 'colspan' : ['Number', ''],
@@ -4044,3 +4046,6 @@ let g:xmldata_xhtml10s = {
\ } \ }
\ ] \ ]
\ } \ }
"endfunction
" }}}
" vim:set foldmethod=marker:

View File

@@ -1,57 +1,51 @@
" Vim color file " Vim color file
" Maintainer: David Schweikert <dws@ee.ethz.ch> " Maintainer: David Schweikert <dws@ee.ethz.ch>
" Last Change: 2004 May 16 " Last Change: 2006 Apr 14
" First remove all existing highlighting.
hi clear hi clear
let colors_name = "delek" let colors_name = "delek"
hi Normal guifg=Black guibg=white " Normal should come first
hi Normal guifg=Black guibg=White
hi Cursor guifg=bg guibg=fg
hi lCursor guifg=NONE guibg=Cyan
" Groups used in the 'highlight' and 'guicursor' options default value. " Note: we never set 'term' because the defaults for B&W terminals are OK
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White hi DiffAdd ctermbg=LightBlue guibg=LightBlue
hi IncSearch term=reverse cterm=reverse gui=reverse hi DiffChange ctermbg=LightMagenta guibg=LightMagenta
hi ModeMsg term=bold cterm=bold gui=bold hi DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi VertSplit term=reverse cterm=reverse gui=reverse hi DiffText ctermbg=Red cterm=bold gui=bold guibg=Red
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg hi Directory ctermfg=DarkBlue guifg=Blue
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold hi ErrorMsg ctermfg=White ctermbg=DarkRed guibg=Red guifg=White
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red hi FoldColumn ctermfg=DarkBlue ctermbg=Grey guibg=Grey guifg=DarkBlue
hi Cursor guibg=Green guifg=NONE hi Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi lCursor guibg=Cyan guifg=NONE hi IncSearch cterm=reverse gui=reverse
hi Directory term=bold ctermfg=DarkBlue guifg=Blue hi LineNr ctermfg=Brown guifg=Brown
hi LineNr term=underline ctermfg=Brown guifg=Brown hi ModeMsg cterm=bold gui=bold
hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen hi MoreMsg ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE hi Pmenu guibg=LightBlue
hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi WarningMsg term=standout ctermfg=DarkRed guifg=Red hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black hi SpecialKey ctermfg=DarkBlue guifg=Blue
hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue hi Title ctermfg=DarkMagenta gui=bold guifg=Magenta
hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta hi VertSplit cterm=reverse gui=reverse
hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS cterm=underline,bold gui=underline,bold
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue hi WarningMsg ctermfg=DarkRed guifg=Red
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
hi NonText term=bold ctermfg=Blue gui=bold guifg=gray guibg=white
hi Cursor guibg=fg guifg=bg
" syntax highlighting " syntax highlighting
hi PreProc term=underline cterm=NONE ctermfg=darkmagenta gui=NONE guifg=magenta3 hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
hi Identifier term=underline cterm=NONE ctermfg=darkcyan gui=NONE guifg=cyan4 hi Constant cterm=NONE ctermfg=DarkGreen gui=NONE guifg=green3
hi Comment term=NONE cterm=NONE ctermfg=darkred gui=NONE guifg=red2 hi Identifier cterm=NONE ctermfg=DarkCyan gui=NONE guifg=cyan4
hi Constant term=underline cterm=NONE ctermfg=darkgreen gui=NONE guifg=green3 hi PreProc cterm=NONE ctermfg=DarkMagenta gui=NONE guifg=magenta3
hi Special term=bold cterm=NONE ctermfg=lightred gui=NONE guifg=deeppink hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=deeppink
hi Statement term=bold cterm=bold ctermfg=blue gui=bold guifg=blue hi Statement cterm=bold ctermfg=Blue gui=bold guifg=blue
hi Type term=underline cterm=NONE ctermfg=blue gui=bold guifg=blue hi Type cterm=NONE ctermfg=Blue gui=bold guifg=blue
if exists("syntax_on")
let syntax_cmd = "enable"
runtime syntax/syncolor.vim
unlet syntax_cmd
endif
" vim: sw=2 " vim: sw=2

View File

@@ -1,6 +1,6 @@
" Vim color file " Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 May 21 " Last Change: 2006 Apr 14
" This color scheme uses a dark grey background. " This color scheme uses a dark grey background.
@@ -22,7 +22,7 @@ hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg hi Visual term=reverse ctermbg=black guibg=grey60
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=Black hi Cursor guibg=Green guifg=Black
@@ -42,6 +42,8 @@ hi FoldColumn term=standout ctermbg=LightGrey ctermfg=DarkBlue guibg=Grey guifg=
hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue hi DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue
hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta hi DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan hi DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan
hi CursorColumn term=reverse ctermbg=Black guibg=grey40
hi CursorLine term=underline cterm=underline guibg=grey40
" Groups for syntax highlighting " Groups for syntax highlighting
hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0 guibg=grey5 hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0 guibg=grey5

View File

@@ -1,6 +1,6 @@
" Vim color file " Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 May 21 " Last Change: 2006 Apr 14
" This color scheme uses a light grey background. " This color scheme uses a light grey background.
@@ -22,7 +22,7 @@ hi ModeMsg term=bold cterm=bold gui=bold
hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg hi Visual term=reverse ctermbg=grey guibg=grey90
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE hi Cursor guibg=Green guifg=NONE
@@ -42,6 +42,8 @@ hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkB
hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue
hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi CursorLine term=underline cterm=underline guibg=grey80
hi CursorColumn term=reverse ctermbg=grey guibg=grey80
" Colors for syntax highlighting " Colors for syntax highlighting
hi Constant term=underline ctermfg=DarkRed guifg=Magenta guibg=grey95 hi Constant term=underline ctermfg=DarkRed guifg=Magenta guibg=grey95

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0d. Last change: 2006 Apr 04 *diff.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -206,7 +206,8 @@ The diffs are highlighted with these groups:
(searching from the end of the line). The (searching from the end of the line). The
text in between is highlighted. This means text in between is highlighted. This means
that parts in the middle that are still the that parts in the middle that are still the
same are highlighted anyway. same are highlighted anyway. Only "iwhite" of
'diffopt' is used here.
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines, |hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
because they don't really exist in this because they don't really exist in this
buffer. buffer.

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0d. Last change: 2006 Apr 09 *eval.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -198,6 +198,11 @@ available. >
:let shortlist = mylist[2:2] " List with one item: [3] :let shortlist = mylist[2:2] " List with one item: [3]
:let otherlist = mylist[:] " make a copy of the List :let otherlist = mylist[:] " make a copy of the List
If the second index is equal to or greater than the length of the list there
is no error and the length minus one is used: >
:let mylist = [0, 1, 2, 3]
:echo mylist[2:8] " result: [2, 3]
The second index can be just before the first index. In that case the result The second index can be just before the first index. In that case the result
is an empty list. If the second index is lower, this results in an error. > is an empty list. If the second index is lower, this results in an error. >
:echo mylist[2:1] " result: [] :echo mylist[2:1] " result: []

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0d. Last change: 2006 Mar 29 *indent.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -33,7 +33,9 @@ There are in fact four methods available for indentation:
The rest of this section describes the 'cindent' option. The rest of this section describes the 'cindent' option.
Note that 'cindent' indenting does not work for every code scenario. Vim Note that 'cindent' indenting does not work for every code scenario. Vim
is not a C compiler: it does not recognize all syntax. is not a C compiler: it does not recognize all syntax. One requirement is
that toplevel functions have a '{' in the first column. Otherwise they are
easily confused with declarations.
These four options control C program indenting: These four options control C program indenting:
'cindent' Enables Vim to perform C program indenting automatically. 'cindent' Enables Vim to perform C program indenting automatically.
@@ -403,6 +405,16 @@ assume a 'shiftwidth' of 4.
c1 && c2 c1 && c2 c1 && c2 c1 && c2
) ) ) )
foo; foo; foo; foo;
<
MN When N is non-zero, line up a line starting with a closing
parentheses with the first character of the previous line.
(default 0).
cino= cino=M1 >
if (cond1 && if (cond1 &&
cond2 cond2
) )
foo; foo;
< <
*java-cinoptions* *java-indenting* *java-cinoptions* *java-indenting*
jN Indent java anonymous classes correctly. The value 'N' is jN Indent java anonymous classes correctly. The value 'N' is

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0d. Last change: 2006 Apr 11 *insert.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -602,6 +602,9 @@ accept the currently selected entry. The CTRL-Y is not inserted. Typing a
space, Enter, or some other unprintable character will leave completion mode space, Enter, or some other unprintable character will leave completion mode
and insert that typed character. and insert that typed character.
When the popup menu is displayed there are a few more special keys, see
|popupmenu-keys|.
Note: The keys that are valid in CTRL-X mode are not mapped. This allows for Note: The keys that are valid in CTRL-X mode are not mapped. This allows for
":map ^F ^X^F" to work (where ^F is CTRL-F and ^X is CTRL-X). The key that ":map ^F ^X^F" to work (where ^F is CTRL-F and ^X is CTRL-X). The key that
ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped. ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped.

View File

@@ -1447,6 +1447,10 @@ which is loaded automatically at startup (assuming :set nocp).
============================================================================== ==============================================================================
11. History *netrw-history* {{{1 11. History *netrw-history* {{{1
v88: * moved DrChip.Netrw menu to Netrw. Now has priority 80 by
default. g:NetrwTopLvlMenu == "Netrw" and can be changed
by the user to suit. The priority is g:NetrwMenuPriority.
* Changed filetype for browser displays from netrwlist to netrw.
v87: * bug fix -- menus were partially disappearing v87: * bug fix -- menus were partially disappearing
v85: * bug fix -- missing an endif v85: * bug fix -- missing an endif
* bug fix -- handles spaces in names and directories when using * bug fix -- handles spaces in names and directories when using

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0d. Last change: 2006 Apr 06 *syntax.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1349,6 +1349,29 @@ Inform development environment, you may with to add this to your
startup sequence: > startup sequence: >
:let inform_highlight_old=1 :let inform_highlight_old=1
IDL *idl.vim* *idl-syntax*
IDL (Interface Definition Language) files are used to define RPC calls. In
Microsoft land, this is also used for defining COM interfaces and calls.
IDL's structure is simple enough to permit a full grammar based approach to
rather than using a few heuristics. The result is large and somewhat
repetative but seems to work.
There are some Microsoft extensions to idl files that are here. Some of them
are disabled by defining idl_no_ms_extensions.
The more complex of the extensions are disabled by defining idl_no_extensions.
Variable Effect ~
idl_no_ms_extensions Disable some of the Microsoft specific
extensions
idl_no_extensions Disable complex extensions
idlsyntax_showerror Show IDL errors (can be rather intrusive, but
quite helpful)
idlsyntax_showerror_soft Use softer colours by default for errors
JAVA *java.vim* *ft-java-syntax* JAVA *java.vim* *ft-java-syntax*

View File

@@ -5838,6 +5838,8 @@ iconize starting.txt /*iconize*
iconv() eval.txt /*iconv()* iconv() eval.txt /*iconv()*
iconv-dynamic mbyte.txt /*iconv-dynamic* iconv-dynamic mbyte.txt /*iconv-dynamic*
ident-search tips.txt /*ident-search* ident-search tips.txt /*ident-search*
idl-syntax syntax.txt /*idl-syntax*
idl.vim syntax.txt /*idl.vim*
if_cscop.txt if_cscop.txt /*if_cscop.txt* if_cscop.txt if_cscop.txt /*if_cscop.txt*
if_mzsch.txt if_mzsch.txt /*if_mzsch.txt* if_mzsch.txt if_mzsch.txt /*if_mzsch.txt*
if_ole.txt if_ole.txt /*if_ole.txt* if_ole.txt if_ole.txt /*if_ole.txt*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0d. Last change: 2006 Apr 13 *todo.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -32,8 +32,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
Do some of the 'cindent' bugs below. Do some of the 'cindent' bugs below.
Should a[:5] not give an error for a list with 4 items?
Add more tests for all new functionality in Vim 7. Especially new functions. Add more tests for all new functionality in Vim 7. Especially new functions.
Win32: Describe how to do debugging. (George Reilly) Win32: Describe how to do debugging. (George Reilly)
@@ -47,7 +45,8 @@ Mac unicode patch (Da Woon Jung, Eckehard Berns):
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work. - With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt) (Alan Schmitt)
Darren is including the patch in ctags. Test it when it's ready. Darren Hiebert is including the patch for omni completion in ctags. A new
version still isn't available for download.
Awaiting updated patches: Awaiting updated patches:
@@ -2238,29 +2237,6 @@ Insert mode:
'cindent', 'smartindent': 'cindent', 'smartindent':
9 Too much indent for "lulu": (Uwe Zeisberger)
int main ()
{
if (lala)
do
++(*lolo);
while (lili
&& lele);
lulu;
}
9 Function gets extra indent: (Jamax)
void function(int param) {
if (false)
return;
}
9 brace not indented correctly:
case 'c': if (cond)
{
Should align with "if" in case statement.
7 Allow aligning a closing ")" with the line above, instead of the matching
"(": (Riehm) if (asdfasdf &&
asdf
)
8 Java: Inside an anonymous class, after an "else" or "try" the indent is 8 Java: Inside an anonymous class, after an "else" or "try" the indent is
too small. (Vincent Bergbauer) too small. (Vincent Bergbauer)
8 In C++ it's possible to have {} inside (): (Kirshna) 8 In C++ it's possible to have {} inside (): (Kirshna)
@@ -2270,18 +2246,12 @@ Insert mode:
"asdf" "asdf"
} }
); );
7 Separate "(0" option into inside/outside a function (Zellner): 7 Add separate "(0" option into inside/outside a function (Zellner):
func( func(
int x) // indent like "(4" int x) // indent like "(4"
{ {
if (a if (a
&& b) // indent like "(0" && b) // indent like "(0"
8 Strange problem with this code, "hello" is indented wrong: (Gary Holloway)
main() { char foo[] = "/*";
/* This is a comment; the indentation of C
* source below this comment gets messed up due to the string above.
*/
hello
9 Using "{" in a comment: (Helmut Stiegler) 9 Using "{" in a comment: (Helmut Stiegler)
if (a) if (a)
{ {
@@ -2290,9 +2260,9 @@ Insert mode:
// { // {
} }
} <-- this is indented incorrect } <-- this is indented incorrect
9 Wrong indent for cino=(4, removing the (void) fixes it: (Zellner) Problem is that find_start_brace() checks for the matching brace to be in
(void) MyFancyFunction( a comment, but not braces in between. Requires adding a comment check to
argument); findmatchlimit().
- Make smartindenting configurable. Add 'sioptions', e.g. '#' setting the - Make smartindenting configurable. Add 'sioptions', e.g. '#' setting the
indent to 0 should be switched on/off. indent to 0 should be switched on/off.
7 Support ANSI style function header, with each argument on its own line. 7 Support ANSI style function header, with each argument on its own line.
@@ -2323,9 +2293,8 @@ Insert mode:
7 Use Tabs for the indent of starting lines, pad with spaces for 7 Use Tabs for the indent of starting lines, pad with spaces for
continuation lines. Allows changing 'tabstop' without messing up the continuation lines. Allows changing 'tabstop' without messing up the
indents. indents.
And/or: Add option to copy indent as-is, without changing spaces to tabs. 'keeptabs': when set don't change the tabs and spaces used for indent,
Also for 'autoindent'. 'keeptabs': when set don't change the tabs and when the indent remains the same or increases.
spaces used for indent, when the indent remains the same or increases.
Java: Java:
@@ -3184,8 +3153,6 @@ Various improvements:
stack of previous directories. We also need ":cdnext". stack of previous directories. We also need ":cdnext".
7 Should ":cd" for MS-DOS go to $HOME, when it's defined? 7 Should ":cd" for MS-DOS go to $HOME, when it's defined?
- Make "gq<CR>" work on the last line in the file. Maybe for every operator? - Make "gq<CR>" work on the last line in the file. Maybe for every operator?
8 findmatchlimit() should be able to skip comments. Solves problem of
matching the '{' in /* if (foo) { */ (Fiveash)
- Add more redirecting of Ex commands: - Add more redirecting of Ex commands:
:redir #> bufname :redir #> bufname
:redir #>> bufname (append) :redir #>> bufname (append)

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0d. Last change: 2006 Apr 13 *version7.txt* For Vim version 7.0d. Last change: 2006 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -242,8 +242,9 @@ Currently supported languages:
C |ft-c-omni| C |ft-c-omni|
(X)HTML with CSS |ft-html-omni| (X)HTML with CSS |ft-html-omni|
JavaScript |ft-javascript-omni| JavaScript |ft-javascript-omni|
any language wih syntax highligting |ft-syntax-omni| Python
XML |ft-xml-omni| XML |ft-xml-omni|
any language wih syntax highligting |ft-syntax-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu. completion are displayed in a popup menu.
@@ -2476,4 +2477,15 @@ typing a special key.
When 'foldignore' is set the folds were not updated right away. When 'foldignore' is set the folds were not updated right away.
When a list is indexed with [a : b] and b was greater than the length an error
message was given. Now silently restrict to the length of the list.
When using BS during Insert mode completion go back to the original text, so
that CTRL-N selects the first matching entry.
Added the 'm' flag to 'cinoptions'.
Win32: Make the "gvim --help" window appear in the middle of the screen
instead of at an arbitrary position. (Randall W. Morris)
vim:tw=78:ts=8:ft=help:norl: vim:tw=78:ts=8:ft=help:norl:

View File

@@ -51,6 +51,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\> setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','') setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
setlocal suffixesadd=.rb setlocal suffixesadd=.rb
setlocal omnifunc=rubycomplete#Complete
" TODO: " TODO:
"setlocal define=^\\s*def "setlocal define=^\\s*def

View File

@@ -17,36 +17,6 @@ setlocal indentkeys=!^F,o,O,e,0(,0)
setlocal indentkeys+==~if,=~then,=~elsif,=~else setlocal indentkeys+==~if,=~then,=~elsif,=~else
setlocal indentkeys+==~begin,=~is,=~select setlocal indentkeys+==~begin,=~is,=~select
" count repeat
"function! <SID>CountWrapper(cmd)
" let i = v:count1
" if a:cmd[0] == ":"
" while i > 0
" execute a:cmd
" let i = i - 1
" endwhile
" else
" execute "normal! gv\<Esc>"
" execute "normal ".i.a:cmd
" let curcol = col(".")
" let curline = line(".")
" normal! gv
" call cursor(curline, curcol)
" endif
"endfunction
" explore motion
" keywords: "architecture", "block", "configuration", "component", "entity", "function", "package", "procedure", "process", "record", "units"
"let b:vhdl_explore = '\%(architecture\|block\|configuration\|component\|entity\|function\|package\|procedure\|process\|record\|units\)'
"noremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
"noremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\%(\\<end\\s\\+\\)\\@<!\\<".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
"noremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%^","bW")')<CR>
"noremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper(':cal search("\\%(--.*\\)\\@<!\\<end\\s\\+".b:vhdl_explore."\\>\\c\\<Bar>\\%$","W")')<CR>
"vnoremap <buffer><silent>[[ :<C-u>cal <SID>CountWrapper('[[')<CR>
"vnoremap <buffer><silent>]] :<C-u>cal <SID>CountWrapper(']]')<CR>
"vnoremap <buffer><silent>[] :<C-u>cal <SID>CountWrapper('[]')<CR>
"vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR>
" constants " constants
" not a comment " not a comment
let s:NC = '\%(--.*\)\@<!' let s:NC = '\%(--.*\)\@<!'
@@ -55,28 +25,6 @@ let s:ES = '\s*\%(--.*\)\=$'
" no "end" keyword in front " no "end" keyword in front
let s:NE = '\%(\<end\s\+\)\@<!' let s:NE = '\%(\<end\s\+\)\@<!'
" for matchit plugin
"if exists("loaded_matchit")
" let b:match_ignorecase = 1
" let b:match_words =
" \ s:NE.'\<if\>:\<elsif\>:\<else\>:\<end\s\+if\>,'.
" \ s:NE.'\<case\>:\<when\>:\<end\s\+case\>,'.
" \ s:NE.'\<loop\>:\<end\s\+loop\>,'.
" \ s:NE.'\<for\>:\<end\s\+for\>,'.
" \ s:NE.'\<generate\>:\<end\s\+generate\>,'.
" \ s:NE.'\<record\>:\<end\s\+record\>,'.
" \ s:NE.'\<units\>:\<end\s\+units\>,'.
" \ s:NE.'\<process\>:\<end\s\+process\>,'.
" \ s:NE.'\<block\>:\<end\s\+block\>,'.
" \ s:NE.'\<function\>:\<end\s\+function\>,'.
" \ s:NE.'\<entity\>:\<end\s\+entity\>,'.
" \ s:NE.'\<component\>:\<end\s\+component\>,'.
" \ s:NE.'\<architecture\>:\<end\s\+architecture\>,'.
" \ s:NE.'\<package\>:\<end\s\+package\>,'.
" \ s:NE.'\<procedure\>:\<end\s\+procedure\>,'.
" \ s:NE.'\<configuration\>:\<end\s\+configuration\>'
"endif
" only define indent function once " only define indent function once
if exists("*GetVHDLindent") if exists("*GetVHDLindent")
finish finish

View File

@@ -2,7 +2,7 @@
" Language: HTML " Language: HTML
" Maintainer: Claudio Fleiner <claudio@fleiner.com> " Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/html.vim " URL: http://www.fleiner.com/vim/syntax/html.vim
" Last Change: 2005 Jul 20 " Last Change: 2006 April 13
" Please check :help html.vim for some comments and a description of the options " Please check :help html.vim for some comments and a description of the options
@@ -27,10 +27,6 @@ endif
syn case ignore syn case ignore
if main_syntax == "html"
syn spell toplevel
endif
" mark illegal characters " mark illegal characters
syn match htmlError "[<>&]" syn match htmlError "[<>&]"
@@ -39,8 +35,8 @@ syn match htmlError "[<>&]"
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagError contained "[^>]<"ms=s+1 syn match htmlTagError contained "[^>]<"ms=s+1
@@ -101,13 +97,13 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" Comments (the real ones or the old netscape ones) " Comments (the real ones or the old netscape ones)
if exists("html_wrong_comments") if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+ syn region htmlComment start=+<!--+ end=+--\s*>+
else else
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError
syn match htmlCommentError contained "[^><!]" syn match htmlCommentError contained "[^><!]"
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc
endif endif
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+ syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
" server-parsed commands " server-parsed commands
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
@@ -158,14 +154,14 @@ if !exists("html_no_rendering")
syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop
syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop
syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
endif endif
syn keyword htmlTagName contained noscript syn keyword htmlTagName contained noscript
syn keyword htmlSpecialTagName contained script style syn keyword htmlSpecialTagName contained script style
if main_syntax != 'java' || exists("java_javascript") if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT " JAVA SCRIPT
syn include @htmlJavaScript <sfile>:p:h/javascript.vim syn include @htmlJavaScript syntax/javascript.vim
unlet b:current_syntax unlet b:current_syntax
syn region javaScript start=+<script[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc syn region javaScript start=+<script[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region htmlScriptTag contained start=+<script+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent syn region htmlScriptTag contained start=+<script+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
@@ -173,14 +169,14 @@ if main_syntax != 'java' || exists("java_javascript")
" html events (i.e. arguments that include javascript commands) " html events (i.e. arguments that include javascript commands)
if exists("html_extended_events") if exists("html_extended_events")
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
else else
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
endif endif
syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
HtmlHiLink htmlEventSQ htmlEvent HtmlHiLink htmlEventSQ htmlEvent
HtmlHiLink htmlEventDQ htmlEvent HtmlHiLink htmlEventDQ htmlEvent
@@ -190,7 +186,7 @@ endif
if main_syntax != 'java' || exists("java_vb") if main_syntax != 'java' || exists("java_vb")
" VB SCRIPT " VB SCRIPT
syn include @htmlVbScript <sfile>:p:h/vb.vim syn include @htmlVbScript syntax/vb.vim
unlet b:current_syntax unlet b:current_syntax
syn region javaScript start=+<script [^>]*language *=[^>]*vbscript[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc syn region javaScript start=+<script [^>]*language *=[^>]*vbscript[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
endif endif
@@ -199,8 +195,8 @@ syn cluster htmlJavaScript add=@htmlPreproc
if main_syntax != 'java' || exists("java_css") if main_syntax != 'java' || exists("java_css")
" embedded style sheets " embedded style sheets
syn keyword htmlArg contained media syn keyword htmlArg contained media
syn include @htmlCss <sfile>:p:h/css.vim syn include @htmlCss syntax/css.vim
unlet b:current_syntax unlet b:current_syntax
syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
syn match htmlCssStyleComment contained "\(<!--\|-->\)" syn match htmlCssStyleComment contained "\(<!--\|-->\)"
@@ -223,65 +219,65 @@ if version >= 508 || !exists("did_html_syn_inits")
if version < 508 if version < 508
let did_html_syn_inits = 1 let did_html_syn_inits = 1
endif endif
HtmlHiLink htmlTag Function HtmlHiLink htmlTag Function
HtmlHiLink htmlEndTag Identifier HtmlHiLink htmlEndTag Identifier
HtmlHiLink htmlArg Type HtmlHiLink htmlArg Type
HtmlHiLink htmlTagName htmlStatement HtmlHiLink htmlTagName htmlStatement
HtmlHiLink htmlSpecialTagName Exception HtmlHiLink htmlSpecialTagName Exception
HtmlHiLink htmlValue String HtmlHiLink htmlValue String
HtmlHiLink htmlSpecialChar Special HtmlHiLink htmlSpecialChar Special
if !exists("html_no_rendering") if !exists("html_no_rendering")
HtmlHiLink htmlH1 Title HtmlHiLink htmlH1 Title
HtmlHiLink htmlH2 htmlH1 HtmlHiLink htmlH2 htmlH1
HtmlHiLink htmlH3 htmlH2 HtmlHiLink htmlH3 htmlH2
HtmlHiLink htmlH4 htmlH3 HtmlHiLink htmlH4 htmlH3
HtmlHiLink htmlH5 htmlH4 HtmlHiLink htmlH5 htmlH4
HtmlHiLink htmlH6 htmlH5 HtmlHiLink htmlH6 htmlH5
HtmlHiLink htmlHead PreProc HtmlHiLink htmlHead PreProc
HtmlHiLink htmlTitle Title HtmlHiLink htmlTitle Title
HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBold htmlBoldUnderline HtmlHiLink htmlUnderlineBold htmlBoldUnderline
HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderline htmlUnderlineItalic HtmlHiLink htmlItalicUnderline htmlUnderlineItalic
HtmlHiLink htmlItalicBold htmlBoldItalic HtmlHiLink htmlItalicBold htmlBoldItalic
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
HtmlHiLink htmlLink Underlined HtmlHiLink htmlLink Underlined
if !exists("html_my_rendering") if !exists("html_my_rendering")
hi def htmlBold term=bold cterm=bold gui=bold hi def htmlBold term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
hi def htmlUnderline term=underline cterm=underline gui=underline hi def htmlUnderline term=underline cterm=underline gui=underline
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
hi def htmlItalic term=italic cterm=italic gui=italic hi def htmlItalic term=italic cterm=italic gui=italic
endif endif
endif endif
HtmlHiLink htmlPreStmt PreProc HtmlHiLink htmlPreStmt PreProc
HtmlHiLink htmlPreError Error HtmlHiLink htmlPreError Error
HtmlHiLink htmlPreProc PreProc HtmlHiLink htmlPreProc PreProc
HtmlHiLink htmlPreAttr String HtmlHiLink htmlPreAttr String
HtmlHiLink htmlPreProcAttrName PreProc HtmlHiLink htmlPreProcAttrName PreProc
HtmlHiLink htmlPreProcAttrError Error HtmlHiLink htmlPreProcAttrError Error
HtmlHiLink htmlSpecial Special HtmlHiLink htmlSpecial Special
HtmlHiLink htmlSpecialChar Special HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlString String HtmlHiLink htmlString String
HtmlHiLink htmlStatement Statement HtmlHiLink htmlStatement Statement
HtmlHiLink htmlComment Comment HtmlHiLink htmlComment Comment
HtmlHiLink htmlCommentPart Comment HtmlHiLink htmlCommentPart Comment
HtmlHiLink htmlValue String HtmlHiLink htmlValue String
HtmlHiLink htmlCommentError htmlError HtmlHiLink htmlCommentError htmlError
HtmlHiLink htmlTagError htmlError HtmlHiLink htmlTagError htmlError
HtmlHiLink htmlEvent javaScript HtmlHiLink htmlEvent javaScript
HtmlHiLink htmlError Error HtmlHiLink htmlError Error
HtmlHiLink javaScript Special HtmlHiLink javaScript Special
HtmlHiLink javaScriptExpression javaScript HtmlHiLink javaScriptExpression javaScript
HtmlHiLink htmlCssStyleComment Comment HtmlHiLink htmlCssStyleComment Comment
HtmlHiLink htmlCssDefinition Special HtmlHiLink htmlCssDefinition Special
endif endif
delcommand HtmlHiLink delcommand HtmlHiLink

View File

@@ -1,8 +1,9 @@
" Vim syntax file " Vim syntax file
" Language: IDL (Interface Description Language) " Language: IDL (Interface Description Language)
" Created By: Jody Goldberg <jody@gnome.org> " Created By: Jody Goldberg
" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au> " Maintainer: Michael Geddes <vim@frog.wheelycreek.net>
" Last Change: 2004 Jul 20 " Last Change: Thu Apr 13 2006
" This is an experiment. IDL's structure is simple enough to permit a full " This is an experiment. IDL's structure is simple enough to permit a full
" grammar based approach to rather than using a few heuristics. The result " grammar based approach to rather than using a few heuristics. The result
@@ -13,6 +14,10 @@
" "
" The more complex of the extensions are disabled by defining idl_no_extensions. " The more complex of the extensions are disabled by defining idl_no_extensions.
" "
" History:
" 2.0: Michael's new version
" 2.1: Support for Vim 7 spell (Anduin Withers)
"
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@@ -32,7 +37,7 @@ syn match idlSemiColon contained ";"
syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl
syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlError,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlError,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral
syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlCommaArg,idlArraySize1 syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlCommaArg,idlArraySize1
syn region idlString contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ syn region idlString contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ contains=@Spell
syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\=" syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\="
syn match idlLiteral contained "0" syn match idlLiteral contained "0"
syn match idlLiteral contained "\.\d\+" syn match idlLiteral contained "\.\d\+"
@@ -42,8 +47,8 @@ syn keyword idlLiteral contained TRUE FALSE
" Comments " Comments
syn keyword idlTodo contained TODO FIXME XXX syn keyword idlTodo contained TODO FIXME XXX
syn region idlComment start="/\*" end="\*/" contains=idlTodo syn region idlComment start="/\*" end="\*/" contains=idlTodo,@Spell
syn match idlComment "//.*" contains=idlTodo syn match idlComment "//.*" contains=idlTodo,@Spell
syn match idlCommentError "\*/" syn match idlCommentError "\*/"
" C style Preprocessor " C style Preprocessor

View File

@@ -7,7 +7,7 @@
" (ss) repaired several quoting and grouping glitches " (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members " (ss) additional factoring of keywords, globals, and members
" Last Change: 2005 Nov 12 (ss) " Last Change: 2006 Jan 15
" 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
@@ -41,7 +41,7 @@ syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ co
syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptSpecialCharacter "'\\.'"
syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)]+me=e-1 contains=@htmlPreproc oneline syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
syn keyword javaScriptConditional if else switch syn keyword javaScriptConditional if else switch
syn keyword javaScriptRepeat while for do in syn keyword javaScriptRepeat while for do in

View File

@@ -1,11 +1,12 @@
" Vim syntax file " Vim syntax file
" Language: Mathematica " Language: Mathematica
" Maintainer: steve layland <layland@wolfram.com> " Maintainer: steve layland <layland@wolfram.com>
" Last Change: Tue May 10 18:31:00 CDT 2005 " Last Change: Thu May 19 21:36:04 CDT 2005
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1273 " Source: http://members.wri.com/layland/vim/syntax/mma.vim
" http://members.wri.com/layland/vim/syntax/mma.vim " http://vim.sourceforge.net/scripts/script.php?script_id=1273
" " Id: $Id$
" NOTE: " NOTE:
"
" Empty .m files will automatically be presumed as Matlab files " Empty .m files will automatically be presumed as Matlab files
" unless you have the following in your .vimrc: " unless you have the following in your .vimrc:
" "
@@ -23,6 +24,12 @@
" from the Java vim syntax file by Claudio Fleiner. Thanks! " from the Java vim syntax file by Claudio Fleiner. Thanks!
" o Everything else written by steve <layland@wolfram.com> " o Everything else written by steve <layland@wolfram.com>
" "
" Bugs:
" o Vim 6.1 didn't really have support for character classes
" of other named character classes. For example, [\a\d]
" didn't work. Therefore, a lot of this code uses explicit
" character classes instead: [0-9a-zA-Z]
"
" TODO: " TODO:
" folding " folding
" fix nesting " fix nesting
@@ -78,19 +85,20 @@ syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constan
" Comment Sections: " Comment Sections:
" this: " this:
" :that: " :that:
syntax match mmaItem "\%(^[( |*\t]*\)\@<=\%(:\+\|\a\)[a-zA-Z0-9 ]\+:" contained contains=@mmaNotes syntax match mmaItem "\%(^[( |*\t]*\)\@<=\%(:\+\|\w\)\w\+\%( \w\+\)\{0,3}:" contained contains=@mmaNotes
" Comment Keywords: " Comment Keywords:
syntax keyword mmaTodo TODO NOTE HEY contained syntax keyword mmaTodo TODO NOTE HEY contained
syntax match mmaTodo "X\{3,}" contained syntax match mmaTodo "X\{3,}" contained
syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained
syntax match mmaFixme "BUG\%( *\#\=[0-9]\+\)\=" contained
" yay pirates... " yay pirates...
syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained
" EmPHAsis: " EmPHAsis:
" this unnecessary, but whatever :) " this unnecessary, but whatever :)
syntax match mmaemPHAsis "\%(^\|\s\)\([_/]\)[a-zA-Z0-9]\+\%(\s\+[a-zA-Z0-9]\+\)*\1\%(\s\|$\)" contained contains=mmaemPHAsis syntax match mmaemPHAsis "\%(^\|\s\)\([_/]\)[a-zA-Z0-9]\+\%([- \t':]\+[a-zA-Z0-9]\+\)*\1\%(\s\|$\)" contained contains=mmaemPHAsis
syntax match mmaemPHAsis "\%(^\|\s\)(\@<!\*[a-zA-Z0-9]\+\%(\s\+[a-zA-Z0-9]\+\)*)\@!\*\%(\s\|$\)" contained contains=mmaemPHAsis syntax match mmaemPHAsis "\%(^\|\s\)(\@<!\*[a-zA-Z0-9]\+\%([- \t':]\+[a-zA-Z0-9]\+\)*)\@!\*\%(\s\|$\)" contained contains=mmaemPHAsis
" Regular Comments: " Regular Comments:
" (* *) " (* *)
@@ -112,9 +120,11 @@ syntax match mmaCommentStar "^\s*\*\+" contained
" Variables: " Variables:
" Dollar sign variables " Dollar sign variables
syntax match mmaVariable "$\a\+\d*" syntax match mmaVariable "\$\a\+[0-9a-zA-Z$]*"
" Preceding contexts
syntax match mmaVariable "`\=\a\+\d*`" " Preceding and Following Contexts
syntax match mmaVariable "`[a-zA-Z$]\+[0-9a-zA-Z$]*" contains=mmaVariable
syntax match mmaVariable "[a-zA-Z$]\+[0-9a-zA-Z$]*`" contains=mmaVariable
" Strings: " Strings:
" "string" " "string"
@@ -179,9 +189,11 @@ syntax match mmaOperator "[*+=^.:?-]"
syntax match mmaOperator "\%(\~\~\=\)" syntax match mmaOperator "\%(\~\~\=\)"
syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction
" Function Usage Messages: " Symbol Tags:
" "SymbolName::item" " "SymbolName::item"
syntax match mmaMessage "$\=\a\+\d*::\a\+\d*" "syntax match mmaSymbol "`\=[a-zA-Z$]\+[0-9a-zA-Z$]*\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*" contained
syntax match mmaMessage "`\=\([a-zA-Z$]\+[0-9a-zA-Z$]*\)\%(`\%([a-zA-Z$]\+[0-9a-zA-Z$]*\)\=\)*::\a\+" contains=mmaMessageType
syntax match mmaMessageType "::\a\+"hs=s+2 contained
" Pure Functions: " Pure Functions:
syntax match mmaPureFunction "#\%(#\|\d\+\)\=" syntax match mmaPureFunction "#\%(#\|\d\+\)\="
@@ -208,7 +220,7 @@ syntax match mmaUnicode "\\\%(\x\{3}\|\.\x\{2}\|:\x\{4}\)"
" Syntax Errors: " Syntax Errors:
syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings syntax match mmaError "\*)" containedin=ALLBUT,@mmaComments,@mmaStrings
syntax match mmaError "\%([&:|+*/?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings syntax match mmaError "\%([/]{3,}\|[&:|+*?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" containedin=ALLBUT,@mmaComments,@mmaStrings
" Punctuation: " Punctuation:
" things that shouldn't really be highlighted, or highlighted " things that shouldn't really be highlighted, or highlighted
@@ -217,13 +229,56 @@ syntax match mmaError "\%([&:|+*/?~-]\{3,}\|[.=]\{4,}\|_\@<=\.\{2,}\|`\{2,}\)" c
" TODO - use Delimiter group? " TODO - use Delimiter group?
syntax match mmaBoring "[(){}]" contained syntax match mmaBoring "[(){}]" contained
" ------------------------------------
" future explorations...
" ------------------------------------
" Function Arguments: " Function Arguments:
" anything between brackets [] " anything between brackets []
" TODO - make good folds for this. " (fold)
"syntax region mmaArgument start="\[" end="]" containedin=ALLBUT,@mmaComments,@mmaCommentStrings transparent fold "syntax region mmaArgument start="\[" end="\]" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold
"syntax sync fromstart
" Lists:
" (fold)
"syntax region mmaLists start="{" end="}" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold
" Regions:
" (fold)
"syntax region mmaRegion start="(\*\+[^<]*<!--[^>]*\*\+)" end="--> \*)" containedin=ALLBUT,@mmaStrings transparent fold keepend
" show fold text
set commentstring='(*%s*)'
"set foldtext=MmaFoldText()
"function MmaFoldText()
" let line = getline(v:foldstart)
"
" let lines = v:foldend-v:foldstart+1
"
" let sub = substitute(line, '(\*\+|\*\+)|[-*_]\+', '', 'g')
"
" if match(line, '(\*') != -1
" let lines = lines.' line comment'
" else
" let lines = lines.' lines'
" endif
"
" return v:folddashes.' '.lines.' '.sub
"endf
"this is slow for computing folds, but it does so accurately
syntax sync fromstart
" but this seems to do alright for non fold syntax coloring.
" for folding, however, it doesn't get the nesting right.
" TODO - find sync group for multiline modules? ick...
" sync multi line comments
"syntax sync match syncComments groupthere NONE "\*)"
"syntax sync match syncComments groupthere mmaComment "(\*"
"set foldmethod=syntax "set foldmethod=syntax
"set foldminlines=10 "set foldnestmax=1
"set foldminlines=15
if version >= 508 || !exists("did_mma_syn_inits") if version >= 508 || !exists("did_mma_syn_inits")
if version < 508 if version < 508
@@ -238,12 +293,14 @@ if version >= 508 || !exists("did_mma_syn_inits")
" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to
" look good in yours " look good in yours
HiLink mmaComment Comment HiLink mmaComment Comment
HiLink mmaCommentStar Comment HiLink mmaCommentStar Comment
HiLink mmaFunctionComment Comment HiLink mmaFunctionComment Comment
HiLink mmaLooseQuote Comment HiLink mmaLooseQuote Comment
HiLink mmaGenericFunction Function HiLink mmaGenericFunction Function
HiLink mmaVariable Identifier HiLink mmaVariable Identifier
" HiLink mmaSymbol Identifier
HiLink mmaOperator Operator HiLink mmaOperator Operator
HiLink mmaPatternOp Operator HiLink mmaPatternOp Operator
HiLink mmaPureFunction Operator HiLink mmaPureFunction Operator
@@ -259,6 +316,7 @@ if version >= 508 || !exists("did_mma_syn_inits")
HiLink mmaTodo Todo HiLink mmaTodo Todo
HiLink mmaemPHAsis Special HiLink mmaemPHAsis Special
HiLink mmaFunctionTitle Special HiLink mmaFunctionTitle Special
HiLink mmaMessageType Special
HiLink mmaItem Preproc HiLink mmaItem Preproc
delcommand HiLink delcommand HiLink

View File

@@ -2,7 +2,7 @@
" Language: nroff/groff " Language: nroff/groff
" Maintainer: Alejandro L<>pez-Valencia <dradul@yahoo.com> " Maintainer: Alejandro L<>pez-Valencia <dradul@yahoo.com>
" URL: http://dradul.tripod.com/vim " URL: http://dradul.tripod.com/vim
" Last Change: 2003 May 24 " Last Change: 2006 Apr 14
" "
" {{{1 Acknowledgements " {{{1 Acknowledgements
" "
@@ -125,12 +125,12 @@ if exists("b:nroff_is_groff")
" "
" GNU troff allows long request names " GNU troff allows long request names
" "
syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg
else else
syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg
endif endif
syn region roffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment syn region nroffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment
" {{{2 Conditional: .if .ie .el " {{{2 Conditional: .if .ie .el
syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite

View File

@@ -1807,7 +1807,8 @@ diff_find_change(wp, lnum, startp, endp)
char_u *line_org; char_u *line_org;
char_u *line_new; char_u *line_new;
int i; int i;
int si, ei_org, ei_new; int si_org, si_new;
int ei_org, ei_new;
diff_T *dp; diff_T *dp;
int idx; int idx;
int off; int off;
@@ -1838,34 +1839,66 @@ diff_find_change(wp, lnum, startp, endp)
if (off >= dp->df_count[i]) if (off >= dp->df_count[i])
continue; continue;
added = FALSE; added = FALSE;
line_new = ml_get_buf(curtab->tp_diffbuf[i], dp->df_lnum[i] + off, FALSE); line_new = ml_get_buf(curtab->tp_diffbuf[i],
dp->df_lnum[i] + off, FALSE);
/* Search for start of difference */ /* Search for start of difference */
for (si = 0; line_org[si] != NUL && line_org[si] == line_new[si]; ) si_org = si_new = 0;
++si; while (line_org[si_org] != NUL)
{
if ((diff_flags & DIFF_IWHITE)
&& vim_iswhite(line_org[si_org])
&& vim_iswhite(line_new[si_new]))
{
si_org = skipwhite(line_org + si_org) - line_org;
si_new = skipwhite(line_new + si_new) - line_new;
}
else
{
if (line_org[si_org] != line_new[si_new])
break;
++si_org;
++si_new;
}
}
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (has_mbyte) if (has_mbyte)
{ {
/* Move back to first byte of character in both lines (may /* Move back to first byte of character in both lines (may
* have "nn^" in line_org and "n^ in line_new). */ * have "nn^" in line_org and "n^ in line_new). */
si -= (*mb_head_off)(line_org, line_org + si); si_org -= (*mb_head_off)(line_org, line_org + si_org);
si -= (*mb_head_off)(line_new, line_new + si); si_new -= (*mb_head_off)(line_new, line_new + si_new);
} }
#endif #endif
if (*startp > si) if (*startp > si_org)
*startp = si; *startp = si_org;
/* Search for end of difference, if any. */ /* Search for end of difference, if any. */
if (line_org[si] != NUL || line_new[si] != NUL) if (line_org[si_org] != NUL || line_new[si_new] != NUL)
{ {
ei_org = (int)STRLEN(line_org); ei_org = (int)STRLEN(line_org);
ei_new = (int)STRLEN(line_new); ei_new = (int)STRLEN(line_new);
while (ei_org >= *startp && ei_new >= *startp while (ei_org >= *startp && ei_new >= si_new
&& ei_org >= 0 && ei_new >= 0 && ei_org >= 0 && ei_new >= 0)
&& line_org[ei_org] == line_new[ei_new])
{ {
--ei_org; if ((diff_flags & DIFF_IWHITE)
--ei_new; && vim_iswhite(line_org[ei_org])
&& vim_iswhite(line_new[ei_new]))
{
while (ei_org >= *startp
&& vim_iswhite(line_org[ei_org]))
--ei_org;
while (ei_new >= si_new
&& vim_iswhite(line_new[ei_new]))
--ei_new;
}
else
{
if (line_org[ei_org] != line_new[ei_new])
break;
--ei_org;
--ei_new;
}
} }
if (*endp < ei_org) if (*endp < ei_org)
*endp = ei_org; *endp = ei_org;

View File

@@ -2140,7 +2140,7 @@ ins_compl_add(str, len, icase, fname, cptext, cdir, flags)
* - a copy of fname, FREE_FNAME is set to free later THE allocated mem. * - a copy of fname, FREE_FNAME is set to free later THE allocated mem.
* - NULL otherwise. --Acevedo */ * - NULL otherwise. --Acevedo */
if (fname != NULL if (fname != NULL
&& compl_curr_match && compl_curr_match != NULL
&& compl_curr_match->cp_fname != NULL && compl_curr_match->cp_fname != NULL
&& STRCMP(fname, compl_curr_match->cp_fname) == 0) && STRCMP(fname, compl_curr_match->cp_fname) == 0)
match->cp_fname = compl_curr_match->cp_fname; match->cp_fname = compl_curr_match->cp_fname;
@@ -2501,6 +2501,11 @@ ins_compl_show_pum()
* compl_match_arraysize)); * compl_match_arraysize));
if (compl_match_array != NULL) if (compl_match_array != NULL)
{ {
/* If the current match is the original text don't find the first
* match after it, don't highlight anything. */
if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
shown_match_ok = TRUE;
i = 0; i = 0;
compl = compl_first_match; compl = compl_first_match;
do do
@@ -2571,8 +2576,10 @@ ins_compl_show_pum()
if (compl_match_array[i].pum_text == compl_shown_match->cp_str if (compl_match_array[i].pum_text == compl_shown_match->cp_str
|| compl_match_array[i].pum_text || compl_match_array[i].pum_text
== compl_shown_match->cp_text[CPT_ABBR]) == compl_shown_match->cp_text[CPT_ABBR])
{
cur = i;
break; break;
cur = i; }
} }
if (compl_match_array != NULL) if (compl_match_array != NULL)
@@ -2951,6 +2958,8 @@ ins_compl_bs()
ins_compl_free(); ins_compl_free();
compl_started = FALSE; compl_started = FALSE;
compl_matches = 0; compl_matches = 0;
compl_cont_status = 0;
compl_cont_mode = 0;
} }
line = ml_get_curline(); line = ml_get_curline();
@@ -2983,6 +2992,15 @@ ins_compl_bs()
} }
} }
/* Go to the original text, since none of the matches is inserted. */
if (compl_first_match->cp_prev != NULL
&& (compl_first_match->cp_prev->cp_flags & ORIGINAL_TEXT))
compl_shown_match = compl_first_match->cp_prev;
else
compl_shown_match = compl_first_match;
compl_curr_match = compl_shown_match;
compl_shows_dir = compl_direction;
/* Show the popup menu with a different set of matches. */ /* Show the popup menu with a different set of matches. */
ins_compl_show_pum(); ins_compl_show_pum();
compl_used_match = FALSE; compl_used_match = FALSE;

View File

@@ -4696,8 +4696,8 @@ eval7(arg, rettv, evaluate)
} }
/* /*
* Evaluate an "[expr]" or "[expr:expr]" index. * Evaluate an "[expr]" or "[expr:expr]" index. Also "dict.key".
* "*arg" points to the '['. * "*arg" points to the '[' or '.'.
* Returns FAIL or OK. "*arg" is advanced to after the ']'. * Returns FAIL or OK. "*arg" is advanced to after the ']'.
*/ */
static int static int
@@ -4867,7 +4867,9 @@ eval_index(arg, rettv, evaluate, verbose)
if (n2 < 0) if (n2 < 0)
n2 = len + n2; n2 = len + n2;
if (!empty2 && (n2 < 0 || n2 >= len || n2 + 1 < n1)) else if (n2 >= len)
n2 = len - 1;
if (!empty2 && (n2 < 0 || n2 + 1 < n1))
{ {
if (verbose) if (verbose)
EMSGN(_(e_listidx), n2); EMSGN(_(e_listidx), n2);

View File

@@ -2118,7 +2118,7 @@ CenterWindow(
hChild = rChild.bottom - rChild.top; hChild = rChild.bottom - rChild.top;
/* If Vim is minimized put the window in the middle of the screen. */ /* If Vim is minimized put the window in the middle of the screen. */
if (IsMinimized(hwndParent)) if (hwndParent == NULL || IsMinimized(hwndParent))
{ {
#ifdef WIN16 #ifdef WIN16
rParent.left = 0; rParent.left = 0;

View File

@@ -4658,18 +4658,30 @@ find_start_comment(ind_maxcomment) /* XXX */
pos_T *pos; pos_T *pos;
char_u *line; char_u *line;
char_u *p; char_u *p;
int cur_maxcomment = ind_maxcomment;
if ((pos = findmatchlimit(NULL, '*', FM_BACKWARD, ind_maxcomment)) == NULL) for (;;)
return NULL; {
pos = findmatchlimit(NULL, '*', FM_BACKWARD, cur_maxcomment);
if (pos == NULL)
break;
/* /*
* Check if the comment start we found is inside a string. * Check if the comment start we found is inside a string.
*/ * If it is then restrict the search to below this line and try again.
line = ml_get(pos->lnum); */
for (p = line; *p && (unsigned)(p - line) < pos->col; ++p) line = ml_get(pos->lnum);
p = skip_string(p); for (p = line; *p && (unsigned)(p - line) < pos->col; ++p)
if ((unsigned)(p - line) > pos->col) p = skip_string(p);
return NULL; if ((unsigned)(p - line) <= pos->col)
break;
cur_maxcomment = curwin->w_cursor.lnum - pos->lnum - 1;
if (cur_maxcomment <= 0)
{
pos = NULL;
break;
}
}
return pos; return pos;
} }
@@ -4770,6 +4782,7 @@ static int cin_isif __ARGS((char_u *));
static int cin_iselse __ARGS((char_u *)); static int cin_iselse __ARGS((char_u *));
static int cin_isdo __ARGS((char_u *)); static int cin_isdo __ARGS((char_u *));
static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int)); static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment));
static int cin_isbreak __ARGS((char_u *)); static int cin_isbreak __ARGS((char_u *));
static int cin_is_cpp_baseclass __ARGS((char_u *line, colnr_T *col)); static int cin_is_cpp_baseclass __ARGS((char_u *line, colnr_T *col));
static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass)); static int get_baseclass_amount __ARGS((int col, int ind_maxparen, int ind_maxcomment, int ind_cpp_baseclass));
@@ -5078,7 +5091,7 @@ get_indent_nolabel(lnum) /* XXX */
/* /*
* Find indent for line "lnum", ignoring any case or jump label. * Find indent for line "lnum", ignoring any case or jump label.
* Also return a pointer to the text (after the label). * Also return a pointer to the text (after the label) in "pp".
* label: if (asdf && asdfasdf) * label: if (asdf && asdfasdf)
* ^ * ^
*/ */
@@ -5442,6 +5455,66 @@ cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */
return retval; return retval;
} }
/*
* Return TRUE if we are at the end of a do-while.
* do
* nothing;
* while (foo
* && bar); <-- here
* Adjust the cursor to the line with "while".
*/
static int
cin_iswhileofdo_end(terminated, ind_maxparen, ind_maxcomment)
int terminated;
int ind_maxparen;
int ind_maxcomment;
{
char_u *line;
char_u *p;
char_u *s;
pos_T *trypos;
int i;
if (terminated != ';') /* there must be a ';' at the end */
return FALSE;
p = line = ml_get_curline();
while (*p != NUL)
{
p = cin_skipcomment(p);
if (*p == ')')
{
s = skipwhite(p + 1);
if (*s == ';' && cin_nocode(s + 1))
{
/* Found ");" at end of the line, now check there is "while"
* before the matching '('. XXX */
i = p - line;
curwin->w_cursor.col = i;
trypos = find_match_paren(ind_maxparen, ind_maxcomment);
if (trypos != NULL)
{
s = cin_skipcomment(ml_get(trypos->lnum));
if (*s == '}') /* accept "} while (cond);" */
s = cin_skipcomment(s + 1);
if (STRNCMP(s, "while", 5) == 0 && !vim_isIDc(s[5]))
{
curwin->w_cursor.lnum = trypos->lnum;
return TRUE;
}
}
/* Searching may have made "line" invalid, get it again. */
line = ml_get_curline();
p = line + i;
}
}
if (*p != NUL)
++p;
}
return FALSE;
}
static int static int
cin_isbreak(p) cin_isbreak(p)
char_u *p; char_u *p;
@@ -5716,7 +5789,7 @@ find_start_brace(ind_maxcomment) /* XXX */
trypos = &pos_copy; trypos = &pos_copy;
curwin->w_cursor = *trypos; curwin->w_cursor = *trypos;
pos = NULL; pos = NULL;
/* ignore the { if it's in a // comment */ /* ignore the { if it's in a // or / * * / comment */
if ((colnr_T)cin_skip2pos(trypos) == trypos->col if ((colnr_T)cin_skip2pos(trypos) == trypos->col
&& (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */ && (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */
break; break;
@@ -5738,7 +5811,7 @@ find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */
{ {
pos_T cursor_save; pos_T cursor_save;
pos_T *trypos; pos_T *trypos;
static pos_T pos_copy; static pos_T pos_copy;
cursor_save = curwin->w_cursor; cursor_save = curwin->w_cursor;
if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL) if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL)
@@ -5941,6 +6014,11 @@ get_c_indent()
*/ */
int ind_matching_paren = 0; int ind_matching_paren = 0;
/*
* indent a closing parentheses under the previous line.
*/
int ind_paren_prev = 0;
/* /*
* Extra indent for comments. * Extra indent for comments.
*/ */
@@ -6079,6 +6157,7 @@ get_c_indent()
case 'W': ind_unclosed_wrapped = n; break; case 'W': ind_unclosed_wrapped = n; break;
case 'w': ind_unclosed_whiteok = n; break; case 'w': ind_unclosed_whiteok = n; break;
case 'm': ind_matching_paren = n; break; case 'm': ind_matching_paren = n; break;
case 'M': ind_paren_prev = n; break;
case ')': ind_maxparen = n; break; case ')': ind_maxparen = n; break;
case '*': ind_maxcomment = n; break; case '*': ind_maxcomment = n; break;
case 'g': ind_scopedecl = n; break; case 'g': ind_scopedecl = n; break;
@@ -6322,41 +6401,50 @@ get_c_indent()
* If the matching paren is more than one line away, use the indent of * If the matching paren is more than one line away, use the indent of
* a previous non-empty line that matches the same paren. * a previous non-empty line that matches the same paren.
*/ */
amount = -1; if (theline[0] == ')' && ind_paren_prev)
cur_amount = MAXCOL;
our_paren_pos = *trypos;
for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
{ {
l = skipwhite(ml_get(lnum)); /* Line up with the start of the matching paren line. */
if (cin_nocode(l)) /* skip comment lines */ amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
continue; }
if (cin_ispreproc_cont(&l, &lnum)) /* ignore #defines, #if, etc. */ else
continue; {
curwin->w_cursor.lnum = lnum; amount = -1;
cur_amount = MAXCOL;
/* Skip a comment. XXX */ our_paren_pos = *trypos;
if ((trypos = find_start_comment(ind_maxcomment)) != NULL) for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
{ {
lnum = trypos->lnum + 1; l = skipwhite(ml_get(lnum));
continue; if (cin_nocode(l)) /* skip comment lines */
} continue;
if (cin_ispreproc_cont(&l, &lnum))
continue; /* ignore #define, #if, etc. */
curwin->w_cursor.lnum = lnum;
/* XXX */ /* Skip a comment. XXX */
if ((trypos = find_match_paren( if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
corr_ind_maxparen(ind_maxparen, &cur_curpos), {
lnum = trypos->lnum + 1;
continue;
}
/* XXX */
if ((trypos = find_match_paren(
corr_ind_maxparen(ind_maxparen, &cur_curpos),
ind_maxcomment)) != NULL ind_maxcomment)) != NULL
&& trypos->lnum == our_paren_pos.lnum && trypos->lnum == our_paren_pos.lnum
&& trypos->col == our_paren_pos.col) && trypos->col == our_paren_pos.col)
{ {
amount = get_indent_lnum(lnum); /* XXX */ amount = get_indent_lnum(lnum); /* XXX */
if (theline[0] == ')') if (theline[0] == ')')
{ {
if (our_paren_pos.lnum != lnum && cur_amount > amount) if (our_paren_pos.lnum != lnum
cur_amount = amount; && cur_amount > amount)
amount = -1; cur_amount = amount;
} amount = -1;
break; }
break;
}
} }
} }
@@ -6367,9 +6455,34 @@ get_c_indent()
*/ */
if (amount == -1) if (amount == -1)
{ {
int ignore_paren_col = 0;
amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment); amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
look = skipwhite(look);
if (*look == '(')
{
linenr_T save_lnum = curwin->w_cursor.lnum;
char_u *line;
int look_col;
/* Ignore a '(' in front of the line that has a match before
* our matching '('. */
curwin->w_cursor.lnum = our_paren_pos.lnum;
line = ml_get_curline();
look_col = look - line;
curwin->w_cursor.col = look_col + 1;
if ((trypos = findmatchlimit(NULL, ')', 0, ind_maxparen))
!= NULL
&& trypos->lnum == our_paren_pos.lnum
&& trypos->col < our_paren_pos.col)
ignore_paren_col = trypos->col + 1;
curwin->w_cursor.lnum = save_lnum;
look = ml_get(our_paren_pos.lnum) + look_col;
}
if (theline[0] == ')' || ind_unclosed == 0 if (theline[0] == ')' || ind_unclosed == 0
|| (!ind_unclosed_noignore && *skipwhite(look) == '(')) || (!ind_unclosed_noignore && *look == '('
&& ignore_paren_col == 0))
{ {
/* /*
* If we're looking at a close paren, line up right there; * If we're looking at a close paren, line up right there;
@@ -6439,16 +6552,17 @@ get_c_indent()
/* Line up with the start of the matching paren line. */ /* Line up with the start of the matching paren line. */
} }
else if (ind_unclosed == 0 || (!ind_unclosed_noignore else if (ind_unclosed == 0 || (!ind_unclosed_noignore
&& *skipwhite(look) == '(')) && *look == '(' && ignore_paren_col == 0))
{ {
if (cur_amount != MAXCOL) if (cur_amount != MAXCOL)
amount = cur_amount; amount = cur_amount;
} }
else else
{ {
/* add ind_unclosed2 for each '(' before our matching one */ /* Add ind_unclosed2 for each '(' before our matching one, but
* ignore (void) before the line (ignore_paren_col). */
col = our_paren_pos.col; col = our_paren_pos.col;
while (our_paren_pos.col > 0) while (our_paren_pos.col > ignore_paren_col)
{ {
--our_paren_pos.col; --our_paren_pos.col;
switch (*ml_get_pos(&our_paren_pos)) switch (*ml_get_pos(&our_paren_pos))
@@ -6887,7 +7001,12 @@ get_c_indent()
amount = n; amount = n;
l = after_label(ml_get_curline()); l = after_label(ml_get_curline());
if (l != NULL && cin_is_cinword(l)) if (l != NULL && cin_is_cinword(l))
amount += ind_level + ind_no_brace; {
if (theline[0] == '{')
amount += ind_open_extra;
else
amount += ind_level + ind_no_brace;
}
break; break;
} }
@@ -7259,8 +7378,8 @@ get_c_indent()
* If so: Ignore until the matching "do". * If so: Ignore until the matching "do".
*/ */
/* XXX */ /* XXX */
else if (cin_iswhileofdo(l, else if (cin_iswhileofdo_end(terminated, ind_maxparen,
curwin->w_cursor.lnum, ind_maxparen)) ind_maxcomment))
{ {
/* /*
* Found an unterminated line after a while ();, line up * Found an unterminated line after a while ();, line up

View File

@@ -1930,7 +1930,7 @@ findmatchlimit(oap, initc, flags, maxtravel)
break; break;
--pos.lnum; --pos.lnum;
if (maxtravel && traveled++ > maxtravel) if (maxtravel > 0 && ++traveled > maxtravel)
break; break;
linep = ml_get(pos.lnum); linep = ml_get(pos.lnum);

View File

@@ -10,7 +10,7 @@ STARTTEST
=/end of AUTO =/end of AUTO
ENDTEST ENDTEST
/* start of AUTO matically checked */ /* start of AUTO matically checked vim: set ts=4 : */
{ {
if (test) if (test)
cmd1; cmd1;
@@ -766,7 +766,39 @@ Constructor::Constructor(int a,
mMember(b) mMember(b)
{ {
} }
int main ()
{
if (lala)
do
++(*lolo);
while (lili
&& lele);
lulu;
}
int main ()
{
switch (c)
{
case 'c': if (cond)
{
}
}
}
main()
{
(void) MyFancyFuasdfadsfnction(
argument);
}
main()
{
char foo[] = "/*";
/* as
df */
hello
}
/* end of AUTO */ /* end of AUTO */
STARTTEST STARTTEST
@@ -1269,6 +1301,19 @@ ENDTEST
asdfasdf, asdfasdf,
), ),
func(asdfadf, func(asdfadf,
asdfasdf),
asdasdf
);
}
STARTTEST
:set cino=M1
2kdd]]=][
ENDTEST
int main ()
{
if (cond1 &&
cond2 cond2
) )
foo; foo;

View File

@@ -1,4 +1,4 @@
/* start of AUTO matically checked */ /* start of AUTO matically checked vim: set ts=4 : */
{ {
if (test) if (test)
cmd1; cmd1;
@@ -754,7 +754,39 @@ Constructor::Constructor(int a,
mMember(b) mMember(b)
{ {
} }
int main ()
{
if (lala)
do
++(*lolo);
while (lili
&& lele);
lulu;
}
int main ()
{
switch (c)
{
case 'c': if (cond)
{
}
}
}
main()
{
(void) MyFancyFuasdfadsfnction(
argument);
}
main()
{
char foo[] = "/*";
/* as
df */
hello
}
/* end of AUTO */ /* end of AUTO */
@@ -1142,3 +1174,12 @@ foo()
); );
} }
int main ()
{
if (cond1 &&
cond2
)
foo;
}

View File

@@ -35,6 +35,6 @@
*/ */
#define VIM_VERSION_NODOT "vim70d" #define VIM_VERSION_NODOT "vim70d"
#define VIM_VERSION_SHORT "7.0d" #define VIM_VERSION_SHORT "7.0d"
#define VIM_VERSION_MEDIUM "7.0d03 BETA" #define VIM_VERSION_MEDIUM "7.0d04 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d03 BETA (2006 Apr 13)" #define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d03 BETA (2006 Apr 13, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14, compiled "