0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

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

View File

@ -1,3 +1,5 @@
" HTML context data
"function! htmlcomplete#LoadData() " {{{
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"],
\ 'vimxmlattrinfo' : {
@ -15,7 +17,7 @@ let g:xmldata_xhtml10s = {
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', 'Name of class, used for connecting element with style'],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*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
" Maintainer: David Schweikert <dws@ee.ethz.ch>
" Last Change: 2004 May 16
" Last Change: 2006 Apr 14
" First remove all existing highlighting.
hi clear
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.
hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White
hi IncSearch term=reverse cterm=reverse gui=reverse
hi ModeMsg term=bold cterm=bold gui=bold
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE
hi lCursor guibg=Cyan guifg=NONE
hi Directory term=bold ctermfg=DarkBlue guifg=Blue
hi LineNr term=underline ctermfg=Brown guifg=Brown
hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE
hi SpecialKey term=bold ctermfg=DarkBlue guifg=Blue
hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta
hi WarningMsg term=standout ctermfg=DarkRed guifg=Red
hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black
hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue
hi DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue
hi DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi NonText term=bold ctermfg=Blue gui=bold guifg=gray guibg=white
hi Cursor guibg=fg guifg=bg
" Note: we never set 'term' because the defaults for B&W terminals are OK
hi DiffAdd ctermbg=LightBlue guibg=LightBlue
hi DiffChange ctermbg=LightMagenta guibg=LightMagenta
hi DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan
hi DiffText ctermbg=Red cterm=bold gui=bold guibg=Red
hi Directory ctermfg=DarkBlue guifg=Blue
hi ErrorMsg ctermfg=White ctermbg=DarkRed guibg=Red guifg=White
hi FoldColumn ctermfg=DarkBlue ctermbg=Grey guibg=Grey guifg=DarkBlue
hi Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue
hi IncSearch cterm=reverse gui=reverse
hi LineNr ctermfg=Brown guifg=Brown
hi ModeMsg cterm=bold gui=bold
hi MoreMsg ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi NonText ctermfg=Blue gui=bold guifg=gray guibg=white
hi Pmenu guibg=LightBlue
hi PmenuSel ctermfg=White ctermbg=DarkBlue guifg=White guibg=DarkBlue
hi Question ctermfg=DarkGreen gui=bold guifg=SeaGreen
hi Search ctermfg=NONE ctermbg=Yellow guibg=Yellow guifg=NONE
hi SpecialKey ctermfg=DarkBlue guifg=Blue
hi StatusLine cterm=bold ctermbg=blue ctermfg=yellow guibg=gold guifg=blue
hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi Title ctermfg=DarkMagenta gui=bold guifg=Magenta
hi VertSplit cterm=reverse gui=reverse
hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
hi VisualNOS cterm=underline,bold gui=underline,bold
hi WarningMsg ctermfg=DarkRed guifg=Red
hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
" syntax highlighting
hi PreProc term=underline cterm=NONE ctermfg=darkmagenta gui=NONE guifg=magenta3
hi Identifier term=underline cterm=NONE ctermfg=darkcyan gui=NONE guifg=cyan4
hi Comment term=NONE cterm=NONE ctermfg=darkred gui=NONE guifg=red2
hi Constant term=underline cterm=NONE ctermfg=darkgreen gui=NONE guifg=green3
hi Special term=bold cterm=NONE ctermfg=lightred gui=NONE guifg=deeppink
hi Statement term=bold cterm=bold ctermfg=blue gui=bold guifg=blue
hi Type term=underline cterm=NONE ctermfg=blue gui=bold guifg=blue
if exists("syntax_on")
let syntax_cmd = "enable"
runtime syntax/syncolor.vim
unlet syntax_cmd
endif
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
hi Constant cterm=NONE ctermfg=DarkGreen gui=NONE guifg=green3
hi Identifier cterm=NONE ctermfg=DarkCyan gui=NONE guifg=cyan4
hi PreProc cterm=NONE ctermfg=DarkMagenta gui=NONE guifg=magenta3
hi Special cterm=NONE ctermfg=LightRed gui=NONE guifg=deeppink
hi Statement cterm=bold ctermfg=Blue gui=bold guifg=blue
hi Type cterm=NONE ctermfg=Blue gui=bold guifg=blue
" vim: sw=2

View File

@ -1,6 +1,6 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 May 21
" Last Change: 2006 Apr 14
" 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 StatusLineNC 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 DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
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 DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta
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
hi Constant term=underline ctermfg=Magenta guifg=#ffa0a0 guibg=grey5

View File

@ -1,6 +1,6 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 May 21
" Last Change: 2006 Apr 14
" 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 StatusLineNC 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 DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
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 DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta
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
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
@ -206,7 +206,8 @@ The diffs are highlighted with these groups:
(searching from the end of the line). The
text in between is highlighted. This means
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,
because they don't really exist in this
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
@ -198,6 +198,11 @@ available. >
:let shortlist = mylist[2:2] " List with one item: [3]
: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
is an empty list. If the second index is lower, this results in an error. >
: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
@ -33,7 +33,9 @@ There are in fact four methods available for indentation:
The rest of this section describes the 'cindent' option.
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:
'cindent' Enables Vim to perform C program indenting automatically.
@ -403,6 +405,16 @@ assume a 'shiftwidth' of 4.
c1 && c2 c1 && c2
) )
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*
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
@ -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
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
":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.

View File

@ -1447,6 +1447,10 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
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
v85: * bug fix -- missing an endif
* 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
@ -1349,6 +1349,29 @@ Inform development environment, you may with to add this to your
startup sequence: >
: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*

View File

@ -5838,6 +5838,8 @@ iconize starting.txt /*iconize*
iconv() eval.txt /*iconv()*
iconv-dynamic mbyte.txt /*iconv-dynamic*
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_mzsch.txt if_mzsch.txt /*if_mzsch.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
@ -32,8 +32,6 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
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.
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.
(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:
@ -2238,29 +2237,6 @@ Insert mode:
'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
too small. (Vincent Bergbauer)
8 In C++ it's possible to have {} inside (): (Kirshna)
@ -2270,18 +2246,12 @@ Insert mode:
"asdf"
}
);
7 Separate "(0" option into inside/outside a function (Zellner):
7 Add separate "(0" option into inside/outside a function (Zellner):
func(
int x) // indent like "(4"
{
if (a
&& 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)
if (a)
{
@ -2290,9 +2260,9 @@ Insert mode:
// {
}
} <-- this is indented incorrect
9 Wrong indent for cino=(4, removing the (void) fixes it: (Zellner)
(void) MyFancyFunction(
argument);
Problem is that find_start_brace() checks for the matching brace to be in
a comment, but not braces in between. Requires adding a comment check to
findmatchlimit().
- Make smartindenting configurable. Add 'sioptions', e.g. '#' setting the
indent to 0 should be switched on/off.
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
continuation lines. Allows changing 'tabstop' without messing up the
indents.
And/or: Add option to copy indent as-is, without changing spaces to tabs.
Also for 'autoindent'. 'keeptabs': when set don't change the tabs and
spaces used for indent, when the indent remains the same or increases.
'keeptabs': when set don't change the tabs and spaces used for indent,
when the indent remains the same or increases.
Java:
@ -3184,8 +3153,6 @@ Various improvements:
stack of previous directories. We also need ":cdnext".
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?
8 findmatchlimit() should be able to skip comments. Solves problem of
matching the '{' in /* if (foo) { */ (Fiveash)
- Add more redirecting of Ex commands:
:redir #> bufname
: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
@ -242,8 +242,9 @@ Currently supported languages:
C |ft-c-omni|
(X)HTML with CSS |ft-html-omni|
JavaScript |ft-javascript-omni|
any language wih syntax highligting |ft-syntax-omni|
Python
XML |ft-xml-omni|
any language wih syntax highligting |ft-syntax-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode
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 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:

View File

@ -51,6 +51,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
setlocal suffixesadd=.rb
setlocal omnifunc=rubycomplete#Complete
" TODO:
"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+==~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
" not a comment
let s:NC = '\%(--.*\)\@<!'
@ -55,28 +25,6 @@ let s:ES = '\s*\%(--.*\)\=$'
" no "end" keyword in front
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
if exists("*GetVHDLindent")
finish

View File

@ -2,7 +2,7 @@
" Language: HTML
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" 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
@ -27,10 +27,6 @@ endif
syn case ignore
if main_syntax == "html"
syn spell toplevel
endif
" mark illegal characters
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 match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
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 htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
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+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
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)
if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+
syn region htmlComment start=+<!--+ end=+--\s*>+
else
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError
syn match htmlCommentError contained "[^><!]"
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc
endif
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
" server-parsed commands
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 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 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
syn keyword htmlTagName contained noscript
syn keyword htmlTagName contained noscript
syn keyword htmlSpecialTagName contained script style
if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT
syn include @htmlJavaScript <sfile>:p:h/javascript.vim
syn include @htmlJavaScript syntax/javascript.vim
unlet b:current_syntax
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
@ -173,14 +169,14 @@ if main_syntax != 'java' || exists("java_javascript")
" html events (i.e. arguments that include javascript commands)
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=htmlEventDQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
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=htmlEventDQ
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
endif
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 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
HtmlHiLink htmlEventSQ htmlEvent
HtmlHiLink htmlEventDQ htmlEvent
@ -190,7 +186,7 @@ endif
if main_syntax != 'java' || exists("java_vb")
" VB SCRIPT
syn include @htmlVbScript <sfile>:p:h/vb.vim
syn include @htmlVbScript syntax/vb.vim
unlet b:current_syntax
syn region javaScript start=+<script [^>]*language *=[^>]*vbscript[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
endif
@ -199,8 +195,8 @@ syn cluster htmlJavaScript add=@htmlPreproc
if main_syntax != 'java' || exists("java_css")
" embedded style sheets
syn keyword htmlArg contained media
syn include @htmlCss <sfile>:p:h/css.vim
syn keyword htmlArg contained media
syn include @htmlCss syntax/css.vim
unlet b:current_syntax
syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
syn match htmlCssStyleComment contained "\(<!--\|-->\)"
@ -223,65 +219,65 @@ if version >= 508 || !exists("did_html_syn_inits")
if version < 508
let did_html_syn_inits = 1
endif
HtmlHiLink htmlTag Function
HtmlHiLink htmlEndTag Identifier
HtmlHiLink htmlArg Type
HtmlHiLink htmlTagName htmlStatement
HtmlHiLink htmlSpecialTagName Exception
HtmlHiLink htmlValue String
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlTag Function
HtmlHiLink htmlEndTag Identifier
HtmlHiLink htmlArg Type
HtmlHiLink htmlTagName htmlStatement
HtmlHiLink htmlSpecialTagName Exception
HtmlHiLink htmlValue String
HtmlHiLink htmlSpecialChar Special
if !exists("html_no_rendering")
HtmlHiLink htmlH1 Title
HtmlHiLink htmlH2 htmlH1
HtmlHiLink htmlH3 htmlH2
HtmlHiLink htmlH4 htmlH3
HtmlHiLink htmlH5 htmlH4
HtmlHiLink htmlH6 htmlH5
HtmlHiLink htmlHead PreProc
HtmlHiLink htmlTitle Title
HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBold htmlBoldUnderline
HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderline htmlUnderlineItalic
HtmlHiLink htmlItalicBold htmlBoldItalic
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
HtmlHiLink htmlLink Underlined
HtmlHiLink htmlH1 Title
HtmlHiLink htmlH2 htmlH1
HtmlHiLink htmlH3 htmlH2
HtmlHiLink htmlH4 htmlH3
HtmlHiLink htmlH5 htmlH4
HtmlHiLink htmlH6 htmlH5
HtmlHiLink htmlHead PreProc
HtmlHiLink htmlTitle Title
HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBold htmlBoldUnderline
HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic
HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderline htmlUnderlineItalic
HtmlHiLink htmlItalicBold htmlBoldItalic
HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic
HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic
HtmlHiLink htmlLink Underlined
if !exists("html_my_rendering")
hi def htmlBold term=bold cterm=bold gui=bold
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 htmlBold term=bold cterm=bold gui=bold
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 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 htmlItalic term=italic cterm=italic gui=italic
hi def htmlItalic term=italic cterm=italic gui=italic
endif
endif
HtmlHiLink htmlPreStmt PreProc
HtmlHiLink htmlPreError Error
HtmlHiLink htmlPreProc PreProc
HtmlHiLink htmlPreAttr String
HtmlHiLink htmlPreStmt PreProc
HtmlHiLink htmlPreError Error
HtmlHiLink htmlPreProc PreProc
HtmlHiLink htmlPreAttr String
HtmlHiLink htmlPreProcAttrName PreProc
HtmlHiLink htmlPreProcAttrError Error
HtmlHiLink htmlSpecial Special
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlString String
HtmlHiLink htmlStatement Statement
HtmlHiLink htmlComment Comment
HtmlHiLink htmlCommentPart Comment
HtmlHiLink htmlValue String
HtmlHiLink htmlCommentError htmlError
HtmlHiLink htmlTagError htmlError
HtmlHiLink htmlEvent javaScript
HtmlHiLink htmlError Error
HtmlHiLink javaScript Special
HtmlHiLink htmlSpecial Special
HtmlHiLink htmlSpecialChar Special
HtmlHiLink htmlString String
HtmlHiLink htmlStatement Statement
HtmlHiLink htmlComment Comment
HtmlHiLink htmlCommentPart Comment
HtmlHiLink htmlValue String
HtmlHiLink htmlCommentError htmlError
HtmlHiLink htmlTagError htmlError
HtmlHiLink htmlEvent javaScript
HtmlHiLink htmlError Error
HtmlHiLink javaScript Special
HtmlHiLink javaScriptExpression javaScript
HtmlHiLink htmlCssStyleComment Comment
HtmlHiLink htmlCssDefinition Special
HtmlHiLink htmlCssDefinition Special
endif
delcommand HtmlHiLink

View File

@ -1,8 +1,9 @@
" Vim syntax file
" Language: IDL (Interface Description Language)
" Created By: Jody Goldberg <jody@gnome.org>
" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au>
" Last Change: 2004 Jul 20
" Created By: Jody Goldberg
" Maintainer: Michael Geddes <vim@frog.wheelycreek.net>
" Last Change: Thu Apr 13 2006
" 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
@ -13,6 +14,10 @@
"
" 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")
finish
@ -32,7 +37,7 @@ syn match idlSemiColon contained ";"
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 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 "0"
syn match idlLiteral contained "\.\d\+"
@ -42,8 +47,8 @@ syn keyword idlLiteral contained TRUE FALSE
" Comments
syn keyword idlTodo contained TODO FIXME XXX
syn region idlComment start="/\*" end="\*/" contains=idlTodo
syn match idlComment "//.*" contains=idlTodo
syn region idlComment start="/\*" end="\*/" contains=idlTodo,@Spell
syn match idlComment "//.*" contains=idlTodo,@Spell
syn match idlCommentError "\*/"
" C style Preprocessor

View File

@ -7,7 +7,7 @@
" (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (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 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 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 javaScriptRepeat while for do in

View File

@ -1,11 +1,12 @@
" Vim syntax file
" Language: Mathematica
" Maintainer: steve layland <layland@wolfram.com>
" Last Change: Tue May 10 18:31:00 CDT 2005
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1273
" http://members.wri.com/layland/vim/syntax/mma.vim
"
" Last Change: Thu May 19 21:36:04 CDT 2005
" Source: http://members.wri.com/layland/vim/syntax/mma.vim
" http://vim.sourceforge.net/scripts/script.php?script_id=1273
" Id: $Id$
" NOTE:
"
" Empty .m files will automatically be presumed as Matlab files
" unless you have the following in your .vimrc:
"
@ -23,6 +24,12 @@
" from the Java vim syntax file by Claudio Fleiner. Thanks!
" 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:
" folding
" fix nesting
@ -78,19 +85,20 @@ syntax keyword mmaVariable Protected Listable OneIdentity Orderless Flat Constan
" Comment Sections:
" this:
" :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:
syntax keyword mmaTodo TODO NOTE HEY contained
syntax match mmaTodo "X\{3,}" contained
syntax keyword mmaFixme FIX[ME] FIXTHIS BROKEN contained
syntax match mmaFixme "BUG\%( *\#\=[0-9]\+\)\=" contained
" yay pirates...
syntax match mmaFixme "\%(Y\=A\+R\+G\+\|GRR\+\|CR\+A\+P\+\)\%(!\+\)\=" contained
" EmPHAsis:
" 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]\+\%(\s\+[a-zA-Z0-9]\+\)*)\@!\*\%(\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]\+\%([- \t':]\+[a-zA-Z0-9]\+\)*)\@!\*\%(\s\|$\)" contained contains=mmaemPHAsis
" Regular Comments:
" (* *)
@ -112,9 +120,11 @@ syntax match mmaCommentStar "^\s*\*\+" contained
" Variables:
" Dollar sign variables
syntax match mmaVariable "$\a\+\d*"
" Preceding contexts
syntax match mmaVariable "`\=\a\+\d*`"
syntax match mmaVariable "\$\a\+[0-9a-zA-Z$]*"
" 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:
" "string"
@ -179,9 +189,11 @@ syntax match mmaOperator "[*+=^.:?-]"
syntax match mmaOperator "\%(\~\~\=\)"
syntax match mmaOperator "\%(=\{2,3}\|=\=!=\|||\=\|&&\|!\)" contains=ALLBUT,mmaPureFunction
" Function Usage Messages:
" Symbol Tags:
" "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:
syntax match mmaPureFunction "#\%(#\|\d\+\)\="
@ -208,7 +220,7 @@ syntax match mmaUnicode "\\\%(\x\{3}\|\.\x\{2}\|:\x\{4}\)"
" Syntax Errors:
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:
" 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?
syntax match mmaBoring "[(){}]" contained
" ------------------------------------
" future explorations...
" ------------------------------------
" Function Arguments:
" anything between brackets []
" TODO - make good folds for this.
"syntax region mmaArgument start="\[" end="]" containedin=ALLBUT,@mmaComments,@mmaCommentStrings transparent fold
"syntax sync fromstart
" (fold)
"syntax region mmaArgument start="\[" end="\]" containedin=ALLBUT,@mmaComments,@mmaStrings transparent fold
" 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 foldminlines=10
"set foldnestmax=1
"set foldminlines=15
if version >= 508 || !exists("did_mma_syn_inits")
if version < 508
@ -238,12 +293,14 @@ if version >= 508 || !exists("did_mma_syn_inits")
" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to
" look good in yours
HiLink mmaComment Comment
HiLink mmaCommentStar Comment
HiLink mmaFunctionComment Comment
HiLink mmaLooseQuote Comment
HiLink mmaGenericFunction Function
HiLink mmaVariable Identifier
" HiLink mmaSymbol Identifier
HiLink mmaOperator Operator
HiLink mmaPatternOp Operator
HiLink mmaPureFunction Operator
@ -259,6 +316,7 @@ if version >= 508 || !exists("did_mma_syn_inits")
HiLink mmaTodo Todo
HiLink mmaemPHAsis Special
HiLink mmaFunctionTitle Special
HiLink mmaMessageType Special
HiLink mmaItem Preproc
delcommand HiLink

View File

@ -2,7 +2,7 @@
" Language: nroff/groff
" Maintainer: Alejandro López-Valencia <dradul@yahoo.com>
" URL: http://dradul.tripod.com/vim
" Last Change: 2003 May 24
" Last Change: 2006 Apr 14
"
" {{{1 Acknowledgements
"
@ -125,12 +125,12 @@ if exists("b:nroff_is_groff")
"
" GNU troff allows long request names
"
syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg
syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg
else
syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg
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
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_new;
int i;
int si, ei_org, ei_new;
int si_org, si_new;
int ei_org, ei_new;
diff_T *dp;
int idx;
int off;
@ -1838,34 +1839,66 @@ diff_find_change(wp, lnum, startp, endp)
if (off >= dp->df_count[i])
continue;
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 */
for (si = 0; line_org[si] != NUL && line_org[si] == line_new[si]; )
++si;
si_org = si_new = 0;
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
if (has_mbyte)
{
/* Move back to first byte of character in both lines (may
* have "nn^" in line_org and "n^ in line_new). */
si -= (*mb_head_off)(line_org, line_org + si);
si -= (*mb_head_off)(line_new, line_new + si);
si_org -= (*mb_head_off)(line_org, line_org + si_org);
si_new -= (*mb_head_off)(line_new, line_new + si_new);
}
#endif
if (*startp > si)
*startp = si;
if (*startp > si_org)
*startp = si_org;
/* 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_new = (int)STRLEN(line_new);
while (ei_org >= *startp && ei_new >= *startp
&& ei_org >= 0 && ei_new >= 0
&& line_org[ei_org] == line_new[ei_new])
while (ei_org >= *startp && ei_new >= si_new
&& ei_org >= 0 && ei_new >= 0)
{
--ei_org;
--ei_new;
if ((diff_flags & DIFF_IWHITE)
&& 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)
*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.
* - NULL otherwise. --Acevedo */
if (fname != NULL
&& compl_curr_match
&& compl_curr_match != NULL
&& compl_curr_match->cp_fname != NULL
&& STRCMP(fname, compl_curr_match->cp_fname) == 0)
match->cp_fname = compl_curr_match->cp_fname;
@ -2501,6 +2501,11 @@ ins_compl_show_pum()
* compl_match_arraysize));
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;
compl = compl_first_match;
do
@ -2571,8 +2576,10 @@ ins_compl_show_pum()
if (compl_match_array[i].pum_text == compl_shown_match->cp_str
|| compl_match_array[i].pum_text
== compl_shown_match->cp_text[CPT_ABBR])
{
cur = i;
break;
cur = i;
}
}
if (compl_match_array != NULL)
@ -2951,6 +2958,8 @@ ins_compl_bs()
ins_compl_free();
compl_started = FALSE;
compl_matches = 0;
compl_cont_status = 0;
compl_cont_mode = 0;
}
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. */
ins_compl_show_pum();
compl_used_match = FALSE;

View File

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

View File

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

View File

@ -4658,18 +4658,30 @@ find_start_comment(ind_maxcomment) /* XXX */
pos_T *pos;
char_u *line;
char_u *p;
int cur_maxcomment = ind_maxcomment;
if ((pos = findmatchlimit(NULL, '*', FM_BACKWARD, ind_maxcomment)) == NULL)
return NULL;
for (;;)
{
pos = findmatchlimit(NULL, '*', FM_BACKWARD, cur_maxcomment);
if (pos == NULL)
break;
/*
* Check if the comment start we found is inside a string.
*/
line = ml_get(pos->lnum);
for (p = line; *p && (unsigned)(p - line) < pos->col; ++p)
p = skip_string(p);
if ((unsigned)(p - line) > pos->col)
return NULL;
/*
* 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)
p = skip_string(p);
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;
}
@ -4770,6 +4782,7 @@ static int cin_isif __ARGS((char_u *));
static int cin_iselse __ARGS((char_u *));
static int cin_isdo __ARGS((char_u *));
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_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));
@ -5078,7 +5091,7 @@ get_indent_nolabel(lnum) /* XXX */
/*
* 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)
* ^
*/
@ -5442,6 +5455,66 @@ cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */
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
cin_isbreak(p)
char_u *p;
@ -5716,7 +5789,7 @@ find_start_brace(ind_maxcomment) /* XXX */
trypos = &pos_copy;
curwin->w_cursor = *trypos;
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
&& (pos = find_start_comment(ind_maxcomment)) == NULL) /* XXX */
break;
@ -5738,7 +5811,7 @@ find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */
{
pos_T cursor_save;
pos_T *trypos;
static pos_T pos_copy;
static pos_T pos_copy;
cursor_save = curwin->w_cursor;
if ((trypos = findmatchlimit(NULL, '(', 0, ind_maxparen)) != NULL)
@ -5941,6 +6014,11 @@ get_c_indent()
*/
int ind_matching_paren = 0;
/*
* indent a closing parentheses under the previous line.
*/
int ind_paren_prev = 0;
/*
* Extra indent for comments.
*/
@ -6079,6 +6157,7 @@ get_c_indent()
case 'W': ind_unclosed_wrapped = n; break;
case 'w': ind_unclosed_whiteok = n; break;
case 'm': ind_matching_paren = n; break;
case 'M': ind_paren_prev = n; break;
case ')': ind_maxparen = n; break;
case '*': ind_maxcomment = 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
* a previous non-empty line that matches the same paren.
*/
amount = -1;
cur_amount = MAXCOL;
our_paren_pos = *trypos;
for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
if (theline[0] == ')' && ind_paren_prev)
{
l = skipwhite(ml_get(lnum));
if (cin_nocode(l)) /* skip comment lines */
continue;
if (cin_ispreproc_cont(&l, &lnum)) /* ignore #defines, #if, etc. */
continue;
curwin->w_cursor.lnum = lnum;
/* Skip a comment. XXX */
if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
/* Line up with the start of the matching paren line. */
amount = get_indent_lnum(curwin->w_cursor.lnum - 1); /* XXX */
}
else
{
amount = -1;
cur_amount = MAXCOL;
our_paren_pos = *trypos;
for (lnum = cur_curpos.lnum - 1; lnum > our_paren_pos.lnum; --lnum)
{
lnum = trypos->lnum + 1;
continue;
}
l = skipwhite(ml_get(lnum));
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 */
if ((trypos = find_match_paren(
corr_ind_maxparen(ind_maxparen, &cur_curpos),
/* Skip a comment. XXX */
if ((trypos = find_start_comment(ind_maxcomment)) != NULL)
{
lnum = trypos->lnum + 1;
continue;
}
/* XXX */
if ((trypos = find_match_paren(
corr_ind_maxparen(ind_maxparen, &cur_curpos),
ind_maxcomment)) != NULL
&& trypos->lnum == our_paren_pos.lnum
&& trypos->col == our_paren_pos.col)
{
amount = get_indent_lnum(lnum); /* XXX */
&& trypos->lnum == our_paren_pos.lnum
&& trypos->col == our_paren_pos.col)
{
amount = get_indent_lnum(lnum); /* XXX */
if (theline[0] == ')')
{
if (our_paren_pos.lnum != lnum && cur_amount > amount)
cur_amount = amount;
amount = -1;
}
break;
if (theline[0] == ')')
{
if (our_paren_pos.lnum != lnum
&& cur_amount > amount)
cur_amount = amount;
amount = -1;
}
break;
}
}
}
@ -6367,9 +6455,34 @@ get_c_indent()
*/
if (amount == -1)
{
int ignore_paren_col = 0;
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
|| (!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;
@ -6439,16 +6552,17 @@ get_c_indent()
/* Line up with the start of the matching paren line. */
}
else if (ind_unclosed == 0 || (!ind_unclosed_noignore
&& *skipwhite(look) == '('))
&& *look == '(' && ignore_paren_col == 0))
{
if (cur_amount != MAXCOL)
amount = cur_amount;
}
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;
while (our_paren_pos.col > 0)
while (our_paren_pos.col > ignore_paren_col)
{
--our_paren_pos.col;
switch (*ml_get_pos(&our_paren_pos))
@ -6887,7 +7001,12 @@ get_c_indent()
amount = n;
l = after_label(ml_get_curline());
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;
}
@ -7259,8 +7378,8 @@ get_c_indent()
* If so: Ignore until the matching "do".
*/
/* XXX */
else if (cin_iswhileofdo(l,
curwin->w_cursor.lnum, ind_maxparen))
else if (cin_iswhileofdo_end(terminated, ind_maxparen,
ind_maxcomment))
{
/*
* Found an unterminated line after a while ();, line up

View File

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

View File

@ -10,7 +10,7 @@ STARTTEST
=/end of AUTO
ENDTEST
/* start of AUTO matically checked */
/* start of AUTO matically checked vim: set ts=4 : */
{
if (test)
cmd1;
@ -766,7 +766,39 @@ Constructor::Constructor(int a,
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 */
STARTTEST
@ -1269,6 +1301,19 @@ ENDTEST
);
}
STARTTEST
:set cino=M1
2kdd]]=][
ENDTEST
int main ()
{
if (cond1 &&
cond2
)
foo;
}
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/start of AUTO/,$wq! test.out

View File

@ -1,4 +1,4 @@
/* start of AUTO matically checked */
/* start of AUTO matically checked vim: set ts=4 : */
{
if (test)
cmd1;
@ -754,7 +754,39 @@ Constructor::Constructor(int a,
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 */
@ -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_SHORT "7.0d"
#define VIM_VERSION_MEDIUM "7.0d03 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d03 BETA (2006 Apr 13)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d03 BETA (2006 Apr 13, compiled "
#define VIM_VERSION_MEDIUM "7.0d04 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0d04 BETA (2006 Apr 14, compiled "