# HG changeset patch # User Bram Moolenaar # Date 1308452956 -7200 # Node ID fd09a9c8468e48be0397f858851fecb2d0d88522 # Parent ea75da0af64d55f248469f90a966b270a981f756 Updated runtime files. diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim --- a/runtime/autoload/getscript.vim +++ b/runtime/autoload/getscript.vim @@ -1,8 +1,8 @@ " --------------------------------------------------------------------- " getscript.vim " Author: Charles E. Campbell, Jr. -" Date: Dec 28, 2009 -" Version: 32 +" Date: May 31, 2011 +" Version: 33 " Installing: :help glvs-install " Usage: :help glvs " @@ -15,7 +15,7 @@ if exists("g:loaded_getscript") finish endif -let g:loaded_getscript= "v32" +let g:loaded_getscript= "v33" if &cp echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" finish @@ -519,6 +519,7 @@ fun! s:GetOneScript(...) " -------------------------------------------------------------------------- " AutoInstall: only if doautoinstall has been requested by the plugin itself " -------------------------------------------------------------------------- +" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall) if doautoinstall " call Decho(" ") " call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname)) @@ -526,7 +527,7 @@ fun! s:GetOneScript(...) " call Decho("<".sname."> is readable") " call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)) exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall) - let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #") + let curdir = fnameescape(substitute(getcwd(),'\','/','ge')) let installdir= curdir."/Installed" if !isdirectory(installdir) call mkdir(installdir) @@ -557,6 +558,11 @@ fun! s:GetOneScript(...) exe "silent !gunzip ".shellescape(sname) let sname= substitute(sname,'\.gz$','','') " call Decho("decompress: new sname<".sname."> after gunzip") + elseif sname =~ '\.xz$' +" call Decho("decompress: attempt to unxz ".sname) + exe "silent !unxz ".shellescape(sname) + let sname= substitute(sname,'\.xz$','','') +" call Decho("decompress: new sname<".sname."> after unxz") else " call Decho("no decompression needed") endif diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Apr 01, 2011 -" Version: 141 +" Date: May 31, 2011 +" Version: 142 " Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2010 Charles E. Campbell, Jr. {{{1 @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_netrw") finish endif -let g:loaded_netrw = "v141" +let g:loaded_netrw = "v142" if v:version < 702 echohl WarningMsg echo "***warning*** this version of netrw needs vim 7.2" @@ -291,7 +291,7 @@ call s:NetrwInit("g:netrw_timefmt","%c") call s:NetrwInit("g:netrw_xstrlen",0) call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.") call s:NetrwInit("g:netrw_win95ftp",1) -call s:NetrwInit("g:netrw_winsize",25) +call s:NetrwInit("g:netrw_winsize",50) " --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 call s:NetrwInit("g:netrw_fname_escape",' ?&;%') @@ -1518,6 +1518,14 @@ endfun fun! s:NetrwMethod(choice) " call Dfunc("NetrwMethod(a:choice<".a:choice.">)") + " sanity check: choice should have at least three slashes in it + if strlen(substitute(a:choice,'[^/]','','g')) < 3 + call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) + let b:netrw_method = -1 +" call Dret("NetrwMethod : incorrect url format<".a:choice.">") + return + endif + " record current g:netrw_machine, if any " curmachine used if protocol == ftp and no .netrc if exists("g:netrw_machine") @@ -1813,6 +1821,25 @@ endfun " s:NetrwMaps: {{{2 fun! s:NetrwMaps(islocal) " call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + + " set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ] +" call Decho("set up Rexplore command") + com! Rexplore call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".") + if g:netrw_mousemaps && g:netrw_retmap +" call Decho("set up Rexplore 2-leftmouse") + if !hasmapto("NetrwReturn") + if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' +" call Decho("making map for 2-leftmouse") + nmap <2-leftmouse> NetrwReturn + elseif maparg("","n") == "" +" call Decho("making map for c-leftmouse") + nmap NetrwReturn + endif + endif + nno NetrwReturn :Rexplore +" call Decho("made NetrwReturn map") + endif + if a:islocal " call Decho("make local maps") inoremap a :call NetrwHide(1) @@ -1925,15 +1952,22 @@ fun! s:NetrwMaps(islocal) endif let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) if g:netrw_mousemaps == 1 - nnoremap :call NetrwLeftmouse(1) - nnoremap :call NetrwPrevWinOpen(1) - nnoremap :call NetrwMarkFile(1,NetrwGetWord()) - nmap <2-leftmouse> - + nmap NetrwLeftmouse + nno NetrwLeftmouse :call NetrwLeftmouse(1) + nmap NetrwMiddlemouse + nno NetrwMiddlemouse :call NetrwPrevWinOpen(1) + nmap NetrwSLeftmouse + nno NetrwSLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) + nmap <2-leftmouse> Netrw2Leftmouse + nmap Netrw2Leftmouse - + imap ILeftmouse + ino ILeftmouse :call NetrwLeftmouse(1) + imap IMiddlemouse + ino IMiddlemouse :call NetrwPrevWinOpen(1) + imap ISLeftmouse + ino ISLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' - inoremap :call NetrwLeftmouse(1) - inoremap :call NetrwPrevWinOpen(1) - inoremap :call NetrwMarkFile(1,NetrwGetWord()) exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' endif exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' @@ -2053,17 +2087,24 @@ fun! s:NetrwMaps(islocal) let mapsafepath = escape(s:path, s:netrw_map_escape) let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) - nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) if g:netrw_mousemaps == 1 - nnoremap :call NetrwLeftmouse(0) - nnoremap :call NetrwPrevWinOpen(0) - nnoremap :call NetrwMarkFile(0,NetrwGetWord()) - nmap <2-leftmouse> - + nmap NetrwLeftmouse + nno NetrwLeftmouse :call NetrwLeftmouse(0) + nmap NetrwMiddlemouse + nno NetrwMiddlemouse :call NetrwPrevWinOpen(0) + nmap NetrwSLeftmouse + nno NetrwSLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) + nmap <2-leftmouse> Netrw2Leftmouse + nmap Netrw2Leftmouse - + imap ILeftmouse + ino ILeftmouse :call NetrwLeftmouse(0) + imap IMiddlemouse + ino IMiddlemouse :call NetrwPrevWinOpen(0) + imap ISLeftmouse + ino ISLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' - inoremap :call NetrwLeftmouse(0) - inoremap :call NetrwPrevWinOpen(0) - inoremap :call NetrwMarkFile(0,NetrwGetWord()) exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' endif exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' @@ -2081,23 +2122,8 @@ fun! s:NetrwMaps(islocal) inoremap :he netrw-quickhelp endif - " set up Rexplore and leftmouse-double-click - com! Rexplore call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".") - if g:netrw_mousemaps && g:netrw_retmap - if !hasmapto("NetrwReturn") - if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$' -" call Decho("making map for 2-leftmouse") - nmap <2-leftmouse> NetrwReturn - elseif maparg("","n") == "" -" call Decho("making map for c-leftmouse") - nmap NetrwReturn - endif - endif - exe 'nnoremap NetrwReturn :Rexplore' -" call Decho("made NetrwReturn map") - endif - keepj call s:SetRexDir(a:islocal,b:netrw_curdir) + " call Dret("s:NetrwMaps") endfun @@ -3647,34 +3673,40 @@ fun! netrw#Explore(indx,dosplit,style,.. if a:dosplit || &modified || a:style == 6 " call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified") call s:SaveWinVars() - let winsize= g:netrw_winsize + let winsz= g:netrw_winsize if a:indx > 0 - let winsize= a:indx + let winsz= a:indx endif if a:style == 0 " Explore, Sexplore " call Decho("style=0: Explore or Sexplore") - exe winsize."wincmd s" + let winsz= (winsz*winheight(0))/100 + exe winsz."wincmd s" elseif a:style == 1 "Explore!, Sexplore! " call Decho("style=1: Explore! or Sexplore!") - exe winsize."wincmd v" + let winsz= (winsz*winheight(0))/100 + exe winsz."wincmd v" elseif a:style == 2 " Hexplore " call Decho("style=2: Hexplore") - exe "bel ".winsize."wincmd s" + let winsz= (winsz*winheight(0))/100 + exe "bel ".winsz."wincmd s" elseif a:style == 3 " Hexplore! " call Decho("style=3: Hexplore!") - exe "abo ".winsize."wincmd s" + let winsz= (winsz*winheight(0))/100 + exe "abo ".winsz."wincmd s" elseif a:style == 4 " Vexplore " call Decho("style=4: Vexplore") - exe "lefta ".winsize."wincmd v" + let winsz= (winsz*winheight(0))/100 + exe "lefta ".winsz."wincmd v" elseif a:style == 5 " Vexplore! " call Decho("style=5: Vexplore!") - exe "rightb ".winsize."wincmd v" + let winsz= (winsz*winheight(0))/100 + exe "rightb ".winsz."wincmd v" elseif a:style == 6 " Texplore call s:SaveBufVars() @@ -4618,13 +4650,13 @@ fun! s:NetrwMarkFileCopy(islocal) " sanity checks if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) - keepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) + keepj call netrw#ErrorMsg(s:ERROR,"there are no marked files in this window (:help netrw-mf)",66) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif " call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) if !exists("s:netrwmftgt") - keepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) + keepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67) " call Dret("s:NetrwMarkFileCopy 0") return 0 endif @@ -6143,7 +6175,8 @@ fun! s:NetrwSplit(mode) if a:mode == 0 " remote and o " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s") - exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" + let winsz= (g:netrw_winsize*winheight(0))/100 + exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) @@ -6162,7 +6195,8 @@ fun! s:NetrwSplit(mode) elseif a:mode == 2 " remote and v " call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v") - exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" + let winsz= (g:netrw_winsize*winwidth(0))/100 + exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord())) @@ -6171,7 +6205,8 @@ fun! s:NetrwSplit(mode) elseif a:mode == 3 " local and o " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s") - exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" + let winsz= (g:netrw_winsize*winheight(0))/100 + exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) @@ -6192,7 +6227,8 @@ fun! s:NetrwSplit(mode) elseif a:mode == 5 " local and v " call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v") - exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" + let winsz= (g:netrw_winsize*winwidth(0))/100 + exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v" let s:didsplit= 1 keepj call s:RestoreWinVars() keepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord())) @@ -6826,8 +6862,8 @@ fun! s:NetrwRemoteListing() " call Decho("2: exe sil r! ".listcmd) exe "sil! keepalt r! ".listcmd else -" call Decho("3: exe sil r! ".listcmd.' '.shellescape(s:path,1)) - exe "sil! keepalt r! ".listcmd.' '.shellescape(s:path,1) +" call Decho("3: exe sil r! ".listcmd.' '.shellescape(fnameescape(s:path),1)) + exe "sil! keepalt r! ".listcmd.' '.shellescape(fnameescape(s:path),1) " call Decho("listcmd<".listcmd."> path<".s:path.">") endif endif @@ -7278,12 +7314,12 @@ fun! s:LocalListing() " get the list of files contained in the current directory let dirname = b:netrw_curdir let dirnamelen = s:Strlen(b:netrw_curdir) - let filelist = glob(s:ComposePath(dirname,"*")) + let filelist = glob(s:ComposePath(fnameescape(dirname),"*")) " call Decho("glob(dirname<".dirname."/*>)=".filelist) if filelist != "" let filelist= filelist."\n" endif - let filelist= filelist.glob(s:ComposePath(dirname,".*")) + let filelist= filelist.glob(s:ComposePath(fnameescape(dirname),".*")) " call Decho("glob(dirname<".dirname."/.*>)=".filelist) " Coding choice: either elide ./ if present @@ -7797,7 +7833,7 @@ endfun " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR -" Dec 03, 2009 : max errnum currently is 77 +" Apr 18, 2011 : max errnum currently is 78 fun! netrw#ErrorMsg(level,msg,errnum) " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) @@ -8326,7 +8362,7 @@ endfun " --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) -" call Dfunc("s:RemotePathAnalysis()") +" call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)") let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' let s:method = substitute(a:dirname,dirpat,'\1','') diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,13 +1,13 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: Aug 09, 2010 -" Version: 26 +" Date: May 31, 2011 +" Version: 27 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " " Contains many ideas from Michael Toren's " -" Copyright: Copyright (C) 2005-2009 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_tar") finish endif -let g:loaded_tar= "v26" +let g:loaded_tar= "v27" if v:version < 702 echohl WarningMsg echo "***warning*** this version of tar needs vim 7.2" @@ -47,6 +47,17 @@ endif if !exists("g:tar_writeoptions") let g:tar_writeoptions= "uf" endif +if !exists("g:netrw_cygwin") + if has("win32") || has("win95") || has("win64") || has("win16") + if &shell =~ '\%(\\|\\)\%(\.exe\)\=$' + let g:netrw_cygwin= 1 + else + let g:netrw_cygwin= 0 + endif + else + let g:netrw_cygwin= 0 + endif +endif if !exists("g:tar_copycmd") if !exists("g:netrw_localcopycmd") if has("win32") || has("win95") || has("win64") || has("win16") @@ -63,17 +74,6 @@ if !exists("g:tar_copycmd") endif let g:tar_copycmd= g:netrw_localcopycmd endif -if !exists("g:netrw_cygwin") - if has("win32") || has("win95") || has("win64") || has("win16") - if &shell =~ '\%(\\|\\)\%(\.exe\)\=$' - let g:netrw_cygwin= 1 - else - let g:netrw_cygwin= 0 - endif - else - let g:netrw_cygwin= 0 - endif -endif if !exists("g:tar_extractcmd") let g:tar_extractcmd= "tar -xf" endif @@ -142,9 +142,9 @@ fun! tar#Browse(tarfile) call setline(lastline+1,'" tar.vim version '.g:loaded_tar) call setline(lastline+2,'" Browsing tarfile '.a:tarfile) call setline(lastline+3,'" Select a file with cursor and press ENTER') - $put ='' - 0d - $ + keepj $put ='' + keepj 0d + keepj $ let tarfile= a:tarfile if has("win32") && executable("cygpath") @@ -154,26 +154,26 @@ fun! tar#Browse(tarfile) let curlast= line("$") if tarfile =~# '\.\(gz\|tgz\)$' " call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.lrp' " call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " + exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.bz2$' " call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.lzma$' " call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.\(xz\|txz\)$' " call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " + exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " else if tarfile =~ '^\s*-' " A file name starting with a dash is taken as an option. Prepend ./ to avoid that. let tarfile = substitute(tarfile, '-', './-', '') endif " call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0)) - exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1) + exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1) endif if v:shell_error != 0 redraw! @@ -184,12 +184,12 @@ fun! tar#Browse(tarfile) if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)') redraw! echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None - silent %d + keepj sil! %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd exe "r ".fnameescape(a:tarfile) let &ei= eikeep - 1d + keepj sil! 1d " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") return endif @@ -286,19 +286,19 @@ fun! tar#Read(fname,mode) endif if tarfile =~# '\.bz2$' " call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) - exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.\(gz\|tgz\)$' " call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1)) - exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.lrp$' " call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) - exe "silent r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.lzma$' " call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) - exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp elseif tarfile =~# '\.\(xz\|txz\)$' " call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp) - exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp + exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp else if tarfile =~ '^\s*-' " A file name starting with a dash is taken as an option. Prepend ./ to avoid that. @@ -317,7 +317,7 @@ fun! tar#Read(fname,mode) exe "file tarfile::".fnameescape(fname) " cleanup - 0d + keepj sil! 0d set nomod let &report= repkeep diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim --- a/runtime/autoload/vimball.vim +++ b/runtime/autoload/vimball.vim @@ -1,9 +1,9 @@ " vimball.vim : construct a file containing both paths and files " Author: Charles E. Campbell, Jr. -" Date: Apr 12, 2010 -" Version: 31 +" Date: Apr 02, 2011 +" Version: 33 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim -" Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. +" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_vimball") finish endif -let g:loaded_vimball = "v31" +let g:loaded_vimball = "v33" if v:version < 702 echohl WarningMsg echo "***warning*** this version of vimball needs vim 7.2" @@ -67,10 +67,10 @@ endif " vimball#MkVimball: creates a vimball given a list of paths to files {{{2 " Input: " line1,line2: a range of lines containing paths to files to be included in the vimball -" writelevel : if true, force a write to filename.vba, even if it exists +" writelevel : if true, force a write to filename.vmb, even if it exists " (usually accomplished with :MkVimball! ... -" filename : base name of file to be created (ie. filename.vba) -" Output: a filename.vba using vimball format: +" filename : base name of file to be created (ie. filename.vmb) +" Output: a filename.vmb using vimball format: " path " filesize " [file] @@ -80,12 +80,12 @@ endif fun! vimball#MkVimball(line1,line2,writelevel,...) range " call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0) if a:1 =~ '\.vim$' || a:1 =~ '\.txt$' - let vbname= substitute(a:1,'\.\a\{3}$','.vba','') + let vbname= substitute(a:1,'\.\a\{3}$','.vmb','') else let vbname= a:1 endif - if vbname !~ '\.vba$' - let vbname= vbname.'.vba' + if vbname !~ '\.vmb$' + let vbname= vbname.'.vmb' endif " call Decho("vbname<".vbname.">") if !a:writelevel && a:1 =~ '[\/]' @@ -134,7 +134,7 @@ fun! vimball#MkVimball(line1,line2,write " create/switch to mkvimball tab if !exists("vbtabnr") tabnew - silent! file Vimball + sil! file Vimball let vbtabnr= tabpagenr() else exe "tabn ".vbtabnr @@ -195,8 +195,8 @@ fun! vimball#Vimball(really,...) " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0) if v:version < 701 || (v:version == 701 && !exists('*fnameescape')) - echoerr "your vim is missing the fnameescape() function" -" call Dret("vimball#Vimball : needs 7.1 with patch 299") + echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)" +" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later") return endif @@ -214,7 +214,7 @@ fun! vimball#Vimball(really,...) " set up vimball tab " call Decho("setting up vimball tab") tabnew - silent! file Vimball + sil! file Vimball let vbtabnr= tabpagenr() let didhelp= "" @@ -254,11 +254,10 @@ fun! vimball#Vimball(really,...) while 1 < linenr && linenr < line("$") let fname = substitute(getline(linenr),'\t\[\[\[1$','','') let fname = substitute(fname,'\\','/','g') -" let fsize = getline(linenr+1)+0 let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0 - let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\+\)$','\1','') + let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','') let filecnt = filecnt + 1 -" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt) +" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc) if a:really echomsg "extracted <".fname.">: ".fsize." lines" @@ -306,20 +305,22 @@ fun! vimball#Vimball(really,...) let linenr = linenr + 2 let lastline = linenr + fsize - 1 " call Decho("exe ".linenr.",".lastline."yank a") - exe "silent ".linenr.",".lastline."yank a" + " no point in handling a zero-length file + if lastline >= linenr + exe "silent ".linenr.",".lastline."yank a" - " copy "a" buffer into tab + " copy "a" buffer into tab " call Decho('copy "a buffer into tab#'.vbtabnr) - exe "tabn ".vbtabnr - setlocal ma - silent! %d - silent put a - 1 - silent d + exe "tabn ".vbtabnr + setlocal ma + sil! %d + silent put a + 1 + sil! d - " write tab to file - if a:really - let fnamepath= home."/".fname + " write tab to file + if a:really + let fnamepath= home."/".fname " call Decho("exe w! ".fnameescape(fnamepath)) if fenc != "" exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath) @@ -328,17 +329,18 @@ fun! vimball#Vimball(really,...) endif echo "wrote ".fnameescape(fnamepath) call s:RecordInVar(home,"call delete('".fnamepath."')") - endif + endif - " return to tab with vimball + " return to tab with vimball " call Decho("exe tabn ".curtabnr) - exe "tabn ".curtabnr + exe "tabn ".curtabnr - " set up help if its a doc/*.txt file + " set up help if its a doc/*.txt file " call Decho("didhelp<".didhelp."> fname<".fname.">") - if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$' - let didhelp= substitute(fname,'^\(.*\") + endif endif " update for next file @@ -400,7 +402,9 @@ fun! vimball#RmVimball(...) let curfile= a:1 " call Decho("case a:0=".a:0.": curfile<".curfile.">") endif - if curfile =~ '\.vba$' + if curfile =~ '\.vmb$' + let curfile= substitute(curfile,'\.vmb','','') + elseif curfile =~ '\.vba$' let curfile= substitute(curfile,'\.vba','','') endif if a:0 >= 2 @@ -418,13 +422,17 @@ fun! vimball#RmVimball(...) " call Decho(".VimballRecord is readable") " call Decho("curfile<".curfile.">") keepalt keepjumps 1split - silent! keepalt keepjumps e .VimballRecord + sil! keepalt keepjumps e .VimballRecord let keepsrch= @/ " call Decho('search for ^\M'.curfile.'.\m: ') -" call Decho('search for ^\M'.curfile.'.\mvba: ') -" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.vba: ') +" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ') +" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ') if search('^\M'.curfile."\m: ".'cw') let foundit= 1 + elseif search('^\M'.curfile.".\mvmb: ",'cw') + let foundit= 2 + elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw') + let foundit= 2 elseif search('^\M'.curfile.".\mvba: ",'cw') let foundit= 1 elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw') @@ -433,25 +441,29 @@ fun! vimball#RmVimball(...) let foundit = 0 endif if foundit - let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','') + if foundit == 1 + let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','') + else + let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','') + endif let s:VBRstring= substitute(exestring,'call delete(','','g') let s:VBRstring= substitute(s:VBRstring,"[')]",'','g') " call Decho("exe ".exestring) - silent! keepalt keepjumps exe exestring - silent! keepalt keepjumps d + sil! keepalt keepjumps exe exestring + sil! keepalt keepjumps d let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g")) " call Decho("exestring<".exestring.">") echomsg "removed ".exestring." files" else let s:VBRstring= '' - let curfile = substitute(curfile,'\.vba','','') + let curfile = substitute(curfile,'\.vmb','','') " call Decho("unable to find <".curfile."> in .VimballRecord") if !exists("s:ok_unablefind") call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord") endif endif - silent! keepalt keepjumps g/^\s*$/d - silent! keepalt keepjumps wq! + sil! keepalt keepjumps g/^\s*$/d + sil! keepalt keepjumps wq! let @/= keepsrch endif call s:ChgDir(curdir) @@ -599,7 +611,7 @@ fun! s:RecordInFile(home) let cmd= expand("%:tr").": " " call Decho("cmd<".cmd.">") - silent! keepalt keepjumps e .VimballRecord + sil! keepalt keepjumps e .VimballRecord setlocal ma $ if exists("s:recordfile") && exists("s:recorddir") @@ -616,8 +628,8 @@ fun! s:RecordInFile(home) " put command into buffer, write .VimballRecord `file keepalt keepjumps put=cmd - silent! keepalt keepjumps g/^\s*$/d - silent! keepalt keepjumps wq! + sil! keepalt keepjumps g/^\s*$/d + sil! keepalt keepjumps wq! call s:ChgDir(curdir) if exists("s:recorddir") @@ -693,10 +705,11 @@ fun! vimball#SaveSettings() let s:repkeep = &report let s:vekeep = &ve let s:ffkeep = &l:ff + let s:swfkeep = &l:swf if exists("&acd") - setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix + setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf else - setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix + setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf endif " vimballs should be in unix format setlocal ff=unix diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,10 +1,10 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Apr 12, 2010 -" Version: 23 +" Date: May 24, 2011 +" Version: 24 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_zip") finish endif -let g:loaded_zip= "v23" +let g:loaded_zip= "v24" if v:version < 702 echohl WarningMsg echo "***warning*** this version of zip needs vim 7.2" @@ -103,38 +103,26 @@ fun! zip#Browse(zipfile) set ft=tar " give header - let lastline= line("$") - call setline(lastline+1,'" zip.vim version '.g:loaded_zip) - call setline(lastline+2,'" Browsing zipfile '.a:zipfile) - call setline(lastline+3,'" Select a file with cursor and press ENTER') - $put ='' - 0d - $ + call append(0, ['" zip.vim version '.g:loaded_zip, + \ '" Browsing zipfile '.a:zipfile, + \ '" Select a file with cursor and press ENTER']) + keepj $ " call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)) - exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1) + exe "silent r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1) if v:shell_error != 0 redraw! echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None " call inputsave()|call input("Press to continue")|call inputrestore() - silent %d + keepj sil! %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd - exe "r ".fnameescape(a:zipfile) + exe "keepj r ".fnameescape(a:zipfile) let &ei= eikeep - 1d + keepj 1d " call Dret("zip#Browse") return endif -" call Decho("line 6: ".getline(6)) - let namecol= stridx(getline(6),'Name') + 1 -" call Decho("namecol=".namecol) - 4,$g/^\s*----/d - 4,$g/^\s*\a/d - $d - if namecol > 0 - exe 'silent 4,$s/^.*\%'.namecol.'c//' - endif setlocal noma nomod ro noremap :call ZipBrowseSelect() @@ -205,11 +193,12 @@ fun! zip#Read(fname,mode) " call Decho("zipfile<".zipfile.">") " call Decho("fname <".fname.">") -" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)) - exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1) +" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)) + exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1) + filetype detect " cleanup - 0d + keepj 0d set nomod let &report= repkeep diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.3. Last change: 2011 Apr 26 +*autocmd.txt* For Vim version 7.3. Last change: 2011 May 19 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.3. Last change: 2011 May 17 +*change.txt* For Vim version 7.3. Last change: 2011 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -717,11 +717,13 @@ Otherwise it works on whole lines anyway *sub-replace-special* *:s\=* When the {string} starts with "\=" it is evaluated as an expression, see -|sub-replace-expression|. You can use that for any special characters. +|sub-replace-expression|. You can use that for complex replacement or special +characters. + Otherwise these characters in {string} have a special meaning: *:s%* When {string} is equal to "%" and '/' is included with the 'cpoptions' option, -then the {string} of the previous substitute command is used. |cpo-/| +then the {string} of the previous substitute command is used, see |cpo-/| magic nomagic action ~ & \& replaced with the whole matched pattern *s/\&* @@ -756,6 +758,14 @@ magic nomagic action ~ \x where x is any character not mentioned above: Reserved for future expansion +The special meaning is also used inside the third argument {sub} of +the |substitute()| function with the following exceptions: + - A % inserts a percent literally without regard to 'cpoptions'. + - magic is always set without regard to 'magic'. + - A ~ inserts a tilde literally. + - and \r inserts a carriage-return (CTRL-M). + - \ does not have a special meaning. it's just one of \x. + Examples: > :s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx" :s/\([abc]\)\([efg]\)/\2\1/g modifies "af fa bg" to "fa fa gb" @@ -787,17 +797,19 @@ either the first or second pattern in pa Substitute with an expression *sub-replace-expression* *sub-replace-\=* When the substitute string starts with "\=" the remainder is interpreted as an -expression. This does not work recursively: a substitute() function inside +expression. This does not work recursively: a |substitute()| function inside the expression cannot use "\=" for the substitute string. The special meaning for characters as mentioned at |sub-replace-special| does -not apply except for "", "\" and "\\". Thus in the result of the -expression you need to use two backslashes to get one, put a backslash before a - you want to insert, and use a without a backslash where you want to -break the line. +not apply except for "". A character is used as a line break, you +can get one with a double-quote string: "\n". Prepend a backslash to get a +real character (which will be a NUL in the file). -For convenience a character is also used as a line break. Prepend a -backslash to get a real character (which will be a NUL in the file). +The "\=" notation can also be used inside the third argument {sub} of +|substitute()| function. In this case, the special meaning for characters as +mentioned at |sub-replace-special| does not apply at all. Especially, and + are interpreted not as a line break but as a carriage-return and a +new-line respectively. When the result is a |List| then the items are joined with separating line breaks. Thus each item becomes a line, except that they can contain line diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2011 May 17 +*eval.txt* For Vim version 7.3. Last change: 2011 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -721,7 +721,8 @@ if it evaluates to true. *expr-<#* *expr-<=#* *expr-=~#* *expr-!~#* *expr-==?* *expr-!=?* *expr->?* *expr->=?* *expr- in an abbreviation |:map-|. - It is also used by the |InsertPreChar| event. + It is also used by the |InsertCharPre| event. *v:charconvert_from* *charconvert_from-variable* v:charconvert_from @@ -1943,7 +1946,7 @@ strridx( {haystack}, {needle} [, {start} Number last index of {needle} in {haystack} strtrans( {expr}) String translate string to make it printable strwidth( {expr}) Number display cell length of the String {expr} -submatch( {nr}) String specific match in ":substitute" +submatch( {nr}) String specific match in ":s" or substitute() substitute( {expr}, {pat}, {sub}, {flags}) String all {pat} in {expr} replaced with {sub} synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} @@ -5557,9 +5560,11 @@ strwidth({expr}) *strwidth()* Also see |strlen()|, |strdisplaywidth()| and |strchars()|. submatch({nr}) *submatch()* - Only for an expression in a |:substitute| command. Returns - the {nr}'th submatch of the matched text. When {nr} is 0 - the whole matched text is returned. + Only for an expression in a |:substitute| command or + substitute() function. + Returns the {nr}'th submatch of the matched text. When {nr} + is 0 the whole matched text is returned. + Also see |sub-replace-expression|. Example: > :s/\d\+/\=submatch(0) + 1/ < This finds the first number in the line and adds one to it. @@ -5567,27 +5572,32 @@ submatch({nr}) *submatch()* substitute({expr}, {pat}, {sub}, {flags}) *substitute()* The result is a String, which is a copy of {expr}, in which - the first match of {pat} is replaced with {sub}. This works - like the ":substitute" command (without any flags). But the - matching with {pat} is always done like the 'magic' option is - set and 'cpoptions' is empty (to make scripts portable). - 'ignorecase' is still relevant. 'smartcase' is not used. - See |string-match| for how {pat} is used. - And a "~" in {sub} is not replaced with the previous {sub}. + the first match of {pat} is replaced with {sub}. + When {flags} is "g", all matches of {pat} in {expr} are + replaced. Otherwise {flags} should be "". + + This works like the ":substitute" command (without any flags). + But the matching with {pat} is always done like the 'magic' + option is set and 'cpoptions' is empty (to make scripts + portable). 'ignorecase' is still relevant. 'smartcase' is + not used. See |string-match| for how {pat} is used. + + A "~" in {sub} is not replaced with the previous {sub}. Note that some codes in {sub} have a special meaning |sub-replace-special|. For example, to replace something with "\n" (two characters), use "\\\\n" or '\\n'. + When {pat} does not match in {expr}, {expr} is returned unmodified. - When {flags} is "g", all matches of {pat} in {expr} are - replaced. Otherwise {flags} should be "". + Example: > :let &path = substitute(&path, ",\\=[^,]*$", "", "") < This removes the last component of the 'path' option. > :echo substitute("testing", ".*", "\\U\\0", "") < results in "TESTING". - The {sub} argument can start with \=, just like with - |:substitute|. Example: > + + When {sub} starts with "\=", the remainder is interpreted as + an expression. See |sub-replace-expression|. Example: > :echo substitute(s, '%\(\x\x\)', \ '\=nr2char("0x" . submatch(1))', 'g') @@ -6226,7 +6236,6 @@ netbeans_enabled Compiled with support f netbeans_intg Compiled with support for |netbeans|. ole Compiled with OLE automation support for Win32. os2 OS/2 version of Vim. -osfiletype Compiled with support for osfiletypes |+osfiletype| path_extra Compiled with up/downwards search in 'path' and 'tags' perl Compiled with Perl interface. persistent_undo Compiled with support for persistent undo history. diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 7.3. Last change: 2008 Jul 15 +*filetype.txt* For Vim version 7.3. Last change: 2011 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -270,6 +270,9 @@ directories! *autocmd-osfiletypes* +NOTE: this code is currently disabled, as the RISC OS implementation was +removed. In the future this will use the 'filetype' option. + On operating systems which support storing a file type with the file, you can specify that an autocommand should only be executed if the file is of a certain type. @@ -296,8 +299,6 @@ must both match): > This will match files of type "&fff" whose names start with "diff". -Note that osfiletype checking is skipped if Vim is compiled without the -|+osfiletype| feature. *plugin-details* The "plugin" directory can be in any of the directories in the 'runtimepath' diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -1,4 +1,4 @@ -*if_cscop.txt* For Vim version 7.3. Last change: 2010 Sep 29 +*if_cscop.txt* For Vim version 7.3. Last change: 2011 Jun 12 VIM REFERENCE MANUAL by Andy Kahn @@ -264,19 +264,20 @@ seems to be useful: > :set cscopequickfix=s-,c-,d-,i-,t-,e- < *cscopetag* *cst* -If 'cscopetag' set, the commands ":tag" and CTRL-] as well as "vim -t" will -always use |:cstag| instead of the default :tag behavior. Effectively, by -setting 'cst', you will always search your cscope databases as well as your -tag files. The default is off. Examples: > +If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t" +will always use |:cstag| instead of the default :tag behavior. Effectively, +by setting 'cst', you will always search your cscope databases as well as +your tag files. The default is off. Examples: > :set cst :set nocst < *cscoperelative* *csre* -If 'cscoperelative' set, then in absence of a prefix given to cscope (prefx -is the argument to -P option of cscope), basename of cscope.out location -(usually the project root directory) will be used as the prefix to construt -absolute path.The default is off. Note: This option is only effective when -cscope (cscopeprg) is initialized without a prefix path (-P). Examples: > +If 'cscoperelative' is set, then in absence of a prefix given to cscope +(prefix is the argument of -P option of cscope), basename of cscope.out +location (usually the project root directory) will be used as the prefix +to construct an absolute path. The default is off. Note: This option is +only effective when cscope (cscopeprg) is initialized without a prefix +path (-P). Examples: > :set csre :set nocsre < diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 7.3. Last change: 2011 Apr 25 +*indent.txt* For Vim version 7.3. Last change: 2011 May 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -561,13 +561,15 @@ REMARKS ABOUT SPECIFIC INDENT FILES ~ FORTRAN *ft-fortran-indent* -Block if, select case, and where constructs are indented. Comments, labelled -statements and continuation lines are indented if the Fortran is in free -source form, whereas they are not indented if the Fortran is in fixed source -form because of the left margin requirements. Hence manual indent corrections -will be necessary for labelled statements and continuation lines when fixed -source form is being used. For further discussion of the method used for the -detection of source format see |ft-fortran-syntax|. +Block if, select case, where, and forall constructs are indented. So are +type, interface, associate, block, and enum constructs. The indenting of +subroutines, functions, modules, and program blocks is optional. Comments, +labelled statements and continuation lines are indented if the Fortran is in +free source form, whereas they are not indented if the Fortran is in fixed +source form because of the left margin requirements. Hence manual indent +corrections will be necessary for labelled statements and continuation lines +when fixed source form is being used. For further discussion of the method +used for the detection of source format see |ft-fortran-syntax|. Do loops ~ All do loops are left unindented by default. Do loops can be unstructured in @@ -594,6 +596,20 @@ autocommand such as > to get do loops indented in .f90 files and left alone in Fortran files with other extensions such as .for. +Program units ~ +The indenting of program units (subroutines, functions, modules, and program +blocks) is enabled by default but can be suppressed if a lighter, screen-width +preserving indent style is desired. To suppress the indenting of program +units for all fortran files set the global fortran_indent_less variable in +your .vimrc as follows > + + let fortran_indent_less=1 + +A finer level of suppression can be achieved by setting the corresponding +buffer-local variable as follows > + + let b:fortran_indent_less=1 + PHP *ft-php-indent* *php-indent* *php-indenting* diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.3. Last change: 2011 May 10 +*map.txt* For Vim version 7.3. Last change: 2011 Jun 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -107,6 +107,8 @@ modes. :cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear* Remove ALL mappings for the modes where the map command applies. {not in Vi} + Use the argument to remove buffer-local + mappings |:map-| Warning: This also removes the default mappings. :map |mapmode-nvo| @@ -934,11 +936,12 @@ See |:verbose-cmd| for more information. avoid that a typed {lhs} is expanded, since command-line abbreviations apply here. -:ab[breviate] [] {lhs} {rhs} +:ab[breviate] [] [] {lhs} {rhs} add abbreviation for {lhs} to {rhs}. If {lhs} already existed it is replaced with the new {rhs}. {rhs} may contain spaces. See |:map-| for the optional argument. + See |:map-| for the optional argument. *:una* *:unabbreviate* :una[bbreviate] {lhs} Remove abbreviation for {lhs} from the list. If none @@ -948,12 +951,12 @@ See |:verbose-cmd| for more information. expansion insert a CTRL-V (type it twice). *:norea* *:noreabbrev* -:norea[bbrev] [] [lhs] [rhs] +:norea[bbrev] [] [] [lhs] [rhs] same as ":ab", but no remapping for this {rhs} {not in Vi} *:ca* *:cabbrev* -:ca[bbrev] [] [lhs] [rhs] +:ca[bbrev] [] [] [lhs] [rhs] same as ":ab", but for Command-line mode only. {not in Vi} @@ -962,12 +965,12 @@ See |:verbose-cmd| for more information. in Vi} *:cnorea* *:cnoreabbrev* -:cnorea[bbrev] [] [lhs] [rhs] +:cnorea[bbrev] [] [] [lhs] [rhs] same as ":ab", but for Command-line mode only and no remapping for this {rhs} {not in Vi} *:ia* *:iabbrev* -:ia[bbrev] [] [lhs] [rhs] +:ia[bbrev] [] [] [lhs] [rhs] same as ":ab", but for Insert mode only. {not in Vi} *:iuna* *:iunabbrev* @@ -975,18 +978,18 @@ See |:verbose-cmd| for more information. Vi} *:inorea* *:inoreabbrev* -:inorea[bbrev] [] [lhs] [rhs] +:inorea[bbrev] [] [] [lhs] [rhs] same as ":ab", but for Insert mode only and no remapping for this {rhs} {not in Vi} *:abc* *:abclear* -:abc[lear] Remove all abbreviations. {not in Vi} +:abc[lear] [] Remove all abbreviations. {not in Vi} *:iabc* *:iabclear* -:iabc[lear] Remove all abbreviations for Insert mode. {not in Vi} +:iabc[lear] [] Remove all abbreviations for Insert mode. {not in Vi} *:cabc* *:cabclear* -:cabc[lear] Remove all abbreviations for Command-line mode. {not +:cabc[lear] [] Remove all abbreviations for Command-line mode. {not in Vi} *using_CTRL-V* diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.3. Last change: 2010 May 14 +*motion.txt* For Vim version 7.3. Last change: 2011 Jun 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -344,6 +344,8 @@ gg Goto line [count], default first li last number in it used as the byte count. End-of-line characters are counted depending on the current 'fileformat' setting. + Also see the |line2byte()| function, and the 'o' + option in 'statusline'. {not in Vi} {not available when compiled without the |+byte_offset| feature} diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.3. Last change: 2011 May 17 +*options.txt* For Vim version 7.3. Last change: 2011 Jun 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2933,8 +2933,6 @@ A jump table for the options with a shor This will use the "c" filetype first, then the "doxygen" filetype. This works both for filetype plugins and for syntax files. More than one dot may appear. - Do not confuse this option with 'osfiletype', which is for the file - type that is actually stored with the file. This option is not copied to another buffer, independent of the 's' or 'S' flag in 'cpoptions'. Only normal file name characters can be used, "/\*?[|<>" are illegal. @@ -3405,7 +3403,7 @@ A jump table for the options with a shor :highlight Cursor gui=NONE guifg=bg guibg=fg < *'guifont'* *'gfn'* - *E235* *E596* *E610* *E611* + *E235* *E596* 'guifont' 'gfn' string (default "") global {not in Vi} @@ -5123,20 +5121,12 @@ A jump table for the options with a shor security reasons. - *'osfiletype'* *'oft'* *E366* -'osfiletype' 'oft' string (RISC-OS default: "Text", - others default: "") + *'osfiletype'* *'oft'* +'osfiletype' 'oft' string (default: "") local to buffer {not in Vi} - {only available when compiled with the |+osfiletype| - feature} - Some operating systems store extra information about files besides - name, datestamp and permissions. This option contains the extra - information, the nature of which will vary between systems. - The value of this option is usually set when the file is loaded, and - is used to set the operating system file type when file is written. - It can affect the pattern matching of the automatic commands. - |autocmd-osfiletypes| + This option was supported on RISC OS, which has been removed. + *'paragraphs'* *'para'* 'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp") diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.3. Last change: 2010 Dec 19 +*os_win32.txt* For Vim version 7.3. Last change: 2011 May 28 VIM REFERENCE MANUAL by George Reilly @@ -321,13 +321,14 @@ A. When using :! to run an external comm Q. How do I avoid getting a window for programs that I run asynchronously? A. You have two possible solutions depending on what exactly do you want: - 1) You may use the /min flag that would run program in minimized state with - no other changes. It will work equally for console and GUI applications. - 2) You can use /b flag to run console applications without creating a + 1) You may use the /min flag in order to run program in a minimized state + with no other changes. It will work equally for console and GUI + applications. + 2) You can use the /b flag to run console applications without creating a console window for them (GUI applications are not affected). But you - should use this flag only if application you run doesn't require any - input. Otherwise it will get an EOF error because it's input stream - (stdin) would be redirected to \\.\NUL (stdour and stderr too). + should use this flag only if the application you run doesn't require any + input. Otherwise it will get an EOF error because its input stream + (stdin) would be redirected to \\.\NUL (stdoud and stderr too). Example for a console application, run Exuberant ctags: > :!start /min ctags -R . diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.3. Last change: 2011 Apr 28 +*pattern.txt* For Vim version 7.3. Last change: 2011 May 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -635,7 +635,8 @@ overview. Like '(?!pattern)" in Perl. Example matches ~ foo\(bar\)\@! any "foo" not followed by "bar" - a.\{-}p\@! "a", "ap", "app", etc. not followed by a "p" + a.\{-}p\@! "a", "ap", "aap", "app", etc. not immediately + followed by a "p" if \(\(then\)\@!.\)*$ "if " not followed by "then" Using "\@!" is tricky, because there are many places where a pattern diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt --- a/runtime/doc/pi_getscript.txt +++ b/runtime/doc/pi_getscript.txt @@ -1,11 +1,11 @@ -*pi_getscript.txt* For Vim version 7.3. Last change: 2009 Oct 14 +*pi_getscript.txt* For Vim version 7.0. Last change: 2011 May 31 > GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. < Authors: Charles E. Campbell, Jr. (remove NOSPAM from the email address) *GetLatestVimScripts-copyright* -Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *glvs-copyright* +Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. *glvs-copyright* The VIM LICENSE applies to getscript.vim and pi_getscript.txt (see |copyright|) except use "getscript" instead of "Vim". No warranty, express or implied. @@ -77,7 +77,9 @@ Your computer needs to have wget or curl 3. GetLatestVimScripts Usage *glvs-usage* *:GLVS* Unless it has been defined elsewhere, > + :GLVS + will invoke GetLatestVimScripts(). If some other plugin has defined that command, then you may type > @@ -127,7 +129,8 @@ click on the script's link, you'll see a http://vim.sourceforge.net/scripts/script.php?script_id=40 The "40" happens to be a ScriptID that GetLatestVimScripts needs to -download the associated page. +download the associated page, and is assigned by vim.sf.net itself +during initial uploading of the plugin. The second number on each line gives the script's SourceID. The SourceID records the count of uploaded scripts as determined by vim.sf.net; hence it @@ -151,19 +154,39 @@ This comment line tells getscript.vim to script is automatically installable. Getscript will also use this line to help build the GetLatestVimScripts.dat file, by including a line such as: > - 884 1 AutoAlign.vim + 884 1 :AutoInstall: AutoAlign.vim < -in it an AutoAlign.vim line isn't already in GetLatestVimScripts.dat file. +assuming that such a line isn't already in GetLatestVimScripts.dat file. See |glvs-plugins| for more. Thus, GetLatestVimScripts thus provides a comprehensive ability to keep your plugins up-to-date! +In summary: + + * Optionally tell getscript that it is allowed to build/append a + GetLatestVimScripts.dat file based upon already installed plugins: > + let g:GetLatestVimScripts_allowautoinstall=1 +< + * A line such as > + " GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim +< in an already-downloaded plugin constitutes the concurrence of the + plugin author that getscript may do AutoInstall. Not all plugins + may be AutoInstall-able, and the plugin's author is best situated + to know whether or not his/her plugin will AutoInstall properly. + + * A line such as > + 884 1 :AutoInstall: AutoAlign.vim +< in your GetLatestVimScripts.dat file constitutes your permission + to getscript to do AutoInstall. AutoInstall requires both your + and the plugin author's permission. See |GetLatestVimScripts_dat|. + + *GetLatestVimScripts_dat* As an example of a file: > ScriptID SourceID Filename -------------------------- - 294 1 Align.vim - 120 2 decho.vim + 294 1 :AutoInstall: Align.vim + 120 2 Decho.vim 40 3 DrawIt.tar.gz 451 4 EasyAccents.vim 195 5 engspchk.vim @@ -201,8 +224,8 @@ are, then you may include :AutoInstall: ^ scriptid < -NOTE: :AutoInstall: is a plugin-author option, not a GetLatestVimScripts.dat~ - entry!~ +NOTE: The :AutoInstall: feature requires both the plugin author's and~ + the user's permission to operate!~ GetLatestVimScripts commands for those scripts are then appended, if not already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is @@ -210,7 +233,7 @@ a relatively painless way to automate th plugins depend upon. Now, as an author, you probably don't want GetLatestVimScripts to download -your own scripts for you yourself, thereby overwriting your not-yet-released +your own scripts atop your own copy, thereby overwriting your not-yet-released hard work. GetLatestVimScripts provides a solution for this: put > 0 0 yourscriptname @@ -351,6 +374,9 @@ The AutoInstall process will: ============================================================================== 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 +v33 May 31, 2011 : * using fnameescape() instead of escape() + * *.xz support +v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript * (David Schaefer) the acd option interferes with vimballs Solution: bypass the acd option diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.3. Last change: 2011 Apr 01 +*pi_netrw.txt* For Vim version 7.3. Last change: 2011 May 31 ----------------------------------------------------- NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. @@ -273,7 +273,7 @@ SOURCING *netrw-source* {{{2 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp :Nsource "sftp://[user@]machine/path" uses sftp -DIRECTORY LISTING *netrw-dirlist* {{{2 +DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2 One may browse a directory to get a listing by simply attempting to edit the directory: > @@ -281,14 +281,15 @@ DIRECTORY LISTING *netrw-dirlist* {{ :e scp://[user]@hostname/path/ :e ftp://[user]@hostname/path/ < - For remote directories (ie. those using scp or ftp), that trailing - "/" is necessary (the slash tells netrw to treat the argument as a - directory to browse instead of a file to download). - - However, the Nread command can also be used to accomplish this: - - :Nread [protocol]://[user]@hostname/path/ - + For remote directory listings (ie. those using scp or ftp), that + trailing "/" is necessary (the slash tells netrw to treat the argument + as a directory to browse instead of as a file to download). + + The Nread command may also be used to accomplish this (again, that + trailing slash is necessary): > + + :Nread [protocol]://[user]@hostname/path/ +< *netrw-login* *netrw-password* CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2 @@ -2158,8 +2159,8 @@ your browsing preferences. (see also: | *g:netrw_mkdir_cmd* command for making a remote directory default: "ssh USEPORT HOSTNAME mkdir" - *g:netrw_mousemaps* =1 (default) enables the mouse buttons - while browsing: + *g:netrw_mousemaps* =1 (default) enables mouse buttons while + browsing to: leftmouse : open file/directory shift-leftmouse : mark file middlemouse : same as P @@ -2274,8 +2275,11 @@ your browsing preferences. (see also: | *g:netrw_winsize* specify initial size of new windows made with "o" (see |netrw-o|), "v" (see |netrw-v|), - |:Hexplore| or |:Vexplore|. - default: "" + |:Hexplore| or |:Vexplore|. The g:netrw_winsize + is an integer describing the percentage of the + current netrw buffer's window to be used for + the new window. + default: 50 (for 50%) *g:netrw_xstrlen* Controls how netrw computes string lengths, including multi-byte characters' string @@ -2660,7 +2664,7 @@ 10. Problems and Fixes *netrw-proble *netrw-p11* P11. I want to have two windows; a thin one on the left and my editing - window on the right. How can I do this? + window on the right. How may I accomplish this? * Put the following line in your <.vimrc>: let g:netrw_altv = 1 @@ -2706,7 +2710,45 @@ 10. Problems and Fixes *netrw-proble "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe" "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" < - + *netrw-p14* + P14. I'd would like to speed up writes using Nwrite and scp/ssh + style connections. How? (Thomer M. Gil) + + Try using ssh's ControlMaster and ControlPath (see the ssh_config + man page) to share multiple ssh connections over a single network + connection. That cuts out the cryptographic handshake on each + file write, sometimes speeding it up by an order of magnitude. + (see http://thomer.com/howtos/netrw_ssh.html) + (included by permission) + + Add the following to your ~/.ssh/config: > + + # you change "*" to the hostname you care about + Host * + ControlMaster auto + ControlPath /tmp/%r@%h:%p + +< Then create an ssh connection to the host and leave it running: > + + ssh -N host.domain.com + +< Now remotely open a file with Vim's Netrw and enjoy the + zippiness: > + + vim scp://host.domain.com//home/user/.bashrc +< + *netrw-p15* + P15. How may I use a double-click instead of netrw's usual single click + to open a file or directory? (Ben Fritz) + + First, disable netrw's mapping with > + let g:netrw_mousemaps= 0 +< and then create a netrw buffer only mapping in + $HOME/.vim/after/ftplugin/netrw.vim: > + nmap <2-leftmouse> +< Note that setting g:netrw_mousemaps to zero will turn off + all netrw's mouse mappings, not just the one. + (see |g:netrw_mousemaps|) ============================================================================== 11. Debugging Netrw Itself *netrw-debug* {{{1 @@ -2762,6 +2804,15 @@ which is loaded automatically at startup ============================================================================== 12. History *netrw-history* {{{1 + v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use + shellescape(fnameescape(s:path),1) for + the benefit of those using scp://.../ + with subdirectories having spaces. + Problem reported by: Gilles Charron + Apr 18, 2011 * s:NetrwMethod() attempts to issue an + error message when given a malformed url + Apr 29, 2011 * converted most mousemaps to use s + * |g:netrw_winsize|'s meaning changed v141: Aug 28, 2010 * added -s:... support for Windows ftp * restored 2-leftmouse for :Rex-like return * added balloon help for banner @@ -2772,6 +2823,9 @@ 12. History *netrw-history* {{{1 Avoids "... is a directory" message, works inside a try-catch-endtry clause. Feb 22, 2011 * for menus, &go =~# used to insure correct case + Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor + In addition, there's more supported settings for + it. v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window v139: May 14, 2010 * when viewing remote directory listings and changing listing style, going to tree listing diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,4 +1,4 @@ -*pi_tar.txt* For Vim version 7.3. Last change: 2010 Nov 03 +*pi_tar.txt* For Vim version 7.3. Last change: 2011 May 31 +====================+ | Tar File Interface | @@ -60,11 +60,11 @@ 3. Options *tar-options* <.vimrc> file. Default Variable Value Explanation - *g:tar_browseoptions* "Ptf" used to get a list of contents - *g:tar_readoptions* "OPxf" used to extract a file from a tarball - *g:tar_cmd* "tar" the name of the tar program - *g:tar_nomax* 0 if true, file window will not be maximized - *g:tar_secure* undef if exists: + *g:tar_browseoptions* "Ptf" used to get a list of contents + *g:tar_readoptions* "OPxf" used to extract a file from a tarball + *g:tar_cmd* "tar" the name of the tar program + *g:tar_nomax* 0 if true, file window will not be maximized + *g:tar_secure* undef if exists: "--"s will be used to prevent unwanted option expansion in tar commands. Please be sure that your tar command @@ -76,15 +76,19 @@ 3. Options *tar-options* "-" Not all tar's support the "--" which is why it isn't default. - *g:tar_writeoptions* "uf" used to update/replace a file + *g:tar_writeoptions* "uf" used to update/replace a file ============================================================================== 4. History *tar-history* + v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling + * inserted additional |:keepj| modifiers + * changed silent to sil! (|:silent|) v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold tarfile name + * inserted keepj before 0d to protect jump list v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression v24 Apr 07, 2009 * :Untarvim command implemented Sep 28, 2009 * Added lzma support diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -1,4 +1,4 @@ -*pi_vimball.txt* For Vim version 7.3. Last change: 2010 Apr 12 +*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Apr 02 ---------------- Vimball Archiver @@ -6,7 +6,7 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) -Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *Vimball-copyright* +Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. *Vimball-copyright* The VIM LICENSE applies to Vimball.vim, and Vimball.txt (see |copyright|) except use "Vimball" instead of "Vim". No warranty, express or implied. @@ -176,6 +176,22 @@ WINDOWS *vimball-windows* ============================================================================== 4. Vimball History *vimball-history* {{{1 + 33 : Apr 02, 2011 * Gave priority to *.vmb over *.vba + * Changed silent! to sil! (shorter) + * Safed |'swf'| setting (during vimball extraction, + its now turned off) + 32 : May 19, 2010 * (Christian Brabrandt) :so someplugin.vba and + :so someplugin.vba.gz (and the other supported + compression types) now works + * (Jan Steffens) added support for xz compression + * fenc extraction was erroneously picking up the + end of the line number when no file encoding + was present. Fixed. + * By request, beginning the switchover from the vba + extension to vmb. Currently both are supported; + MkVimball, however, now will create *.vmb files. + Feb 11, 2011 * motoyakurotsu reported an error with vimball's + handling of zero-length files 30 : Dec 08, 2008 * fnameescape() inserted to protect error messaging using corrupted filenames from causing problems @@ -199,6 +215,8 @@ 4. Vimball History *vimball-history* causing problems as reported by Zhang Shuhan 24 : Nov 15, 2007 * g:vimball_path_escape used by s:Path() to prevent certain characters from causing trouble + (defunct: |fnameescape()| and |shellescape()| + now used instead) 22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter 21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header handling problem and it now changes \s to /s diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 7.3. Last change: 2010 Sep 14 +*pi_zip.txt* For Vim version 7.3. Last change: 2011 May 24 +====================+ | Zip File Interface | @@ -6,7 +6,7 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) -Copyright: Copyright (C) 2005-2009 Charles E Campbell, Jr *zip-copyright* +Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright* Permission is hereby granted to use and distribute this code, with or without modifications, provided that this copyright notice is copied with it. Like anything else that's free, @@ -17,14 +17,14 @@ Copyright: Copyright (C) 2005-2009 Charl the use of this software. ============================================================================== -1. Contents *zip* *zip-contents* +1. Contents *zip* *zip-contents* 1. Contents................................................|zip-contents| 2. Usage...................................................|zip-usage| 3. Additional Extensions...................................|zip-extension| 4. History.................................................|zip-history| ============================================================================== -2. Usage *zip-usage* *zip-manual* +2. Usage *zip-usage* *zip-manual* When one edits a *.zip file, this plugin will handle displaying a contents page. Select a file to edit by moving the cursor atop @@ -69,6 +69,7 @@ 2. Usage *zip-usage* *zip-manual* let g:loaded_zipPlugin= 1 let g:loaded_zip = 1 < +< ============================================================================== 3. Additional Extensions *zip-extension* @@ -83,7 +84,11 @@ 3. Additional Extensions *zip-extens should be treated as zip files. ============================================================================== -4. History *zip-history* {{{1 +4. History *zip-history* {{{1 + v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames + fnameescape'd as well as shellquote'd + * (Motoya Kurotsu) inserted keepj before 0d to protect + jump list v17 May 09, 2008 * arno caught a security bug v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.3. Last change: 2010 Dec 02 +*quickref.txt* For Vim version 7.3. Last change: 2011 Jun 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -657,6 +657,7 @@ Short explanation of each option: *opti 'cscopepathcomp' 'cspc' how many components of the path to show 'cscopeprg' 'csprg' command to execute cscope 'cscopequickfix' 'csqf' use quickfix window for cscope results +'cscoperelative' 'csre' Use cscope.out path basename as prefix 'cscopetag' 'cst' use cscope for tag commands 'cscopetagorder' 'csto' determines ":cstag" search order 'cscopeverbose' 'csverb' give messages when adding a cscope database @@ -800,7 +801,7 @@ Short explanation of each option: *opti 'omnifunc' 'ofu' function for filetype-specific completion 'opendevice' 'odev' allow reading/writing devices on MS-Windows 'operatorfunc' 'opfunc' function to be called for |g@| operator -'osfiletype' 'oft' operating system-specific filetype information +'osfiletype' 'oft' no longer supported 'paragraphs' 'para' nroff macros that separate paragraphs 'paste' allow pasting text 'pastetoggle' 'pt' key code that causes 'paste' to toggle diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.3. Last change: 2011 Feb 01 +*spell.txt* For Vim version 7.3. Last change: 2011 May 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1244,6 +1244,7 @@ one or more groups, where each group can Optionally this may be followed by: * the group appears zero or more times, e.g., sm*e + the group appears one or more times, e.g., c+ + ? the group appears zero times or once, e.g., x? This is similar to the regexp pattern syntax (but not the same!). A few examples with the sequence of word flags they require: @@ -1251,6 +1252,7 @@ examples with the sequence of word flags COMPOUNDRULE yz yz COMPOUNDRULE x+z xz xxz xxxz etc. COMPOUNDRULE yx+ yx yxx yxxx etc. + COMPOUNDRULE xy?z xz xyz COMPOUNDRULE [abc]z az bz cz COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc. diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -154,12 +154,14 @@ 'cscopepathcomp' options.txt /*'cscopepathcomp'* 'cscopeprg' options.txt /*'cscopeprg'* 'cscopequickfix' options.txt /*'cscopequickfix'* +'cscoperelative' options.txt /*'cscoperelative'* 'cscopetag' options.txt /*'cscopetag'* 'cscopetagorder' options.txt /*'cscopetagorder'* 'cscopeverbose' options.txt /*'cscopeverbose'* 'cspc' options.txt /*'cspc'* 'csprg' options.txt /*'csprg'* 'csqf' options.txt /*'csqf'* +'csre' options.txt /*'csre'* 'cst' options.txt /*'cst'* 'csto' options.txt /*'csto'* 'csverb' options.txt /*'csverb'* @@ -1191,7 +1193,6 @@ +mzscheme/dyn various.txt /*+mzscheme\/dyn* +netbeans_intg various.txt /*+netbeans_intg* +ole various.txt /*+ole* -+osfiletype various.txt /*+osfiletype* +path_extra various.txt /*+path_extra* +perl various.txt /*+perl* +perl/dyn various.txt /*+perl\/dyn* @@ -3705,7 +3706,6 @@ E362 term.txt /*E362* E363 options.txt /*E363* E364 eval.txt /*E364* E365 print.txt /*E365* -E366 options.txt /*E366* E367 autocmd.txt /*E367* E368 eval.txt /*E368* E369 pattern.txt /*E369* @@ -3970,8 +3970,6 @@ E607 eval.txt /*E607* E608 eval.txt /*E608* E609 if_cscop.txt /*E609* E61 pattern.txt /*E61* -E610 options.txt /*E610* -E611 options.txt /*E611* E612 sign.txt /*E612* E613 print.txt /*E613* E614 editing.txt /*E614* @@ -4304,6 +4302,7 @@ IME mbyte.txt /*IME* Insert insert.txt /*Insert* Insert-mode insert.txt /*Insert-mode* InsertChange autocmd.txt /*InsertChange* +InsertCharPre autocmd.txt /*InsertCharPre* InsertEnter autocmd.txt /*InsertEnter* InsertLeave autocmd.txt /*InsertLeave* J change.txt /*J* @@ -4959,6 +4958,40 @@ charset-conversion mbyte.txt /*charset-c chill.vim syntax.txt /*chill.vim* cindent() eval.txt /*cindent()* cinkeys-format indent.txt /*cinkeys-format* +cino-# indent.txt /*cino-#* +cino-( indent.txt /*cino-(* +cino-) indent.txt /*cino-)* +cino-+ indent.txt /*cino-+* +cino-/ indent.txt /*cino-\/* +cino-2 indent.txt /*cino-2* +cino-: indent.txt /*cino-:* +cino-= indent.txt /*cino-=* +cino-> indent.txt /*cino->* +cino-C indent.txt /*cino-C* +cino-J indent.txt /*cino-J* +cino-L indent.txt /*cino-L* +cino-M indent.txt /*cino-M* +cino-N indent.txt /*cino-N* +cino-U indent.txt /*cino-U* +cino-W indent.txt /*cino-W* +cino-^ indent.txt /*cino-^* +cino-b indent.txt /*cino-b* +cino-c indent.txt /*cino-c* +cino-e indent.txt /*cino-e* +cino-f indent.txt /*cino-f* +cino-g indent.txt /*cino-g* +cino-h indent.txt /*cino-h* +cino-i indent.txt /*cino-i* +cino-j indent.txt /*cino-j* +cino-l indent.txt /*cino-l* +cino-m indent.txt /*cino-m* +cino-n indent.txt /*cino-n* +cino-p indent.txt /*cino-p* +cino-star indent.txt /*cino-star* +cino-t indent.txt /*cino-t* +cino-u indent.txt /*cino-u* +cino-{ indent.txt /*cino-{* +cino-} indent.txt /*cino-}* cinoptions-values indent.txt /*cinoptions-values* clear-undo undo.txt /*clear-undo* clearmatches() eval.txt /*clearmatches()* @@ -5132,6 +5165,7 @@ cscope_connection() eval.txt /*cscope_co cscopepathcomp if_cscop.txt /*cscopepathcomp* cscopeprg if_cscop.txt /*cscopeprg* cscopequickfix if_cscop.txt /*cscopequickfix* +cscoperelative if_cscop.txt /*cscoperelative* cscopetag if_cscop.txt /*cscopetag* cscopetagorder if_cscop.txt /*cscopetagorder* cscopeverbose if_cscop.txt /*cscopeverbose* @@ -5139,6 +5173,7 @@ csh.vim syntax.txt /*csh.vim* cspc if_cscop.txt /*cspc* csprg if_cscop.txt /*csprg* csqf if_cscop.txt /*csqf* +csre if_cscop.txt /*csre* cst if_cscop.txt /*cst* csto if_cscop.txt /*csto* csverb if_cscop.txt /*csverb* @@ -5416,6 +5451,11 @@ expr-env eval.txt /*expr-env* expr-env-expand eval.txt /*expr-env-expand* expr-function eval.txt /*expr-function* expr-is eval.txt /*expr-is* +expr-is# eval.txt /*expr-is#* +expr-is? eval.txt /*expr-is?* +expr-isnot eval.txt /*expr-isnot* +expr-isnot# eval.txt /*expr-isnot#* +expr-isnot? eval.txt /*expr-isnot?* expr-nesting eval.txt /*expr-nesting* expr-number eval.txt /*expr-number* expr-option eval.txt /*expr-option* @@ -6807,6 +6847,8 @@ netrw-p10 pi_netrw.txt /*netrw-p10* netrw-p11 pi_netrw.txt /*netrw-p11* netrw-p12 pi_netrw.txt /*netrw-p12* netrw-p13 pi_netrw.txt /*netrw-p13* +netrw-p14 pi_netrw.txt /*netrw-p14* +netrw-p15 pi_netrw.txt /*netrw-p15* netrw-p2 pi_netrw.txt /*netrw-p2* netrw-p3 pi_netrw.txt /*netrw-p3* netrw-p4 pi_netrw.txt /*netrw-p4* @@ -6855,6 +6897,7 @@ netrw-start pi_netrw.txt /*netrw-start* netrw-t pi_netrw.txt /*netrw-t* netrw-texplore pi_netrw.txt /*netrw-texplore* netrw-todo pi_netrw.txt /*netrw-todo* +netrw-trailingslash pi_netrw.txt /*netrw-trailingslash* netrw-transparent pi_netrw.txt /*netrw-transparent* netrw-u pi_netrw.txt /*netrw-u* netrw-updir pi_netrw.txt /*netrw-updir* @@ -7279,17 +7322,6 @@ right-justify change.txt /*right-justify rileft rileft.txt /*rileft* rileft.txt rileft.txt /*rileft.txt* riscos os_risc.txt /*riscos* -riscos-commandline os_risc.txt /*riscos-commandline* -riscos-filetypes os_risc.txt /*riscos-filetypes* -riscos-gui os_risc.txt /*riscos-gui* -riscos-interrupt os_risc.txt /*riscos-interrupt* -riscos-locations os_risc.txt /*riscos-locations* -riscos-memory os_risc.txt /*riscos-memory* -riscos-munging os_risc.txt /*riscos-munging* -riscos-porting os_risc.txt /*riscos-porting* -riscos-remote os_risc.txt /*riscos-remote* -riscos-shell os_risc.txt /*riscos-shell* -riscos-temp-files os_risc.txt /*riscos-temp-files* rot13 change.txt /*rot13* round() eval.txt /*round()* rsync pi_netrw.txt /*rsync* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.3. Last change: 2011 May 19 +*todo.txt* For Vim version 7.3. Last change: 2011 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -27,82 +27,20 @@ 1 probably not See |develop.txt| for development plans. You can vote for which items should be worked on, but only if you sponsor Vim development. See |sponsor|. +Issues can also be entered online: http://code.google.com/p/vim/issues/list +Updates will be forwarded to the vim_dev maillist. Issues entered there will +not be repeated below, unless there is extra information. + *known-bugs* -------------------- Known bugs and current work ----------------------- Go through more coverity reports. -Hong Xu: I think src/Make_ro.mak should also be removed. -Two patches 2011 May 15 - Crash in autocomplete, valgrind log. (Greg Weber, 2011 Apr 22) -Ex command ":s/ \?/ /g" splits multi-byte characters into bytes. (Dominique -Pelle, 2011 May 7). - -In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009 -Jun 1) -Patch by Jean-Rene David, 2011 Apr 30. - -When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". -(ZyX, 2011 Feb 12) -Patch by Jean-Rene David, 2011 Apr 30. - -Patch to set v:register default depending on "unnamed" in 'clipboard'. (Ingo -Karkat, 2011 Jan 16) - -Patch to add 'cscoperelative'. (Raghavendra Prabhu, 2011 Apr 18) - -9 "} else" causes following lines to be indented too much. (Rouben - Rostamian, 2008 Aug 30) -Patch by Lech Lorens, 2011 May 16, with more tests. - -New syntax file for dnsmasq. (Thilo Six, 2011 Apr 18) - Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10) -Patch for: - InsertCharPre - user typed character Insert mode, before inserting the - char. Pattern is matched with text before the cursor. - Set v:char to the character, can be changed. - (not triggered when 'paste' is set). -(Jakson A. Aquino, 2011 Jan 29) - -Patch for "No errors" showing up after QuickfixCmdPost. (Mike Lundy, 2011 Feb -3) - -Patch for cmdline completion of ":lang". (Dominique Pelle, 2011 Feb 5) - -Patch for adding 's' option to 'cino', C++ namespace indenting. (Konstantin -Lepa, 2011 Jan 18) - -Patch to support ":!start /b cmd". (Xaizek, 2010 Dec 22) - -Patch for syntax "extend" not working correctly. (Ben Schmidt, 2011 May 15) - -Patch to build with GTK on Mac. (Ben Schmidt, 2011 Jan 18) -Use another name instead of FEAT_GUI_ELSEWHERE. - -Patch for xxd makefile to avoid generating .dSYM files. (Ben Schmidt, 2011 Jan -18) - -Patch to show sign for folded text. (Christian Brabandt, 2011 Jan 12) -Method to reproduce it: Jan 16. - -Patch to improve optwin.vim. (ZyX, 2011 Jan 29) - -Patch for Python 3 support. (lilydjwg, 2011 Feb 24) - -Patch to make putting from clipboard linewise when the text ends in a newline. -(Sung Pae) Do we want this? - -Patch to add third dict argument to sort(). (ZyX, 2011 May 15) - -Building the MingW version without clipboard but with multi-byte doesn't -work. (Bill Lam, 2010 Sep 18) - -Patch for handling of NL in substitute() with \= expression. (Motoya Kurotsu, -2011 Mar 16) Update Mar 24. +Patch to fix gj with count. (James Vega, 2011 Jun 13) Patch to disallow fork() when __APPLE__ is defined. (Hisashi T Fujinaka, 2010 Nov 25) @@ -111,6 +49,11 @@ 7 Output for ":scriptnames" and ":brea use "~/" when possible. Patch by Jean-Rene David, 2011 May 1. +Cindent wrong after patch 7.3.202. (Lech Lorens, issue 9) + +Patch for cindent fix with closing brace placement, including tests. +(Lech Lorens, issue 10, 2011 Jun 12) + Patch for better #if 0 syntax highlighting for C code. (Ben Schmidt, 2011 Jan 20) Change to C syntax folding to make it work much faster, but a bit less @@ -124,12 +67,26 @@ Update 2011 Feb 3. Patch to use pipes on Win32. (Vincent Berthoux, 2011 Feb 28) Update Mar 1 using 'shelltemp'. +Patch to fix CTRL-R CTRL-W in the command line when the cursor is not at the +end. (Tyru, 2011 Jun 6) + Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1) Needs more work. +Patch to make ";" not get stuck on "t" command. (Christian Brabandt, 2011 May +23) + +Patch to do more testing of Javascript indenting. Some items are srong. +(Luc Deschenaux, 2011 Jun 14) + "gh" deletes the current line, except when it's the last line. Hint by Christian Brabandt, 2011 Mar 22 +"echo 'abc' > ''" returns 0 or 1, depending on 'ignorecase'. +mb_strnicmp() checks for illegal and truncated bytes are wrong. +Should also not assume that byte length is equal before case folding. +Patch by Ivan Krasilnikov, 2011 May 27. + The :z command doesn't work exactly as it should. (ChangZhuo Chen, 2011 Mar 2) Compare with how old Vi works and with posix spec. terminal is 80 x 24, 'scroll' option set to 11. @@ -138,6 +95,14 @@ Compare with how old Vi works and with p 'list' is set. (Dennis Preiser) Patch 7.3.116 was the wrong solution. +With concealed text mouse click doesn't put the cursor in the right position. +(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly, +need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called. + +Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2, +only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug +21, Ben Fritz, 2010 Sep 14) + When opening file from windows explorer, characters inside [] cause problems, even though double quotes are used. (Manuel Stol, 2011 Mar 9) @@ -149,12 +114,14 @@ Use function to set paste option and res Help file foldexpr (ZyX) -Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2, -only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug -21, Ben Fritz, 2010 Sep 14) - Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20) +Patch to automatically get version number into NSIS. (Guopeng Wen, 2011 May +27) + +Patch to make character classes work with multi-byte characters. +(Dominique Pelle, 2011 May 31) + In GTK Gvim, setting 'lines' and 'columns' to 99999 causes a crash (Tony Mechelynck, 2011 Apr 25). Can reproduce the crash sometimes: gvim -N -u NONE --cmd 'set lines=99999 columns=99999' @@ -190,6 +157,10 @@ When using a Vim server, a # in the path Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5) +Bug: Windows 7 64 bit system freezes when 'clipboard' set to "unnamed" and +doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011 +Jun 17) + Using ":break" or something else that stops executing commands inside a ":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct 15) @@ -235,6 +206,9 @@ Patch by Christian Brabandt, 2011 Mar 19 Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct 30) +Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011 +May 24) Update May 26. + When a script contains "redir => s:foo" but doesn't end redirection, a following "redir" command gives an error for not being able to access s:foo. (ZyX, 2011 Mar 27) @@ -244,6 +218,10 @@ Problem with "syn sync gouphere". (Gusta Loading autoload script even when usage is inside "if 0". (Christian Brabandt, 2010 Dec 18) +With a filler line in diff mode, it isn't displayed in the column with line +number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5) +Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems. + In the sandbox it's not allowed to do many things, but it's possible to change or set variables. Add a way to prevent variables from being changed in the sandbox? E.g.: ":protect g:restore_settings". @@ -356,6 +334,9 @@ Echo starts in the wrong column: Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7) +GvimExt sets $LANG in the wrong way. Patch by Yasuhiro Matsumoto, 2011 Jun +15. This will fix issue no 11. + When writing a file > 2Gbyte, the reported number of bytes is negative. (Antonio Colombo, 2010 Dec 18) @@ -923,6 +904,9 @@ Gnome improvements: Edward Catmur, 2007 New PHP syntax file, use it? (Peter Hodge) +":echoe" in catch block stops processing, while this doesn't happen outside of +a catch block. (ZyX, 2011 Jun 2) + 'foldcolumn' in modeline applied to wrong window when using a session. (Teemu Likonen, March 19) @@ -1144,8 +1128,6 @@ if_ruby.c. Patch to dynamically load Python on Solaris. (Danek Duvall, 2009 Feb 16) Needs more work. -Python3 interface doesn't handle utf-8 correctly? (Nov 2010, lilydjwg) - The need_fileinfo flag is messy. Instead make the message right away and put it in keep_msg? @@ -1370,6 +1352,9 @@ resulting in highlighted "{" in that win In mswin.vim: Instead of mapping for Insert mode in a complicated way, can it be done like ":imap " without negative side effects? +Completion menu disappears when using 'cursorcolumn'. (Sven-Hendrik Haase, +2011 May 23) + GTK: when the Tab pages bar appears or disappears while the window is maximized the window is no longer maximized. Patch that has some idea but doesn't work from Geoffrey Antos, 2008 May 5. @@ -3529,6 +3514,8 @@ 7 Support "-visual " command lin Autocommands: +9 Rework the code from FEAT_OSFILETYPE for autocmd-osfiletypes to use + 'filetype'. Only for when the current buffer is known. - Put autocommand event names in a hashtable for faster lookup? 8 When the SwapExists event is triggered, provide information about the swap file, e.g., whether the process is running, file was modified, etc. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.3. Last change: 2011 Feb 15 +*usr_41.txt* For Vim version 7.3. Last change: 2011 Jun 19 VIM USER MANUAL - by Bram Moolenaar @@ -597,7 +597,7 @@ String manipulation: *string-functio strridx() last index of a short string in a long string strlen() length of a string substitute() substitute a pattern match with a string - submatch() get a specific match in a ":substitute" + submatch() get a specific match in ":s" and substitute() strpart() get part of a string expand() expand special keywords iconv() convert text from one encoding to another diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.3. Last change: 2011 Mar 03 +*various.txt* For Vim version 7.3. Last change: 2011 May 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -360,8 +360,6 @@ m *+mzscheme* Mzscheme interface |mzsc m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+netbeans_intg* |netbeans| m *+ole* Win32 GUI only: |ole-interface| - *+osfiletype* Support for the 'osfiletype' option and filetype - checking in automatic commands. |autocmd-osfiletypes| N *+path_extra* Up/downwards search in 'path' and 'tags' m *+perl* Perl interface |perl| m *+perl/dyn* Perl interface |perl-dynamic| |/dyn| diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2011 May 19 +" Last Change: 2011 Jun 13 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -937,6 +937,9 @@ au BufNewFile,BufRead *.clp setf jess " Jgraph au BufNewFile,BufRead *.jgr setf jgraph +" Jovial +au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial + " Kixtart au BufNewFile,BufRead *.kix setf kix diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim --- a/runtime/indent/fortran.vim +++ b/runtime/indent/fortran.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Fortran95 (and Fortran90, Fortran77, F and elf90) -" Version: 0.38 -" Last Change: 2010 July 21 +" Version: 0.39 +" Last Change: 2011 May 30 " Maintainer: Ajit J. Thakkar ; " Usage: Do :help fortran-indent from Vim @@ -12,8 +12,14 @@ endif let b:did_indent = 1 setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select -setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect -setlocal indentkeys+==~type,=~interface +setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif +setlocal indentkeys+==~type,=~interface,=~forall,=~associate,=~block,=~enum +setlocal indentkeys+==~endforall,=~endassociate,=~endblock,=~endenum +if exists("b:fortran_indent_more") || exists("g:fortran_indent_more") + setlocal indentkeys+==~function,=~subroutine,=~module,=~contains,=~program + setlocal indentkeys+==~endfunction,=~endsubroutine,=~endmodule + setlocal indentkeys+==~endprogram +endif " Determine whether this is a fixed or free format source file " if this hasn't been done yet @@ -69,6 +75,8 @@ function FortranGetIndent(lnum) let prevline=getline(a:lnum) " Strip tail comment let prevstat=substitute(prevline, '!.*$', '', '') + let prev2line=getline(a:lnum-1) + let prev2stat=substitute(prev2line, '!.*$', '', '') "Indent do loops only if they are all guaranteed to be of do/end do type if exists("b:fortran_do_enddo") || exists("g:fortran_do_enddo") @@ -80,33 +88,64 @@ function FortranGetIndent(lnum) endif endif - "Add a shiftwidth to statements following if, else, case, - "where, elsewhere, type and interface statements - if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(else\|case\|where\|elsewhere\)\>' - \ ||prevstat =~? '^\s*\(\d\+\s\)\=\s*\(type\|interface\)\>' - \ || prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>' + "Add a shiftwidth to statements following if, else, else if, case, + "where, else where, forall, type, interface and associate statements + if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>' + \ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>' + \ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>' + \ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>' let ind = ind + &sw " Remove unwanted indent after logical and arithmetic ifs if prevstat =~? '\' && prevstat !~? '\' let ind = ind - &sw endif " Remove unwanted indent after type( statements - if prevstat =~? '\' + \ ||prevstat =~? '^\s*'.prefix.'subroutine\>' + \ ||prevstat =~? '^\s*'.prefix.type.'function\>' + \ ||prevstat =~? '^\s*'.type.prefix.'function\>' + let ind = ind + &sw + endif + if getline(v:lnum) =~? '^\s*contains\>' + \ ||getline(v:lnum)=~? '^\s*end\s*' + \ .'\(function\|subroutine\|module\|program\)\>' + let ind = ind - &sw + endif + endif + + "Subtract a shiftwidth from else, else if, elsewhere, case, end if, + " end where, end select, end forall, end interface, end associate, + " end enum, and end type statements if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*' - \. '\(else\|elsewhere\|case\|end\s*\(if\|where\|select\|interface\|type\)\)\>' + \. '\(else\|else\s*if\|else\s*where\|case\|' + \. 'end\s*\(if\|where\|select\|interface\|' + \. 'type\|forall\|associate\|enum\)\)\>' let ind = ind - &sw " Fix indent for case statement immediately after select - if prevstat =~? '\' + if prevstat =~? '\' let ind = ind + &sw endif endif + "First continuation line + if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$' + let ind = ind + &sw + endif + "Line after last continuation line + if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$' + let ind = ind - &sw + endif + return ind endfunction diff --git a/runtime/optwin.vim b/runtime/optwin.vim --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2010 Dec 02 +" Last Change: 2011 Jun 13 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 @@ -10,7 +10,7 @@ if bufwinnr("option-window") > 0 if @% == "option-window" finish endif - exe "norm! \w" + wincmd w if s:thiswin == winnr() break endif @@ -26,12 +26,8 @@ set cpo&vim fun! CR() " If on a continued comment line, go back to the first comment line - let lnum = line(".") + let lnum = search("^[^\t]", 'bWcn') let line = getline(lnum) - while line[0] == "\t" - let lnum = lnum - 1 - let line = getline(lnum) - endwhile " on a "set" line executes the option line if match(line, "^ \tset ") >= 0 @@ -82,11 +78,11 @@ fun! Find(lnum) if getline(a:lnum - 1) =~ "(local to" let local = 1 let thiswin = winnr() - exe "norm! \p" + wincmd p if exists("b:current_syntax") && b:current_syntax == "help" - exe "norm! \j" + wincmd j if winnr() == thiswin - exe "norm! \j" + wincmd j endif endif else @@ -111,10 +107,10 @@ fun! Update(lnum, line, local, this if name == "pt" && &pt =~ "\x80" let val = PTvalue() else - exe "let val = substitute(&" . name . ', "[ \\t\\\\\"|]", "\\\\\\0", "g")' + let val = escape(eval('&' . name), " \t\\\"|") endif if a:local - exe "norm! " . a:thiswin . "\w" + exe a:thiswin . "wincmd w" endif if match(a:line, "=") >= 0 || (val != "0" && val != "1") call setline(a:lnum, " \tset " . name . "=" . val) @@ -139,7 +135,7 @@ set notitle noicon nosc noru " Relies on syntax highlighting to be switched on. let s:thiswin = winnr() while exists("b:current_syntax") && b:current_syntax == "help" - exe "norm! \w" + wincmd w if s:thiswin == winnr() break endif @@ -147,7 +143,7 @@ endwhile " Open the window new option-window -setlocal ts=15 tw=0 noro +setlocal ts=15 tw=0 noro buftype=nofile " Insert help and a "set" command for each option. call append(0, '" Each "set" line shows the current value of an option (on the left).') @@ -162,9 +158,7 @@ call append(6, '" Hit on a "set" " Init a local binary option fun! BinOptionL(name) - exe "norm! \p" - exe "let val = &" . a:name - exe "norm! \p" + let val = getwinvar(winnr('#'), '&' . a:name) call append("$", substitute(substitute(" \tset " . val . a:name . "\t" . \!val . a:name, "0", "no", ""), "1", "", "")) endfun @@ -177,16 +171,13 @@ endfun " Init a local string option fun! OptionL(name) - exe "norm! \p" - exe "let val = substitute(&" . a:name . ', "[ \\t\\\\\"|]", "\\\\\\0", "g")' - exe "norm! \p" + let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|") call append("$", " \tset " . a:name . "=" . val) endfun " Init a global string option fun! OptionG(name, val) - call append("$", " \tset " . a:name . "=" . substitute(a:val, '[ \t\\"|]', - \ '\\\0', "g")) + call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|")) endfun let s:idx = 1 @@ -315,6 +306,8 @@ if has("cscope") call append("$", " \tset cspc=" . &cspc) call append("$", "cscopequickfix\twhen to open a quickfix window for cscope") call OptionG("csqf", &csqf) + call append("$", "cscoperelative\tfile names in a cscope file are relative to that file") + call BinOptionG("csre", &csre) endif @@ -1342,3 +1335,5 @@ let &ru = s:old_ru let &sc = s:old_sc let &cpo = s:cpo_save unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum + +" vim: ts=8 sw=2 sts=2 diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim --- a/runtime/plugin/getscriptPlugin.vim +++ b/runtime/plugin/getscriptPlugin.vim @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_getscriptPlug endif finish endif -let g:loaded_getscriptPlugin = "v32" +let g:loaded_getscriptPlugin = "v33" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v141" +let g:loaded_netrwPlugin = "v142" if v:version < 702 echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None finish diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim --- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_tarPlugin") finish endif -let g:loaded_tarPlugin = "v26" +let g:loaded_tarPlugin = "v27" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/tohtml.vim b/runtime/plugin/tohtml.vim --- a/runtime/plugin/tohtml.vim +++ b/runtime/plugin/tohtml.vim @@ -1,6 +1,6 @@ " Vim plugin for converting a syntax highlighted file to HTML. " Maintainer: Ben Fritz -" Last Change: 2011 Apr 09 +" Last Change: 2011 May 26 " " The core of the code is in $VIMRUNTIME/autoload/tohtml.vim and " $VIMRUNTIME/syntax/2html.vim @@ -26,56 +26,61 @@ " buffer before we're done (5000 or so lines should do it) " * TODO comments for code cleanup scattered throughout " -" -" Changelog: -" 7.3_v9 (this version): Add html_pre_wrap option active with html_use_css and -" without html_no_pre, default value same as 'wrap' -" option, (Andy Spencer). Don't use 'fileencoding' for -" converted document encoding if 'buftype' indicates a -" special buffer which isn't written. -" 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow leaving tab -" characters in generated output (Andy Spencer). Escape -" text that looks like a modeline so Vim doesn't use -" anything in the converted HTML as a modeline. -" Bugfixes: Fix folding when a fold starts before the -" conversion range. Remove fold column when there are -" no folds. -" 7.3_v7 (840c3cadb842): see betas released on vim_dev below: -" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way. -" 7.3_v7b2: Remove automatic detection of encodings that are not -" supported by all major browsers according to -" http://wiki.whatwg.org/wiki/Web_Encodings and convert -" to UTF-8 for all Unicode encodings. Make HTML -" encoding to Vim encoding detection be -" case-insensitive for built-in pairs. -" 7.3_v7b1: Remove use of setwinvar() function which cannot be -" called in restricted mode (Andy Spencer). Use -" 'fencoding' instead of 'encoding' to determine by -" charset, and make sure the 'fenc' of the generated -" file matches its indicated charset. Add charsets for -" all of Vim's natively supported encodings. -" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other -" user settings interfering with diff mode generation, -" trailing whitespace (e.g. line number column) when -" using html_no_pre, and bugs when using -" html_hover_unfold. -" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync -" folds in diff mode when first line was folded. -" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode. -" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css -" default to true when not set to anything. Use strict -" doctypes where possible. Rename use_xhtml option to -" html_use_xhtml for consistency. Use .xhtml extension -" when using this option. Add meta tag for settings. -" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the -" diff colors and the normal syntax colors -" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output -" Pre-v1 baseline: Mercurial changeset 3c9324c0800e if exists('g:loaded_2html_plugin') finish endif -let g:loaded_2html_plugin = 'vim7.3_v9' +let g:loaded_2html_plugin = 'vim7.3_v10' + +" +" Changelog: +" 7.3_v10 (this version): Fix error E684 when converting a range wholly inside +" multiple nested folds with dynamic folding on. +" Also fix problem with foldtext in this situation. +" 7.3_v9 (0877b8d6370e): Add html_pre_wrap option active with html_use_css +" and without html_no_pre, default value same as +" 'wrap' option, (Andy Spencer). Don't use +" 'fileencoding' for converted document encoding if +" 'buftype' indicates a special buffer which isn't +" written. +" 7.3_v8 (85c5a72551e2): Add html_expand_tabs option to allow leaving tab +" characters in generated output (Andy Spencer). +" Escape text that looks like a modeline so Vim +" doesn't use anything in the converted HTML as a +" modeline. Bugfixes: Fix folding when a fold starts +" before the conversion range. Remove fold column when +" there are no folds. +" 7.3_v7 (840c3cadb842): see betas released on vim_dev below: +" 7.3_v7b3: Fixed bug, convert Unicode to UTF-8 all the way. +" 7.3_v7b2: Remove automatic detection of encodings that are not +" supported by all major browsers according to +" http://wiki.whatwg.org/wiki/Web_Encodings and +" convert to UTF-8 for all Unicode encodings. Make +" HTML encoding to Vim encoding detection be +" case-insensitive for built-in pairs. +" 7.3_v7b1: Remove use of setwinvar() function which cannot be +" called in restricted mode (Andy Spencer). Use +" 'fencoding' instead of 'encoding' to determine by +" charset, and make sure the 'fenc' of the generated +" file matches its indicated charset. Add charsets for +" all of Vim's natively supported encodings. +" 7.3_v6 (0d3f0e3d289b): Really fix bug with 'nowrapscan', 'magic' and other +" user settings interfering with diff mode generation, +" trailing whitespace (e.g. line number column) when +" using html_no_pre, and bugs when using +" html_hover_unfold. +" 7.3_v5 ( unreleased ): Fix bug with 'nowrapscan' and also with out-of-sync +" folds in diff mode when first line was folded. +" 7.3_v4 (7e008c174cc3): Bugfixes, especially for xhtml markup, and diff mode +" 7.3_v3 (a29075150aee): Refactor option handling and make html_use_css +" default to true when not set to anything. Use strict +" doctypes where possible. Rename use_xhtml option to +" html_use_xhtml for consistency. Use .xhtml extension +" when using this option. Add meta tag for settings. +" 7.3_v2 (80229a724a11): Fix syntax highlighting in diff mode to use both the +" diff colors and the normal syntax colors +" 7.3_v1 (e7751177126b): Add conceal support and meta tags in output +" Pre-v1 baseline: Mercurial changeset 3c9324c0800e " Define the :TOhtml command when: " - 'compatible' is not set diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim --- a/runtime/plugin/vimballPlugin.vim +++ b/runtime/plugin/vimballPlugin.vim @@ -16,18 +16,22 @@ if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballPlugin = "v31" +let g:loaded_vimballPlugin = "v33" let s:keepcpo = &cpo set cpo&vim " ------------------------------------------------------------------------------ " Public Interface: {{{1 -com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(,,0,) -com! -na=? -complete=dir UseVimball call vimball#Vimball(1,) -com! -na=0 VimballList call vimball#Vimball(0) -com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball()|call vimball#RestoreSettings() -au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip call vimball#Decompress(expand(""))|call vimball#Vimball(1) -au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'| setlocal ma ff=unix noma |endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") +com! -ra -complete=file -na=+ -bang MkVimball call vimball#MkVimball(,,0,) +com! -na=? -complete=dir UseVimball call vimball#Vimball(1,) +com! -na=0 VimballList call vimball#Vimball(0) +com! -na=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball()|call vimball#RestoreSettings() +au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") +au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz if expand("%")!=expand("") | exe "1sp" fnameescape(expand(""))|endif|call vimball#Decompress(expand(""))|so %|if expand("%")!=expand("")|close|endif +au SourceCmd *.vba if expand("%")!=expand("") | exe "1sp" fnameescape(expand(""))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif +au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") +au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz if expand("%")!=expand("") | exe "1sp" fnameescape(expand(""))|endif|call vimball#Decompress(expand(""))|so %|if expand("%")!=expand("")|close|endif +au SourceCmd *.vmb if expand("%")!=expand("") | exe "1sp" fnameescape(expand(""))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif " ===================================================================== " Restoration And Modelines: {{{1 diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim --- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zipPlugin") finish endif -let g:loaded_zipPlugin = "v23" +let g:loaded_zipPlugin = "v24" let s:keepcpo = &cpo set cpo&vim @@ -40,7 +40,7 @@ augroup zip au FileWriteCmd zipfile:*/* call zip#Write(expand("")) endif - au BufReadCmd *.zip,*.jar,*.xpi,*.war,*.ear call zip#Browse(expand("")) + au BufReadCmd *.zip,*.jar,*.xpi,*.war,*.ear,*.celzip call zip#Browse(expand("")) augroup END " --------------------------------------------------------------------- diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Ben Fritz -" Last Change: 2011 Apr 05 +" Last Change: 2011 May 27 " " Additional contributors: " @@ -635,11 +635,22 @@ if s:settings.dynamic_folds " close all folds again so we can get the fold text as we go silent! %foldclose! + " Go through and remove folds we don't need to (or cannot) process in the + " current conversion range + " + " If a fold is removed which contains other folds, which are included, we need + " to adjust the level of the included folds as used by the conversion logic + " (avoiding special cases is good) + " + " Note any time we remove a fold, either all of the included folds are in it, + " or none of them, because we only remove a fold if neither its start nor its + " end are within the conversion range. + let leveladjust = 0 for afold in s:allfolds let removed = 0 if exists("g:html_start_line") && exists("g:html_end_line") if afold.firstline < g:html_start_line - if afold.lastline < g:html_end_line && afold.lastline > g:html_start_line + if afold.lastline <= g:html_end_line && afold.lastline >= g:html_start_line " if a fold starts before the range to convert but stops within the " range, we need to include it. Make it start on the first converted " line. @@ -649,6 +660,9 @@ if s:settings.dynamic_folds " the entire range, don't bother parsing it call remove(s:allfolds, index(s:allfolds, afold)) let removed = 1 + if afold.lastline > g:html_end_line + let leveladjust += 1 + endif endif elseif afold.firstline > g:html_end_line " If the entire fold lies outside the range we need to remove it. @@ -671,11 +685,23 @@ if s:settings.dynamic_folds endif endif if !removed + let afold.level -= leveladjust if afold.level+1 > s:foldcolumn let s:foldcolumn = afold.level+1 endif endif endfor + + " if we've removed folds containing the conversion range from processing, + " getting foldtext as we go won't know to open the removed folds, so the + " foldtext would be wrong; open them now. + " + " Note that only when a start and an end line is specified will a fold + " containing the current range ever be removed. + while leveladjust > 0 + exe g:html_start_line."foldopen" + let leveladjust -= 1 + endwhile endif " Now loop over all lines in the original text to convert to html. diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -2,8 +2,8 @@ " Language: automake Makefile.am " Maintainer: Debian VIM Maintainers " Former Maintainer: John Williams -" Last Change: 2007-10-14 -" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/automake.vim;hb=debian +" Last Change: 2011-06-13 +" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim " " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain " it only because patches have been submitted for it by Debian users and the @@ -17,6 +17,12 @@ " when they are used in an inappropriate place, such as in defining " EXTRA_SOURCES. +" Standard syntax initialization +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif " Read the Makefile syntax to start with if version < 600 @@ -25,27 +31,28 @@ else runtime! syntax/make.vim endif -syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1 -syn match automakePrimary "^TESTS\s*="me=e-1 -syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\|_CPPFLAGS\)\s*="me=e-1 -syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1 -syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1 -syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1 -syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1 -syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1 -syn match automakeConditional "^\(if\s*[a-zA-Z0-9_]\+\|else\|endif\)\s*$" +syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" +syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 +syn match automakeSecondary "^\w\+\(_SOURCES\|_LIBADD\|_LDADD\|_LDFLAGS\|_DEPENDENCIES\|_AR\|_CCASFLAGS\|_CFLAGS\|_CPPFLAGS\|_CXXFLAGS\|_FCFLAGS\|_FFLAGS\|_GCJFLAGS\|_LFLAGS\|_LIBTOOLFLAGS\|OBJCFLAGS\|RFLAGS\|UPCFLAGS\|YFLAGS\)\s*\ze+\==" +syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\==" +syn match automakeExtra "^EXTRA_\w\+\s*\ze+\==" +syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\==" +syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\==" +syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\==" +syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$" -syn match automakeSubst "@[a-zA-Z0-9_]\+@" -syn match automakeSubst "^\s*@[a-zA-Z0-9_]\+@" +syn match automakeSubst "@\w\+@" +syn match automakeSubst "^\s*@\w\+@" syn match automakeComment1 "#.*$" contains=automakeSubst syn match automakeComment2 "##.*$" syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call +syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake -syn region automakeNoSubst start="^EXTRA_[a-zA-Z0-9_]*\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent -syn region automakeNoSubst start="^DIST_SUBDIRS\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent -syn region automakeNoSubst start="^[a-zA-Z0-9_]*_SOURCES\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent -syn match automakeBadSubst "@\([a-zA-Z0-9_]*@\=\)\=" contained +syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn match automakeBadSubst "@\(\w*@\=\)\=" contained syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -2,7 +2,7 @@ " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige " Filenames: *.bib -" Last Change: Aug 02, 2005 +" Last Change: Mar 23, 2011 " Thanks to those who pointed out problems with this file or supplied fixes! @@ -34,6 +34,8 @@ syn keyword bibEntryKw contained number syn keyword bibEntryKw contained school series title type volume year " Non-standard: syn keyword bibNSEntryKw contained abstract isbn issn keywords url +" AMS mref http://www.ams.org/mref +syn keyword bibNSEntryKw contained mrclass mrnumber mrreviewer fjournal coden " Clusters " ======== @@ -55,11 +57,11 @@ syn region bibEntryData contained start= " Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce " an error, so we explicitly distinguish versions with and without folding functionality: if version < 600 - syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment + syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment else - syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment + syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment endif -syn region bibComment2 start=/@Comment[{(]/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry +syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry " Synchronization " =============== diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,8 +3,8 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2010 Oct 21 -" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim +" Last Change: 2011 June 01 +" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim " Standard syntax initialization if version < 600 @@ -19,7 +19,7 @@ syn case ignore " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" -syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(lenny|squeeze)-%(backports%(-sloppy)=|volatile)|%(dapper|hardy|jaunty|karmic|lucid|maverick|natty)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|%(lenny|squeeze)-%(backports%(-sloppy)=|volatile)|%(hardy|lucid|maverick|natty|oneiric)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,8 +3,8 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs " Wichert Akkerman -" Last Change: 2010 Oct 21 -" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim +" Last Change: 2011 June 01 +" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim " Standard syntax initialization if version < 600 @@ -24,7 +24,8 @@ syn match debControlComma ", *" syn match debControlSpace " " " Define some common expressions we can use later on -syn match debcontrolArchitecture contained "\%(all\|any\|alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\|hurd-i386\|kfreebsd-\%(i386\|amd64\|gnu\)\|knetbsd-i386\|kopensolaris-i386\|netbsd-\%(alpha\|i386\)\)" +syn match debcontrolArchitecture contained "\%(all\|any\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\)" +syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" @@ -49,14 +50,15 @@ syn match debcontrolComment "^#.*$" syn case ignore " List of all legal keys -syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *" +syn match debcontrolKey contained "^\%(Source\|Package\|Section\|Priority\|\%(XSBC-Original-\)\=Maintainer\|Uploaders\|Build-\%(Conflicts\|Depends\)\%(-Indep\)\=\|Standards-Version\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Breaks\|Essential\|Architecture\|Multi-Arch\|Description\|Bugs\|Origin\|X[SB]-Python-Version\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|\%(XC-\)\=Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *" " Fields for which we do strict syntax checking syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline +syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline -syn region debcontrolStrictField start="^XC-Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline +syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend @@ -82,6 +84,7 @@ if version >= 508 || !exists("did_debcon HiLink debcontrolStrictField Error HiLink debcontrolMultiField Normal HiLink debcontrolArchitecture Normal + HiLink debcontrolMultiArch Normal HiLink debcontrolName Normal HiLink debcontrolPriority Normal HiLink debcontrolSection Normal diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,8 +2,8 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann -" Last Change: 2010 Oct 21 -" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim +" Last Change: 2011 June 01 +" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim " Standard syntax initialization if version < 600 @@ -23,7 +23,7 @@ syn match debsourcesComment /#.*/ " Match uri's syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ -syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(lenny\|squeeze\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|dapper\|hardy\|jaunty\|karmic\|lucid\|maverick\|natty\)\([-[:alnum:]_./]*\)+ +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(lenny\|squeeze\|wheezy\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|hardy\|lucid\|maverick\|natty\|oneiric\)\([-[:alnum:]_./]*\)+ " Associate our matches and regions with pretty colours hi def link debsourcesLine Error diff --git a/runtime/syntax/gdmo.vim b/runtime/syntax/gdmo.vim --- a/runtime/syntax/gdmo.vim +++ b/runtime/syntax/gdmo.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: GDMO " (ISO-10165-4; Guidelines for the Definition of Managed Object) -" Maintainer: Gyuman Kim -" URL: http://dooly.modacom.co.kr/gdmo.vim -" Last change: 2001 Sep 02 +" Maintainer: Gyuman (Chester) Kim +" URL: http://classicalprogrammer.wikidot.com/local--files/vim-syntax-file-for-gdmo/gdmo.vim +" Last change: 8th June, 2011 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded diff --git a/runtime/syntax/jovial.vim b/runtime/syntax/jovial.vim new file mode 100644 --- /dev/null +++ b/runtime/syntax/jovial.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: JOVIAL J73 +" Version: 1.2 +" Maintainer: Paul McGinnis +" Last Change: 2011/06/17 +" Remark: Based on MIL-STD-1589C for JOVIAL J73 language + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword jovialTodo TODO FIXME XXX contained + +" JOVIAL beads - first digit is number of bits, [0-9A-V] is the bit value +" representing 0-31 (for 5 bits on the bead) +syn match jovialBitConstant "[1-5]B'[0-9A-V]'" + +syn match jovialNumber "\<\d\+\>" + +syn match jovialFloat "\d\+E[-+]\=\d\+" +syn match jovialFloat "\d\+\.\d*\(E[-+]\=\d\+\)\=" +syn match jovialFloat "\.\d\+\(E[-+]\=\d\+\)\=" + +syn region jovialComment start=/"/ end=/"/ contains=jovialTodo +syn region jovialComment start=/%/ end=/%/ contains=jovialTodo + +" JOVIAL variable names. This rule is to prevent conflicts with strings. +" Handle special case where ' character can be part of a JOVIAL variable name. +syn match jovialIdentifier "[A-Z\$][A-Z0-9'\$]\+" + +syn region jovialString start="\s*'" skip=/''/ end=/'/ oneline + +" JOVIAL compiler directives -- see Section 9 in MIL-STD-1589C +syn region jovialPreProc start="\s*![A-Z]\+" end=/;/ + +syn keyword jovialOperator AND OR NOT XOR EQV MOD + +" See Section 2.1 in MIL-STD-1589C for data types +syn keyword jovialType ITEM B C P V +syn match jovialType "\" +syn match jovialType "\" +syn match jovialType "\" +syn match jovialType "\" + +syn keyword jovialStorageClass STATIC CONSTANT PARALLEL BLOCK N M D W + +syn keyword jovialStructure TABLE STATUS + +syn keyword jovialConstant NULL + +syn keyword jovialBoolean FALSE TRUE + +syn keyword jovialTypedef TYPE + +syn keyword jovialStatement ABORT BEGIN BY BYREF BYRES BYVAL CASE COMPOOL +syn keyword jovialStatement DEF DEFAULT DEFINE ELSE END EXIT FALLTHRU FOR +syn keyword jovialStatement GOTO IF INLINE INSTANCE LABEL LIKE OVERLAY POS +syn keyword jovialStatement PROC PROGRAM REC REF RENT REP RETURN START STOP +syn keyword jovialStatement TERM THEN WHILE + +" JOVIAL extensions, see section 8.2.2 in MIL-STD-1589C +syn keyword jovialStatement CONDITION ENCAPSULATION EXPORTS FREE HANDLER IN INTERRUPT NEW +syn keyword jovialStatement PROTECTED READONLY REGISTER SIGNAL TO UPDATE WITH WRITEONLY ZONE + +" implementation specific constants and functions, see section 1.4 in MIL-STD-1589C +syn keyword jovialConstant BITSINBYTE BITSINWORD LOCSINWORD +syn keyword jovialConstant BYTESINWORD BITSINPOINTER INTPRECISION +syn keyword jovialConstant FLOATPRECISION FIXEDPRECISION FLOATRADIX +syn keyword jovialConstant MAXFLOATPRECISION MAXFIXEDPRECISION +syn keyword jovialConstant MAXINTSIZE MAXBYTES MAXBITS +syn keyword jovialConstant MAXTABLESIZE MAXSTOP MINSTOP MAXSIGDIGITS +syn keyword jovialFunction BYTEPOS MAXINT MININT +syn keyword jovialFunction IMPLFLOATPRECISION IMPLFIXEDPRECISION IMPLINTSIZE +syn keyword jovialFunction MINSIZE MINFRACTION MINSCALE MINRELPRECISION +syn keyword jovialFunction MAXFLOAT MINFLOAT FLOATRELPRECISION +syn keyword jovialFunction FLOATUNDERFLOW MAXFIXED MINFIXED + +" JOVIAL built-in functions +syn keyword jovialFunction LOC NEXT BIT BYTE SHIFTL SHIFTR ABS SGN BITSIZE +syn keyword jovialFunction BYTESIZE WORDSIZE LBOUND UBOUND NWDSEN FIRST +syn keyword jovialFunction LAST NENT + +" Define the default highlighting. +hi def link jovialBitConstant Number +hi def link jovialBoolean Boolean +hi def link jovialComment Comment +hi def link jovialConstant Constant +hi def link jovialFloat Float +hi def link jovialFunction Function +" No color highlighting for JOVIAL identifiers. See above, +" this is to prevent confusion with JOVIAL strings +"hi def link jovialIdentifier Identifier +hi def link jovialNumber Number +hi def link jovialOperator Operator +hi def link jovialPreProc PreProc +hi def link jovialStatement Statement +hi def link jovialStorageClass StorageClass +hi def link jovialString String +hi def link jovialStructure Structure +hi def link jovialTodo Todo +hi def link jovialType Type +hi def link jovialTypedef Typedef + + +let b:current_syntax = "jovial" + +" vim: ts=8 diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim --- a/runtime/syntax/matlab.vim +++ b/runtime/syntax/matlab.vim @@ -4,6 +4,8 @@ " Credits: Preben 'Peppe' Guldberg " Original author: Mario Eusebio " Last Change: Wed Jan 13 11:12:34 CET 2010 +" sinh added to matlab implicit commands +" Change History: " - 'global' and 'persistent' keyword are now recognized " For version 5.x: Clear all syntax items @@ -68,7 +70,7 @@ syn keyword matlabOperator ceil floor s syn keyword matlabFunction error eval function syn keyword matlabImplicit abs acos atan asin cos cosh exp log prod sum -syn keyword matlabImplicit log10 max min sign sin sqrt tan reshape +syn keyword matlabImplicit log10 max min sign sin sinh sqrt tan reshape syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim --- a/runtime/syntax/netrw.vim +++ b/runtime/syntax/netrw.vim @@ -88,7 +88,7 @@ if !exists("did_drchip_netrwlist_syntax" hi default link netrwTimeSep netrwDateSep hi default link netrwComma netrwComment hi default link netrwHide netrwComment - hi default link netrwMarkFile DiffChange + hi default link netrwMarkFile TabLineSel " special syntax highlighting (see :he g:netrw_special_syntax) hi default link netrwBak NonText diff --git a/runtime/syntax/xquery.vim b/runtime/syntax/xquery.vim --- a/runtime/syntax/xquery.vim +++ b/runtime/syntax/xquery.vim @@ -3,7 +3,7 @@ " Author: René Neumann " Author: Steve Spigarelli " Original Author: Jean-Marc Vanel -" Last Change: December 11, 2010 +" Last Change: mar jui 12 18:04:05 CEST 2005 " Filenames: *.xq " URL: http://jmvanel.free.fr/vim/xquery.vim @@ -51,7 +51,7 @@ syn match xqFloat "\d\+e[-+]\=\d\+[fl] syn match xqNumber "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" syn match xqNumber "\<\d\+\>" -syn region xqString start=+"+ end=+"+ +syn region xqString start=+\z(['"]\)+ skip=+\\.+ end=+\z1+ syn region xqComment start='(:' excludenl end=':)' contains=XQdoc syn match xqVariable "$\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>"