From 62c86d546c0eb155fa7cbadabb0ed70fb44540c4 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sat, 21 Jun 2008 20:46:29 +0200 Subject: [PATCH] Update runtime files --- runtime/autoload/netrw.vim | 1717 +++++++++++++++++++++++------------- runtime/autoload/netrwSettings.vim | 1 + runtime/autoload/rubycomplete.vim | 2 +- runtime/autoload/tar.vim | 60 +- runtime/autoload/vimball.vim | 14 +- runtime/autoload/zip.vim | 15 +- runtime/doc/change.txt | 96 +- runtime/doc/eval.txt | 237 ++++- runtime/doc/gui.txt | 12 +- runtime/doc/indent.txt | 19 +- runtime/doc/mlang.txt | 5 +- runtime/doc/pi_netrw.txt | 313 +++++-- runtime/doc/pi_paren.txt | 8 +- runtime/doc/pi_tar.txt | 29 +- runtime/doc/pi_vimball.txt | 14 +- runtime/doc/pi_zip.txt | 7 +- runtime/doc/syntax.txt | 4 +- runtime/doc/tags | 23 +- runtime/doc/todo.txt | 59 +- runtime/doc/usr_28.txt | 6 +- runtime/doc/usr_30.txt | 12 +- runtime/doc/usr_41.txt | 15 +- runtime/doc/various.txt | 3 +- runtime/filetype.vim | 19 +- runtime/ftplugin/debchangelog.vim | 85 +- runtime/ftplugin/debcontrol.vim | 70 ++ runtime/ftplugin/gitcommit.vim | 8 +- runtime/ftplugin/javascript.vim | 4 +- runtime/getdos.aap | 152 ++-- runtime/getunix.aap | 112 +-- runtime/indent/gitconfig.vim | 10 +- runtime/lang/menu_ca_es.latin1.vim | 34 +- runtime/menu.vim | 4 +- runtime/plugin/netrwPlugin.vim | 18 +- runtime/plugin/tarPlugin.vim | 18 +- runtime/plugin/vimballPlugin.vim | 2 +- runtime/plugin/zipPlugin.vim | 2 +- runtime/syntax/automake.vim | 29 +- runtime/syntax/colortest.vim | 13 +- runtime/syntax/debchangelog.vim | 15 +- runtime/syntax/debcontrol.vim | 44 +- runtime/syntax/gitconfig.vim | 5 +- runtime/syntax/haste.vim | 150 ++++ runtime/syntax/po.vim | 8 +- runtime/syntax/tpp.vim | 6 +- runtime/tutor/tutor.hr | 270 +++--- runtime/tutor/tutor.hr.cp1250 | 270 +++--- runtime/tutor/tutor.hr.utf-8 | 270 +++--- runtime/vimrc_example.vim | 9 +- 49 files changed, 2767 insertions(+), 1531 deletions(-) create mode 100644 runtime/ftplugin/debcontrol.vim create mode 100644 runtime/syntax/haste.vim diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index a974a8f4..6064a657 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,10 +1,10 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Mar 28, 2008 -" Version: 123 +" Date: Jun 12, 2008 +" Version: 125 " Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 1999-2008 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, @@ -27,11 +27,20 @@ if !exists("s:NOTE") let s:WARNING = 1 let s:ERROR = 2 endif -let g:loaded_netrw = "v123" +let g:loaded_netrw = "v125" + +" sanity checks if v:version < 700 call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1) finish endif +if !exists("*shellescape") + call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has shellescape()",64) +endif +if !exists("*fnameescape") + call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has fnameescape()",65) +endif + let s:keepcpo= &cpo setlocal cpo&vim "DechoTabOn @@ -140,7 +149,10 @@ endif if !exists("g:netrw_compress") let g:netrw_compress= "gzip" endif -" Default values - d-f ---------- {{{3 +if !exists("g:netrw_ctags") + let g:netrw_ctags= "ctags" +endif +" Default values - d-g ---------- {{{3 if !exists("g:NETRW_DIRHIST_CNT") let g:NETRW_DIRHIST_CNT= 0 endif @@ -290,26 +302,11 @@ if !exists("g:netrw_rmf_cmd") let g:netrw_rmf_cmd = g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f" endif " Default values - s ---------- {{{3 + " set up shell quoting character if exists("g:netrw_silent") && g:netrw_silent != 0 - let g:netrw_silentxfer= "silent " + let s:netrw_silentxfer= "silent " else - let g:netrw_silentxfer= "" -endif -if !exists("g:netrw_shq") - if exists("&shq") && &shq != "" - let g:netrw_shq= &shq - elseif exists("&sxq") && &sxq != "" - let g:netrw_shq= &sxq - elseif has("win32") || has("win95") || has("win64") || has("win16") - if g:netrw_cygwin - let g:netrw_shq= "'" - else - let g:netrw_shq= '"' - endif - else - let g:netrw_shq= "'" - endif -" call Decho("g:netrw_shq<".g:netrw_shq.">") + let s:netrw_silentxfer= "" endif if !exists("g:netrw_sort_by") " alternatives: date size @@ -336,12 +333,12 @@ else let g:netrw_use_noswf= 0 endif " Default values - t-w ---------- {{{3 -if !exists("g:netrw_ctags") - let g:netrw_ctags= "ctags" -endif if !exists("g:netrw_timefmt") let g:netrw_timefmt= "%c" endif +if !exists("g:netrw_xstrlen") + let g:netrw_xstrlen= 1 +endif if !exists("g:NetrwTopLvlMenu") let g:NetrwTopLvlMenu= "Netrw." endif @@ -356,9 +353,6 @@ if !exists("g:netrw_winsize") endif " --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 -if !exists("g:netrw_cd_escape") - let g:netrw_cd_escape="[]#*$%'\" ?`!&();<>\\" -endif if !exists("g:netrw_fname_escape") let g:netrw_fname_escape= ' ?&;%' endif @@ -447,8 +441,14 @@ fun! s:NetrwOptionRestore(vt) let &l:acd = {a:vt}netrw_acdkeep unlet {a:vt}netrw_acdkeep if &l:acd -" call Decho("exe cd ".escape(curdir,g:netrw_cd_escape)) " NOTE: was g:netrw_fname_escape for some reason - exe "lcd ".escape(curdir,g:netrw_cd_escape) +" call Decho("exe keepjumps lcd ".fnameescape(curdir)) " NOTE: was g:netrw_fname_escape for some reason + try + if !exists("&l:acd") && !&l:acd + exe 'keepjumps lcd '.fnameescape(curdir) + endif + catch /^Vim\%((\a\+)\)\=:E472/ + call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".curdir."> (permissions?)",61) + endtry endif endif endif @@ -461,8 +461,7 @@ fun! s:NetrwOptionRestore(vt) if exists("{a:vt}netrw_cpokeep") |let &l:cpo = {a:vt}netrw_cpokeep |unlet {a:vt}netrw_cpokeep |endif if exists("{a:vt}netrw_dirkeep") && isdirectory({a:vt}netrw_dirkeep) && g:netrw_keepdir let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g') - let dirkeep = escape(dirkeep,g:netrw_cd_escape) - if exists("{a:vt}netrw_dirkeep") |exe "lcd ".dirkeep|unlet {a:vt}netrw_dirkeep |endif + if exists("{a:vt}netrw_dirkeep") |exe "keepjumps lcd ".fnameescape(dirkeep)|unlet {a:vt}netrw_dirkeep |endif endif if exists("{a:vt}netrw_fokeep") |let &l:fo = {a:vt}netrw_fokeep |unlet {a:vt}netrw_fokeep |endif if exists("{a:vt}netrw_gdkeep") |let &l:gd = {a:vt}netrw_gdkeep |unlet {a:vt}netrw_gdkeep |endif @@ -490,8 +489,8 @@ fun! s:NetrwOptionRestore(vt) endif if exists("{a:vt}netrw_regstar") |silent! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif if exists("{a:vt}netrw_regslash")|silent! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif -" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) +" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) " call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) " call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) " call Dret("s:NetrwOptionRestore : win#".winnr()." buf#".bufnr("%")) @@ -637,10 +636,10 @@ fun! netrw#NetRead(mode,...) " call Decho("reconstructing choice") if match(choice,'"$') != -1 " case "..." - let choice=strpart(choice,1,s:Strlen(choice)-2) + let choice=strpart(choice,1,strlen(choice)-2) else " case "... ... ..." - let choice = strpart(choice,1,s:Strlen(choice)-1) + let choice = strpart(choice,1,strlen(choice)-1) let wholechoice = "" while match(choice,'"$') == -1 @@ -655,7 +654,7 @@ fun! netrw#NetRead(mode,...) endif let choice= a:{ichoice} endwhile - let choice= strpart(wholechoice,1,s:Strlen(wholechoice)-1) . " " . strpart(choice,0,s:Strlen(choice)-1) + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) endif endif endif @@ -705,8 +704,8 @@ fun! netrw#NetRead(mode,...) let uid_machine = g:netrw_machine endif endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile.g:netrw_shq +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -718,19 +717,19 @@ fun! netrw#NetRead(mode,...) call s:SaveBufVars()|new|call s:RestoreBufVars() setlocal ff=unix exe "put ='".g:netrw_ftpmode."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) if exists("g:netrw_ftpextracmd") exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' @@ -753,32 +752,32 @@ fun! netrw#NetRead(mode,...) setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) else put ='open '.g:netrw_machine -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftp") && g:netrw_ftp == 1 put =g:netrw_uid -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) put ='\"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) else put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" put =g:netrw_ftpmode -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftpextracmd") exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif put ='get \"'.netrw_fname.'\" '.tmpfile -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) " perform ftp: " -i : turns off interactive prompting from ftp @@ -786,7 +785,7 @@ fun! netrw#NetRead(mode,...) " -n win32: quit being obnoxious about password norm! 1Gdd " call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" " call Decho("error<".getline(1).">") @@ -807,8 +806,8 @@ fun! netrw#NetRead(mode,...) else let useport= "" endif -" call Decho("exe g:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".g:netrw_shq.g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape).g:netrw_shq." ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape).g:netrw_shq." ".tmpfile +" call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -828,8 +827,8 @@ fun! netrw#NetRead(mode,...) if match(b:netrw_fname,"#") == -1 " simple wget " call Decho('using simple wget (# not in b:netrw_fname<'.b:netrw_fname.">)") -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_http_cmd." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq."http://".g:netrw_machine.netrw_fname.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq."http://".g:netrw_machine.netrw_fname.g:netrw_shq +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) else @@ -839,8 +838,8 @@ fun! netrw#NetRead(mode,...) let netrw_tag = substitute(netrw_fname,"^.*#","","") " call Decho("netrw_html<".netrw_html.">") " call Decho("netrw_tag <".netrw_tag.">") -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_http_cmd." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq."http://".g:netrw_machine.netrw_html.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_http_cmd." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq."http://".g:netrw_machine.netrw_html.g:netrw_shq +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) " call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" @@ -869,7 +868,7 @@ fun! netrw#NetRead(mode,...) " perform cadaver operation: norm! 1Gdd " call Decho("executing: %!".g:netrw_dav_cmd) - exe g:netrw_silentxfer."%!".g:netrw_dav_cmd + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd bd! let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -879,8 +878,8 @@ fun! netrw#NetRead(mode,...) elseif b:netrw_method == 7 " call Decho("read via rsync (method #7)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq." ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq." ".tmpfile +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -904,11 +903,11 @@ fun! netrw#NetRead(mode,...) " call Decho("read via fetch for ".netrw_option) if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".g:netrw_shq.netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".g:netrw_shq.netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname.g:netrw_shq +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname) else -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".g:netrw_shq.netrw_option."://".g:netrw_machine."/".netrw_fname.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".g:netrw_shq.netrw_option."://".g:netrw_machine."/".netrw_fname.g:netrw_shq +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname) endif let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) @@ -920,8 +919,8 @@ fun! netrw#NetRead(mode,...) elseif b:netrw_method == 9 " call Decho("read via sftp (method #9)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq." ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq." ".tmpfile +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -940,7 +939,7 @@ fun! netrw#NetRead(mode,...) endif if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' " call Decho("cleanup by deleting tmpfile<".tmpfile.">") - call s:System("delete",tmpfile) + call s:System("delete",fnameescape(tmpfile)) endif call s:NetrwOptionRestore("w:") @@ -1027,10 +1026,10 @@ fun! netrw#NetWrite(...) range elseif match(choice,"^\"") != -1 if match(choice,"\"$") != -1 " case "..." - let choice=strpart(choice,1,s:Strlen(choice)-2) + let choice=strpart(choice,1,strlen(choice)-2) else " case "... ... ..." - let choice = strpart(choice,1,s:Strlen(choice)-1) + let choice = strpart(choice,1,strlen(choice)-1) let wholechoice = "" while match(choice,"\"$") == -1 @@ -1045,7 +1044,7 @@ fun! netrw#NetWrite(...) range endif let choice= a:{ichoice} endwhile - let choice= strpart(wholechoice,1,s:Strlen(wholechoice)-1) . " " . strpart(choice,0,s:Strlen(choice)-1) + let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1) endif endif endif @@ -1060,6 +1059,7 @@ fun! netrw#NetWrite(...) range " ============================ if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 echo "(netrw) Processing your write request..." +" call Decho("(netrw) Processing your write request...") endif "......................................... @@ -1080,8 +1080,8 @@ fun! netrw#NetWrite(...) range endif endif let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname) - exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname) let b:netrw_lastfile = choice "......................................... @@ -1090,21 +1090,23 @@ fun! netrw#NetWrite(...) range " call Decho("write via ftp+.netrc (method #2)") let netrw_fname= b:netrw_fname new +" call Decho("filter input window#".winnr()) setlocal ff=unix exe "put ='".g:netrw_ftpmode."'" -" call Decho(" filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) if exists("g:netrw_ftpextracmd") exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif exe "put ='".'put \"'.tmpfile.'\" \"'.netrw_fname.'\"'."'" -" call Decho(" filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else +" call Decho("filter input window#".winnr()) " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" @@ -1126,22 +1128,22 @@ fun! netrw#NetWrite(...) range setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) else put ='open '.g:netrw_machine -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftp") && g:netrw_ftp == 1 put =g:netrw_uid -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) put ='\"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) else put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) " save choice/id/password for future use let b:netrw_lastfile = choice @@ -1151,7 +1153,7 @@ fun! netrw#NetWrite(...) range " -n win32: quit being obnoxious about password norm! 1Gdd " call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") @@ -1171,8 +1173,8 @@ fun! netrw#NetWrite(...) range else let useport= "" endif -" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq) - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname) let b:netrw_lastfile = choice "......................................... @@ -1197,13 +1199,15 @@ fun! netrw#NetWrite(...) range else put ='open '.g:netrw_machine endif - put ='user '.g:netrw_uid.' '.s:netrw_passwd + if exists("g:netrw_uid") && exists("s:netrw_passwd") + put ='user '.g:netrw_uid.' '.s:netrw_passwd + endif put ='put '.tmpfile.' '.netrw_fname " perform cadaver operation: norm! 1Gdd " call Decho("executing: %!".g:netrw_dav_cmd) - exe g:netrw_silentxfer."%!".g:netrw_dav_cmd + exe s:netrw_silentxfer."%!".g:netrw_dav_cmd bd! let b:netrw_lastfile = choice @@ -1213,7 +1217,7 @@ fun! netrw#NetWrite(...) range " call Decho("write via rsync (method #7)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) " call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname let b:netrw_lastfile = choice "......................................... @@ -1229,10 +1233,10 @@ fun! netrw#NetWrite(...) range new setlocal ff=unix put ='put \"'.escape(tmpfile,'\').'\" '.netrw_fname -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) norm! 1Gdd " call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine) - exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine + exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine bd! let b:netrw_lastfile= choice @@ -1435,7 +1439,7 @@ fun! s:NetrwMethod(choice) " globals: method machine id passwd fname " rcphf : [user@]host:filename Use rcp " scpurm : scp://[user@]host[[#:]port]/filename Use scp " httpurm : http://[user@]host/filename Use wget - " davurm : [s]dav://host[:port]/path Use cadaver + " davurm : dav[s]://host[:port]/path Use cadaver " rsyncurm : rsync://host[:port]/path Use rsync " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) " sftpurm : sftp://[user@]host/filename Use scp @@ -1446,7 +1450,7 @@ fun! s:NetrwMethod(choice) " globals: method machine id passwd fname let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$' - let davurm = '^s\=dav://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' + let davurm = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' @@ -1564,10 +1568,10 @@ fun! s:NetrwMethod(choice) " globals: method machine id passwd fname " Issue an rcp: hostname:filename" (this one should be last) elseif match(a:choice,rcphf) == 0 " call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") - let b:netrw_method = 1 - let userid = substitute(a:choice,rcphf,'\2',"") - let g:netrw_machine= substitute(a:choice,rcphf,'\3',"") - let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") + let b:netrw_method = 1 + let userid = substitute(a:choice,rcphf,'\2',"") + let g:netrw_machine = substitute(a:choice,rcphf,'\3',"") + let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") " call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") " call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") " call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") @@ -1668,6 +1672,7 @@ fun! s:BrowserMaps(islocal) nnoremap md :call NetrwMarkFileDiff(1) nnoremap me :call NetrwMarkFileEdit(1) nnoremap mf :call NetrwMarkFile(1,NetrwGetWord()) + nnoremap mg :call NetrwMarkFileGrep(1) nnoremap mh :call NetrwMarkHideSfx(1) nnoremap mm :call NetrwMarkFileMove(1) nnoremap mp :call NetrwMarkFilePrint(1) @@ -1680,15 +1685,16 @@ fun! s:BrowserMaps(islocal) nnoremap mz :call NetrwMarkFileCompress(1) nnoremap gb :call NetrwBookmarkDir(1,b:netrw_curdir) nnoremap gh :call NetrwHidden(1) - nnoremap c :exe "lcd ".escape(b:netrw_curdir,g:netrw_cd_escape) + nnoremap c :exe "keepjumps lcd ".fnameescape(b:netrw_curdir) nnoremap C :let g:netrw_chgwin= winnr() nnoremap d :call NetrwMakeDir("") nnoremap i :call NetrwListStyle(1) nnoremap o :call NetrwSplit(3) - nnoremap O :call NetrwObtain(0) + nnoremap O :call NetrwObtain(1) nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) nnoremap P :call NetrwPrevWinOpen(1) nnoremap qb :call NetrwBookmarkDir(2,b:netrw_curdir) + nnoremap mB :call NetrwBookmarkDir(6,b:netrw_curdir) nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) nnoremap s :call NetrwSortStyle(1) @@ -1726,7 +1732,7 @@ fun! s:BrowserMaps(islocal) exe 'nnoremap R :call NetrwLocalRename("'.b:netrw_curdir.'")' exe 'vnoremap R :call NetrwLocalRename("'.b:netrw_curdir.'")' exe 'nnoremap m :call NetrwMakeDir("")' - nnoremap :he netrw-dir + nnoremap :he netrw-quickhelp else " remote call s:RemotePathAnalysis(b:netrw_curdir) @@ -1739,6 +1745,7 @@ fun! s:BrowserMaps(islocal) nnoremap md :call NetrwMarkFileDiff(0) nnoremap me :call NetrwMarkFileEdit(0) nnoremap mf :call NetrwMarkFile(0,NetrwGetWord()) + nnoremap mg :call NetrwMarkFileGrep(0) nnoremap mh :call NetrwMarkHideSfx(0) nnoremap mm :call NetrwMarkFileMove(0) nnoremap mp :call NetrwMarkFilePrint(0) @@ -1758,6 +1765,7 @@ fun! s:BrowserMaps(islocal) nnoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) nnoremap P :call NetrwPrevWinOpen(0) nnoremap qb :call NetrwBookmarkDir(2,b:netrw_curdir) + nnoremap mB :call NetrwBookmarkDir(6,b:netrw_curdir) nnoremap qf :call NetrwFileInfo(0,NetrwGetWord()) nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) nnoremap s :call NetrwSortStyle(0) @@ -1810,12 +1818,13 @@ endfun " --------------------------------------------------------------------- " s:NetrwBookmarkDir: {{{2 -" 0: (user: ) bookmark current directory -" 1: (user: ) change to the bookmarked directory -" 2: (user: ) list bookmarks -" 3: (browsing) record current directory history -" 4: (user: ) go up (previous) bookmark -" 5: (user: ) go down (next) bookmark +" 0: (user: ) bookmark current directory +" 1: (user: ) change to the bookmarked directory +" 2: (user: ) list bookmarks +" 3: (browsing) record current directory history +" 4: (user: ) go up (previous) bookmark +" 5: (user: ) go down (next) bookmark +" 6: (user: ) delete bookmark fun! s:NetrwBookmarkDir(chg,curdir) " call Dfunc("NetrwBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." bookmax=".g:NETRW_BOOKMARKMAX." histmax=".g:netrw_dirhistmax) @@ -1942,6 +1951,45 @@ fun! s:NetrwBookmarkDir(chg,curdir) endif echo "Sorry, no successor directory exists yet" endif + + elseif a:chg == 6 + if v:count > 0 && v:count == g:NETRW_BOOKMARKMAX + " delete the v:count'th bookmark +" call Decho("delete bookmark#".v:count."<".g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX}.">") + unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} + let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1 + + elseif v:count > 0 +" call Decho("delete by shifting bookmark#".v:count."<".g:NETRW_BOOKMARKDIR_{v:count}.">") + let cnt= v:count + while cnt < g:NETRW_BOOKMARKMAX + let g:NETRW_BOOKMARKDIR_{cnt} = g:NETRW_BOOKMARKDIR_{(cnt+1)} + let cnt = cnt + 1 + endwhile + unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} + let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1 + + elseif exists("b:netrw_curdir") + " look for current directory amongst the bookmarks and remove that bookmark +" call Decho("search for bookmark<".b:netrw_curdir.">") + let cnt= 1 + while cnt <= g:NETRW_BOOKMARKMAX +" call Decho("checking: g:NETRW_BOOKMARKDIR_".cnt."<".g:NETRW_BOOKMARKDIR_{cnt}.">") + if g:NETRW_BOOKMARKDIR_{cnt} == b:netrw_curdir + if cnt < g:NETRW_BOOKMARKMAX +" call Decho("delete bookmark#".cnt."<".b:netrw_curdir.">") + while cnt < g:NETRW_BOOKMARMAX + let g:NETRW_BOOKMARKDIR_{cnt} = g:NETRW_BOOKMARKDIR_{(cnt+1)} + let cnt = cnt + 1 + endwhile + endif + unlet g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} + let g:NETRW_BOOKMARKMAX= g:NETRW_BOOKMARKMAX - 1 + endif + let cnt= cnt + 1 + endwhile + endif + endif call s:NetrwBookmarkMenu() " call Dret("NetrwBookmarkDir") @@ -1964,6 +2012,16 @@ fun! s:NetrwBrowse(islocal,dirname) " call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) return endif + if !exists("*shellescape") + call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) +" call Dret("s:NetrwBrowse : missing shellescape()") + return + endif + if !exists("*fnameescape") + call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70) +" call Dret("s:NetrwBrowse : missing fnameescape()") + return + endif call s:NetrwOptionSave("w:") call s:NetrwSafeOptions() @@ -1976,8 +2034,8 @@ fun! s:NetrwBrowse(islocal,dirname) if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep " call Decho("handle w:netrw_acdkeep:") -" call Decho("lcd ".escape(a:dirname,g:netrw_cd_escape)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") - exe 'lcd '.escape(a:dirname,g:netrw_cd_escape) +" call Decho("keepjumps lcd ".fnameescape(a:dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")") + exe 'keepjumps lcd '.fnameescape(a:dirname) " call Decho("getcwd<".getcwd().">") elseif !a:islocal && a:dirname !~ '[\/]$' && a:dirname !~ '^"' @@ -1997,8 +2055,8 @@ fun! s:NetrwBrowse(islocal,dirname) setlocal ma noro " call Decho("setlocal ma noro") let b:netrw_curdir= a:dirname -" call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,g:netrw_cd_escape)." (bt=".&bt.")") - exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,g:netrw_cd_escape) +" call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path)." (bt=".&bt.")") + exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path) exe "silent keepalt doau BufReadPre ".s:fname silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path) if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' @@ -2079,22 +2137,25 @@ fun! s:NetrwBrowse(islocal,dirname) " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 if !g:netrw_keepdir " call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) -" call Decho('exe cd '.escape(b:netrw_curdir,g:netrw_cd_escape)) - try - exe 'lcd '.escape(b:netrw_curdir,g:netrw_cd_escape) - catch /^Vim\%((\a\+)\)\=:E472/ - call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",33) - if exists("w:netrw_prvdir") - let b:netrw_curdir= w:netrw_prvdir - else - call s:NetrwOptionRestore("w:") - setlocal noma nomod nowrap - let b:netrw_curdir= dirname -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) -" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") - return - endif - endtry +" call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist")) + if !exists("&l:acd") || !&l:acd +" call Decho('exe keepjumps lcd '.fnameescape(b:netrw_curdir)) + try + exe 'keepjumps lcd '.fnameescape(b:netrw_curdir) + catch /^Vim\%((\a\+)\)\=:E472/ + call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",61) + if exists("w:netrw_prvdir") + let b:netrw_curdir= w:netrw_prvdir + else + call s:NetrwOptionRestore("w:") + setlocal noma nomod nowrap + let b:netrw_curdir= dirname +" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") + return + endif + endtry + endif endif " -------------------------------- @@ -2152,9 +2213,20 @@ fun! s:NetrwFileInfo(islocal,fname) " call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">)") if a:islocal if (has("unix") || has("macunix")) && executable("/bin/ls") - echo system("/bin/ls -lsad ".a:fname) + if exists("b:netrw_curdir") +" call Decho('using ls with b:netrw_curdir<'.b:netrw_curdir.'>') + if b:netrw_curdir =~ '/$' + echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir.a:fname)) + else + echo system("/bin/ls -lsad ".shellescape(b:netrw_curdir."/".a:fname)) + endif + else +" call Decho('using ls '.a:fname." using cwd<".getcwd().">") + echo system("/bin/ls -lsad ".shellescape(a:fname)) + endif else " use vim functions to return information about file below cursor +" call Decho("using vim functions to query for file info") if !isdirectory(a:fname) && !filereadable(a:fname) && a:fname =~ '[*@/]' let fname= substitute(a:fname,".$","","") else @@ -2273,7 +2345,7 @@ fun! s:NetrwGetBuffer(islocal,dirname) " call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr) else " let v:errmsg= "" " Decho - let escdirname= escape(dirname,g:netrw_cd_escape) + let escdirname= fnameescape(dirname) " call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">") " call Decho(' exe silent! keepalt file '.escdirname) exe 'silent! keepalt file '.escdirname @@ -2343,14 +2415,14 @@ fun! s:NetrwGetcwd(doesc) let curdir= curdir.'/' endif if a:doesc - let curdir= escape(curdir,g:netrw_cd_escape) + let curdir= fnameescape(curdir) endif " call Dret("NetrwGetcwd <".curdir.">") return curdir endfun " --------------------------------------------------------------------- -" s:NetrwGetWord: it gets the directory named under the cursor {{{2 +" s:NetrwGetWord: it gets the directory/file named under the cursor {{{2 fun! s:NetrwGetWord() " call Dfunc("s:NetrwGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol(".")) call s:UseBufWinVars() @@ -2370,7 +2442,7 @@ fun! s:NetrwGetWord() " call Decho("active banner handling") norm! 0 let dirname= "./" - let curline= getline(".") + let curline= getline('.') if curline =~ '"\s*Sorted by\s' norm s @@ -2398,37 +2470,45 @@ fun! s:NetrwGetWord() elseif w:netrw_liststyle == s:THINLIST " call Decho("thin column handling") norm! 0 - let dirname= getline(".") + let dirname= getline('.') elseif w:netrw_liststyle == s:LONGLIST " call Decho("long column handling") norm! 0 - let dirname= substitute(getline("."),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') + let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') elseif w:netrw_liststyle == s:TREELIST " call Decho("treelist handling") - let dirname= substitute(getline("."),'^\(| \)*','','e') + let dirname= substitute(getline('.'),'^\(| \)*','','e') else " call Decho("obtain word from wide listing") - let dirname= getline(".") + let dirname= getline('.') if !exists("b:netrw_cpf") let b:netrw_cpf= 0 exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' -" call Decho("computed cpf") +" call Decho("computed cpf=".b:netrw_cpf) endif " call Decho("buf#".bufnr("%")."<".bufname("%").">") let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf " call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) " call Decho("1: dirname<".dirname.">") - if filestart > 0|let dirname= substitute(dirname,'^.\{'.filestart.'}','','')|endif + if filestart == 0 + norm! 0ma + else + call cursor(line("."),filestart+1) + norm! ma + endif + let rega= @a + call cursor(line("."),filestart+b:netrw_cpf+1) + norm! "ay`a + let dirname = @a + let @a = rega " call Decho("2: dirname<".dirname.">") - let dirname = substitute(dirname,'^\(.\{'.b:netrw_cpf.'}\).*$','\1','e') + let dirname= substitute(dirname,'\s\+$','','e') " call Decho("3: dirname<".dirname.">") - let dirname = substitute(dirname,'\s\+$','','e') -" call Decho("4: dirname<".dirname.">") endif " symlinks are indicated by a trailing "@". Remove it before further processing. @@ -2539,16 +2619,17 @@ fun! s:NetrwBookmarkMenu() " the following test assures that gvim is running, has menus available, and has menus enabled. if has("gui") && has("menu") && has("gui_running") && &go =~ 'm' && g:netrw_menu if exists("g:NetrwTopLvlMenu") - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark' +" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)") + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' endif " show bookmarked places - let cnt = 0 + let cnt = 1 while cnt <= g:NETRW_BOOKMARKMAX if exists("g:NETRW_BOOKMARKDIR_{cnt}") - let bmdir= escape(g:NETRW_BOOKMARKDIR_{cnt},'.') -" call Decho('silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmdir.' :e '.g:NETRW_BOOKMARKDIR_{cnt}) - exe 'silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmdir.' :e '.g:NETRW_BOOKMARKDIR_{cnt}."\" + let bmdir= escape(g:NETRW_BOOKMARKDIR_{cnt},'. ') +" call Decho('silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmdir.' :e '.bmdir) + exe 'silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmdir.' :e '.bmdir."\" endif let cnt= cnt + 1 endwhile @@ -2561,9 +2642,9 @@ fun! s:NetrwBookmarkMenu() let histcnt = histcnt + 1 let priority = g:NETRW_DIRHIST_CNT + histcnt if exists("g:NETRW_DIRHIST_{cnt}") - let bmdir= escape(g:NETRW_DIRHIST_{cnt},'.') -" call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.g:NETRW_DIRHIST_{cnt}) - exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.g:NETRW_DIRHIST_{cnt}."\" + let bmdir= escape(g:NETRW_DIRHIST_{cnt},'. ') +" call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir) + exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir."\" endif let first = 0 let cnt = ( cnt - 1 ) % g:netrw_dirhistmax @@ -2584,18 +2665,22 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") if !exists("b:netrw_curdir") + " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called + " and the current window is the NetrwMessage window. " call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!") - echoerr "(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!" +" call Decho("getcwd<".getcwd().">") +" call Dredir("ls!") " call Dret("s:NetrwBrowseChgDir") return endif call s:NetrwOptionSave("s:") call s:NetrwSafeOptions() - let nbcd_curpos = netrw#NetrwSavePosn() - let dirname = substitute(b:netrw_curdir,'\\','/','ge') - let newdir = a:newdir - let dolockout = 0 + let nbcd_curpos = netrw#NetrwSavePosn() + let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos + let dirname = substitute(b:netrw_curdir,'\\','/','ge') + let newdir = a:newdir + let dolockout = 0 " set up o/s-dependent directory recognition pattern if has("amiga") @@ -2634,7 +2719,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " this lets NetrwBrowseX avoid the edit if a:0 < 1 " call Decho("dirname<".dirname."> netrw_cd_escape<".g:netrw_cd_escape."> browse_split=".g:netrw_browse_split) -" call Decho("set up windows for editing<".escape(dirname,g:netrw_cd_escape)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) +" call Decho("set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) call s:NetrwOptionRestore("s:") if !exists("s:didsplit") if g:netrw_browse_split == 1 @@ -2656,20 +2741,19 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) call s:NetrwMenu(0) " optional change to window if g:netrw_chgwin >= 1 - exe g:netrw_chgwin."wincmd w" + exe "keepjumps ".g:netrw_chgwin."wincmd w" endif endif endif " the point where netrw actually edits the (local) file " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will if a:islocal -" call Decho("edit local file: exe e! ".escape(dirname,g:netrw_cd_escape)) - exe "e! ".escape(dirname,g:netrw_cd_escape) - let dolockout= 1 +" call Decho("edit local file: exe e! ".fnameescape(dirname)) + exe "e! ".fnameescape(dirname) else " call Decho("remote file: NetrwBrowse will edit it") - let dolockout= 1 endif + let dolockout= 1 endif elseif newdir =~ '^/' @@ -2888,29 +2972,29 @@ fun! netrw#NetrwBrowseX(fname,remote) elseif exists("g:netrw_browsex_viewer") && executable(viewer) " call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") -" call Decho("exe silent !".viewer." ".viewopt.g:netrw_shq.escape(fname,'%#').g:netrw_shq.redir) - exe "silent !".viewer." ".viewopt.g:netrw_shq.escape(fname,'%#').g:netrw_shq.redir +" call Decho("exe silent !".viewer." ".viewopt.shellescape(fname).redir) + exe "silent !".viewer." ".viewopt.shellescape(fname).redir let ret= v:shell_error elseif has("win32") || has("win64") -" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.g:netrw_shq.escape(fname, '%#').g:netrw_shq) - exe 'silent !start rundll32 url.dll,FileProtocolHandler '.g:netrw_shq.escape(fname, '%#').g:netrw_shq +" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname)) + exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname) call inputsave()|call input("Press to continue")|call inputrestore() let ret= v:shell_error elseif has("unix") && executable("gnome-open") && !s:haskdeinit -" call Decho("exe silent !gnome-open ".g:netrw_shq.escape(fname,'%#').g:netrw_shq." ".redir) - exe "silent !gnome-open ".g:netrw_shq.escape(fname,'%#').g:netrw_shq.redir +" call Decho("exe silent !gnome-open ".shellescape(fname)." ".redir) + exe "silent !gnome-open ".shellescape(fname).redir let ret= v:shell_error elseif has("unix") && executable("kfmclient") && s:haskdeinit -" call Decho("exe silent !kfmclient exec ".g:netrw_shq.escape(fname,'%#').g:netrw_shq." ".redir) - exe "silent !kfmclient exec ".g:netrw_shq.escape(fname,'%#').g:netrw_shq." ".redir +" call Decho("exe silent !kfmclient exec ".shellescape(fname)." ".redir) + exe "silent !kfmclient exec ".shellescape(fname)." ".redir let ret= v:shell_error elseif has("macunix") && executable("open") -" call Decho("exe silent !open '".escape(fname,'%#')."' ".redir) - exe silent !open '".escape(fname,'%#')."' ".redir +" call Decho("exe silent !open ".shellescape(fname)." ".redir) + exe "silent !open ".shellescape(fname)." ".redir let ret= v:shell_error else @@ -3539,6 +3623,7 @@ fun! s:NetrwMakeDir(usrhost) endif if a:usrhost == "" +" call Decho("local mkdir") " Local mkdir: " sanity checks @@ -3565,13 +3650,13 @@ fun! s:NetrwMakeDir(usrhost) call mkdir(fullnewdir,"p") else let netrw_origdir= s:NetrwGetcwd(1) - exe 'keepjumps cd '.b:netrw_curdir -" call Decho("netrw_origdir<".netrw_origdir.">: cd b:netrw_curdir<".b:netrw_curdir.">") -" call Decho("exe silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq) - exe "silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq + exe 'keepjumps lcd '.fnameescape(b:netrw_curdir) +" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") +" call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname)) + exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname) if !g:netrw_keepdir - exe 'keepjumps cd '.netrw_origdir -" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".netrw_origdir." getcwd<".getcwd().">") + exe 'keepjumps lcd '.fnameescape(netrw_origdir) +" call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">") endif endif @@ -3586,12 +3671,13 @@ fun! s:NetrwMakeDir(usrhost) endif " redraw! - else + elseif !exists("b:netrw_method") || b:netrw_method == 4 " Remote mkdir: +" call Decho("remote mkdir") let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname -" call Decho("exe silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq) - exe "silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq +" call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname)) + exe "silent! !".mkdircmd." ".shellescape(newdirname) if v:shell_error == 0 " refresh listing let svpos= netrw#NetrwSavePosn() @@ -3601,6 +3687,13 @@ fun! s:NetrwMakeDir(usrhost) call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) endif " redraw! + + elseif b:netrw_method == 2 + " COMBAK -- future work + call netrw#ErrorMsg(s:ERROR,"making directories via ftp not currently supported",68) + elseif b:netrw_method == 3 + " COMBAK -- future work + call netrw#ErrorMsg(s:ERROR,"making directories via ftp not currently supported",68) endif " call Dret("NetrwMakeDir") @@ -3767,83 +3860,89 @@ endfun " s:NetrwMarkFileCopy: (invoked by mc) copy marked files to target {{{2 " If no marked files, then set up directory as the " target. Currently does not support copying entire -" directories. Uses the global marked file list. +" directories. Uses the local-buffer marked file list. " Returns 1=success (used by NetrwMarkFileMove()) " 0=failure fun! s:NetrwMarkFileCopy(islocal) " call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---').">") - " s:netrwmarkfilelist_{bufnr("%")}: the List of marked files - let curbufnr= bufnr("%") - if exists("s:netrwmarkfilelist") -" call Decho("s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">") - let svpos = netrw#NetrwSavePosn() - let curdir = b:netrw_curdir - - " s:netrwmftgt : name of directory to copy files to - " s:netrwmfloc : =0 target directory is remote - " =1 target directory is local - if exists("s:netrwmftgt") && exists("s:netrwmfloc") -" call Decho("s:netrwmftgt<".s:netrwmftgt.">") -" call Decho("s:netrwmfloc=".s:netrwmfloc) - - for fname in s:netrwmarkfilelist -" call Decho("s:NetrwMarkFileCopy: fname<".fname.">") - - " sanity check - if (a:islocal && isdirectory(fname)) || (!a:islocal && fname =~ '/$') - call netrw#ErrorMsg(s:ERROR,"currently netrw can't copy entire directories such as <".fname.">",58) -" call Dret("s:NetrwMarkFileCopy 0 : currently netrw can't copy entire directories") - return 0 - endif - - if a:islocal && s:netrwmfloc - " local to local copy -" call Decho("local to local copy") -" call Decho("from b:netrw_curdir<".b:netrw_curdir."> fname<".fname."> to s:netrwmftgt<".s:netrwmftgt.">") - if executable(g:netrw_localcopycmd) -" call Decho("let ret= system(".g:netrw_localcopycmd." ".s:ComposePath(b:netrw_curdir,fname)." ".s:netrwmftgt.")") - let ret= system(g:netrw_localcopycmd." "." ".s:netrwmftgt) " global markfilelist verison - if v:shell_error < 0 - call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localcopycmd."> failed, aborting",54) - break - endif - else - call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localcopycmd."> is not executable!",57) - break - endif - - elseif !a:islocal && s:netrwmfloc - " remote to local copy -" call Decho("remote to local copy") -" call Decho("getcwd<".getcwd()."> b:netrw_curdir<".b:netrw_curdir.">") - call netrw#NetrwObtain(a:islocal,fname,s:netrwmftgt) - - elseif a:islocal && !s:netrwmfloc - " local to remote copy -" call Decho("local to remote copy") -" call Decho("getcwd<".getcwd()."> b:netrw_curdir<".b:netrw_curdir.">") - call s:NetrwUpload(fname,s:netrwmftgt) - - else - " remote to remote copy -" call Decho("remote to remote copy") - call s:NetrwUpload(fname,s:netrwmftgt) - endif - endfor + " sanity checks + if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) + call netrw#ErrorMsg(2,"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") + call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) +" call Dret("s:NetrwMarkFileCopy 0") + return 0 + endif +" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">") + let curdir = b:netrw_curdir + let curbufnr = bufnr("%") - " unmark all marked file lists - call s:NetrwUnmarkAll() + if a:islocal && s:netrwmftgt_islocal + " Copy marked files, local directory to local directory +" call Decho("copy from local to local") + let args= join(map(copy(s:netrwmarkfilelist_{bufnr('%')}),"b:netrw_curdir.\"/\".shellescape(v:val)")) +" call Decho("system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt).")") + call system(g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt)) + + elseif a:islocal && !s:netrwmftgt_islocal + " Copy marked files, local directory to remote directory +" call Decho("copy from local to remote") + call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) + + elseif !a:islocal && s:netrwmftgt_islocal +" call Decho("copy from remote to local") + call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt) + + elseif !a:islocal && !s:netrwmftgt_islocal +" call Decho("copy from remote to remote") + let curdir = getcwd() + let tmpdir = s:GetTempfile("") + if tmpdir !~ '/' + let tmpdir= curdir."/".tmpdir + endif + if exists("*mkdir") + call mkdir(tmpdir) else - call netrw#ErrorMsg(s:ERROR,"missing a markfile copy target! (see help for netrw-mt)",56) + exe "silent! !".g:netrw_local_mkdir.' '.shellescape(tmpdir) + endif + if isdirectory(tmpdir) + exe "keepjumps lcd ".fnameescape(tmpdir) + call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) + let localfiles= map(copy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') + call s:NetrwUpload(localfiles,s:netrwmftgt) + if getcwd() == tmpdir + for fname in s:netrwmarkfilelist_{bufnr('%')} + call s:System("delete",fname) + endfor + exe "keepjumps lcd ".fnameescape(curdir) + exe "silent !".g:netrw_local_rmdir." ".fnameescape(tmpdir) + else + exe "keepjumps lcd ".fnameescape(curdir) + endif endif + endif - " refresh the listing - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) - else - call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + " ------- + " cleanup + " ------- +" call Decho("cleanup") + + " remove markings from local buffer + call s:NetrwUnmarkList(curbufnr,curdir) + + " refresh buffers + if !s:netrwmftgt_islocal + call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) + endif + if a:islocal + call s:NetrwRefreshDir(a:islocal,b:netrw_curdir) endif + call s:LocalBrowseShellCmdRefresh() " call Dret("s:NetrwMarkFileCopy 1") return 1 @@ -4033,73 +4132,143 @@ fun! s:NetrwMarkHideSfx(islocal) endfun " --------------------------------------------------------------------- +" s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2 +" Uses the global markfilelist +fun! s:NetrwMarkFileGrep(islocal) +" call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") + let svpos = netrw#NetrwSavePosn() + let curdir = b:netrw_curdir + let curbufnr = bufnr("%") + + if exists("s:netrwmarkfilelist") +" call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") + let netrwmarkfilelist= "" + for fname in s:netrwmarkfilelist +" call Decho("fname<".fname.">") + let fname = escape(substitute(fname,"[\"']","","g")," ") + let netrwmarkfilelist = netrwmarkfilelist." ".fname + endfor + call s:NetrwUnmarkAll() + + " ask user for pattern + call inputsave() + let pat= input("Enter pattern: ","") + call inputrestore() + if pat !~ '^\s' + if pat !~ '^/' + let pat= '/'.pat.'/' + endif + let pat= " ".pat + endif + + " use vimgrep for both local and remote +" call Decho("exe vimgrep".pat." ".netrwmarkfilelist) + exe "vimgrep".pat." ".netrwmarkfilelist + + 2match none + call netrw#NetrwRestorePosn(svpos) + endif + +" call Dret("s:NetrwMarkFileGrep") +endfun + +" --------------------------------------------------------------------- " s:NetrwMarkFileMove: (invoked by mm) execute arbitrary command on marked files, one at a time {{{2 " uses the global marked file list +" s:netrwmfloc= 0: target directory is remote +" = 1: target directory is local fun! s:NetrwMarkFileMove(islocal) " call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")") + let curdir = b:netrw_curdir + let curbufnr = bufnr("%") - if exists("s:netrwmarkfilelist") - let svpos = netrw#NetrwSavePosn() - let curbufnr = bufnr("%") - let curdir = b:netrw_curdir - if exists("s:netrwmftgt") && exists("s:netrwmfloc") - - for fname in s:netrwmarkfilelist - let islocal= fname !~ '^\a\+://' -" call Decho("s:NetrwMarkFileMove: fname<".fname."> islocal=".islocal) - if islocal && s:netrwmfloc - " local to local move - " s:netrwmfloc= 0: target directory is remote - " = 1: target directory is local -" call Decho("local to local move") - if executable(g:netrw_localmovecmd) -" call Decho("let ret= system(".g:netrw_localmovecmd." ".fname." ".s:netrwmftgt.")") - let ret= system(g:netrw_localmovecmd." ".fname." ".s:netrwmftgt) - if v:shell_error < 0 - call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> failed, aborting",54) - break - endif - else - call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> is not executable!",57) - break - endif - elseif !islocal && s:netrwmfloc - " remote to local move -" call Decho("remote to local: copy and remove") -" call Decho("islocal =".islocal) -" call Decho("fname <".fname.">") -" call Decho("s:netrwmftgt<".s:netrwmftgt.">") - call netrw#NetrwObtain(islocal,fname,s:netrwmftgt) - let path = substitute(fname,'^\(.*/\)\(.\{-}\)$','\1','') - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok= s:NetrwRemoteRmFile(path,barefname,1) - elseif !islocal && s:netrwmfloc - " local to remote move -" call Decho("local to remote: copy and remove") - call s:NetrwUpload(fname,s:netrwmftgt) - let path = substitute(fname,'^\(.*/\)\(.\{-}\)$','\1','') - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok = s:NetrwLocalRmFile(path,barefname,1) - else - " remote to remote move -" call Decho("remote to remote: copy and remove") - call s:NetrwUpload(fname,s:netrwmftgt) - let path = substitute(fname,'^\(.*/\)\(.\{-}\)$','\1','') - let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') - let ok = s:NetrwRemoteRmFile(path,barefname,1) + " sanity check + if !exists("s:netrwmarkfilelist_{bufnr('%')}") || empty(s:netrwmarkfilelist_{bufnr('%')}) + call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66) +" call Dret("s:NetrwMarkFileMove") + return + endif +" call Decho("sanity chk passed: s:netrwmarkfilelist_".bufnr('%')."<".string(s:netrwmarkfilelist_{bufnr('%')})) + if !exists("s:netrwmftgt") + call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67) +" call Dret("s:NetrwMarkFileCopy 0") + return 0 + endif +" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">") + + if a:islocal && s:netrwmftgt_islocal + " move: local -> local +" call Decho("move from local to local") +" call Decho("(s:NetrwMarkFileMove) local to local move") + if executable(g:netrw_localmovecmd) + for fname in s:netrwmarkfilelist_{bufnr("%")} +" call Decho("system(".g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt).")") + let ret= system(g:netrw_localmovecmd." ".shellescape(fname)." ".shellescape(s:netrwmftgt)) + if v:shell_error < 0 + call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> failed, aborting",54) + break endif endfor - endif + else + call netrw#ErrorMsg(s:ERROR,"command<".g:netrw_localmovecmd."> is not executable!",57) + endif + + elseif a:islocal && !s:netrwmftgt_islocal + " move: local -> remote +" call Decho("move from local to remote") +" call Decho("copy") + let mflist= s:netrwmarkfilelist_{bufnr("%")} + call s:NetrwMarkFileCopy(a:islocal) +" call Decho("remove") + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist + + elseif !a:islocal && s:netrwmftgt_islocal + " move: remote -> local +" call Decho("move from remote to local") +" call Decho("copy") + let mflist= s:netrwmarkfilelist_{bufnr("%")} + call s:NetrwMarkFileCopy(a:islocal) +" call Decho("remove") + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist + + elseif !a:islocal && !s:netrwmftgt_islocal + " move: remote -> remote +" call Decho("move from remote to remote") +" call Decho("copy") + let mflist= s:netrwmarkfilelist_{bufnr("%")} + call s:NetrwMarkFileCopy(a:islocal) +" call Decho("remove") + for fname in mflist + let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','') + let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1) + endfor + unlet mflist + endif - " unmark marked file lists - call s:NetrwUnmarkAll() + " ------- + " cleanup + " ------- +" call Decho("cleanup") - " refresh the listing and restore cursor position - call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - call netrw#NetrwRestorePosn(svpos) - else - call netrw#ErrorMsg(s:ERROR,"no files marked!",59) + " remove markings from local buffer + call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer + + " refresh buffers + if !s:netrwmftgt_islocal + call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt) + endif + if a:islocal + call s:NetrwRefreshDir(a:islocal,b:netrw_curdir) endif + call s:LocalBrowseShellCmdRefresh() " call Dret("s:NetrwMarkFileMove") endfun @@ -4124,8 +4293,9 @@ fun! s:NetrwMarkFilePrint(islocal) endif 1split " the autocmds will handle both local and remote files - exe "silent e ".fname -" call Decho("hardcopy ".fname) +" call Decho("exe silent e ".escape(fname,' ')) + exe "silent e ".escape(fname,' ') +" call Decho("hardcopy") hardcopy q endfor @@ -4148,6 +4318,7 @@ fun! s:NetrwMarkFileRegexp(islocal) if a:islocal " get the matching list of files using local glob() +" call Decho("handle local regexp") let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) let filelist = glob(s:ComposePath(dirname,regexp)) if filelist != "" @@ -4169,6 +4340,7 @@ fun! s:NetrwMarkFileRegexp(islocal) endwhile else +" call Decho("handle remote regexp") " convert displayed listing into a filelist let eikeep = &ei @@ -4191,6 +4363,9 @@ fun! s:NetrwMarkFileRegexp(islocal) silent %s/^| //e silent! g/^ .*$/d endif + " convert regexp into the more usual glob-style format + let regexp= substitute(regexp,'\*','.*','g') +" call Decho("regexp<".regexp.">") exe "silent! v/".escape(regexp,'/')."/d" let filelist= getline(1,line("$")) q! @@ -4224,7 +4399,8 @@ fun! s:NetrwMarkFileSource(islocal) let fname= curdir.fname endif " the autocmds will handle sourcing both local and remote files - exe "so ".fname +" call Decho("exe so ".escape(fname,' ')) + exe "so ".escape(fname,' ') endfor 2match none endif @@ -4256,9 +4432,7 @@ fun! s:NetrwMarkFileTag(islocal) if a:islocal if executable(g:netrw_ctags) - if g:netrw_shq != "'" - let netrwmarkfilelist= substitute(netrwmarkfilelist,"'",g:netrw_shq,'g') - endif + call map(netrwmarkfilelist,"shellescape(v:val)") " call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")") call system(g:netrw_ctags." ".netrwmarkfilelist) else @@ -4287,13 +4461,16 @@ endfun " s:NetrwMarkFileTgt: (invoked by mt) This function sets up a marked file target {{{2 " Sets up two variables, " s:netrwmftgt : holds the target directory -" s:netrwmfloc : 0=target directory is remote +" s:netrwmftgt_islocal : 0=target directory is remote " 1=target directory is local fun! s:NetrwMarkFileTgt(islocal) " call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() let curdir = b:netrw_curdir let hadtgt = exists("s:netrwmftgt") + if !exists("w:netrw_bannercnt") + let w:netrw_bannercnt= b:netrw_bannercnt + endif " set up target if line(".") < w:netrw_bannercnt @@ -4302,14 +4479,17 @@ fun! s:NetrwMarkFileTgt(islocal) " call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">") else - " get word under cursor. - " * If directory, use it for the target. - " * If file, use b:netrw_curdir for the target + " get word under cursor. + " * If directory, use it for the target. + " * If file, use b:netrw_curdir for the target let curword= s:NetrwGetWord() let tgtdir = s:ComposePath(curdir,curword) - if isdirectory(tgtdir) + if a:islocal && isdirectory(tgtdir) let s:netrwmftgt = tgtdir -" call Decho("isdir: s:netrwmftgt<".s:netrwmftgt.">") +" call Decho("local isdir: s:netrwmftgt<".s:netrwmftgt.">") + elseif !a:islocal && tgtdir =~ '/$' + let s:netrwmftgt = tgtdir +" call Decho("remote isdir: s:netrwmftgt<".s:netrwmftgt.">") else let s:netrwmftgt = curdir " call Decho("isfile: s:netrwmftgt<".s:netrwmftgt.">") @@ -4321,9 +4501,10 @@ fun! s:NetrwMarkFileTgt(islocal) " call Decho("simplify: s:netrwmftgt<".s:netrwmftgt.">") endif if g:netrw_cygwin - let s:netrwmftgt= substitute(system("cygpath ".s:netrwmftgt),'\n$','','') + let s:netrwmftgt= substitute(system("cygpath ".shellescape(s:netrwmftgt)),'\n$','','') + let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','') endif - let s:netrwmfloc= a:islocal + let s:netrwmftgt_islocal= a:islocal if g:netrw_fastbrowse > 0 call s:LocalBrowseShellCmdRefresh() @@ -4334,7 +4515,7 @@ fun! s:NetrwMarkFileTgt(islocal) norm! j endif -" call Dret("s:NetrwMarkFileTgt") +" call Dret("s:NetrwMarkFileTgt : netrwmftgt<".(exists("s:netrwmftgt")? s:netrwmftgt : "").">") endfun " --------------------------------------------------------------------- @@ -4343,18 +4524,22 @@ fun! s:NetrwUnmarkList(curbufnr,curdir) " call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)") " remove all files in local marked-file list from global list - for mfile in s:netrwmarkfilelist_{a:curbufnr} - let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile - let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile - call remove(s:netrwmarkfilelist,idx) " remove from global list - endfor - if s:netrwmarkfilelist == [] - unlet s:netrwmarkfilelist + if exists("s:netrwmarkfilelist_{a:curbufnr}") + for mfile in s:netrwmarkfilelist_{a:curbufnr} + let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile + let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile + call remove(s:netrwmarkfilelist,idx) " remove from global list + endfor + if s:netrwmarkfilelist == [] + unlet s:netrwmarkfilelist + endif + + " getting rid of the local marked-file lists is easy + unlet s:netrwmarkfilelist_{a:curbufnr} + endif + if exists("s:netrwmarkfilemtch_{a:curbufnr}") + unlet s:netrwmarkfilemtch_{a:curbufnr} endif - - " getting rid of the local marked-file lists is easy - unlet s:netrwmarkfilelist_{a:curbufnr} - unlet s:netrwmarkfilemtch_{a:curbufnr} 2match none " call Dret("s:NetrwUnmarkList") endfun @@ -4411,7 +4596,7 @@ fun! s:NetrwUnMarkFile(islocal) " call Dret("s:NetrwUnMarkFile") endfun -" =========================================== +" --------------------------------------------------------------------- " s:NetrwMenu: generates the menu for gvim and netrw {{{2 fun! s:NetrwMenu(domenu) @@ -4431,14 +4616,16 @@ fun! s:NetrwMenu(domenu) exe 'silent! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' exe 'silent! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' exe 'silent! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directorymb mb' - exe 'silent! menu '.g:NetrwMenuPriority.'.8.2 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Bookmarkgb gb' - exe 'silent! menu '.g:NetrwMenuPriority.'.8.3 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' - exe 'silent! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' - exe 'silent! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' + exe 'silent! menu '.g:NetrwMenuPriority.'.8.2 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ DeletemB mB' + exe 'silent! menu '.g:NetrwMenuPriority.'.8.3 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Bookmarkgb gb' + exe 'silent! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)u u' + exe 'silent! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)U U' + exe 'silent! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Listqb qb' exe 'silent! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List'." \NetrwHideEdit" exe 'silent! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ SequenceS S' - exe 'silent! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \NetrwRefresh" - exe 'silent! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" + exe 'silent! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files'."gh gh" + exe 'silent! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing'." \NetrwRefresh" + exe 'silent! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options:NetrwSettings '.":NetrwSettings\" exe 'silent! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' exe 'silent! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window '."\" exe 'silent! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directoryp p' @@ -4495,24 +4682,16 @@ fun! s:NetrwMenu(domenu) endfun -" ========================================== +" --------------------------------------------------------------------- " s:NetrwObtain: obtain file under cursor or from markfile list {{{2 +" Used by the O maps (as NetrwObtain()) fun! s:NetrwObtain(islocal) " call Dfunc("NetrwObtain(islocal=".a:islocal.")") if exists("s:netrwmarkfilelist_{bufnr('%')}") - for fname in s:netrwmarkfilelist_{bufnr("%")} - let islocal= fname !~ '^\a\+://' - call netrw#NetrwObtain(islocal,fname) - endfor + let islocal= s:netrwmarkfilelist_{bufnr("%")}[1] !~ '^\a\+://' + call netrw#NetrwObtain(islocal,s:netrwmarkfilelist_{bufnr("%")}) call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) - endif - if exists("s:netrwmarkfilelist") - for fname in s:netrwmarkfilelist - let islocal= fname !~ '^\a\+://' - call netrw#NetrwObtain(islocal,fname) - endfor - call s:NetrwUnmarkAll() else call netrw#NetrwObtain(a:islocal,expand("")) endif @@ -4522,18 +4701,49 @@ endfun " --------------------------------------------------------------------- " netrw#NetrwObtain: {{{2 +" netrw#NetrwObtain(islocal,fname[,tgtdirectory]) +" islocal=0 obtain from remote source +" =1 obtain from local source +" fname : a filename or a list of filenames +" tgtdir : optional place where files are to go (not present, uses getcwd()) fun! netrw#NetrwObtain(islocal,fname,...) -" call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".a:fname.">) a:0=".a:0) +" call Dfunc("netrw#NetrwObtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0) " NetrwStatusLine support - for obtaining support - if a:islocal + if type(a:fname) == 1 + let fnamelist= [ a:fname ] + elseif type(a:fname) == 3 + let fnamelist= a:fname + else + call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62) +" call Dret("netrw#NetrwObtain") + return + endif +" call Decho("fnamelist<".string(fnamelist).">") + if a:0 > 0 + let tgtdir= a:1 + else + let tgtdir= getcwd() + endif +" call Decho("tgtdir<".tgtdir.">") - " obtain local file from getcwd() to b:netrw_curdir -" call Decho("obtain local file from ".getcwd()." to b:netrw_curdir<".b:netrw_curdir.">") + if a:islocal + " obtain a file from b:netrw_curdir to getcwd() +" call Decho("obtain a local file from ".b:netrw_curdir." to ".tgtdir if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir - let fname= expand("") - let fcopy= readfile(b:netrw_curdir."/".fname,"b") - call writefile(fcopy,getcwd()."/".fname,"b") + let topath= s:ComposePath(tgtdir,"") + if (has("win32") || has("win95") || has("win64") || has("win16")) + " transfer files one at time + for fname in fnamelist +" call Decho("system(".g:netrw_localcopycmd." ".fname." ".shellescape(topath).")") + call system(g:netrw_localcopycmd." ".fname." ".shellescape(topath)) + endfor + else + " transfer files with one command + let filelist= join(map(copy(fname),"shellescape(v:val)")) +" call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")") + call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) + endif elseif !exists("b:netrw_curdir") call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) else @@ -4541,166 +4751,144 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif else +" call Decho("obtain a remote file from ".b:netrw_curdir." to ".tgtdir) + if type(a:fname) == 1 + call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) + endif + call s:NetrwMethod(b:netrw_curdir) - " obtain a remote file to local directory (see tgtdir below) -" call Decho("obtain a remote file to local directory<".getcwd().">") - call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) - - " set up target directory (default is vim's idea of the current directory) - if a:0 > 0 - let tgtdir= a:1 - else - let tgtdir= getcwd() - endif -" call Decho("obtain a remote file<".a:fname."> to tgtdir<".tgtdir.">") - if exists("w:netrw_method") && w:netrw_method =~ '[235]' -" call Decho("method=".w:netrw_method) - if executable("ftp") -" call Decho("using ftp, method=".w:netrw_method) - let curdir = b:netrw_curdir - let path = substitute(curdir,'ftp://[^/]\+/','','e') - let curline= line(".") - let endline= line("$")+1 - setlocal ma noro -" call Decho("setlocal ma noro") - keepjumps $ -" call Decho("getcwd<".getcwd().">") -" call Decho("curdir<".curdir.">") -" call Decho("path<".path.">") -" call Decho("curline=".curline) -" call Decho("endline=".endline) - - "......................................... - if w:netrw_method == 2 - " ftp + <.netrc>: Method #2 - setlocal ff=unix - if path != "" - put ='cd '.path -" call Decho("ftp: cd ".path) - endif - if tgtdir != '.' - put ='lcd '.tgtdir - endif - put ='get '.a:fname -" call Decho("ftp: get ".a:fname) - put ='quit' -" call Decho("ftp: quit") - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port - else -" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine - endif + if b:netrw_method == 4 + " obtain file using scp +" call Decho("obtain via scp (method#4)") + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + if b:netrw_fname =~ '/' + let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','') + else + let path= "" + endif + let filelist= join(map(copy(fnamelist),'shellescape(g:netrw_machine.":".escape(path.v:val,g:netrw_fname_escape))')) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".filelist." ".shellescape(tgtdir)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".filelist." ".shellescape(tgtdir) - "......................................... - elseif w:netrw_method == 3 - " ftp + machine,id,passwd,filename: Method #3 + elseif b:netrw_method == 2 + " obtain file using ftp + .netrc +" call Decho("obtain via ftp+.netrc (method #2)") + call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") setlocal ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho('ftp: open '.g:netrw_machine.' '.g:netrw_port) - else - put ='open '.g:netrw_machine -" call Decho('ftp: open '.g:netrw_machine) + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + exe "put ='".g:netrw_ftpmode."'" +" call Decho("filter input: ".getline('$')) endif - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - put =g:netrw_uid - put ='\"'.s:netrw_passwd.'\"' -" call Decho('ftp: g:netrw_uid') -" call Decho('ftp: s:netrw_passwd') - else - put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' -" call Decho('user '.g:netrw_uid.' '.s:netrw_passwd) + if exists("b:netrw_fname") && b:netrw_fname != "" + call setline(line("$")+1,'cd "'.b:netrw_fname.'"') +" call Decho("filter input: ".getline('$')) endif - if path != "" - put ='cd '.path -" call Decho('ftp: cd '.a:path) - endif - if tgtdir != '.' - put ='lcd '.tgtdir -" call Decho('ftp: lcd '.tgtdir) - endif - put ='get '.a:fname -" call Decho("ftp: get ".a:fname) - put ='quit' -" call Decho("ftp: quit") + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline('$')) + endif + for fname in fnamelist + call setline(line("$")+1,'get "'.fname.'"') +" call Decho("filter input: ".getline('$')) + endfor + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + else +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep= &debug + setlocal debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),4) + let &debug= debugkeep + endif - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password -" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i -n" + elseif b:netrw_method == 3 + " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc) +" call Decho("obtain via ftp+mipf (method #3)") + call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setlocal ff=unix - "......................................... + if exists("g:netrw_port") && g:netrw_port != "" + put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho("filter input: ".getline('$')) else - call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",28) - endif - " restore - exe "silent! ".endline.",$d" - exe "keepjumps ".curline - setlocal noma nomod ro - else -" call Decho("ftp not executable") - if !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"this system doesn't support ftp",29) - endif - " restore status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - " restore NetrwMethod - if exists("keep_netrw_method") - call s:NetrwMethod(keep_netrw_choice) - let w:netrw_method = keep_netrw_wmethod + put ='open '.g:netrw_machine +" call Decho("filter input: ".getline('$')) endif -" call Dret("NetrwObtain") - return - endif - "......................................... - else - " scp: Method#4 - let curdir = b:netrw_curdir - let path = substitute(curdir,'scp://[^/]\+/','','e') - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + put =g:netrw_uid +" call Decho("filter input: ".getline('$')) + put ='\"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('$')) else - let useport= "" + put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('$')) endif - if a:fname =~ '^\a\+:' - let fname= substitute(a:fname,'^.*/','','') - else - let fname= a:fname + + if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" + put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) endif - if path !~ '/$' - let path= path.'/' + + if exists("b:netrw_fname") && b:netrw_fname != "" + call setline(line("$")+1,'cd "'.b:netrw_fname.'"') +" call Decho("filter input: ".getline('$')) endif -" call Decho("using scp: curdir <".curdir.">") -" call Decho("using scp: fname <".fname.">") -" call Decho("using scp: machine<".g:netrw_machine.">") -" call Decho("using scp: path <".path.">") -" call Decho("using scp: pwd <".getcwd().">") -" call Decho("using scp: tgtdir <".tgtdir.">") -" call Decho("using scp: useport<".useport.">") -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ".tgtdir) - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ".tgtdir + + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline('$')) endif - " restore status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls -" redraw! + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline('$')) + endif + for fname in fnamelist + call setline(line("$")+1,'get "'.fname.'"') + endfor +" call Decho("filter input: ".getline('$')) - " restore NetrwMethod - if exists("keep_netrw_method") - call s:NetrwMethod(keep_netrw_choice) - let w:netrw_method = keep_netrw_wmethod + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + norm! 1Gdd +" call Decho("executing: %!".g:netrw_ftp_cmd." -i -n") + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + if getline(1) !~ "^$" +" call Decho("error<".getline(1).">") + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,getline(1),5) + endif endif endif + endif + + " cleanup + if exists("tmpbufnr") + if bufnr("%") != tmpbufnr + exe tmpbufnr."bw!" + else + q! + endif + endif + " call Dret("netrw#NetrwObtain") endfun @@ -4810,27 +4998,176 @@ endfun " --------------------------------------------------------------------- " s:NetrwUpload: load fname to tgt (used by NetrwMarkFileCopy()) {{{2 -" fname may itself be a remote or local file -" tgt is assumed to be remote, so NetWrite will be used -" (indirectly via an autocmd) -fun! s:NetrwUpload(fname,tgt) -" call Dfunc("s:NetrwUpload(fname<".a:fname."> tgt<".a:tgt.">)") - - 1split - let efname= escape(a:fname,g:netrw_fname_escape) -" call Decho("exe e ".efname) - exe "e ".efname - if a:tgt =~ '/$' - let wfname= substitute(a:fname,'^.*/','','') - let wfname= escape(a:tgt.wfname,g:netrw_fname_escape) -" call Decho("exe w ".wfname) - exe "w ".wfname +" Always assumed to be local -> remote +" call s:NetrwUpload(filename, target) +" call s:NetrwUpload(filename, target, fromdirectory) +fun! s:NetrwUpload(fname,tgt,...) +" call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0) + + if a:tgt =~ '^\a\+://' + let tgtdir= substitute(a:tgt,'^\a\+://[^/]\+/\(.\{-}\)$','\1','') else - let wfname= escape(a:tgt,g:netrw_fname_escape) -" call Decho("exe w ".wfname) - exe "w ".wfname + let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','') + endif +" call Decho("tgtdir<".tgtdir.">") + + if a:0 > 0 + let fromdir= a:1 + else + let fromdir= getcwd() + endif +" call Decho("fromdir<".fromdir.">") + + if type(a:fname) == 1 + " handle uploading a single file using NetWrite +" call Decho("handle uploading a single file via NetWrite") + 1split + let efname= escape(a:fname,g:netrw_fname_escape) +" call Decho("exe e ".efname) + exe "e ".efname +" call Decho("now locally editing<".expand("%").">, has ".line("$")." lines") + if a:tgt =~ '/$' + let wfname= substitute(a:fname,'^.*/','','') + let wfname= escape(a:tgt.wfname,g:netrw_fname_escape) +" call Decho("exe w! ".wfname) + exe "w! ".wfname + else + let wfname= escape(a:tgt,g:netrw_fname_escape) +" call Decho("writing local->remote: exe w ".wfname) + exe "w ".wfname +" call Decho("done writing local->remote") + endif + q! + + elseif type(a:fname) == 3 + " handle uploading a list of files via scp +" call Decho("handle uploading a list of files via scp") + let curdir= getcwd() + if a:tgt =~ '^scp:' + exe "keepjumps silent lcd ".fnameescape(fromdir) + let filelist= copy(s:netrwmarkfilelist_{bufnr('%')}) + let args = join(map(filelist,"shellescape(v:val)")) + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " ".g:netrw_scpport." ".g:netrw_port + else + let useport= "" + endif + let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') + let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".args." ".shellescape(machine.":".escape(tgt,g:netrw_fname_escape))) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".args." ".shellescape(machine.":".escape(tgt,g:netrw_fname_escape)) + exe "keepjumps silent lcd ".fnameescape(curdir) + + elseif a:tgt =~ '^ftp:' + call s:NetrwMethod(a:tgt) + + if b:netrw_method == 2 + " handle uploading a list of files via ftp+.netrc + let netrw_fname = b:netrw_fname + silent keepjumps new +" call Decho("filter input window#".winnr()) + + exe "put ='".g:netrw_ftpmode."'" +" call Decho("filter input: ".getline('$')) + + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline('$')) + endif + + call setline(line("$")+1,'lcd "'.fromdir.'"') +" call Decho("filter input: ".getline('$')) + + call setline(line("$")+1,'cd "'.tgtdir.'"') +" call Decho("filter input: ".getline('$')) + + for fname in a:fname + call setline(line("$")+1,'put "'.fname.'"') +" call Decho("filter input: ".getline('$')) + endfor + + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + else +" call Decho("filter input window#".winnr()) +" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine + endif + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + silent g/Local directory now/d + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + call netrw#ErrorMsg(s:ERROR,getline(1),14) + else + bw!|q + endif + + elseif b:netrw_method == 3 + " upload with ftp + machine, id, passwd, and fname (ie. no .netrc) + let netrw_fname= b:netrw_fname + call s:SaveBufVars()|silent keepjumps new|call s:RestoreBufVars() + let tmpbufnr= bufnr("%") + setlocal ff=unix + + if exists("g:netrw_port") && g:netrw_port != "" + put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho("filter input: ".getline('$')) + else + put ='open '.g:netrw_machine +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + put =g:netrw_uid +" call Decho("filter input: ".getline('$')) + call setline(line("$")+1,'"'.s:netrw_passwd.'"') +" call Decho("filter input: ".getline('$')) + else + put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"' +" call Decho("filter input: ".getline('$')) + endif + + call setline(line("$")+1,'lcd "'.fromdir.'"') +" call Decho("filter input: ".getline('$')) + + if exists("b:netrw_fname") && b:netrw_fname != "" + call setline(line("$")+1,'cd "'.b:netrw_fname.'"') +" call Decho("filter input: ".getline('$')) + endif + + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline('$')) + endif + + for fname in a:fname + call setline(line("$")+1,'put "'.fname.'"') +" call Decho("filter input: ".getline('$')) + endfor + + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password + norm! 1Gdd +" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n") + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n" + " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) + silent g/Local directory now/d + if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' + let debugkeep= &debug + setlocal debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),15) + let &debug = debugkeep + let mod = 1 + else + bw!|q + endif + endif + else + call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63) + endif endif - q! " call Dret("s:NetrwUpload") endfun @@ -4886,6 +5223,39 @@ fun! s:NetrwRefresh(islocal,dirname) endfun " --------------------------------------------------------------------- +" s:NetrwRefreshDir: refreshes a directory by name {{{2 +" Called by NetrwMarkFileCopy() +" Interfaces to s:NetrwRefresh() and s:LocalBrowseShellCmdRefresh() +fun! s:NetrwRefreshDir(islocal,dirname) +" call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) fastbrowse=".g:netrw_fastbrowse) + if g:netrw_fastbrowse == 0 + " slowest mode (keep buffers refreshed, local or remote) +" call Decho("slowest mode: keep buffers refreshed, local or remote") + let tgtwin= bufwinnr(a:dirname) +" call Decho("tgtwin= bufwinnr(".a:dirname.")=".tgtwin) + + if tgtwin > 0 + " tgtwin is being displayed, so refresh it + let curwin= winnr() +" call Decho("refresh tgtwin#".tgtwin." (curwin#".curwin.")") + exe tgtwin."wincmd w" + call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) + exe curwin."wincmd w" + + elseif bufnr(a:dirname) > 0 + let bn= bufnr(a:dirname) +" call Decho("bd bufnr(".a:dirname.")=".bn) + exe "silent bd ".bn + endif + + elseif g:netrw_fastbrowse <= 1 +" call Decho("medium-speed mode: refresh local buffers only") + call s:LocalBrowseShellCmdRefresh() + endif +" call Dret("s:NetrwRefreshDir") +endfun + +" --------------------------------------------------------------------- " s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2 " What this function does is to compute a priority for the patterns " in the g:netrw_sort_sequence. It applies a substitute to any @@ -4913,13 +5283,13 @@ fun! s:NetrwSetSort() let seq = seqlist let seqlist = "" endif - let eseq= escape(seq,'/') + let sepchr= "\" if priority < 10 - let spriority= "00".priority.'\/' + let spriority= "00".priority.sepchr elseif priority < 100 - let spriority= "0".priority.'\/' + let spriority= "0".priority.sepchr else - let spriority= priority.'\/' + let spriority= priority.sepchr endif " call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">") @@ -4932,13 +5302,15 @@ fun! s:NetrwSetSort() if seq == '*' let starpriority= spriority else - exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/' - exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^\d\{3}\/\d\{3}\//s/^\d\{3}\///' + exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/' + " sometimes multiple sorting patterns will match the same file or directory. + " The following substitute is intended to remove the excess matches. + exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^\d\{3}'.sepchr.'\d\{3}\//s/^\d\{3}'.sepchr.'\(\d\{3}\/\).\@=/\1/e' endif let priority = priority + 1 endwhile if exists("starpriority") - exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.starpriority.'/' + exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}'.sepchr.'/s/^/'.starpriority.'/' endif " Following line associated with priority -- items that satisfy a priority @@ -4947,7 +5319,7 @@ fun! s:NetrwSetSort() " priority pattern needs to be retained. So, at this point, these excess " priority prefixes need to be removed, but not directories that happen to " be just digits themselves. - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+\ze./\1/e' + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}'.sepchr.'\)\%(\d\{3}'.sepchr.'\)\+\ze./\1/e' " call Dret("SetSort") endfun @@ -5082,7 +5454,7 @@ endfun " s:NetrwTreeDir: determine tree directory given current cursor position {{{2 " (full path directory with trailing slash returned) fun! s:NetrwTreeDir() -" call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline(".")."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") +" call Dfunc("NetrwTreeDir() curline#".line(".")."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">") let treedir= b:netrw_curdir " call Decho("set initial treedir<".treedir.">") @@ -5120,7 +5492,7 @@ fun! s:NetrwTreeDir() " construct treedir by searching backwards at correct depth " call Decho("constructing treedir<".treedir."> depth<".depth.">") while depth != "" && search('^'.depth.'[^|].\{-}/$','bW') - let dirname= substitute(getline("."),'^\(| \)*','','e') + let dirname= substitute(getline('.'),'^\(| \)*','','e') let treedir= dirname.treedir let depth = substitute(depth,'^| ','','') " call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") @@ -5352,12 +5724,13 @@ fun! s:PerformListing(islocal) exe "keepjumps ".w:netrw_bannercnt " show copy/move target, if any - if exists("s:netrwmftgt") && exists("s:netrwmfloc") + if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") " call Decho("show copy/move target<".s:netrwmftgt.">") - if s:netrwmfloc - keepjumps put ='\" Copy/Move Tgt: '.s:netrwmftgt.' (local)' + keepjumps put ='' + if s:netrwmftgt_islocal + call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)') else - keepjumps put ='\" Copy/Move Tgt: '.s:netrwmftgt.' (remote)' + call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (remote)') endif let w:netrw_bannercnt= w:netrw_bannercnt + 1 else @@ -5429,7 +5802,8 @@ fun! s:PerformListing(islocal) endif " remove priority pattern prefix " call Decho("remove priority pattern prefix") - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e' + let sepchr= "\" + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}'.sepchr.'//e' elseif a:islocal if w:netrw_bannercnt < line("$") @@ -5619,12 +5993,12 @@ fun! s:NetrwRemoteListing() else " use ssh to get remote file listing {{{3 -" call Decho("use ssh to get remote file listing: s:netrw_shq<".g:netrw_shq."> s:path<".s:path."> g:netrw_cd_escape<".g:netrw_cd_escape.">") +" call Decho("use ssh to get remote file listing: s:path<".s:path.">") let listcmd= s:MakeSshCmd(g:netrw_list_cmd) " call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)") if g:netrw_scp_cmd =~ '^pscp' -" call Decho("1: exe silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq) - exe "silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq +" call Decho("1: exe silent r! ".listcmd.shellescape(s:path)) + exe "silent r! ".listcmd.shellescape(s:path) " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like g/^Listing directory/d g/^d[-rwx][-rwx][-rwx]/s+$+/+e @@ -5637,8 +6011,9 @@ fun! s:NetrwRemoteListing() " call Decho("2: exe silent r! ".listcmd) exe "silent r! ".listcmd else -" call Decho("3: exe silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq) - exe "silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq +" call Decho("3: exe silent r! ".listcmd.' "'.shellescape(s:path).'"') + exe "silent r! ".listcmd.' "'.shellescape(s:path).'"' +" call Decho("listcmd<".listcmd."> path<".s:path.">") endif endif @@ -5656,7 +6031,7 @@ fun! s:NetrwRemoteListing() if s:method == "ftp" " cleanup exe "keepjumps ".w:netrw_bannercnt - while getline(".") =~ g:netrw_ftp_browse_reject + while getline('.') =~ g:netrw_ftp_browse_reject keepjumps d endwhile " if there's no ../ listed, then put ./ and ../ in @@ -5753,6 +6128,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) " call Decho("attempt to remove file (all=".all.")") if !all echohl Statement +" call Decho("case all=0:") call inputsave() let ok= input("Confirm deletion of file<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") call inputrestore() @@ -5767,10 +6143,17 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) endif if all || ok =~ 'y\%[es]' || ok == "" +" call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : "")) if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) +" call Decho("case ftp:") + let path= a:path + if path =~ '^\a\+://' + let path= substitute(path,'^\a\+://[^/]\+/','','') + endif silent! keepjumps .,$d - call s:NetrwRemoteFtpCmd(a:path,"delete ".a:rmfile) + call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"') else +" call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">") let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd) " call Decho("netrw_rm_cmd<".netrw_rm_cmd.">") if !exists("b:netrw_curdir") @@ -5782,9 +6165,9 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) " call Decho("remotedir<".remotedir.">") " call Decho("rmfile<".a:rmfile.">") if remotedir != "" - let netrw_rm_cmd= netrw_rm_cmd." ".remotedir.escape(a:rmfile,g:netrw_cd_escape) + let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(remotedir.a:rmfile)) else - let netrw_rm_cmd= netrw_rm_cmd." ".escape(a:rmfile,g:netrw_cd_escape) + let netrw_rm_cmd= netrw_rm_cmd." ".shellescape(fnameescape(a:rmfile)) endif " call Decho("call system(".netrw_rm_cmd.")") let ret= system(netrw_rm_cmd) @@ -5795,6 +6178,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) endif endif elseif ok =~ 'q\%[uit]' +" call Decho("ok==".ok) break endif @@ -5873,16 +6257,16 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) endif if exists("g:netrw_ftpextracmd") exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif - exe "put ='".a:listcmd."'" + call setline(line("$")+1,a:listcmd) " exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else -" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif "......................................... @@ -5907,17 +6291,17 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) endif if exists("g:netrw_ftpextracmd") exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline(".")) +" call Decho("filter input: ".getline('.')) endif - exe "put ='".a:listcmd."'" + call setline(line("$")+1,a:listcmd) " perform ftp: " -i : turns off interactive prompting from ftp " -n unix : DON'T use <.netrc>, even though it exists " -n win32: quit being obnoxious about password " exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' -" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n" +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n") + exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n" "......................................... else @@ -5986,8 +6370,8 @@ fun! s:NetrwRemoteRename(usrhost,path) range else let oldname= a:path.oldname let newname= a:path.newname -" call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,g:netrw_cd_escape).'"') - let ret= s:System("system",rename_cmd.' "'.escape(oldname,g:netrw_cd_escape).'" "'.escape(newname,g:netrw_cd_escape).'"') +" call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"') + let ret= s:System("system",rename_cmd.' "'.fnameescape(oldname).'" "'.fnameescape(newname).'"') endif endfor @@ -6011,8 +6395,8 @@ fun! s:NetrwRemoteRename(usrhost,path) range else let oldname= a:path.oldname let newname= a:path.newname -" call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,g:netrw_cd_escape).'"') - let ret= s:System("system",rename_cmd.' "'.escape(oldname,g:netrw_cd_escape).'" "'.escape(newname,g:netrw_cd_escape).'"') +" call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"') + let ret= s:System("system",rename_cmd.' "'.fnameescape(oldname).'" "'.fnameescape(newname).'"') endif let ctr= ctr + 1 @@ -6040,10 +6424,9 @@ fun! netrw#LocalBrowseCheck(dirname) " The &ft == "netrw" test was installed because the BufEnter event " would hit when re-entering netrw windows, creating unexpected " refreshes (and would do so in the middle of NetrwSaveOptions(), too) -" call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">") -" call Decho("isdir=".isdirectory(a:dirname)) +" call Decho("netrw#LocalBrowseCheck: isdir<".a:dirname.">=".isdirectory(a:dirname)) if isdirectory(a:dirname) -" call Decho(" ft=".&ft." b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")) +" call Decho(" ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")) if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) silent! call s:NetrwBrowse(1,a:dirname) elseif &ft == "netrw" && line("$") == 1 @@ -6051,7 +6434,6 @@ fun! netrw#LocalBrowseCheck(dirname) endif endif " not a directory, ignore it -" call Dret("netrw#LocalBrowseCheck") endfun " --------------------------------------------------------------------- @@ -6068,7 +6450,7 @@ fun! s:LocalListing() " get the list of files contained in the current directory let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) - let dirnamelen = s:Strlen(b:netrw_curdir) + let dirnamelen = strlen(b:netrw_curdir) let filelist = glob(s:ComposePath(dirname,"*")) " call Decho("glob(dirname<".dirname."/*>)=".filelist) if filelist != "" @@ -6081,22 +6463,14 @@ fun! s:LocalListing() " or include ./ if not present if filelist =~ '[\\/]\.[\\/]\=\(\n\|$\)' " elide /path/. from glob() entries if present +" call Decho("elide /path/. from glob entries if present") let filelist = substitute(filelist,'\n','\t','g') let filelist = substitute(filelist,'^[^\t]\+[/\\]\.\t','','') let filelist = substitute(filelist,'[^\t]\+[/\\]\.$','','') let filelist = substitute(filelist,'\t\zs[^\t]\+[/\\]\.\t','','') let filelist = substitute(filelist,'\t','\n','g') endif -" if filelist !~ '[\\/]\.[\\/]\=\(\n\|$\)' - " include ./ in the glob() entry if its missing -" call Decho("forcibly tacking on .") -" if filelist == "" -" let filelist= s:ComposePath(dirname,"./") -" else -" let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"./") -" endif " call Decho("filelist<".filelist.">") -" endif if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)' " include ../ in the glob() entry if its missing " call Decho("forcibly tacking on ..") @@ -6105,21 +6479,24 @@ fun! s:LocalListing() endif if b:netrw_curdir == '/' " remove .. from filelist when current directory is root directory - let filelist= substitute(filelist,'/\.\.\n','','') " call Decho("remove .. from filelist") + let filelist= substitute(filelist,'/\.\.\n','','') endif + " remove multiple contiguous newlines let filelist= substitute(filelist,'\n\{2,}','\n','ge') if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) " change all \s to /s +" call Decho('change all \s to /s') let filelist= substitute(filelist,'\','/','g') else " escape all \s to \\ +" call Decho('escape all \s to \\') let filelist= substitute(filelist,'\','\\','g') endif -" call Decho("dirname<".dirname.">") -" call Decho("dirnamelen<".dirnamelen.">") -" call Decho("filelist<".filelist.">") +" call Decho("(before while) dirname<".dirname.">") +" call Decho("(before while) dirnamelen<".dirnamelen.">") +" call Decho("(before while) filelist<".filelist.">") while filelist != "" if filelist =~ '\n' @@ -6129,13 +6506,30 @@ fun! s:LocalListing() let filename = filelist let filelist = "" endif - if filename !~ '/\.$' && filename !~ '/\.\.$' && fnamemodify(filename,"") != resolve(filename) +" call Decho(" ") +" call Decho("(while) filelist<".filelist.">") +" call Decho("(while) filename<".filename.">") + + if getftype(filename) == "link" " indicate a symbolic link " call Decho("indicate <".filename."> is a symbolic link with trailing @") let pfile= filename."@" + + elseif getftype(filename) == "socket" + " indicate a socket +" call Decho("indicate <".filename."> is a socket with trailing =") + let pfile= filename."=" + + elseif getftype(filename) == "fifo" + " indicate a fifo +" call Decho("indicate <".filename."> is a fifo with trailing |") + let pfile= filename."|" + elseif isdirectory(filename) + " indicate a directory " call Decho("indicate <".filename."> is a directory with trailing /") let pfile= filename."/" + elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(filename) if (has("win32") || has("win95") || has("win64") || has("win16")) if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$' @@ -6154,15 +6548,19 @@ fun! s:LocalListing() " normal file let pfile= filename endif + else + " normal file let pfile= filename endif +" call Decho("pfile<".pfile."> (after *@/ appending)") + if pfile =~ '//$' let pfile= substitute(pfile,'//$','/','e') +" call Decho("change // to /: pfile<".pfile.">") endif let pfile= strpart(pfile,dirnamelen) let pfile= substitute(pfile,'^[/\\]','','e') -" call Decho(" ") " call Decho("filename<".filename.">") " call Decho("pfile <".pfile.">") @@ -6200,8 +6598,8 @@ fun! s:LocalListing() " cleanup any windows mess at end-of-line silent! keepjumps %s/\r$//e - setlocal ts=32 -" call Decho("setlocal ts=32") + exe "setlocal ts=".g:netrw_maxfilenamelen +" call Decho("setlocal ts=".g:netrw_maxfilenamelen) " call Dret("s:LocalListing") endfun @@ -6218,6 +6616,10 @@ fun! s:LocalBrowseShellCmdRefresh() " call Dret("LocalBrowseShellCmdRefresh : browselist is empty") return endif + if !exists("w:netrw_bannercnt") +" call Dret("LocalBrowseShellCmdRefresh : don't refresh when focus not on netrw windwo") + return + endif let itab = 1 let buftablist = [] while itab <= tabpagenr("$") @@ -6235,12 +6637,14 @@ fun! s:LocalBrowseShellCmdRefresh() for ibuf in s:netrw_browselist " call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 + " wipe out any non-displaying netrw buffer " call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") - exe "silent! bw ".ibuf + exe "silent! bd ".ibuf call remove(s:netrw_browselist,ibl) " call Decho("browselist=".string(s:netrw_browselist)) continue elseif index(tabpagebuflist(),ibuf) != -1 + " refresh any netrw buffer " call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) exe bufwinnr(ibuf)."wincmd w" call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) @@ -6255,7 +6659,7 @@ endfun " --------------------------------------------------------------------- " s:NetrwLocalRm: {{{2 fun! s:NetrwLocalRm(path) range -" call Dfunc("NetrwLocalRm(path<".a:path.">)") +" call Dfunc("s:NetrwLocalRm(path<".a:path.">)") " call Decho("firstline=".a:firstline." lastline=".a:lastline) " preparation for removing multiple files/directories @@ -6268,7 +6672,7 @@ fun! s:NetrwLocalRm(path) range " call Decho("remove all marked files") for fname in s:netrwmarkfilelist_{bufnr("%")} let ok= s:NetrwLocalRmFile(a:path,fname,all) - if ok =~ 'q\%[uit]' + if ok =~ 'q\%[uit]' || ok == "no" break elseif ok =~ 'a\%[ll]' let all= 1 @@ -6295,7 +6699,7 @@ fun! s:NetrwLocalRm(path) range continue endif let ok= s:NetrwLocalRmFile(a:path,curword,all) - if ok =~ 'q\%[uit]' + if ok =~ 'q\%[uit]' || ok == "no" break elseif ok =~ 'a\%[ll]' let all= 1 @@ -6305,10 +6709,13 @@ fun! s:NetrwLocalRm(path) range endif " refresh the directory - call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) - call netrw#NetrwRestorePosn(svpos) +" call Decho("bufname<".bufname("%").">") + if bufname("%") != "NetrwMessage" + call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./')) + call netrw#NetrwRestorePosn(svpos) + endif -" call Dret("NetrwLocalRm") +" call Dret("s:NetrwLocalRm") endfun " --------------------------------------------------------------------- @@ -6325,6 +6732,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') " attempt to remove file +" call Decho("attempt to remove file<".rmfile.">") if !all echohl Statement call inputsave() @@ -6334,9 +6742,9 @@ fun! s:NetrwLocalRmFile(path,fname,all) if ok == "" let ok="no" endif -" call Decho("response: ok<".ok.">") +" call Decho("response: ok<".ok.">") let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') -" call Decho("response: ok<".ok."> (after sub)") +" call Decho("response: ok<".ok."> (after sub)") if ok =~ 'a\%[ll]' let all= 1 endif @@ -6344,7 +6752,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) if all || ok =~ 'y\%[es]' || ok == "" let ret= s:System("delete",rmfile) -" call Decho("errcode=".v:shell_error." ret=".ret) +" call Decho("errcode=".v:shell_error." ret=".ret) endif else @@ -6365,24 +6773,26 @@ fun! s:NetrwLocalRmFile(path,fname,all) let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~ 'y\%[es]' || ok == "" -" call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")') - call s:System("system",g:netrw_local_rmdir.' "'.rmfile.'"') -" call Decho("v:shell_error=".v:shell_error) +" call Decho("1st attempt: system(".g:netrw_local_rmdir.' '.shellescape(rmfile).')') + call s:System("system",g:netrw_local_rmdir.' '.shellescape(rmfile)) +" call Decho("v:shell_error=".v:shell_error) if v:shell_error != 0 -" call Decho("2nd attempt to remove directory<".rmfile.">") +" call Decho("2nd attempt to remove directory<".rmfile.">") let errcode= s:System("delete",rmfile) -" call Decho("errcode=".errcode) +" call Decho("errcode=".errcode) if errcode != 0 if has("unix") -" call Decho("3rd attempt to remove directory<".rmfile.">") - call s:System("system","rm ".rmfile) +" call Decho("3rd attempt to remove directory<".rmfile.">") + call s:System("system","rm ".shellescape(rmfile)) if v:shell_error != 0 && !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34) + call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34) + let ok="no" endif elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35) + call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35) + let ok="no" endif endif endif @@ -6469,11 +6879,15 @@ endfun " --------------------------------------------------------------------- " s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2 " -" Directory Is +" g:netrw_ Directory Is " fastbrowse Local Remote " slow 0 D D D=Deleting a buffer implies it will not be re-used (slow) " med 1 D H H=Hiding a buffer implies it may be re-used (fast) " fast 2 H H +" +" Deleting a buffer means that it will be re-loaded when examined, hence "slow". +" Hiding a buffer means that it will be re-used when examined, hence "fast". +" (re-using a buffer may not be as accurate) fun! s:LocalFastBrowser() " call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) @@ -6558,36 +6972,55 @@ fun! s:NetrwBMShow() endif endif endif -" call Dret("s:NetrwBMShow : bmshowfunc<".bmshowfunc.">") +" call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") endfun " --------------------------------------------------------------------- " s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2 fun! s:ComposePath(base,subdir) " call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") + if(has("amiga")) - let ec = a:base[s:Strlen(a:base)-1] +" call Decho("amiga") + let ec = a:base[strlen(a:base)-1] if ec != '/' && ec != ':' let ret = a:base . "/" . a:subdir else let ret = a:base . a:subdir endif + elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("windows") let ret= a:subdir + elseif a:base =~ '^\a\+://' +" call Decho("remote linux/macos") let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') - let ret = urlbase.curpath.a:subdir + if a:subdir == '../' + if curpath =~ '[^/]/[^/]\+/$' + let curpath= substitute(curpath,'[^/]\+/$','','') + else + let curpath="" + endif + let ret= urlbase.curpath + else + let ret= urlbase.curpath.a:subdir + endif " call Decho("urlbase<".urlbase.">") " call Decho("curpath<".curpath.">") " call Decho("ret<".ret.">") + else +" call Decho("local linux/macos") let ret = substitute(a:base."/".a:subdir,"//","/","g") if a:base =~ '^//' " keeping initial '//' for the benefit of network share listing support let ret= '/'.ret endif + let ret= simplify(ret) endif + " call Dret("s:ComposePath ".ret) return ret endfun @@ -6597,7 +7030,7 @@ endfun " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR -" Sep 17, 2007 : max errnum currently is 60 +" Jun 11, 2008 : max errnum currently is 70 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) @@ -6608,6 +7041,7 @@ fun! netrw#ErrorMsg(level,msg,errnum) else let level= "**note** (netrw) " endif +" call Decho("level=".level) if g:netrw_use_errorwindow " (default) netrw creates a one-line window to show error/warning @@ -6615,22 +7049,28 @@ fun! netrw#ErrorMsg(level,msg,errnum) " record current window number for NetrwRestorePosn()'s benefit let s:winBeforeErr= winnr() +" call Decho("s:winBeforeErr=".s:winBeforeErr) " getting messages out reliably is just plain difficult! " This attempt splits the current window, creating a one line window. if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0 +" call Decho("write to NetrwMessage buffer") exe bufwinnr("NetrwMessage")."wincmd w" - set ma noro -" call Decho("set ma noro") +" call Decho("setlocal ma noro") + setlocal ma noro call setline(line("$")+1,level.a:msg) $ else +" call Decho("create a NetrwMessage buffer window") bo 1split enew setlocal bt=nofile file NetrwMessage +" call Decho("setlocal ma noro") + setlocal ma noro call setline(line("$"),level.a:msg) endif +" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr()) if &fo !~ '[ta]' syn clear syn match netrwMesgNote "^\*\*note\*\*" @@ -6755,7 +7195,7 @@ endfun " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 " a correct command fun! s:MakeSshCmd(sshcmd) -" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">)") +" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">") let sshcmd = substitute(a:sshcmd,'\',s:user.s:machine,'') if exists("g:netrw_port") && g:netrw_port != "" let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'') @@ -6781,7 +7221,7 @@ fun! s:RemoteSystem(cmd) let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') if remotedir != "" - let cmd= cmd.' "lcd '."'".remotedir."';" + let cmd= cmd.' "cd '.shellescape(remotedir).";" else let cmd= cmd.' "' endif @@ -6920,7 +7360,7 @@ endfun " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). fun! s:NetrwSaveWordPosn() " call Dfunc("NetrwSaveWordPosn()") - let s:netrw_saveword= '^'.escape(getline("."),g:netrw_cd_escape).'$' + let s:netrw_saveword= '^'.fnameescape(getline('.')).'$' " call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">") endfun @@ -6997,6 +7437,27 @@ fun! s:RestoreWinVars() endfun " --------------------------------------------------------------------- +" s:Rexplore: implements returning from a buffer to a netrw directory {{{2 +" +" s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap +" is true) and a command, :Rexplore, which call this function. +" +" s:nbcd_curpos_{bufnr('%')} is set up by s:NetrwBrowseChgDir() +fun! s:NetrwRexplore(islocal,dirname) +" call Dfunc("s:NetrwRexplore(islocal=".a:islocal." dirname<".a:dirname.">)") + if a:islocal + call netrw#LocalBrowseCheck(a:dirname) + else + call s:NetrwBrowse(0,a:dirname) + endif + if exists("s:nbcd_curpos_{bufnr('%')}") + call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')}) + unlet s:nbcd_curpos_{bufnr('%')} + endif +" call Dret("s:NetrwRexplore") +endfun + +" --------------------------------------------------------------------- " s:SaveBufVars: {{{2 fun! s:SaveBufVars() " call Dfunc("s:SaveBufVars()") @@ -7064,22 +7525,22 @@ fun! s:SetRexDir(islocal,dirname) " call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">)") " set up Rex and leftmouse-double-click if a:islocal - exe 'com! Rexplore call netrw#LocalBrowseCheck("'.escape(a:dirname,g:netrw_cd_escape).'")' + exe 'com! Rexplore call s:NetrwRexplore(1,"'.a:dirname.'")' if g:netrw_retmap silent! unmap <2-leftmouse> if !hasmapto("NetrwReturn") nmap <2-leftmouse> NetrwReturn endif - exe 'nnoremap NetrwReturn :call netrw#LocalBrowseCheck("'.a:dirname.'")' + exe 'nnoremap NetrwReturn :call NetrwRexplore(1,"'.a:dirname.'")' endif else - exe 'com! Rexplore call s:NetrwBrowse(0,"'.escape(a:dirname,g:netrw_cd_escape).'")' + exe 'com! Rexplore call s:NetrwRexplore(0,"'.a:dirname.'")' if g:netrw_retmap silent! unmap <2-leftmouse> if !hasmapto("NetrwReturn") nmap <2-leftmouse> NetrwReturn endif - exe 'nnoremap NetrwReturn :call NetrwBrowse(0,"'.a:dirname.'")' + exe 'nnoremap NetrwReturn :call NetrwRexplore(0,"'.a:dirname.'")' endif endif " call Dret("s:SetRexDir") @@ -7087,12 +7548,39 @@ endfun " --------------------------------------------------------------------- " s:Strlen: this function returns the length of a string, even if its {{{2 -" using two-byte etc characters. Depends on virtcol(). +" using two-byte etc characters. " Currently, its only used if g:Align_xstrlen is set to a -" nonzero value. +" nonzero value. Solution from Nicolai Weibull, vim docs +" (:help strlen()), Tony Mechelynck, and my own invention. fun! s:Strlen(x) " call Dfunc("s:Strlen(x<".a:x.">") - let ret= strlen(substitute(a:x,'.','c','g')) + if g:netrw_xstrlen == 1 + " number of codepoints (Latin a + combining circumflex is two codepoints) + " (comment from TM, solution from NW) + let ret= strlen(substitute(a:x,'.','c','g')) + + elseif g:netrw_xstrlen == 2 + " number of spacing codepoints (Latin a + combining circumflex is one spacing + " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.) + " (comment from TM, solution from TM) + let ret=strlen(substitute(a:x, '.\Z', 'x', 'g')) + + elseif g:netrw_xstrlen == 3 + " virtual length (counting, for instance, tabs as anything between 1 and + " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately + " preceded by lam, one otherwise, etc.) + " (comment from TM, solution from me) + let modkeep= &mod + exe "norm! o\" + call setline(line("."),a:x) + let ret= virtcol("$") - 1 + d + let &mod= modkeep + + else + " at least give a decent default + ret= strlen(a:x) + endif " call Dret("s:Strlen ".ret) return ret endfun @@ -7100,8 +7588,11 @@ endfun " --------------------------------------------------------------------- " s:System: using Steve Hall's idea to insure that Windows paths stay {{{2 " acceptable. No effect on Unix paths. -" Examples of use: let result= s:System("system",path) +" Examples of use: let result= s:System("rm",path) " let result= s:System("delete",path) +fun! netrw#System(cmd,path) + echomsg s:System(a:cmd,a:path) +endfun fun! s:System(cmd,path) " call Dfunc("s:System(cmd<".a:cmd."> path<".a:path.">)") @@ -7120,9 +7611,11 @@ fun! s:System(cmd,path) exe "let result= ".a:cmd."('".path."')" let &shellslash = sskeep else - exe "let result= ".a:cmd."(".g:netrw_shq.path.g:netrw_shq.")" +" call Decho("exe let result= ".a:cmd."('".path."')") + exe "let result= ".a:cmd."('".path."')" endif else +" call Decho("exe let result= ".a:cmd."('".path."')") exe "let result= ".a:cmd."('".path."')" endif @@ -7134,7 +7627,7 @@ endfun " s:TreeListMove: {{{2 fun! s:TreeListMove(dir) " call Dfunc("s:TreeListMove(dir<".a:dir.">)") - let curline = getline(".") + let curline = getline('.') let prvline = (line(".") > 1)? getline(line(".")-1) : '' let nxtline = (line(".") < line("$"))? getline(line(".")+1) : '' let curindent= substitute(curline,'^\([| ]*\).\{-}$','\1','') diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index 8b5170c6..d6a93624 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -146,6 +146,7 @@ fun! netrwSettings#NetrwSettings() let tmpfileescline= line("$") put ='let g:netrw_tmpfile_escape...' put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf + put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen put = 'let g:netrw_winsize = '.g:netrw_winsize put ='' diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index d2c2325d..99c4ec9c 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -36,7 +36,7 @@ if !exists("g:rubycomplete_classes_in_global") endif if !exists("g:rubycomplete_buffer_loading") - let g:rubycomplete_classes_in_global = 0 + let g:rubycomplete_buffer_loading = 0 endif if !exists("g:rubycomplete_include_object") diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index d855c4db..35ef7fd2 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,7 +1,7 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: May 30, 2008 -" Version: 14 +" Date: Jun 12, 2008 +" Version: 16 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " @@ -24,7 +24,7 @@ set cpo&vim if &cp || exists("g:loaded_tar") || v:version < 700 finish endif -let g:loaded_tar= "v14" +let g:loaded_tar= "v16" "call Decho("loading autoload/tar.vim") if v:version < 701 || (v:version == 701 && !has("patch299")) echoerr "(autoload/tar.vim) need vim v7.1 with patchlevel 299" @@ -45,21 +45,33 @@ if !exists("g:tar_writeoptions") let g:tar_writeoptions= "uf" endif - " set up shell quoting character - if !exists("g:tar_shq") - if exists("&shq") && &shq != "" - let g:tar_shq= &shq - elseif has("win32") || has("win95") || has("win64") || has("win16") - if g:netrw_cygwin - let g:tar_shq= "'" - else - let g:tar_shq= '"' - 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 + +" set up shell quoting character +if !exists("g:tar_shq") + if exists("&shq") && &shq != "" + let g:tar_shq= &shq + elseif has("win32") || has("win95") || has("win64") || has("win16") + if exists("g:netrw_cygwin") && g:netrw_cygwin let g:tar_shq= "'" + else + let g:tar_shq= '"' endif -" call Decho("g:tar_shq<".g:tar_shq.">") + else + let g:tar_shq= "'" endif +" call Decho("g:tar_shq<".g:tar_shq.">") +endif " ---------------- " Functions: {{{1 @@ -111,6 +123,7 @@ 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 $ @@ -190,7 +203,7 @@ fun! s:TarBrowseSelect() wincmd _ endif let s:tblfile_{winnr()}= curfile - call tar#Read("tarfile:".tarfile.':'.fname,1) + call tar#Read("tarfile:".tarfile.'::'.fname,1) filetype detect let &report= repkeep @@ -203,8 +216,8 @@ fun! tar#Read(fname,mode) " call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")") let repkeep= &report set report=10 - let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','') - let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','') + let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','') + let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','') if has("win32") && executable("cygpath") " assuming cygwin let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e') @@ -220,6 +233,7 @@ fun! tar#Read(fname,mode) let doro = 1 else let decmp="" + let doro = 0 if fname =~ '\.gz$\|\.bz2$\|\.Z$\|\.zip$' setlocal bin endif @@ -245,7 +259,7 @@ fun! tar#Read(fname,mode) endif let w:tarfile= a:fname - exe "file tarfile:".fname + exe "file tarfile::".fname " cleanup 0d @@ -310,8 +324,8 @@ fun! tar#Write(fname) cd _ZIPVIM_ " call Decho("current directory now: ".getcwd()) - let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','') - let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','') + let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\)::.*$','\1','') + let fname = substitute(w:tarfile,'tarfile:.\{-}::\(.*\)$','\1','') " handle compressed archives if tarfile =~# '\.gz' @@ -430,11 +444,11 @@ endfun fun s:Escape(name) " shellescape() was added by patch 7.0.111 if exists("*shellescape") - let name= shellescape(a:name) + let qnameq= shellescape(a:name) else - let name= g:tar_shq . a:name . g:tar_shq + let qnameq= g:tar_shq . a:name . g:tar_shq endif - return name + return qnameq endfun " --------------------------------------------------------------------- diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim index 535fae18..d69c6453 100644 --- 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: May 30, 2008 -" Version: 26 ASTRO-ONLY +" Date: Jun 05, 2008 +" Version: 27 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim -" Copyright: (c) 2004-2007 by Charles E. Campbell, Jr. +" Copyright: (c) 2004-2008 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. @@ -15,7 +15,7 @@ if &cp || exists("g:loaded_vimball") || v:version < 700 finish endif let s:keepcpo = &cpo -let g:loaded_vimball = "v26" +let g:loaded_vimball = "v27" set cpo&vim "DechoTabOn @@ -215,6 +215,12 @@ endfun fun! vimball#Vimball(really,...) " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0) + if v:version < 701 || (v:version == 701 && !has("patch299")) + echoerr "This version of vimball requires vim 7.1 with patch 299" +" call Dret("vimball#Vimball : needs 7.1 with patch 299") + return + endif + if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$' echoerr "(Vimball) The current file does not appear to be a Vimball!" " call Dret("vimball#Vimball") diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index 5bb41d63..5842741b 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,7 +1,7 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Jan 07, 2008 -" Version: 16 +" Date: Jun 12, 2008 +" Version: 18 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1 @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_zip") || v:version < 700 finish endif -let g:loaded_zip = "v16" +let g:loaded_zip = "v18" let s:zipfile_escape = ' ?&;\' let s:ERROR = 2 let s:WARNING = 1 @@ -323,8 +323,13 @@ endfun " QuoteFileDir: {{{2 fun! s:QuoteFileDir(fname) " call Dfunc("QuoteFileDir(fname<".a:fname.">)") -" call Dret("QuoteFileDir") - return g:zip_shq.a:fname.g:zip_shq + if has("*shellescape") + let qnameq= shellescape(a:fname) + else + let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq + endif +" call Dret("QuoteFileDir <".qnameq.">") + return qnameq endfun " --------------------------------------------------------------------- diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index cc5d8563..65a4cd81 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.1. Last change: 2008 Jun 04 +*change.txt* For Vim version 7.1. Last change: 2008 Jun 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -229,17 +229,17 @@ key restores the original text (if there was any). (See section "Insert and Replace mode" |mode-ins-repl|). *cw* *cW* -Special case: "cw" and "cW" work the same as "ce" and "cE" if the cursor is -on a non-blank and not at the end of a word. This is because Vim interprets -"cw" as change-word, and a word does not include the following white space. +Special case: When the cursor is in a word, "cw" and "cW" do not include the +white space after a word, they only change up to the end of the word. This is +because Vim interprets "cw" as change-word, and a word does not include the +following white space. {Vi: "cw" when on a blank followed by other blanks changes only the first blank; this is probably a bug, because "dw" deletes all the blanks; use the 'w' flag in 'cpoptions' to make it work like Vi anyway} If you prefer "cw" to include the space after a word, use this mapping: > :map cw dwi -If you want to change a word when the cursor is not at the start use "ciw" -(|c| |iw|). +Or use "caw" (see |aw|). *:c* *:ch* *:change* :{range}c[hange][!] Replace lines of text with some different text. @@ -1261,9 +1261,11 @@ an external command, like "par" (e.g.: "!}par" to format until the end of the paragraph) or set 'formatprg' to "par". *format-comments* -Vim can format comments in a special way. Vim recognizes a comment by a -specific string at the start of the line (ignoring white space). Three types -of comments can be used: +An overview of comment formatting is in section |30.6| of the user manual. + +Vim can automatically insert and format comments in a special way. Vim +recognizes a comment by a specific string at the start of the line (ignoring +white space). Three types of comments can be used: - A comment string that repeats at the start of each line. An example is the type of comment used in shell scripts, starting with "#". @@ -1271,7 +1273,7 @@ of comments can be used: lines. An example is this list with dashes. - Three-piece comments that have a start string, an end string, and optional lines in between. The strings for the start, middle and end are different. - An example is the C-style comment: + An example is the C style comment: /* * this is a C comment */ @@ -1297,23 +1299,24 @@ type of comment string. A part consists of: e End of a three-piece comment - l Left adjust middle with start or end (default). Only recognized when - used together with 's' or 'e'. + l Left align. Used together with 's' or 'e', the leftmost character of + start or end will line up with the leftmost character from the middle. + This is the default and can be omitted. See below for more details. - r Right adjust middle with start or end. Only recognized when used - together with 's' or 'e'. + r Right align. Same as above but rightmost instead of leftmost. See + below for more details. - O Don't use this one for the "O" command. + O Don't consider this comment for the "O" command. x Allows three-piece comments to be ended by just typing the last - character of the end-comment string as the first character on a new - line, when the middle-comment string has already been inserted - automatically. See below for more details. + character of the end-comment string as the first action on a new + line when the middle-comment string has been inserted automatically. + See below for more details. {digits} - When together with 's' or 'e': add extra indent for the middle part. - This can be used to left-align the middle part with the start or end - and then add an offset. + When together with 's' or 'e': add {digit} amount of offset to an + automatically inserted middle or end comment leader. The offset begins + from a left alignment. See below for more details. -{digits} Like {digits} but reduce the indent. This only works when there is @@ -1342,12 +1345,42 @@ have a middle string because otherwise Vim can't recognize the middle lines. Notice the use of the "x" flag in the above three-piece comment definition. When you hit Return in a C-comment, Vim will insert the middle comment leader -for the new line, e.g. " * ". To close this comment you just have to type "/" +for the new line: " * ". To close this comment you just have to type "/" before typing anything else on the new line. This will replace the -middle-comment leader with the end-comment leader, leaving just " */". There -is no need to hit BackSpace first. - -Examples: > +middle-comment leader with the end-comment leader and apply any specified +alignment, leaving just " */". There is no need to hit BackSpace first. + + +Here is an example of alignment flags at work to make a comment stand out +(kind of looks like a 1 too). Consider comment string > + sr:/***,m:**,ex2:******/ + + /*** + **<--right aligned from "r" flag + ** +offset 2 spaces from the "2" flag--->** + ******/ +In this case, the first comment was typed, then return was pressed 4 times, +then "/" was pressed to end the comment. + +Here are some finer points of three part comments. There are three times when +alignment and offset flags are taken into consideration: opening a new line +after a start-comment, opening a new line before an end-comment, and +automatically ending a three-piece comment. The end alignment flag has a +backwards perspective; the result is that the same alignment flag used with +"s" and "e" will result in the same indent for the starting and ending pieces. +Only one alignment per comment part is meant to be used, but an offset number +will override the "r" and "l" flag. + +Enabling 'cindent' will override the alignment flags in many cases. +Reindenting using a different method like |gq| or |=| will not consult +alignment flags either. The same behaviour can be defined in those other +formatting options. One consideration is that 'cindent' has additional options +for context based indenting of comments but cannot replicate many three piece +indent alignments. However, 'indentexpr' is has the ability to work better +with three piece comments. + +Other examples: > "b:*" Includes lines starting with "*", but not if the "*" is followed by a non-blank. This avoids a pointer dereference like "*str" to be recognized as a comment. @@ -1358,17 +1391,6 @@ By default, "b:#" is included. This means that a line that starts with "#include" is not recognized as a comment line. But a line that starts with "# define" is recognized. This is a compromise. -Often the alignment can be changed from right alignment to a left alignment -with an additional space. For example, for Javadoc comments, this can be -used (insert a backslash before the space when using ":set"): > - s1:/*,mb:*,ex:*/ -Note that an offset is included with start, so that the middle part is left -aligned with the start and then an offset of one character added. This makes -it possible to left align the start and middle for this construction: > - /** - * comment - */ - {not available when compiled without the |+comments| feature} *fo-table* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 61f010b8..157df6dd 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.1. Last change: 2008 May 29 +*eval.txt* For Vim version 7.1. Last change: 2008 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -39,10 +39,10 @@ done, the features in this document are not available. See |+eval| and *E712* There are six types of variables: -Number A 32 bit signed number. |expr-number| +Number A 32 bit signed number. |expr-number| *Number* Examples: -123 0x10 0177 -Float A floating point number. |floating-point-format| *Float* +Float A floating point number. |floating-point-format| *Float* {only when compiled with the |+float| feature} Examples: 123.456 1.15e-6 -1.1e3 @@ -96,9 +96,10 @@ use strlen(): > < *E745* *E728* *E703* *E729* *E730* *E731* List, Dictionary and Funcref types are not automatically converted. - *E805* *E806* + *E805* *E806* *E808* When mixing Number and Float the Number is converted to Float. Otherwise -there is no automatic conversion of Float. +there is no automatic conversion of Float. You can use str2float() for String +to Float, printf() for Float to String and float2nr() for Float to Number. *E706* You will get an error if you try to change the type of a variable. You need @@ -801,16 +802,16 @@ Note the difference between "+" and ".": "123" . "456" = "123456" Since '.' has the same precedence as '+' and '-', you need to read: > - 1.90+&90 + 1 . 90 + 90.0 As: > - (1 . 90) + &90 + (1 . 90) + 90.0 That works, since the String "190" is automatically converted to the Number -190, which can be added to the float 90. However: > - 1.90*&90 +190, which can be added to the Float 90.0. However: > + 1 . 90 * 90.0 Should be read as: > - 1 . (90 * &90) + 1 . (90 * 90.0) Since '.' has lower precedence than '*'. This does NOT work, since this -attempts to concatenate a Float to a String. +attempts to concatenate a Float and a String. When the righthand side of '/' is zero, the result is 0x7fffffff. When the righthand side of '%' is zero, the result is 0. @@ -933,24 +934,41 @@ Decimal, Hexadecimal (starting with 0x or 0X), or Octal (starting with 0). *floating-point-format* Floating point numbers can be written in two forms: -- &N.M, where N and M are numbers. The .M can be omitted. The N cannot be - omitted. There can be a minus sign in the N. Examples: - &123.456 - &0.0001 - &55 - &-0.123 - Only a decimal point is accepted, not a comma. No matter what the current - locale is. -- Same, with a following exponent in the form "eX", where X is a decimal - number with an optional minus sign. The 'e' can also be upper case. - Examples: - &1.234e3 - &1E-6 - &-3.1416e88 + + [-+]{N}.{M} + [-+]{N}.{M}e[-+]{exp} + +{N} and {M} are numbers. Both {N} and {M} must be present and can only +contain digits. +[-+] means there is an optional plus or minus sign. +{exp} is the exponent, power of 10. +Only a decimal point is accepted, not a comma. No matter what the current +locale is. +{only when compiled with the |+float| feature} + +Examples: + 123.456 + +0.0001 + 55.0 + -0.123 + 1.234e03 + 1.0E-6 + -3.1416e+88 + +These are INVALID: + 3. empty {M} + 1e40 missing .{M} + The precision and range of floating points numbers depends on the library Vim was compiled with. There is no way to change this at runtime. -{only when compiled with the |+float| feature} +Rationale: +Before floating point was introduced, the text "123.456" was interpreted as +the two numbers "123" and "456", both converted to a string and concatenated, +resulting in the string "123456". Since this was considered pointless, and we +could not find it actually being used in Vim scripts, this backwards +incompatibility was accepted in favor of being able to use the normal notation +for floating point numbers. string *expr-string* *E114* @@ -1611,6 +1629,7 @@ byte2line( {byte}) Number line number at byte count {byte} byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr} call( {func}, {arglist} [, {dict}]) any call {func} with arguments {arglist} +ceil( {expr}) Float round {expr} up changenr() Number current change number char2nr( {expr}) Number ASCII value of first char in {expr} cindent( {lnum}) Number C indent for line {lnum} @@ -1652,6 +1671,8 @@ finddir( {name}[, {path}[, {count}]]) String find directory {name} in {path} findfile( {name}[, {path}[, {count}]]) String find file {name} in {path} +float2nr( {expr}) Number convert Float {expr} to a Number +floor( {expr}) Float round {expr} down fnameescape( {fname}) String escape special characters in {fname} fnamemodify( {fname}, {mods}) String modify file name foldclosed( {lnum}) Number first line of fold at {lnum} if closed @@ -1730,6 +1751,7 @@ line( {expr}) Number line nr of cursor, last line or mark line2byte( {lnum}) Number byte count of line {lnum} lispindent( {lnum}) Number Lisp indent for line {lnum} localtime() Number current time +log10( {expr}) Float logarithm of Float {expr} to base 10 map( {expr}, {string}) List/Dict change each item in {expr} to {expr} maparg( {name}[, {mode} [, {abbr}]]) String rhs of mapping {name} in mode {mode} @@ -1755,6 +1777,7 @@ mode() String current editing mode nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum} nr2char( {expr}) String single char with ASCII value {expr} pathshorten( {expr}) String shorten directory names in a path +pow( {x}, {y}) Float {x} to the power of {y} prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum} printf( {fmt}, {expr1}...) String format text pumvisible() Number whether popup menu is visible @@ -1778,6 +1801,7 @@ rename( {from}, {to}) Number rename (move) file from {from} to {to} repeat( {expr}, {count}) String repeat {expr} {count} times resolve( {filename}) String get filename a shortcut points to reverse( {list}) List reverse {list} in-place +round( {expr}) Float round off {expr} search( {pattern} [, {flags} [, {stopline} [, {timeout}]]]) Number search for {pattern} searchdecl({name} [, {global} [, {thisblock}]]) @@ -1813,7 +1837,8 @@ spellsuggest( {word} [, {max} [, {capital}]]) List spelling suggestions split( {expr} [, {pat} [, {keepempty}]]) List make |List| from {pat} separated {expr} -str2nr( {expr} [, {base}]) Number convert string to number +str2float( {expr}) Float convert String to Float +str2nr( {expr} [, {base}]) Number convert String to Number strftime( {format}[, {time}]) String time in specified format stridx( {haystack}, {needle}[, {start}]) Number index of {needle} in {haystack} @@ -1844,6 +1869,7 @@ tolower( {expr}) String the String {expr} switched to lowercase toupper( {expr}) String the String {expr} switched to uppercase tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} to chars in {tostr} +trunc( {expr} Float truncate Float {expr} type( {name}) Number type of variable {name} values( {dict}) List values in {dict} virtcol( {expr}) Number screen column of cursor or mark @@ -2056,6 +2082,19 @@ call({func}, {arglist} [, {dict}]) *call()* *E699* {dict} is for functions with the "dict" attribute. It will be used to set the local variable "self". |Dictionary-function| +ceil({expr}) *ceil()* + Return the smallest integral value greater than or equal to + {expr} as a |Float| (round up). + {expr} must evaluate to a |Float| or a |Number|. + Examples: > + echo ceil(1.456) +< 2.0 > + echo ceil(-5.456) +< -5.0 > + echo ceil(4.0) +< 4.0 + {only available when compiled with the |+float| feature} + changenr() *changenr()* Return the number of the most recent change. This is the same number as what is displayed with |:undolist| and can be used @@ -2669,13 +2708,46 @@ findfile({name}[, {path}[, {count}]]) *findfile()* < Searches from the directory of the current file upwards until it finds the file "tags.vim". +float2nr({expr}) *float2nr()* + Convert {expr} to a Number by omitting the part after the + decimal point. + {expr} must evaluate to a |Float| or a Number. + When the value of {expr} is out of range for a |Number| the + result is truncated to 0x7fffffff or -0x7fffffff. + Examples: > + echo float2nr(3.95) +< 3 > + echo float2nr(-23.45) +< -23 > + echo float2nr(1.0e100) +< 2147483647 > + echo float2nr(-1.0e150) +< -2147483647 > + echo float2nr(1.0e-100) +< 0 + {only available when compiled with the |+float| feature} + + +floor({expr}) *floor()* + Return the largest integral value less than or equal to + {expr} as a |Float| (round down). + {expr} must evaluate to a |Float| or a |Number|. + Examples: > + echo floor(1.856) +< 1.0 > + echo floor(-5.456) +< -6.0 > + echo floor(4.0) +< 4.0 + {only available when compiled with the |+float| feature} + fnameescape({string}) *fnameescape()* Escape {string} for use as file name command argument. All characters that have a special meaning, such as '%' and '|' are escaped with a backslash. - For most systems the characters escaped are "". For systems - where a backslash appears in a filename, it depends on the - value of 'isfname'. + For most systems the characters escaped are + " \t\n*?[{`$\\%#'\"|!<". For systems where a backslash + appears in a filename, it depends on the value of 'isfname'. Example: > :let fname = 'some str%nge|name' :exe "edit " . fnameescape(fname) @@ -3167,7 +3239,7 @@ has_key({dict}, {key}) *has_key()* haslocaldir() *haslocaldir()* The result is a Number, which is 1 when the current - window has set a local path via |:lcd|, and 0 otherwise. + window has set a local path via |:lcd|, and 0 otherwise. hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()* The result is a Number, which is 1 if there is a mapping that @@ -3606,6 +3678,16 @@ localtime() *localtime()* 1970. See also |strftime()| and |getftime()|. +log10({expr}) *log10()* + Return the logarithm of Float {expr} to base 10 as a |Float|. + {expr} must evaluate to a |Float| or a |Number|. + Examples: > + :echo log10(1000) +< 3.0 > + :echo log10(0.01) +< -2.0 + {only available when compiled with the |+float| feature} + map({expr}, {string}) *map()* {expr} must be a |List| or a |Dictionary|. Replace each item in {expr} with the result of evaluating @@ -3933,6 +4015,16 @@ pathshorten({expr}) *pathshorten()* < ~/.v/a/myfile.vim ~ It doesn't matter if the path exists or not. +pow({x}, {y}) *pow()* + Return the power of {x} to the exponent {y} as a |Float|. + {x} and {y} must evaluate to a |Float| or a |Number|. + Examples: > + :echo pow(3, 3) +< 27.0 > + :echo pow(2, 16) +< 65536.0 + {only available when compiled with the |+float| feature} + prevnonblank({lnum}) *prevnonblank()* Return the line number of the first line at or above {lnum} that is not blank. Example: > @@ -4072,11 +4164,17 @@ printf({fmt}, {expr1} ...) *printf()* digits after the decimal point. When the precision is zero the decimal point is omitted. When the precision is not specified 6 is used. A really big number - (dividing by zero) results in "inf". + (out of range or dividing by zero) results in "inf". + "0.0 / 0.0" results in "nan". + Example: > + echo printf("%.2f", 12.115) +< 12.12 + Note that roundoff depends on the system libraries. + Use |round()| when in doubt. *printf-e* *printf-E* e E The Float argument is converted into a string of the - form 1.234e3 or 1.234E3 (when using 'E'). The + form 1.234e+03 or 1.234E+03 when using 'E'. The precision specifies the number of digits after the decimal point, like with 'f'. @@ -4084,7 +4182,10 @@ printf({fmt}, {expr1} ...) *printf()* g G The Float argument is converted like with 'f' if the value is between 0.001 (inclusive) and 10000000.0 (exclusive). Otherwise 'e' is used for 'g' and 'E' - for 'G'. + for 'G'. When no precision is specified superfluous + zeroes and '+' signs are removed, except for the zero + immediately after the decimal point. Thus 10000000.0 + results in 1.0e7. *printf-%* % A '%' is written. No argument is converted. The @@ -4317,6 +4418,21 @@ reverse({list}) Reverse the order of items in {list} in-place. Returns If you want a list to remain unmodified make a copy first: > :let revlist = reverse(copy(mylist)) +round({expr}) *round()* + Round off {expr} to a the nearest integral value and return it + as a |Float|. If {expr} lies halfway between two integral + values, then use the larger one (away from zero). + {expr} must evaluate to a |Float| or a |Number|. + Examples: > + echo round(0.456) +< 0.0 > + echo round(4.5) +< 5.0 > + echo round(-4.5) +< -5.0 + {only available when compiled with the |+float| feature} + + search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()* Search for regexp pattern {pattern}. The search starts at the cursor position (you can use |cursor()| to set it). @@ -4870,6 +4986,18 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()* < The opposite function is |join()|. +sqrt({expr}) *sqrt()* + Return the non-negative square root of Float {expr} as a + |Float|. + {expr} must evaluate to a |Float| or a |Number|. When {expr} + is negative the result is NaN (Not a Number). + Examples: > + :echo sqrt(100) +< 10.0 > + :echo sqrt(-4.01) +< nan + {only available when compiled with the |+float| feature} + str2nr( {expr} [, {base}]) *str2nr()* Convert string {expr} to a number. {base} is the conversion base, it can be 8, 10 or 16. @@ -4882,16 +5010,18 @@ str2nr( {expr} [, {base}]) *str2nr()* str2float( {expr}) *str2float()* - Convert string {expr} to a Float. This works the same as when - using a floating point number directly, see - |floating-point-format|, but without the leading '&'. - A comma is also accepted for a decimal point. + Convert string {expr} to a Float. This mostly works the same + as when using a floating point number in an expression, see + |floating-point-format|. But it's a bit more permissive. + E.g., "1e40" is accepted, while in an expression you need to + write "1.0e40". Text after the number is silently ignored. - A second comma or decimal point also ends the number: - "12,345.67" is converted to 12.345. You can strip out - thousands separators with |substitute()|: > + The decimal point is always '.', no matter what the locale is + set to. A comma ends the number: "12,345.67" is converted to + 12.0. You can strip out thousands separators with + |substitute()|: > let f = str2float(substitute(text, ',', '', 'g')) -< {only when compiled with the |+float| feature} +< {only available when compiled with the |+float| feature} strftime({format} [, {time}]) *strftime()* @@ -4939,7 +5069,7 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number, {expr} type result ~ String 'string' Number 123 - Float &123.456789 or &1.234567e8 + Float 123.456789 or 1.234567e8 Funcref function('name') List [item, item] Dictionary {key: value, key: value} @@ -5249,6 +5379,19 @@ tr({src}, {fromstr}, {tostr}) *tr()* echo tr("", "<>", "{}") < returns "{blob}" +trunc({expr}) *trunc()* + Return the largest integral value with magnituted less than or + equal to {expr} as a |Float| (truncate towards zero). + {expr} must evaluate to a |Float| or a |Number|. + Examples: > + echo trunc(1.456) +< 1.0 > + echo trunc(-5.456) +< -5.0 > + echo trunc(4.0) +< 4.0 + {only available when compiled with the |+float| feature} + *type()* type({expr}) The result is a Number, depending on the type of {expr}: Number: 0 @@ -5263,7 +5406,7 @@ type({expr}) The result is a Number, depending on the type of {expr}: :if type(myvar) == type(function("tr")) :if type(myvar) == type([]) :if type(myvar) == type({}) - :if type(myvar) == type(&0) + :if type(myvar) == type(0.0) values({dict}) *values()* Return a |List| with all the values of {dict}. The |List| is @@ -7595,11 +7738,11 @@ code can be used: > " Only do non-blank lines. if line =~ '\S' " Get the first number in the line. - let nr = matchstr(line, '\d\+') + let nr = matchstr(line, '\d\+') " Get the file name, remove the script number " 123: ". - let name = substitute(line, '.\+:\s*', '', '') + let name = substitute(line, '.\+:\s*', '', '') " Add an item to the Dictionary - let scripts[nr] = name + let scripts[nr] = name endif endfor unlet scriptnames_output diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index b5ae414d..ce7ed15b 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 7.1. Last change: 2007 May 11 +*gui.txt* For Vim version 7.1. Last change: 2008 Jun 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -325,16 +325,22 @@ A different kind of selection is used when: - at the |hit-enter| prompt - whenever the current mode is not in the 'mouse' option - when holding the CTRL and SHIFT keys in the GUI + Since Vim continues like the selection isn't there, and there is no mode associated with the selection, this is called modeless selection. Any text in the Vim window can be selected. Select the text by pressing the left mouse button at the start, drag to the end and release. To extend the selection, use the right mouse button when 'mousemodel' is "extend", or the left mouse button with the shift key pressed when 'mousemodel' is "popup". -The middle mouse button pastes the text. The selection is removed when the selected text is scrolled or changed. + On the command line CTRL-Y can be used to copy the selection into the -clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y . +clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y . When +'guioptions' contains a or A (default on X11), the selection is automatically +copied to the "* register. + +The middle mouse button can then paste the text. On non-X11 systems, you can +use CTRL-R +. 3.4 Using Mouse on Status Lines *gui-mouse-status* diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 0791b9ff..51948545 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -6,22 +6,27 @@ This file is about indenting C programs and other files. -1. Indenting C programs |C-indenting| +1. Indenting C style programs |C-indenting| 2. Indenting by expression |indent-expression| ============================================================================== -1. Indenting C programs *C-indenting* +1. Indenting C style programs *C-indenting* -The basics for C indenting are explained in section |30.2| of the user manual. +The basics for C style indenting are explained in section |30.2| of the user +manual. -Vim has options for automatically indenting C program files. These options -affect only the indent and do not perform other formatting. For comment -formatting, see |format-comments|. +Vim has options for automatically indenting C style program files. Many +programming languages including Java and C++ follow very closely the +formatting conventions established with C. These options affect only the +indent and do not perform other formatting. There are additional options that +affect other kinds of formatting as well as indenting, see |format-comments|, +|format-table|, |gq| and |formatting| for the main ones. Note that this will not work when the |+smartindent| or |+cindent| features have been disabled at compile time. -There are in fact four methods available for indentation: +There are in fact four main methods available for indentation, each one +overrides the previous if it is enabled, or non-empty for 'indentexpr': 'autoindent' uses the indent from the previous line. 'smartindent' is like 'autoindent' but also recognizes some C syntax to increase/reduce the indent where appropriate. diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index e0aa815f..f39bd96d 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 7.1. Last change: 2006 Jul 12 +*mlang.txt* For Vim version 7.1. Last change: 2008 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -73,6 +73,9 @@ use of "-" and "_". This sets $LC_TIME. Without an argument both are set, and additionally $LANG is set. + When compiled with the |+float| feature the LC_NUMERIC + value will always be set to "C", so that floating + point numbers use '.' as the decimal point. This will make a difference for items that depend on the language (some messages, time and date format). Not fully supported on all systems diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 6b0c9a6c..028b58b2 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,13 +1,13 @@ -*pi_netrw.txt* For Vim version 7.1. Last change: 2008 Mar 28 +*pi_netrw.txt* For Vim version 7.1. Last change: 2008 Jun 12 ----------------------------------------------------- NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. ----------------------------------------------------- -*dav* *http* *network* *Nwrite* *netrw-file* -*fetch* *netrw* *Nread* *rcp* *scp* -*ftp* *netrw.vim* *Nsource* *rsync* *sftp* +*dav* *ftp* *netrw-file* *Nread* *rcp* *scp* +*davs* *http* *netrw.vim* *Nsource* *rsync* *sftp* +*fetch* *netrw* *network* *Nwrite* ============================================================================== 1. Contents *netrw-contents* {{{1 @@ -30,7 +30,7 @@ 7. Ex Commands..........................................|netrw-ex| 8. Variables and Options................................|netrw-var| 9. Browsing.............................................|netrw-browse| - Introduction To Browsing...........................|netrw-browse-intro| + Introduction To Browsing...........................|netrw-intro-browse| Quick Reference: Maps..............................|netrw-browse-maps| Quick Reference: Commands..........................|netrw-browse-cmds| Bookmarking A Directory............................|netrw-mb| @@ -55,12 +55,21 @@ Listing Bookmarks And History......................|netrw-qb| Making A New Directory.............................|netrw-d| Making The Browsing Directory The Current Directory|netrw-c| + Marking Files......................................|netrw-mf| + Marking Files By Regular Expression................|netrw-mr| + Marked Files: Arbitrary Command....................|netrw-mx| Marked Files: Compression And Decompression........|netrw-mz| + Marked Files: Copying..............................|netrw-mc| + Marked Files: Diff.................................|netrw-md| + Marked Files: Editing..............................|netrw-me| + Marked Files: Grep.................................|netrw-mg| + Marked Files: Hiding and Unhiding by Suffix........|netrw-mh| + Marked Files: Moving...............................|netrw-mm| Marked Files: Printing.............................|netrw-mp| + Marked Files: Sourcing.............................|netrw-ms| Marked Files: Tagging..............................|netrw-mT| + Marked Files: Setting the Target Directory.........|netrw-mt| Marked Files: Unmarking............................|netrw-mu| - Marking Files......................................|netrw-mf| - Marking Files By Regular Expression................|netrw-mr| Netrw Browser Variables............................|netrw-browser-var| Netrw Browsing And Option Incompatibilities........|netrw-incompatible| Netrw Settings.....................................|netrw-settings| @@ -155,7 +164,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2 ftp: *g:netrw_ftp_cmd* = "ftp" http: *g:netrw_http_cmd* = "curl -o" if curl is available http: g:netrw_http_cmd = "wget -q -O" elseif wget is available - http: g:netrw_http_cmd = "fetch -o" elseif fetch is available + http: g:netrw_http_cmd = "fetch -o" elseif fetch is available rcp: *g:netrw_rcp_cmd* = "rcp" rsync: *g:netrw_rsync_cmd* = "rsync -a" scp: *g:netrw_scp_cmd* = "scp -q" @@ -277,7 +286,7 @@ settings are described below, in |netrw-browser-options|, and in method works for your setup. *g:netrw_extracmd* default: doesn't exist - If this variable exists, then any string it contains + If this variable exists, then any string it contains will be placed into the commands set to your ftp client. As an example: ="passive" @@ -300,7 +309,7 @@ settings are described below, in |netrw-browser-options|, and in *s:netrw_passwd* (ftp) password, retained on a per-session basis *g:netrw_preview* =0 (default) preview window shown in a horizontally - split window + split window =1 preview window shown in a vertically split window. Also affects the "previous window" (see |netrw-P|) in the same way. @@ -319,10 +328,10 @@ settings are described below, in |netrw-browser-options|, and in =1 : transfers done silently *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one - line window. This window provides reliable + line window. This window provides reliable delivery of messages. (default) =0 : messages from netrw will use echoerr ; - messages don't always seem to show up this + messages don't always seem to show up this way, but one doesn't have to quit the window. *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank @@ -337,7 +346,7 @@ settings are described below, in |netrw-browser-options|, and in This option is ignored if you're using unix *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP - =1 use WinNT's rcp in binary mode (default) + =1 use WinNT's rcp in binary mode (default) PATHS *netrw-path* {{{2 @@ -424,6 +433,10 @@ additional prompting. | dav://host/path | | cadaver | | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | +---------------------------------+----------------------------+------------+ + | DAV + SSL: | | | + | davs://host/path | | cadaver | + | :Nread davs://host/path | :Nwrite davs://host/path | cadaver | + +---------------------------------+----------------------------+------------+ | FETCH: | | | | fetch://[user@]host/path | | | | fetch://[user@]host:http/path | Not Available | fetch | @@ -468,7 +481,7 @@ additional prompting. work with your ftp client. Otherwise the script will prompt for user-id and password. - (*3) for ftp, "machine" may be machine#port or machine:port + (*3) for ftp, "machine" may be machine#port or machine:port if a different port is needed than the standard ftp port (*4) for http:..., if wget is available it will be used. Otherwise, @@ -592,7 +605,7 @@ below, a {netfile} is an url to a remote file. strings (ie. ""). :NetrwSettings This command is described in |netrw-settings| -- used to - display netrw settings and change netrw behavior. + display netrw settings and change netrw behavior. ============================================================================== @@ -606,9 +619,9 @@ set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|) > - ------------- - Netrw Options - ------------- + ------------- + Netrw Options + ------------- Option Meaning -------------- ----------------------------------------------- < @@ -778,7 +791,8 @@ itself: 9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1 *netrw-browser* *netrw-dir* *netrw-list* -INTRODUCTION TO BROWSING *netrw-browse-intro* {{{2 +INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2 + (Quick References: |netrw-quickmaps| |netrw-quickcoms|) Netrw supports the browsing of directories on your local system and on remote hosts; browsing includes listing files and directories, entering directories, @@ -832,6 +846,29 @@ There are several things you can do to affect the browser's display of files: See |netrw-browse-cmds| for all the things you can do with netrw! +QUICK HELP *netrw-quickhelp* {{{2 + (Use ctrl-] to select a topic)~ + Intro to Browsing...............................|netrw-intro-browse| + Quick Reference: Maps.........................|netrw-quickmap| + Quick Reference: Commands.....................|netrw-browse-cmds| + Hiding + Edit hiding list..............................|netrw-ctrl-h| + Hiding Files or Directories...................|netrw-a| + Hiding/Unhiding by suffix.....................|netrw-mh| + Hiding dot-files.............................|netrw-gh| + Listing Style + Select listing style (thin/long/wide/tree)....|netrw-i| + Associated setting variable...................|g:netrw_liststyle| + Shell command used to perform listing.........|g:netrw_list_cmd| + Quick file info...............................|netrw-qf| + Sorted by + Select sorting style (name/time/size).........|netrw-s| + Editing the sorting sequence..................|netrw-S| + Associated setting variable...................|g:netrw_sort_sequence| + Reverse sorting order.........................|netrw-r| + + + *netrw-quickmap* *netrw-quickmaps* QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 > --- ----------------- ---- @@ -848,6 +885,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 d Make a directory |netrw-d| D Attempt to remove the file(s)/directory(ies) |netrw-D| gb Go to previous bookmarked directory |netrw-gb| + gh Quick hide/unhide of dot-files |netrw-gh| gi Display information on file |netrw-qf| Edit file hiding list |netrw-ctrl-h| i Cycle between thin, long, wide, and tree listings |netrw-i| @@ -898,6 +936,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 to the netrw browser window. (gvim only) like mf, will mark files + *netrw-quickcom* *netrw-quickcoms* QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2 :NetrwClean[!] ...........................................|netrw-clean| :NetrwSettings ...........................................|netrw-settings| @@ -915,9 +954,9 @@ One may easily "bookmark" a directory by using > {cnt}mb < -Any count may be used. One may use viminfo's "!" option to retain bookmarks -between vim sessions. See |netrw-gb| for how to return to a bookmark and -|netrw-qb| for how to list them. +Any count may be used. One may use viminfo's "!" option (|'viminfo'|) to +retain bookmarks between vim sessions. See |netrw-gb| for how to return +to a bookmark and |netrw-qb| for how to list them. BROWSING *netrw-cr* {{{2 @@ -1296,12 +1335,16 @@ for local files. EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2 The "" map brings up a requestor allowing the user to change the -file/directory hiding list. The hiding list consists of one or more patterns -delimited by commas. Files and/or directories satisfying these patterns will -either be hidden (ie. not shown) or be the only ones displayed (see -|netrw-a|). +file/directory hiding list contained in |g:netrw_list_hide|. The hiding list +consists of one or more patterns delimited by commas. Files and/or +directories satisfying these patterns will either be hidden (ie. not shown) or +be the only ones displayed (see |netrw-a|). + +The "gh" mapping (see |netrw-gh|) quickly alternates between the usual +hiding list and the hiding of files or directories that begin with ".". -Associated setting variable: |g:netrw_hide| +Associated setting variables: |g:netrw_hide| |g:netrw_list_hide| +Associated topics: |netrw-a| |netrw-gh| |netrw-mh| EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2 @@ -1379,14 +1422,15 @@ If files have been marked using |netrw-mf|, then this command will: and showing only non-hidden files. endif - *netrw-gh* + *netrw-gh* *netrw-hide* As a quick shortcut, one may press > gh -to toggle between hiding files which begin with a period (dot) or not. +to toggle between hiding files which begin with a period (dot) and not hiding +them. Associated setting variable: |g:netrw_list_hide| +Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh| - *netrw-ctrl_h* IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2 Especially with the remote directory browser, constantly entering the password @@ -1448,6 +1492,8 @@ directory's name. A bare at that point will abort the making of the directory. Attempts to make a local directory that already exists (as either a file or a directory) will be detected, reported on, and ignored. +Currently, making a directory via ftp is not supported. + Associated setting variable: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd| @@ -1467,15 +1513,60 @@ directory. Associated setting variable: |g:netrw_keepdir| +MARKING FILES *netrw-mf* {{{2 + (also see |netrw-mr|) + +One may mark files with the cursor atop a filename and then pressing "mf". +With gvim, one may also mark files with . The following netrw +maps make use of marked files: + + |netrw-a| Hide marked files/directories + |netrw-D| Delete marked files/directories + |netrw-mc| Copy marked files to target + |netrw-md| Apply vimdiff to marked files + |netrw-me| Edit marked files + |netrw-mg| Apply vimgrep to marked files + |netrw-mm| Move marked files + |netrw-mp| Print marked files + |netrw-mt| Set target for |netrw-mm| and |netrw-mc| + |netrw-mT| Generate tags using marked files + |netrw-mx| Apply shell command to marked files + |netrw-mz| Compress/Decompress marked files + |netrw-O| Obtain marked files + |netrw-R| Rename marked files + +One may unmark files one at a time the same way one marks them; ie. place +the cursor atop a marked file and press "mf". This process also works +with using gvim. One may unmark all files by pressing +"mu" (see |netrw-mu|). + +*markfilelist* *global_markfilelist* *local_markfilelist* +All marked files are entered onto the global marked file list; there is only +one such list. In addition, every netrw buffer also has its own local marked +file list; since netrw buffers are associated with specific directories, this +means that each directory has its own local marked file list. The various +commands which operate on marked files use one or the other of the marked file +lists. + + +MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2 + (also see |netrw-mf|) + +One may also mark files by pressing "mr"; netrw will then issue a prompt, +"Enter regexp: ". You may then enter a regular expression such as \.c$ . +All files in the current directory will then be marked. Note that the +regular expressions are vim-style |regexp| ones, not shell ones. So +entering *.c probably isn't what you want! + MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked-file list) -Upon activation of the "mx" map, netrw will query the user for some command to -be applied to all marked files. All %s in the command will be substituted -with the name of a marked file. If no %s are in the command, then the command -will be followed by a space and a marked filename. +Upon activation of the "mx" map, netrw will query the user for some (external) +command to be applied to all marked files. All "%"s in the command will be +substituted with the name of each marked file in turn. If no "%"s are in the +command, then the command will be followed by a space and a marked filename. MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2 @@ -1515,6 +1606,16 @@ MARKED FILES: EDITING *netrw-me* {{{2 This command will place the marked files on the |arglist| and commence editing them. One may return the to explorer window with |:Rexplore|. +MARKED FILES: GREP *netrw-mg* {{{2 + (See |netrw-mf| and |netrw-mr| for how to mark files) + (uses the global marked file list) + +This command will apply |:vimgrep| to the marked files. The command will ask +for the requested pattern; one may enter: > + /pattern/[g][j] + ! /pattern/[g][j] + pattern +< MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the local marked file list) @@ -1602,51 +1703,6 @@ MARKED FILES: UNMARKING *netrw-mu* {{{2 The "mu" mapping will unmark all currently marked files. -MARKING FILES *netrw-mf* {{{2 - (also see |netrw-mr|) - -One may mark files with the cursor atop a filename and then pressing "mf". -With gvim, one may also mark files with . The following netrw -maps make use of marked files: - - |netrw-a| Hide marked files/directories - |netrw-D| Delete marked files/directories - |netrw-mc| Copy marked files to target - |netrw-md| Apply vimdiff to marked files - |netrw-me| Edit marked files - |netrw-mm| Move marked files - |netrw-mp| Print marked files - |netrw-mt| Set target for |netrw-mm| and |netrw-mc| - |netrw-mT| Generate tags using marked files - |netrw-mx| Apply shell command to marked files - |netrw-mz| Compress/Decompress marked files - |netrw-O| Obtain marked files - |netrw-R| Rename marked files - -One may unmark files one at a time the same way one marks them; ie. place -the cursor atop a marked file and press "mf". This process also works -with using gvim. One may unmark all files by pressing -"mu" (see |netrw-mu|). - -*markfilelist* *global_markfilelist* *local_markfilelist* -All marked files are entered onto the global marked file list; there is only -one such list. In addition, every netrw buffer also has its own local marked -file list; since netrw buffers are associated with specific directories, this -means that each directory has its own local marked file list. The various -commands which operate on marked files use one or the other of the marked file -lists. - - -MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2 - (also see |netrw-mf|) - -One may also mark files by pressing "mr"; netrw will then issue a prompt, -"Enter regexp: ". You may then enter a regular expression such as \.c$ . -All files in the current directory will then be marked. Note that the -regular expressions are vim-style |regexp| ones, not shell ones. So -entering *.c probably isn't what you want! - - NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2 (if you're interestd in the netrw file transfer settings, see |netrw-options|) @@ -1697,15 +1753,18 @@ your browsing preferences. (see also: |netrw-settings|) A dictionary mapping suffices to decompression programs. - *g:netrw_fastbrowse* =0: slow speed browsing, never re-use - directory listings; always obtain - directory listings. - =1: medium speed browsing, re-use directory - listings only when remote browsing. + *g:netrw_fastbrowse* =0: slow speed directory browsing; + never re-uses directory listings, + always obtains directory listings. + =1: medium speed directory browsing; + re-use directory listings only + when remote directory browsing. (default value) - =2: fast browsing, only obtains directory - listings when the directory hasn't been - seen before (or |netrw-ctrl-l| is used). + =2: fast directory browsing; + only obtains directory listings when the + directory hasn't been seen before + (or |netrw-ctrl-l| is used). + Fast browsing retains old directory listing buffers so that they don't need to be re-acquired. This feature is especially @@ -1714,8 +1773,9 @@ your browsing preferences. (see also: |netrw-settings|) such directories, the old directory buffer becomes out-of-date. One may always refresh such a directory listing with |netrw-ctrl-l|. - This option gives the choice of the trade-off - between accuracy and speed to the user. + This option gives the user the choice of + trading off accuracy (ie. up-to-date listing) + versus speed. *g:netrw_fname_escape* =' ?&;%' Used on filenames before remote reading/writing @@ -1895,6 +1955,22 @@ your browsing preferences. (see also: |netrw-settings|) |:Hexplore| or |:Vexplore|. default: "" + *g:netrw_xstrlen* Controls how netrw computes a string + including multi-byte characters' string + length. (thanks to N Weibull, T Mechelynck) + =0: uses Vim's built-in strlen() + =1: number of codepoints (Latin + a combining + circumflex is two codepoints) (DEFAULT) + =2: number of spacing codepoints (Latin a + + combining circumflex is one spacing + codepoint; a hard tab is one; wide and + narrow CJK are one each; etc.) + =3: virtual length (counting tabs as anything + between 1 and |'tabstop'|, wide CJJK as 2 + rather than 1, Arabic alif as zero when + immediately preceded by lam, one + otherwise, etc) + *g:NetrwTopLvlMenu* This variable specifies the top level menu name; by default, it's "Netrw.". If you wish to change this, do so in your @@ -1966,10 +2042,10 @@ splitting if one has set |g:netrw_preview| first. PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2 -To edit a file or directory in the previously used window (see :he |CTRL-W_P|), -press a "P". If there's only one window, then the one window will be -horizontally split (above/below splitting is controlled by |g:netrw_alto|, -and its initial size is controlled by |g:netrw_winsize|). +To edit a file or directory in the previously used (last accessed) window (see +:he |CTRL-W_p|), press a "P". If there's only one window, then the one window +will be horizontally split (above/below splitting is controlled by +|g:netrw_alto|, and its initial size is controlled by |g:netrw_winsize|). If there's more than one window, the previous window will be re-used on the selected file/directory. If the previous window's associated buffer @@ -2000,6 +2076,12 @@ If there are marked files: (see |netrw-mf|) Marked files will be renamed (moved). You will be queried as above in order to specify where you want the file/directory to be moved. + WARNING:~ + + Note that moving files is a dangerous operation; copies are safer. That's + because a "move" for remote files is actually a copy + delete -- and if + the copy fails and the delete does not, you may lose the file. + The g:netrw_rename_cmd variable is used to implement renaming. By default its value is: @@ -2295,6 +2377,51 @@ which is loaded automatically at startup (assuming :set nocp). ============================================================================== 12. History *netrw-history* {{{1 + v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he + noted that gx was failing since its call to + netrw#NetBrowseX() wasn't updated to + netrw#NetrwBrowseX(). + * (Stanis Trendelenburg) ST provides a patch to + supports davs: (dav + ssl) + * (Rick Choi) noted that directory names comprised + of three digits were not being displayed by + the internal browser. Fixed. + * (Erik Falor) provided a patch to handle problems + with changing directory and |'acd'| option. + * (James Vega, Teemu Likonen) noted that netrw + wasn't handling multi-byte filenames/directories + correctly. Fixed. + * (Rick) found problem with g:netrw_maxfilenamelen + being overridden. + * (James Vega) pointed out that netrw was + misidentifying all files in a symbolically linked + directory as being symbolically linked + themselves. This particular problem was fixed; + however, there are now situations where + symbolically linked files will not be detected. + Really need an internal vim function to do this + identification. + Apr 17, 2008 * When g:netrw_keepdir==0, current directory + doesn't necessarily equal b:netrw_curdir + initially. Problem is due to the patch directly + above. + * Fixed qf to handle case where b:netrw_curdir + isn't the same as the current directory under + linux/macosx. + * New: |netrw-mg| (apply vimgrep to marked files) + May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was + interfering with g:netrw_maxfilenamelen + May 05, 2008 * (James Vega) a file inside a linked directory + was showing up as a symbolic link itself. + May 22, 2008 * symbolic links, fifos, and sockets are now + indicated by a trailing @, |, or =, respectively. + Jun 06, 2008 * Removed numerous bugs from the marked file + move and copy. Tested these changes under + Unix only thus far. + * :Rexplore returns to the screen position in the + netrw listing from whence the file was edited + v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the + "x" action for mac to use g:netrw_shq v123: Feb 27, 2008 * Marked files now keeps a "global" marked file list. The global marked file list is used to support tag processing and vimdiff'ing diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index 32d96df8..a223a259 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -1,4 +1,4 @@ -*pi_paren.txt* For Vim version 7.1. Last change: 2008 Jan 06 +*pi_paren.txt* For Vim version 7.1. Last change: 2008 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -47,5 +47,11 @@ are: - 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay in a long line with syntax highlighting. + +If you would like the |%| command to work better, the matchit plugin can be +used, see |matchit-install|. This plugin also helps to skip matches in +comments. This is unrelated to the matchparen highlighting, they use a +different mechanism. + ============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index df5bd675..44598e5b 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,8 +1,8 @@ -*pi_tar.txt* For Vim version 7.1. Last change: 2008 May 30 +*pi_tar.txt* For Vim version 7.1. Last change: 2008 Jun 12 - +====================+ - | Tar File Interface | - +====================+ + +====================+ + | Tar File Interface | + +====================+ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) @@ -43,32 +43,35 @@ Copyright 2005-2008: The GPL (gnu public license) applies to *tar-copyright* ============================================================================== 4. History *tar-history* + v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files + inside tarballs. Fixes a problem with tarballs called + things like c:\abc.tar. (tnx to Bill McCarthy) v14 May 09, 2008 * arno caught a security bug May 28, 2008 * various security improvements. Now requires patch 299 - which provides the fnameescape() function + which provides the fnameescape() function May 30, 2008 * allows one to view *.gz and *.bz2 files that are in - *.tar files. + *.tar files. v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq v10 May 02, 2006 * now using "redraw then echo" to show messages, instead - of "echo and prompt user" + of "echo and prompt user" v9 May 02, 2006 * improved detection of masquerading as tar file v8 May 02, 2006 * allows editing of files that merely masquerade as tar - files + files v7 Mar 22, 2006 * work on making tar plugin work across network Mar 27, 2006 * g:tar_cmd now available for users to change the name - of the tar program to be used. By default, of course, + of the tar program to be used. By default, of course, it's "tar". v6 Dec 21, 2005 * writing to files not in directories caused problems - - fixed (pointed out by Christian Robinson) + fixed (pointed out by Christian Robinson) v5 Nov 22, 2005 * report option workaround installed v3 Sep 16, 2005 * handles writing files in an archive back to the - archive + archive Oct 18, 2005 * used instead of in autocmds Oct 18, 2005 * handles writing to compressed archives Nov 03, 2005 * handles writing tarfiles across a network using - netrw#NetWrite() + netrw#NetWrite() v2 * converted to use Vim7's new autoload feature by - Bram Moolenaar + Bram Moolenaar v1 (original) * Michael Toren (see http://michael.toren.net/code/) ============================================================================== diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt index 6a12eb99..d1da5f67 100644 --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -1,4 +1,4 @@ -*pi_vimball.txt* For Vim version 7.1. Last change: 2008 May 30 +*pi_vimball.txt* For Vim version 7.1. Last change: 2008 Jun 05 ---------------- Vimball Archiver @@ -140,17 +140,17 @@ Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *Vimball-copyright* ============================================================================== 4. Vimball History *vimball-history* {{{1 - 25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x - files as help files, too. - Apr 18, 2008 * RmVimball command is now protected by saving and - restoring settings -- in particular, acd was - causing problems as reported by Zhang Shuhan - May 27, 2008 * g:vimball_mkdir usage installed. Makes the + 26 : May 27, 2008 * g:vimball_mkdir usage installed. Makes the $HOME/.vim (or $HOME\vimfiles) directory if necessary. May 30, 2008 * (tnx to Bill McCarthy) found and fixed a bug: vimball wasn't updating plugins to AsNeeded/ when it should + 25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x + files as help files, too. + Apr 18, 2008 * RmVimball command is now protected by saving and + restoring settings -- in particular, acd was + 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 22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index c52188d9..6e619847 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 7.1. Last change: 2008 Jan 07 +*pi_zip.txt* For Vim version 7.1. Last change: 2008 Jun 12 +====================+ | Zip File Interface | @@ -51,12 +51,12 @@ Copyright: Copyright (C) 2005-2008 Charles E Campbell, Jr *zip-copyright* *g:zip_unzipcmd* Use this option to specify the program which does the duty of "unzip". - Its used during browsing. By default: > + It's used during browsing. By default: > let g:zip_unzipcmd= "unzip" < *g:zip_zipcmd* Use this option to specify the program which does the duty of "zip". - Its used during the writing (updating) of a file already in a zip + It's used during the writing (updating) of a file already in a zip file; by default: > let g:zip_zipcmd= "zip" < @@ -75,6 +75,7 @@ Copyright: Copyright (C) 2005-2008 Charles E Campbell, Jr *zip-copyright* ============================================================================== 4. History *zip-history* {{{1 + 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 when editing alternate file to bring up a zipfile diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index b20e5bf9..6e7d8a3f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.1. Last change: 2008 Jun 03 +*syntax.txt* For Vim version 7.1. Last change: 2008 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4229,7 +4229,7 @@ WildMenu current match in 'wildmenu' completion The 'statusline' syntax allows the use of 9 different highlights in the statusline and ruler (via 'rulerformat'). The names are User1 to User9. -For the GUI you can use these groups to set the colors for the menu, +For the GUI you can use the following groups to set the colors for the menu, scrollbars and tooltips. They don't have defaults. This doesn't work for the Win32 GUI. Only three highlight arguments have any effect here: font, guibg, and guifg. diff --git a/runtime/doc/tags b/runtime/doc/tags index 34d23782..d2f1d063 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -1116,6 +1116,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* +feature-list various.txt /*+feature-list* +file_in_path various.txt /*+file_in_path* +find_in_path various.txt /*+find_in_path* ++float various.txt /*+float* +folding various.txt /*+folding* +footer various.txt /*+footer* +fork various.txt /*+fork* @@ -4098,6 +4099,7 @@ E804 eval.txt /*E804* E805 eval.txt /*E805* E806 eval.txt /*E806* E807 eval.txt /*E807* +E808 eval.txt /*E808* E81 map.txt /*E81* E82 message.txt /*E82* E83 message.txt /*E83* @@ -4214,6 +4216,7 @@ Normal intro.txt /*Normal* Normal-mode intro.txt /*Normal-mode* Nread pi_netrw.txt /*Nread* Nsource pi_netrw.txt /*Nsource* +Number eval.txt /*Number* Nvi intro.txt /*Nvi* Nwrite pi_netrw.txt /*Nwrite* O insert.txt /*O* @@ -4762,6 +4765,7 @@ catch-interrupt eval.txt /*catch-interrupt* catch-order eval.txt /*catch-order* catch-text eval.txt /*catch-text* cc change.txt /*cc* +ceil() eval.txt /*ceil()* ch.vim syntax.txt /*ch.vim* change-list-jumps motion.txt /*change-list-jumps* change-tabs change.txt /*change-tabs* @@ -5006,6 +5010,7 @@ dab motion.txt /*dab* dap motion.txt /*dap* das motion.txt /*das* dav pi_netrw.txt /*dav* +davs pi_netrw.txt /*davs* daw motion.txt /*daw* dd change.txt /*dd* debug-gcc debug.txt /*debug-gcc* @@ -5317,7 +5322,9 @@ fixed-6.3 version6.txt /*fixed-6.3* fixed-6.4 version6.txt /*fixed-6.4* fixed-7.1 version7.txt /*fixed-7.1* flexwiki.vim syntax.txt /*flexwiki.vim* +float2nr() eval.txt /*float2nr()* floating-point-format eval.txt /*floating-point-format* +floor() eval.txt /*floor()* fname_diff-variable eval.txt /*fname_diff-variable* fname_in-variable eval.txt /*fname_in-variable* fname_new-variable eval.txt /*fname_new-variable* @@ -5624,6 +5631,7 @@ g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf* g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp* g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* +g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen* g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions* g:tar_cmd pi_tar.txt /*g:tar_cmd* g:tar_nomax pi_tar.txt /*g:tar_nomax* @@ -6250,6 +6258,7 @@ locale-name mbyte.txt /*locale-name* localtime() eval.txt /*localtime()* location-list quickfix.txt /*location-list* location-list-window quickfix.txt /*location-list-window* +log10() eval.txt /*log10()* long-lines version5.txt /*long-lines* lowercase change.txt /*lowercase* lpc.vim syntax.txt /*lpc.vim* @@ -6464,7 +6473,6 @@ netrw-bookmark pi_netrw.txt /*netrw-bookmark* netrw-bookmarks pi_netrw.txt /*netrw-bookmarks* netrw-browse pi_netrw.txt /*netrw-browse* netrw-browse-cmds pi_netrw.txt /*netrw-browse-cmds* -netrw-browse-intro pi_netrw.txt /*netrw-browse-intro* netrw-browse-maps pi_netrw.txt /*netrw-browse-maps* netrw-browser pi_netrw.txt /*netrw-browser* netrw-browser-options pi_netrw.txt /*netrw-browser-options* @@ -6479,7 +6487,6 @@ netrw-cr pi_netrw.txt /*netrw-cr* netrw-credits pi_netrw.txt /*netrw-credits* netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h* netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l* -netrw-ctrl_h pi_netrw.txt /*netrw-ctrl_h* netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l* netrw-curdir pi_netrw.txt /*netrw-curdir* netrw-d pi_netrw.txt /*netrw-d* @@ -6503,11 +6510,13 @@ netrw-gx pi_netrw.txt /*netrw-gx* netrw-handler pi_netrw.txt /*netrw-handler* netrw-help pi_netrw.txt /*netrw-help* netrw-hexplore pi_netrw.txt /*netrw-hexplore* +netrw-hide pi_netrw.txt /*netrw-hide* netrw-hiding pi_netrw.txt /*netrw-hiding* netrw-history pi_netrw.txt /*netrw-history* netrw-horiz pi_netrw.txt /*netrw-horiz* netrw-i pi_netrw.txt /*netrw-i* netrw-incompatible pi_netrw.txt /*netrw-incompatible* +netrw-intro-browse pi_netrw.txt /*netrw-intro-browse* netrw-list pi_netrw.txt /*netrw-list* netrw-listbookmark pi_netrw.txt /*netrw-listbookmark* netrw-listhack pi_netrw.txt /*netrw-listhack* @@ -6518,6 +6527,7 @@ netrw-mc pi_netrw.txt /*netrw-mc* netrw-md pi_netrw.txt /*netrw-md* netrw-me pi_netrw.txt /*netrw-me* netrw-mf pi_netrw.txt /*netrw-mf* +netrw-mg pi_netrw.txt /*netrw-mg* netrw-mh pi_netrw.txt /*netrw-mh* netrw-ml_get pi_netrw.txt /*netrw-ml_get* netrw-mm pi_netrw.txt /*netrw-mm* @@ -6560,6 +6570,11 @@ netrw-psftp pi_netrw.txt /*netrw-psftp* netrw-putty pi_netrw.txt /*netrw-putty* netrw-qb pi_netrw.txt /*netrw-qb* netrw-qf pi_netrw.txt /*netrw-qf* +netrw-quickcom pi_netrw.txt /*netrw-quickcom* +netrw-quickcoms pi_netrw.txt /*netrw-quickcoms* +netrw-quickhelp pi_netrw.txt /*netrw-quickhelp* +netrw-quickmap pi_netrw.txt /*netrw-quickmap* +netrw-quickmaps pi_netrw.txt /*netrw-quickmaps* netrw-r pi_netrw.txt /*netrw-r* netrw-read pi_netrw.txt /*netrw-read* netrw-ref pi_netrw.txt /*netrw-ref* @@ -6818,6 +6833,7 @@ postscript-print-encoding print.txt /*postscript-print-encoding* postscript-print-trouble print.txt /*postscript-print-trouble* postscript-print-util print.txt /*postscript-print-util* postscript-printing print.txt /*postscript-printing* +pow() eval.txt /*pow()* ppwiz.vim syntax.txt /*ppwiz.vim* press-enter message.txt /*press-enter* press-return message.txt /*press-return* @@ -6997,6 +7013,7 @@ 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* ruby if_ruby.txt /*ruby* ruby-buffer if_ruby.txt /*ruby-buffer* @@ -7273,6 +7290,7 @@ sqlinformix.vim syntax.txt /*sqlinformix.vim* sqlj sql.txt /*sqlj* sqlserver sql.txt /*sqlserver* sqlsettype sql.txt /*sqlsettype* +sqrt() eval.txt /*sqrt()* sscanf eval.txt /*sscanf* standard-plugin usr_05.txt /*standard-plugin* standard-plugin-list help.txt /*standard-plugin-list* @@ -7652,6 +7670,7 @@ toolbar-icon gui.txt /*toolbar-icon* toupper() eval.txt /*toupper()* tr() eval.txt /*tr()* trojan-horse starting.txt /*trojan-horse* +trunc() eval.txt /*trunc()* try-conditionals eval.txt /*try-conditionals* try-echoerr eval.txt /*try-echoerr* try-finally eval.txt /*try-finally* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 0f9d02c0..b04f066e 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.1. Last change: 2008 Jun 04 +*todo.txt* For Vim version 7.1. Last change: 2008 Jun 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,25 +30,8 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -Finish incomplete utf-8 sequences patch. (Ben Schmidt) - -Bug when reading file with one byte 0xfc in utf-8. (Dominique Pelle, 2008 Apr -6) Ben Schmidt mentions it's already fixed by his patch (2008 May 16). - -Patch for BSD console mouse support. Paul Mahol, 2008 Apr 9, 2008 Apr 21. - -Problems with using :execute in Vim scripts. (rdancer / Jan Minar, 2008 May -14) Unpacked in /tmp/vulnerablevim/ -Problems with tar.vim, zip.vim and netrw forwarded to Charles Campbell. -Check out use of :exe starting with scripts.vim - -Crash with specific regexp. (Andreas Politz, 2008 May 22) - -Win32: patch for if_python.c /tmp/vim-win64.diff.1 - -Fix for matchparen HL doesn't work. beep. - -debian runtime files. (James Vega) +Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun +11) Don't install gvimtutor when compiled without GUI. (NAKAGAWA Tsuneo) @@ -57,6 +40,11 @@ Ukranian translations. Uses utf-8, add conversions in Makefile. When reallocating cmdline xp_pattern becomes invalid. Move expand_T xpc into ccline? (Dominique Pelle) +Docs corrections. (Adri Verhoef, 2008 Apr 23, Update Jun 19) +More docs corrections (John Beckett, Jun 19) + +Patch for BSD console mouse support. Paul Mahol, 2008 Apr 9, 2008 Apr 21. + Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3 laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1) Works OK with Vim in an xterm. @@ -64,24 +52,31 @@ Works OK with Vim in an xterm. Test 11 breaks after patch 7.1.186 on Win32 console. (Daniel Shahaf, 2008 Apr 10) +Fix for matchparen HL doesn't work. beep. + +Win32: associating a type of with Vim doesn't take care of space after a +backslash? (Robert Vibrant, 2008 Jun 5) + After using for command line completion after ":ta blah" and getting E33 (no tags file), further editing the command to e.g., ":echo 'blah'", the command is not executed. +Patch to return more info with mode() function. (Ben Schmidt, 2008 Jun 3) + Test this some more: Regexp: matchlist('12a4aaa', '^\(.\{-}\)\(\%5c\@<=a\+\)\(.\+\)\?') Returns ['12a4', 'aaa', '4aaa'], should be ['12a4', 'aaa', ''] Backreference not cleared when retrying after \@<= fails? (Brett Stahlman, 2008 March 8) -Docs corrections. (Adri Verhoef, 2008 Apr 23) - When adding path to 'tags' with a wildcard, it appears only a first match is used. (Erik Falor, 2008 April 18) Or is it that a wildcard in the file name is not supported, only in the path? Have a look at patch for utf-8 line breaking. (Yongwei Wu, 2008 Mar 1, Mar 23) +Patch to return noting when 'key' is empty. (Ben Schmidt, 2008 Jun 13) + Setting 'pastetoggle' to "jj" doesn't work. Was OK in vim 7.0. (James Vega, 2008 May 4) @@ -105,11 +100,16 @@ The utf class table is missing some entries: 0x26ab, circle Patch for netbeans.txt, Thoml, 2008 Mar 20 -Large update for netbeans.txt, Philippe Fremy, 2008 May 26 +Large update for netbeans.txt, Philippe Fremy, 2008 May 26, June 13 + +Patch for netbeans.c to improve error messages. (Philippe Fremy, 2008 Jun 6) Visual line mode doesn't highlight properly when 'showbreak' is used and the line doesn't fit. (Dasn, 2008 May 1) +GUI: In Normal mode can't yank the modeless selection. Make "gy" do this? +Works like CTRL-Y in Command line mode. + Patch to reduce FileChangedShellPost events. (John Little, 2008 May 18) GTK: Patch to avoid the command line going below the screen when Vim is @@ -187,7 +187,7 @@ C syntax: {} inside () causes following {} to be highlighted as error. (Michalis Giannakidis, 2006 Jun 1) 'ic' and 'smartcase' don't work properly when using \%V in search pattern. -(fritzophrenic, 2008 May 15) +(fritzophrenic, 2008 May 15) Patch by Kana Natsuno (kana), 2008 Jun 12. Win32: use of get_short_pathname() is bad. Add comments for function arguments. Check what happens for ":echo fnamemodify('c:\abc\abc', ':8')". @@ -343,6 +343,9 @@ properly? Cursor displayed in the wrong position when using 'numberwidth'. (James Vega, 2007 Jun 21) +When $VAR contains a backslash expand('$VAR') removes it. (Teemu Likonen, 2008 +Jun 18) + If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work. F1 - F4 in an xterm produce a different escape sequence when used with a @@ -365,6 +368,9 @@ C++ indenting wrong with "=". (James Kanze, 2007 Jan 26) ":lockvar" should use copyID to avoid endless loop. +When using --remote-silent and the file name matches 'wildignore' get an E479 +error. without --remoete-silent it works fine. (Ben Fritz, 2008 Jun 20) + Patch to use xterm mouse codes for screen. (Micah Cowan, 2007 May 8) Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then @@ -687,7 +693,8 @@ Patches: - ml_append_string(): efficiently append to an existing line. (Brad Beveridge, 2006 Aug 26) Use in some situations, e.g., when pasting a character at a time? -- gettabvar() and settabvar() functions. (Yegappan Lakshmanan, 2007 Sep 13) +- gettabvar() and settabvar() functions. (Yegappan Lakshmanan, 2007 Sep 13, + 2008 Jun 12) - recognize hex numbers better. (Mark Manning, 2006 Sep 13) @@ -1342,8 +1349,6 @@ Macintosh: 9 When "$" is in 'cpoptions' and folding is active, a "C" command changes the folds and resets w_lines_valid. The display updating doesn't work then. (Pritesh Mistry) -8 ":s!from!to!" works, but ":smagic!from!to!" doesn't. It sees the "!" as a - flag to to the command. Same for ":snomagic". (Johan Spetz) 8 Using ":s" in a function changes the previous replacement string. Save "old_sub" in save_search_patterns()? 8 Should allow multi-byte characters for the delimiter: ":s+a+b+" where "+" diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt index 9c621d72..0ed2e34c 100644 --- a/runtime/doc/usr_28.txt +++ b/runtime/doc/usr_28.txt @@ -1,4 +1,4 @@ -*usr_28.txt* For Vim version 7.1. Last change: 2006 Apr 24 +*usr_28.txt* For Vim version 7.1. Last change: 2008 Jun 14 VIM USER MANUAL - by Bram Moolenaar @@ -378,7 +378,7 @@ More about folding by expression in the reference manual: |fold-expr| This is useful when you set the 'diff' option in the same window. The |vimdiff| command does this for you. Example: > - setlocal diff foldmethod=diff scrollbind nowrap foldlevel=1 + :setlocal diff foldmethod=diff scrollbind nowrap foldlevel=1 Do this in every window that shows a different version of the same file. You will clearly see the differences between the files, while the text that didn't @@ -389,7 +389,7 @@ For more details see |fold-diff|. ============================================================================== *28.10* Which fold method to use? -All these possibilities makes you wonder which method you should chose. +All these possibilities make you wonder which method you should chose. Unfortunately, there is no golden rule. Here are some hints. If there is a syntax file with folding for the language you are editing, that diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index 942a15a7..0541e894 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -200,14 +200,14 @@ Then have Vim read this file with: > Jumping to errors will work like with the ":make" command. ============================================================================== -*30.2* Indenting C files +*30.2* Indenting C style text A program is much easier to understand when the lines have been properly -indented. Vim offers various ways to make this less work. - For C programs set the 'cindent' option. Vim knows a lot about C programs -and will try very hard to automatically set the indent for you. Set the -'shiftwidth' option to the amount of spaces you want for a deeper level. Four -spaces will work fine. One ":set" command will do it: > +indented. Vim offers various ways to make this less work. For C or C style +programs like Java or C++, set the 'cindent' option. Vim knows a lot about C +programs and will try very hard to automatically set the indent for you. Set +the 'shiftwidth' option to the amount of spaces you want for a deeper level. +Four spaces will work fine. One ":set" command will do it: > :set cindent shiftwidth=4 diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 29fce7d8..9825222b 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.1. Last change: 2008 May 28 +*usr_41.txt* For Vim version 7.1. Last change: 2008 Jun 18 VIM USER MANUAL - by Bram Moolenaar @@ -579,7 +579,8 @@ the function name to jump to detailed help on it. String manipulation: nr2char() get a character by its ASCII value char2nr() get ASCII value of a character - str2nr() convert a string to a number + str2nr() convert a string to a Number + str2float() convert a string to a Float printf() format a string according to % items escape() escape characters in a string with a '\' shellescape() escape a string for use with a shell command @@ -648,6 +649,16 @@ Dictionary manipulation: min() minimum value in a Dictionary count() count number of times a value appears +Floating point computation: + ceil() round up + float2nr() convert Float to Number + floor() round down + log10() logarithm to base 10 + pow() value of x to the exponent y + round() round off + sqrt() square root + trunc() remove value after decimal point + Variables: type() type of a variable islocked() check if a variable is locked diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 07a3dfa8..c3739455 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.1. Last change: 2008 Apr 30 +*various.txt* For Vim version 7.1. Last change: 2008 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -316,6 +316,7 @@ N *+find_in_path* include file searches: |[I|, |:isearch|, N *+folding* |folding| *+footer* |gui-footer| *+fork* Unix only: |fork| shell commands + *+float* Floating point support N *+gettext* message translations |multi-lang| *+GUI_Athena* Unix only: Athena |GUI| *+GUI_neXtaw* Unix only: neXtaw |GUI| diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 98472628..89af04cc 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2008 May 28 +" Last Change: 2008 Jun 20 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -532,6 +532,10 @@ au BufNewFile,BufRead *.si setf cuplsim " Debian Control au BufNewFile,BufRead */debian/control setf debcontrol +au BufNewFile,BufRead control + \ if getline(1) =~ '^Source:' + \| setf debcontrol + \| endif " Debian Sources.list au BufNewFile,BufRead /etc/apt/sources.list setf debsources @@ -748,6 +752,9 @@ au BufNewFile,BufRead *.hs setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell +" Haste +au BufNewFile,BufRead *.ht setf haste + " Hercules au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules @@ -1789,16 +1796,21 @@ au BufNewFile,BufRead *.rules call s:FTRules() let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*' func! s:FTRules() + if expand(':p') =~ '^/etc/udev/rules\.d/.*\.rules$' + setf udevrules + return + endif try let config_lines = readfile('/etc/udev/udev.conf') catch /^Vim\%((\a\+)\)\=:E484/ setf hog return endtry + let dir = expand(':p:h') for line in config_lines if line =~ s:ft_rules_udev_rules_pattern let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "") - if expand(':p:h') == udev_rules + if dir == udev_rules setf udevrules endif break @@ -2009,9 +2021,6 @@ au BufNewFile,BufRead *.uit,*.uil setf uil " Udev conf au BufNewFile,BufRead /etc/udev/udev.conf setf udevconf -" Udev rules -au BufNewFile,BufRead /etc/udev/rules.d/*.rules setf udevrules - " Udev permissions au BufNewFile,BufRead /etc/udev/permissions.d/*.permissions setf udevperm " diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index a3079d19..cd5b0716 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -1,10 +1,11 @@ -" Vim filetype plugin file (GUI menu and folding) +" Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog -" Maintainer: Michael Piefel -" Stefano Zacchiroli -" Last Change: $LastChangedDate: 2006-08-24 23:41:26 +0200 (gio, 24 ago 2006) $ +" Maintainer: Debian Vim Maintainers +" Former Maintainers: Michael Piefel +" Stefano Zacchiroli +" Last Change: 2008-03-08 " License: GNU GPL, version 2.0 or later -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/ftplugin/debchangelog.vim?op=file&rev=0&sc=0 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debchangelog.vim;hb=debian if exists("b:did_ftplugin") finish @@ -12,9 +13,11 @@ endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) -setlocal foldmethod=expr -setlocal foldexpr=GetDebChangelogFold(v:lnum) -setlocal foldtext=DebChangelogFoldText() +if exists("g:debchangelog_fold_enable") + setlocal foldmethod=expr + setlocal foldexpr=DebGetChangelogFold(v:lnum) + setlocal foldtext=DebChangelogFoldText() +endif " Debian changelogs are not supposed to have any other text width, " so the user cannot override this setting @@ -107,9 +110,8 @@ function NewVersion() call append(2, "") call append(3, " -- ") call append(4, "") - call Distribution("unstable") call Urgency("low") - normal 1G + normal 1G0 call search(")") normal h normal  @@ -240,6 +242,22 @@ function! s:getAuthor(zonestart, zoneend) return '[unknown]' endfunction +" Look for a package source name searching backward from the givenline and +" returns it. Return the empty string if the package name can't be found +function! DebGetPkgSrcName(lineno) + let lineidx = a:lineno + let pkgname = '' + while lineidx > 0 + let curline = getline(lineidx) + if curline =~ '^\S' + let pkgname = matchlist(curline, '^\(\S\+\).*$')[1] + break + endif + let lineidx = lineidx - 1 + endwhile + return pkgname +endfunction + function! DebChangelogFoldText() if v:folddashes == '-' " changelog entry fold return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' ' @@ -247,7 +265,7 @@ function! DebChangelogFoldText() return foldtext() endfunction -function! GetDebChangelogFold(lnum) +function! DebGetChangelogFold(lnum) let line = getline(a:lnum) if line =~ '^\w\+' return '>1' " beginning of a changelog entry @@ -261,7 +279,50 @@ function! GetDebChangelogFold(lnum) return '=' endfunction -foldopen! " unfold the entry the cursor is on (usually the first one) +silent! foldopen! " unfold the entry the cursor is on (usually the first one) + +" }}} + +" {{{1 omnicompletion for Closes: # + +if !exists('g:debchangelog_listbugs_severities') + let g:debchangelog_listbugs_severities = 'critical,grave,serious,important,normal,minor,wishlist' +endif + +fun! DebCompleteBugs(findstart, base) + if a:findstart + " it we are just after an '#', the completion should start at the '#', + " otherwise no completion is possible + let line = getline('.') + let colidx = col('.') + if colidx > 1 && line[colidx - 2] =~ '#' + let colidx = colidx - 2 + else + let colidx = -1 + endif + return colidx + else + if ! filereadable('/usr/sbin/apt-listbugs') + echoerr 'apt-listbugs not found, you should install it to use Closes bug completion' + return + endif + let pkgsrc = DebGetPkgSrcName(line('.')) + let listbugs_output = system('apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') + let bug_lines = split(listbugs_output, '\n') + let completions = [] + for line in bug_lines + let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$') + let completion = {} + let completion['word'] = parts[1] + let completion['menu'] = parts[2] + let completion['info'] = parts[0] + let completions += [completion] + endfor + return completions + endif +endfun + +setlocal omnifunc=DebCompleteBugs " }}} diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim new file mode 100644 index 00000000..2fb2ee7d --- /dev/null +++ b/runtime/ftplugin/debcontrol.vim @@ -0,0 +1,70 @@ +" Vim filetype plugin file (GUI menu and folding) +" Language: Debian control files +" Maintainer: Debian Vim Maintainers +" Former Maintainer: Pierre Habouzit +" Last Change: 2008-03-08 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debcontrol.vim;hb=debian + +" Do these settings once per buffer +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +" {{{1 Local settings (do on every load) +if exists("g:debcontrol_fold_enable") + setlocal foldmethod=expr + setlocal foldexpr=DebControlFold(v:lnum) + setlocal foldtext=DebControlFoldText() +endif +setlocal textwidth=0 + +" Clean unloading +let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<" + +" }}}1 + +" {{{1 folding + +function! s:getField(f, lnum) + let line = getline(a:lnum) + let fwdsteps = 0 + while line !~ '^'.a:f.':' + let fwdsteps += 1 + let line = getline(a:lnum + fwdsteps) + if line == '' + return 'unknown' + endif + endwhile + return substitute(line, '^'.a:f.': *', '', '') +endfunction + +function! DebControlFoldText() + if v:folddashes == '-' " debcontrol entry fold + let type = substitute(getline(v:foldstart), ':.*', '', '') + if type == 'Source' + let ftext = substitute(foldtext(), ' *Source: *', ' ', '') + return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' ' + endif + let arch = s:getField('Architecture', v:foldstart) + let ftext = substitute(foldtext(), ' *Package: *', ' [' . arch . '] ', '') + return ftext . ': ' . s:getField('Description', v:foldstart) . ' ' + endif + return foldtext() +endfunction + +function! DebControlFold(l) + + " This is for not merging blank lines around folds to them + if getline(a:l) =~ '^Source:' + return '>1' + endif + + if getline(a:l) =~ '^Package:' + return '>1' + endif + + return '=' +endfunction + +" }}}1 diff --git a/runtime/ftplugin/gitcommit.vim b/runtime/ftplugin/gitcommit.vim index b0f19bf0..bfc5b33f 100644 --- a/runtime/ftplugin/gitcommit.vim +++ b/runtime/ftplugin/gitcommit.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: git config file " Maintainer: Tim Pope -" Last Change: 2008 Mar 09 +" Last Change: 2008 Jun 04 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -54,12 +54,12 @@ function! s:gitdiffcached(bang,gitdir,...) let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"') endif if a:0 - let extra = join(map(copy(a:000),has("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) + let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'")) else let extra = "-p --stat=".&columns endif - call system(git." diff --cached --no-color ".extra." > ".name) - exe "pedit ".name + call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name)) + exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name) wincmd P let b:git_dir = a:gitdir command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(0,b:git_dir,) diff --git a/runtime/ftplugin/javascript.vim b/runtime/ftplugin/javascript.vim index 1ba44004..af5e4a92 100644 --- a/runtime/ftplugin/javascript.vim +++ b/runtime/ftplugin/javascript.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Javascript " Maintainer: Doug Kearns -" Last Change: 2007 Feb 21 +" Last Change: 2008 Jun 15 " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim if exists("b:did_ftplugin") @@ -28,7 +28,7 @@ setlocal commentstring=//%s " Change the :browse e filter to primarily show Java-related files. if has("gui_win32") - let b:browsefilter="Javascript Files (*.js)\t*.js\n" + let b:browsefilter="Javascript Files (*.js)\t*.js\n" . \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/getdos.aap b/runtime/getdos.aap index 7412c96d..f0658745 100644 --- a/runtime/getdos.aap +++ b/runtime/getdos.aap @@ -25,7 +25,7 @@ all fetch: @if get_md5(file) != "90fc32a08e0c4befdf86153d6947fd42": :fetch {fetch = $fetcha} $file file = doc/change.txt - @if get_md5(file) != "aa1a9165651f28f6b56f9c73a51f0176": + @if get_md5(file) != "fd95db2f772eba2ae1cce9d56fcc3fef": :fetch {fetch = $fetcha} $file file = doc/cmdline.txt @if get_md5(file) != "598af7cdc83a7b2dbc30526e07bd4bce": @@ -49,7 +49,7 @@ all fetch: @if get_md5(file) != "8a3025910524f7ce15177b66288bfe1a": :fetch {fetch = $fetcha} $file file = doc/eval.txt - @if get_md5(file) != "fb25c2877d895ab8b68d18efc9f1c9ca": + @if get_md5(file) != "54399ed078c9e43e2c2fb8526069ea41": :fetch {fetch = $fetcha} $file file = doc/farsi.txt @if get_md5(file) != "a03717a5a3d602b1ee31c97bfad0246e": @@ -61,7 +61,7 @@ all fetch: @if get_md5(file) != "0a01c9d9d7157e139f0c4fd02cf434ba": :fetch {fetch = $fetcha} $file file = doc/gui.txt - @if get_md5(file) != "4fe9fe5e950a8e675d112a94ea96f032": + @if get_md5(file) != "c0a4eacec0f484e4cb7f0e04bd60830b": :fetch {fetch = $fetcha} $file file = doc/gui_w16.txt @if get_md5(file) != "d07ba6a366621c3959872200c8a7c294": @@ -112,7 +112,7 @@ all fetch: @if get_md5(file) != "8135b6a875438a2b8bf95a5a92a9fa91": :fetch {fetch = $fetcha} $file file = doc/indent.txt - @if get_md5(file) != "cc1a84b8e964d77c735b262f9e2762e1": + @if get_md5(file) != "5bf3b345dd271c4d5d5447bfbbb29e44": :fetch {fetch = $fetcha} $file file = doc/index.txt @if get_md5(file) != "3f0816d3b135cd49a5e2773a78cf8f5f": @@ -130,7 +130,7 @@ all fetch: @if get_md5(file) != "7c5a348aff8c1496154f02226667a434": :fetch {fetch = $fetcha} $file file = doc/mlang.txt - @if get_md5(file) != "0ef3874cbaee3586c86d1dbb569b0e68": + @if get_md5(file) != "bf8d89c27b392e8b1529ff873084c085": :fetch {fetch = $fetcha} $file file = doc/motion.txt @if get_md5(file) != "64213fa4db138eb37c561eea1e06a8b9": @@ -190,22 +190,22 @@ all fetch: @if get_md5(file) != "457c78b890a01c38eb43e8a9ef1db652": :fetch {fetch = $fetcha} $file file = doc/pi_netrw.txt - @if get_md5(file) != "3e14dce6dbf81fc48827da952f86e4de": + @if get_md5(file) != "75187f585a03458b98aa2e6e2bafa9a3": :fetch {fetch = $fetcha} $file file = doc/pi_paren.txt - @if get_md5(file) != "a2b75fd9de0af918e6dd426b61eac0a7": + @if get_md5(file) != "61cc23a20b4330850d8c2d5c49633f06": :fetch {fetch = $fetcha} $file file = doc/pi_spec.txt @if get_md5(file) != "e9cffe18156bf2fbf5335b7ebb036a0a": :fetch {fetch = $fetcha} $file file = doc/pi_tar.txt - @if get_md5(file) != "6c96f4d6d1102c7292a9892355860687": + @if get_md5(file) != "e08cb7732c2626e91fa27c1e00c06a6a": :fetch {fetch = $fetcha} $file file = doc/pi_vimball.txt - @if get_md5(file) != "9b1ab2a18a3c33e7446dc2ea44bd3cfe": + @if get_md5(file) != "e28190caa74583710fc5fbea9267e9cf": :fetch {fetch = $fetcha} $file file = doc/pi_zip.txt - @if get_md5(file) != "c45c1499cefbb9586017bc8ae68aab8f": + @if get_md5(file) != "1fecece21c7f9fefde14a5cf1123e66d": :fetch {fetch = $fetcha} $file file = doc/print.txt @if get_md5(file) != "02c1522de006bd87c735f7374058b59a": @@ -253,7 +253,7 @@ all fetch: @if get_md5(file) != "837bad117e515c7f34c6b1e0405cde0d": :fetch {fetch = $fetcha} $file file = doc/syntax.txt - @if get_md5(file) != "6be4c637552d8e3c8182d9653bdac8b3": + @if get_md5(file) != "70ba44d5b30c0abbec583af33a1242e5": :fetch {fetch = $fetcha} $file file = doc/tabpage.txt @if get_md5(file) != "41ab372c309517455f66feb20300f150": @@ -268,7 +268,7 @@ all fetch: @if get_md5(file) != "8dea209a381e7fb5a9dcf53c683ca256": :fetch {fetch = $fetcha} $file file = doc/todo.txt - @if get_md5(file) != "fafbb537fd97193227ca1a0385927deb": + @if get_md5(file) != "48f27faa3b597d1aee09e5bcd4defff8": :fetch {fetch = $fetcha} $file file = doc/uganda.txt @if get_md5(file) != "95036d8022007f88d08c3a9358a04d74": @@ -337,13 +337,13 @@ all fetch: @if get_md5(file) != "64a0311bc3558d046c2c18ddb12d2a04": :fetch {fetch = $fetcha} $file file = doc/usr_28.txt - @if get_md5(file) != "9d10fee802303cb8a4359024598aa5c6": + @if get_md5(file) != "4a6fe9f944dc7ee7d827bfb12a566515": :fetch {fetch = $fetcha} $file file = doc/usr_29.txt @if get_md5(file) != "ef46dedbe1818d033193c93cb4bbc16b": :fetch {fetch = $fetcha} $file file = doc/usr_30.txt - @if get_md5(file) != "374cb474f910f1784d87c5b996893efe": + @if get_md5(file) != "c1d9efcb43621d971523a74965ade8f6": :fetch {fetch = $fetcha} $file file = doc/usr_31.txt @if get_md5(file) != "e4ba0a1d8c91473fb6cd01c373d791c1": @@ -355,7 +355,7 @@ all fetch: @if get_md5(file) != "1d7c817fa0127fffeda9ace837d80591": :fetch {fetch = $fetcha} $file file = doc/usr_41.txt - @if get_md5(file) != "890db1bcb6606992b88215a2ac26cadd": + @if get_md5(file) != "6a1e9219fe110146da34044794da5c4a": :fetch {fetch = $fetcha} $file file = doc/usr_42.txt @if get_md5(file) != "2ffdf76a8dbd49e8c110800c9e5c5fcf": @@ -376,7 +376,7 @@ all fetch: @if get_md5(file) != "644136cd322e60281a6f88633910e985": :fetch {fetch = $fetcha} $file file = doc/various.txt - @if get_md5(file) != "803da2e08075345f446e8b56138c739b": + @if get_md5(file) != "353c456f0bc252683a8a2c6d34dbedfb": :fetch {fetch = $fetcha} $file file = doc/version4.txt @if get_md5(file) != "799e8ede6d83a605493901b95b1c197d": @@ -614,16 +614,16 @@ all fetch: @if get_md5(file) != "1950435d77e9a4da5c6f710873392066": :fetch {fetch = $fetcha} $file file = vimrc_example.vim - @if get_md5(file) != "c242c2e543f2b7b85cd0a86ada3ad528": + @if get_md5(file) != "5a1c2699b4f999074a98aaf4dcabd0d5": :fetch {fetch = $fetcha} $file file = filetype.vim - @if get_md5(file) != "ce814a0a49e30e99cb330aa5f616c60e": + @if get_md5(file) != "164b4a1020fc858bf76768d219e5a642": :fetch {fetch = $fetcha} $file file = scripts.vim @if get_md5(file) != "d12fede790b223bb56d42e35a0de6152": :fetch {fetch = $fetcha} $file file = menu.vim - @if get_md5(file) != "3bafb4f8404882b85d45c3871ba0bf31": + @if get_md5(file) != "051c8e90b930327a3dd891efbabf0663": :fetch {fetch = $fetcha} $file file = macmap.vim @if get_md5(file) != "74777953bb8d0667d691d779ea135c8e": @@ -669,13 +669,13 @@ all fetch: @if get_md5(file) != "14433d057f181ccc72a21cbf85347690": :fetch {fetch = $fetcha} $file file = autoload/netrw.vim - @if get_md5(file) != "bffddc6b0b239428c277bdb860e85ede": + @if get_md5(file) != "559d8062a2ca29ec3e21ca1b5f06f83e": :fetch {fetch = $fetcha} $file file = autoload/netrwFileHandlers.vim @if get_md5(file) != "3bda9a928d5d5ea2507c9c221ba7902e": :fetch {fetch = $fetcha} $file file = autoload/netrwSettings.vim - @if get_md5(file) != "be205f4819d6fcaf95631ccdeb2c5330": + @if get_md5(file) != "e03695005d8e413c487a982da1ba13af": :fetch {fetch = $fetcha} $file file = autoload/paste.vim @if get_md5(file) != "ea89e81910ef039f52659f72e069cb79": @@ -687,7 +687,7 @@ all fetch: @if get_md5(file) != "596171ad6a5ad77cd799af17f2bb69b0": :fetch {fetch = $fetcha} $file file = autoload/rubycomplete.vim - @if get_md5(file) != "a3531058b12c52d27fe77bfa53a78be6": + @if get_md5(file) != "cae7de5a750697ed630ae5e127c6f043": :fetch {fetch = $fetcha} $file file = autoload/spellfile.vim @if get_md5(file) != "5b944373c38159ea95a96e3a317c5ef0": @@ -699,16 +699,16 @@ all fetch: @if get_md5(file) != "f9720c367264ffa0a4dc71d245ed8593": :fetch {fetch = $fetcha} $file file = autoload/tar.vim - @if get_md5(file) != "fb8763aa7f9e9f2791c0584aaef1f886": + @if get_md5(file) != "bfe38c25116af6c5c7c864ba5f5198d7": :fetch {fetch = $fetcha} $file file = autoload/vimball.vim - @if get_md5(file) != "9104b0382b2c7c8d120af969737fe5cd": + @if get_md5(file) != "f479109ca8e37a045c6065eade6419f7": :fetch {fetch = $fetcha} $file file = autoload/xmlcomplete.vim @if get_md5(file) != "162431c8ad7e4bd183d460bc9736aef1": :fetch {fetch = $fetcha} $file file = autoload/zip.vim - @if get_md5(file) != "213d5f92e0a68d0ad007e5f5fc8f87df": + @if get_md5(file) != "e63e3c5809f652ed286c74300b4adb75": :fetch {fetch = $fetcha} $file file = autoload/README.txt @if get_md5(file) != "05d0473d5a9d9093421cc9532a1187e6": @@ -1039,7 +1039,7 @@ all fetch: @if get_md5(file) != "bed670801967d4c692132d8e7240d2f9": :fetch {fetch = $fetcha} $file file = indent/gitconfig.vim - @if get_md5(file) != "fb58fa26d9a65b5de3ac73a1d94d864b": + @if get_md5(file) != "48ea111c7429071457e777d19834a3bb": :fetch {fetch = $fetcha} $file file = indent/hamster.vim @if get_md5(file) != "fb88a47bd3ff137fb1f93be774f5a5d2": @@ -1292,7 +1292,10 @@ all fetch: @if get_md5(file) != "778c451ff7e3036fcdca2c31e40e0d76": :fetch {fetch = $fetcha} $file file = ftplugin/debchangelog.vim - @if get_md5(file) != "b7c17cc29e37555077decffb43cdec8e": + @if get_md5(file) != "c011074a1c7a0daf4a71e065d3e70781": + :fetch {fetch = $fetcha} $file + file = ftplugin/debcontrol.vim + @if get_md5(file) != "7c4d7dd999a3b5ff0677af6ef3bf4edc": :fetch {fetch = $fetcha} $file file = ftplugin/denyhosts.vim @if get_md5(file) != "39fc1463231036e74b05f718fce7da40": @@ -1345,12 +1348,12 @@ all fetch: file = ftplugin/git.vim @if get_md5(file) != "ba9e00dc1f52acbfd8452c6db534273f": :fetch {fetch = $fetcha} $file - file = ftplugin/gitcommit.vim - @if get_md5(file) != "cc1cbb4ba258448e343da67c487c281b": - :fetch {fetch = $fetcha} $file file = ftplugin/gpg.vim @if get_md5(file) != "9147dd06409a4d250105be098854e226": :fetch {fetch = $fetcha} $file + file = ftplugin/gitcommit.vim + @if get_md5(file) != "53d7d736848d54cd0b9cbff64a3c86d6": + :fetch {fetch = $fetcha} $file file = ftplugin/gitconfig.vim @if get_md5(file) != "3b487d55e02ffa57e89aea417964baff": :fetch {fetch = $fetcha} $file @@ -1397,7 +1400,7 @@ all fetch: @if get_md5(file) != "5c179b28b34ab626e19eeb2b9ba6b2a8": :fetch {fetch = $fetcha} $file file = ftplugin/javascript.vim - @if get_md5(file) != "e8756b7a2e3c41b6008fcc6f424a462a": + @if get_md5(file) != "ab169dd482336f76553d752f65603fd0": :fetch {fetch = $fetcha} $file file = ftplugin/jsp.vim @if get_md5(file) != "9308873f18f59da0e92db29bc681bebc": @@ -1423,9 +1426,6 @@ all fetch: file = ftplugin/lisp.vim @if get_md5(file) != "1d79694ec87386f8a4b2650a8c78da39": :fetch {fetch = $fetcha} $file - file = ftplugin/lua.vim - @if get_md5(file) != "8bed2a23a456dbbe052cd8fd714cd823": - :fetch {fetch = $fetcha} $file file = ftplugin/loginaccess.vim @if get_md5(file) != "c6522ff76275ccaf55c0c97cedab3b51": :fetch {fetch = $fetcha} $file @@ -1435,6 +1435,9 @@ all fetch: file = ftplugin/lprolog.vim @if get_md5(file) != "93cf90212db1cbbb44ab5b042119d1f2": :fetch {fetch = $fetcha} $file + file = ftplugin/lua.vim + @if get_md5(file) != "8bed2a23a456dbbe052cd8fd714cd823": + :fetch {fetch = $fetcha} $file file = ftplugin/m4.vim @if get_md5(file) != "434ff2cfd6e48a2182d0a1a875ed745b": :fetch {fetch = $fetcha} $file @@ -1570,6 +1573,9 @@ all fetch: file = ftplugin/screen.vim @if get_md5(file) != "c2f3c233a1dfba0eeed39579e822cd29": :fetch {fetch = $fetcha} $file + file = ftplugin/sh.vim + @if get_md5(file) != "b5d54eaf716b3309c656f8b93dda9f0a": + :fetch {fetch = $fetcha} $file file = ftplugin/sensors.vim @if get_md5(file) != "ad70e088c5db6136e13dcb560756b7a4": :fetch {fetch = $fetcha} $file @@ -1582,9 +1588,6 @@ all fetch: file = ftplugin/sgml.vim @if get_md5(file) != "b81ffc0ba0f135b813f1ca8d3bed9567": :fetch {fetch = $fetcha} $file - file = ftplugin/sh.vim - @if get_md5(file) != "b5d54eaf716b3309c656f8b93dda9f0a": - :fetch {fetch = $fetcha} $file file = ftplugin/sieve.vim @if get_md5(file) != "ed111db6a062c537c4b6f9b884a75777": :fetch {fetch = $fetcha} $file @@ -1695,7 +1698,7 @@ all fetch: @if get_md5(file) != "f4498a3d49212757d42e03a7855c60b8": :fetch {fetch = $fetcha} $file file = plugin/netrwPlugin.vim - @if get_md5(file) != "e2828d73d629a3fda0037c491e986486": + @if get_md5(file) != "95afb093f2ef49aa571840feab897c5f": :fetch {fetch = $fetcha} $file file = plugin/rrhelper.vim @if get_md5(file) != "43cf94ae9c34e18e86ecde61f31f17b0": @@ -1704,16 +1707,16 @@ all fetch: @if get_md5(file) != "78a26299e645b91f831e66c34c2b61cb": :fetch {fetch = $fetcha} $file file = plugin/tarPlugin.vim - @if get_md5(file) != "b113e567973ed28841381d3268ad31d9": + @if get_md5(file) != "25c711413f0027bde7854536c7c28dd6": :fetch {fetch = $fetcha} $file file = plugin/tohtml.vim @if get_md5(file) != "2b3dc0d481bf35fbcd9c3d29f9fc04f8": :fetch {fetch = $fetcha} $file file = plugin/vimballPlugin.vim - @if get_md5(file) != "c2de03bffced08fbf98f80a8bac33f61": + @if get_md5(file) != "64b4f897f71184d11243bd4a74c65cb8": :fetch {fetch = $fetcha} $file file = plugin/zipPlugin.vim - @if get_md5(file) != "c636fe725bc148eec8617c9b1fede2a1": + @if get_md5(file) != "1a439fd663dd690af386bc14e7f15afc": :fetch {fetch = $fetcha} $file file = plugin/README.txt @if get_md5(file) != "e52c32d264ac26b4996b44d3b58b3629": @@ -1819,7 +1822,7 @@ all fetch: @if get_md5(file) != "604da3bc4d8516ffbad2687e6385efc8": :fetch {fetch = $fetcha} $file file = syntax/automake.vim - @if get_md5(file) != "d096883080e01824cf90922d50d06f80": + @if get_md5(file) != "226bef21fc2717c05bc5738b227d6678": :fetch {fetch = $fetcha} $file file = syntax/ave.vim @if get_md5(file) != "a6cf8b1b2097201c00d32170ffad1593": @@ -1930,7 +1933,7 @@ all fetch: @if get_md5(file) != "f52424296ada7a26aedf0af8abc0841f": :fetch {fetch = $fetcha} $file file = syntax/colortest.vim - @if get_md5(file) != "913ff219467b135ee1bdf7c23cf961dd": + @if get_md5(file) != "08e7fc64d42be83118dccf1dc0d5fdda": :fetch {fetch = $fetcha} $file file = syntax/conaryrecipe.vim @if get_md5(file) != "dcfa5e70bfbfaaf1df911ee551171ae2": @@ -2008,10 +2011,10 @@ all fetch: @if get_md5(file) != "e71752a058ba2786962f3ea97e39e3bc": :fetch {fetch = $fetcha} $file file = syntax/debchangelog.vim - @if get_md5(file) != "4ff4d283fe7f57093293cf74c0803261": + @if get_md5(file) != "cf1770c0abcbd76a73c1513a404b46a7": :fetch {fetch = $fetcha} $file file = syntax/debcontrol.vim - @if get_md5(file) != "92b2cd3df5f605f77f4af43a7c2f3e03": + @if get_md5(file) != "17c7bfbe4b616db9f468fd54f8c107cf": :fetch {fetch = $fetcha} $file file = syntax/debsources.vim @if get_md5(file) != "73efe38672a1d048644a203ba52fc566": @@ -2203,7 +2206,7 @@ all fetch: @if get_md5(file) != "57c6755f1beaf1a0b24482845bd5c7cc": :fetch {fetch = $fetcha} $file file = syntax/gitconfig.vim - @if get_md5(file) != "911b02f6e8357bd1d808e19a1ebe4c13": + @if get_md5(file) != "eeed0255ca4ba8bc0b744c8944aa906c": :fetch {fetch = $fetcha} $file file = syntax/gitrebase.vim @if get_md5(file) != "7abecc96fd03a4091c37798187c0d3d5": @@ -2253,6 +2256,9 @@ all fetch: file = syntax/haskell.vim @if get_md5(file) != "503ad33bfa43aba69b686199cc3086d4": :fetch {fetch = $fetcha} $file + file = syntax/haste.vim + @if get_md5(file) != "4824a58ce5878b275d84b16ca15b169f": + :fetch {fetch = $fetcha} $file file = syntax/hb.vim @if get_md5(file) != "03894f70998cc0acfae1427dfac5d189": :fetch {fetch = $fetcha} $file @@ -2478,6 +2484,9 @@ all fetch: file = syntax/manconf.vim @if get_md5(file) != "720dd0deb4641557b53ccd899764d134": :fetch {fetch = $fetcha} $file + file = syntax/mel.vim + @if get_md5(file) != "6d2328b2bf69567d7e2bd8e57021729a": + :fetch {fetch = $fetcha} $file file = syntax/manual.vim @if get_md5(file) != "8ecc9fabc2934189cd62e1c72acbace4": :fetch {fetch = $fetcha} $file @@ -2499,9 +2508,6 @@ all fetch: file = syntax/maxima.vim @if get_md5(file) != "ec7d20c9c9f5a3e61355e867807f366c": :fetch {fetch = $fetcha} $file - file = syntax/mel.vim - @if get_md5(file) != "6d2328b2bf69567d7e2bd8e57021729a": - :fetch {fetch = $fetcha} $file file = syntax/messages.vim @if get_md5(file) != "2b69b8b92bf04bfbb8fbea4370ee9cb9": :fetch {fetch = $fetcha} $file @@ -2559,12 +2565,12 @@ all fetch: file = syntax/msidl.vim @if get_md5(file) != "835f2f1c100a434ba8eac461781849b7": :fetch {fetch = $fetcha} $file - file = syntax/msmessages.vim - @if get_md5(file) != "a343b32ff07b39dd40add742144f03d3": - :fetch {fetch = $fetcha} $file file = syntax/ncf.vim @if get_md5(file) != "f8f4a06bde14fc24a235cad0106cf996": :fetch {fetch = $fetcha} $file + file = syntax/msmessages.vim + @if get_md5(file) != "a343b32ff07b39dd40add742144f03d3": + :fetch {fetch = $fetcha} $file file = syntax/msql.vim @if get_md5(file) != "2484ca59e54c962f569baf45c8b59355": :fetch {fetch = $fetcha} $file @@ -2701,7 +2707,7 @@ all fetch: @if get_md5(file) != "e9447c3d4bcded039a32f15357d74dca": :fetch {fetch = $fetcha} $file file = syntax/po.vim - @if get_md5(file) != "36f2598e075459ef8d75e2c3ed8a90ce": + @if get_md5(file) != "48241f5f76bea4e3b2d31bbbbf8f13db": :fetch {fetch = $fetcha} $file file = syntax/pod.vim @if get_md5(file) != "00cd74ee8bc6d02b6a2370b7e3bd8709": @@ -2790,15 +2796,12 @@ all fetch: file = syntax/rebol.vim @if get_md5(file) != "46c8feb1c88165d674859628b4c9add6": :fetch {fetch = $fetcha} $file - file = syntax/registry.vim - @if get_md5(file) != "535db8a67588b5cffaf5f4191aeb0c94": - :fetch {fetch = $fetcha} $file - file = syntax/rib.vim - @if get_md5(file) != "ea09dc17b5b792b2aeeed401ec92b027": - :fetch {fetch = $fetcha} $file file = syntax/remind.vim @if get_md5(file) != "4ab65bbfd0c7737eea0e7d1511d0e006": :fetch {fetch = $fetcha} $file + file = syntax/registry.vim + @if get_md5(file) != "535db8a67588b5cffaf5f4191aeb0c94": + :fetch {fetch = $fetcha} $file file = syntax/resolv.vim @if get_md5(file) != "251a5afb45c90df50c6d3a72cde1e75c": :fetch {fetch = $fetcha} $file @@ -2811,6 +2814,9 @@ all fetch: file = syntax/rhelp.vim @if get_md5(file) != "8b5f5ad8210359a48e226494d8ac591e": :fetch {fetch = $fetcha} $file + file = syntax/rib.vim + @if get_md5(file) != "ea09dc17b5b792b2aeeed401ec92b027": + :fetch {fetch = $fetcha} $file file = syntax/rnc.vim @if get_md5(file) != "11df701d2e329463c676f4f485673d9a": :fetch {fetch = $fetcha} $file @@ -2871,21 +2877,21 @@ all fetch: file = syntax/services.vim @if get_md5(file) != "a17575f0ba54e8fb1148ddfc2361d776": :fetch {fetch = $fetcha} $file - file = syntax/setserial.vim - @if get_md5(file) != "a357be9e6fa9645a859603e369fe2bee": - :fetch {fetch = $fetcha} $file - file = syntax/sh.vim - @if get_md5(file) != "dc4d9ee7b2435727cce075b30ba55ebb": - :fetch {fetch = $fetcha} $file file = syntax/sgml.vim @if get_md5(file) != "302a181b53f010cfa913bcbc30c43838": :fetch {fetch = $fetcha} $file + file = syntax/setserial.vim + @if get_md5(file) != "a357be9e6fa9645a859603e369fe2bee": + :fetch {fetch = $fetcha} $file file = syntax/sgmldecl.vim @if get_md5(file) != "ffa2933c8a1d13fbe598ed6f8890569b": :fetch {fetch = $fetcha} $file file = syntax/sgmllnx.vim @if get_md5(file) != "404e12a006c2ed62b52a3aa78ffac628": :fetch {fetch = $fetcha} $file + file = syntax/sh.vim + @if get_md5(file) != "dc4d9ee7b2435727cce075b30ba55ebb": + :fetch {fetch = $fetcha} $file file = syntax/sicad.vim @if get_md5(file) != "a6d1915486833764fcd64622f260d52b": :fetch {fetch = $fetcha} $file @@ -3094,7 +3100,7 @@ all fetch: @if get_md5(file) != "e4e220d82ced65a5fafcc289668da7e9": :fetch {fetch = $fetcha} $file file = syntax/tpp.vim - @if get_md5(file) != "2672069ba6a34304386a9def6d759018": + @if get_md5(file) != "e82a3f0846f2682a3062dffdfd7882ef": :fetch {fetch = $fetcha} $file file = syntax/trasys.vim @if get_md5(file) != "40bbb16cbbab3a509c45e883dc1ae9e4": @@ -3410,7 +3416,7 @@ all fetch: @if get_md5(file) != "b4cc58bc30631ff955a2573353f42e65": :fetch {fetch = $fetcha} $file file = lang/menu_ca_es.latin1.vim - @if get_md5(file) != "846efc0dafec5be7abbe9d166c82beb5": + @if get_md5(file) != "af2216863148e257fe998c7e0bb8eb9a": :fetch {fetch = $fetcha} $file file = lang/menu_ca_es.utf-8.vim @if get_md5(file) != "b4cc58bc30631ff955a2573353f42e65": @@ -3999,7 +4005,7 @@ all fetch: @if get_md5(file) != "afca74b7f39f3c2f848cbca5d5857546": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr - @if get_md5(file) != "7183b651034dd958fb27603e0e333e85": + @if get_md5(file) != "684efe29ed03ae5b094cfcc4160b3573": :fetch {fetch = $fetcha} $file file = tutor/tutor.hu @if get_md5(file) != "af021db8eb4b8d53632800323403d796": @@ -4035,10 +4041,10 @@ all fetch: @if get_md5(file) != "1137516f087b4d1243ffd0c611217d1f": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr.cp1250 - @if get_md5(file) != "853f187d467397227abae4ea9e11c728": + @if get_md5(file) != "fae340923f76c66546406f45facc187d": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr.utf-8 - @if get_md5(file) != "bbee200bf9a0f3ec5e689982cf2f6549": + @if get_md5(file) != "26a1b9caefc27f32882f5e8119d91d4d": :fetch {fetch = $fetcha} $file file = tutor/tutor.hu.cp1250 @if get_md5(file) != "af021db8eb4b8d53632800323403d796": @@ -4099,10 +4105,10 @@ all fetch: @if get_md5(file) != "573e878e2b6bdcda80a316ab876fd5db": :fetch {fetch = $fetcha} $file file = spell/cleanadd.vim - @if get_md5(file) != "c7589f18a56bd905e73fcc9dbe098ede": + @if get_md5(file) != "80af6888c3a40045e645f0a433b4521a": :fetch {fetch = $fetcha} $file file = spell/cleanadd.vim - @if get_md5(file) != "c7589f18a56bd905e73fcc9dbe098ede": + @if get_md5(file) != "80af6888c3a40045e645f0a433b4521a": :fetch {fetch = $fetcha} $file file = spell/he.vim @if get_md5(file) != "2ed8c67c392ba82189dadea349bfd20c": @@ -4135,7 +4141,7 @@ all fetch: @if get_md5(file) != "af0da03b5c998a8f8ed94a66763febd9": :fetch {fetch = $fetcha} $file file = doc/tags - @if get_md5(file) != "b36b151a7409d2ee5d2819d9dea3d806": + @if get_md5(file) != "490e1add05d911707745d2d458cdb464": :fetch {fetch = $fetcha} $file :mkdir {f} print file = print/ascii.ps diff --git a/runtime/getunix.aap b/runtime/getunix.aap index 27de93c1..47db0c5d 100644 --- a/runtime/getunix.aap +++ b/runtime/getunix.aap @@ -73,7 +73,7 @@ all fetch: @if get_md5(file) != "50890e9879c563578691f0f25d0531e9": :fetch {fetch = $fetcha} $file file = doc/mlang.txt - @if get_md5(file) != "4428d0de81e84479b0012c5dc2ede13a": + @if get_md5(file) != "7c42445e3ea6adc194a8664f6a9b6a14": :fetch {fetch = $fetcha} $file file = doc/mbyte.txt @if get_md5(file) != "89d1b6f32e357d22ac760ea408039f4b": @@ -103,7 +103,7 @@ all fetch: @if get_md5(file) != "68c9ba2eb91763db96e103384b9242a0": :fetch {fetch = $fetcha} $file file = doc/pi_zip.txt - @if get_md5(file) != "ea66bdd47b13daa5e7cd263263dd2cd8": + @if get_md5(file) != "90b8a42284f104918bb128e833cb2744": :fetch {fetch = $fetcha} $file file = doc/os_dos.txt @if get_md5(file) != "228a0959a5f3bc656307d108ba7235a6": @@ -118,13 +118,13 @@ all fetch: @if get_md5(file) != "7c42b19d1b8503c48d3336ea96038873": :fetch {fetch = $fetcha} $file file = doc/pi_vimball.txt - @if get_md5(file) != "eabc33585b63a1051065ae00333550d9": + @if get_md5(file) != "09eb5bcc4fcb7be913d55d496ef6cc40": :fetch {fetch = $fetcha} $file file = doc/cmdline.txt @if get_md5(file) != "9a38b598e77234235058e01d31205a0b": :fetch {fetch = $fetcha} $file file = doc/pi_netrw.txt - @if get_md5(file) != "392956a16c2edc8dacdb425ffd4f4c28": + @if get_md5(file) != "0be0a89bc18f3a5d2ab54280f550eecd": :fetch {fetch = $fetcha} $file file = doc/quotes.txt @if get_md5(file) != "15b84662e71c269dfdde642227cbb388": @@ -141,9 +141,6 @@ all fetch: file = doc/os_risc.txt @if get_md5(file) != "c2c6c8a91ff09b250f4d85f3fa6366c5": :fetch {fetch = $fetcha} $file - file = doc/eval.txt - @if get_md5(file) != "72d04de20a907007257536b5ad47c606": - :fetch {fetch = $fetcha} $file file = doc/rileft.txt @if get_md5(file) != "28cd046695a832a78d7511d3b1f39d25": :fetch {fetch = $fetcha} $file @@ -163,7 +160,7 @@ all fetch: @if get_md5(file) != "3e077702c81be58c579499f5e5680b83": :fetch {fetch = $fetcha} $file file = doc/various.txt - @if get_md5(file) != "43c5954b7e2190ea65c6a1ebb94f7b46": + @if get_md5(file) != "d40b66bdb39767656021778cc4b2a7b7": :fetch {fetch = $fetcha} $file file = doc/version4.txt @if get_md5(file) != "923c050e307ba78440df9b3294881f60": @@ -180,6 +177,9 @@ all fetch: file = doc/usr_toc.txt @if get_md5(file) != "4dcf12f8efcd403e16a61309e2453ab0": :fetch {fetch = $fetcha} $file + file = doc/pi_tar.txt + @if get_md5(file) != "a9b55ceaaafa214a02f2e93875fed4f5": + :fetch {fetch = $fetcha} $file file = doc/os_mint.txt @if get_md5(file) != "f586669ec2d77ba0997e0d0af1482726": :fetch {fetch = $fetcha} $file @@ -211,7 +211,7 @@ all fetch: @if get_md5(file) != "668b7ab304ab39bbca713fdad750c7ca": :fetch {fetch = $fetcha} $file file = doc/gui.txt - @if get_md5(file) != "33f5dc98d58d345c5445488066a60947": + @if get_md5(file) != "7de64586129b7fa4504649832d537b70": :fetch {fetch = $fetcha} $file file = doc/pi_spec.txt @if get_md5(file) != "287915217e5b2c2aef75da73c78da91f": @@ -220,10 +220,10 @@ all fetch: @if get_md5(file) != "094aeee56af8456b4d9c6d86c6a78f00": :fetch {fetch = $fetcha} $file file = doc/usr_41.txt - @if get_md5(file) != "6cc1651df82040161ed57b45d644f7b9": + @if get_md5(file) != "61dccfa1e91ec4e10d66fd01fb511f8e": :fetch {fetch = $fetcha} $file file = doc/syntax.txt - @if get_md5(file) != "bf19e4d6a6d0a521b08c1a1076c68c07": + @if get_md5(file) != "d0f35fdd31cde78373e52fc060aa1aa7": :fetch {fetch = $fetcha} $file file = doc/map.txt @if get_md5(file) != "69e75fa4a20ad0f6eb4449cdaa51e43d": @@ -241,7 +241,7 @@ all fetch: @if get_md5(file) != "5ac5d62e27cbb9019e4c585e732bdbe5": :fetch {fetch = $fetcha} $file file = doc/todo.txt - @if get_md5(file) != "fcb243d6816a3f4e7f9d08b002a54311": + @if get_md5(file) != "adb5341ff047770446d9f5a3d2274ad1": :fetch {fetch = $fetcha} $file file = doc/spell.txt @if get_md5(file) != "50522e1c859efcc928d5d133a0818355": @@ -250,7 +250,7 @@ all fetch: @if get_md5(file) != "fc1ded8853b27d15b867c9ec53bf69a1": :fetch {fetch = $fetcha} $file file = doc/change.txt - @if get_md5(file) != "9a42469a127ca32a6a8b880e4e86527a": + @if get_md5(file) != "ea7649b4d692e0cef328b5eb210f20b7": :fetch {fetch = $fetcha} $file file = doc/filetype.txt @if get_md5(file) != "74fe18ab5a7833b2aa7dde98b5bac112": @@ -268,10 +268,10 @@ all fetch: @if get_md5(file) != "5ba99c6a2c8712171f4fbffbc6efc35d": :fetch {fetch = $fetcha} $file file = doc/usr_28.txt - @if get_md5(file) != "ed03e79e18bc8f83a203cea7584a8176": + @if get_md5(file) != "0d187ee3d2d969e449accf70368d2fd0": :fetch {fetch = $fetcha} $file file = doc/indent.txt - @if get_md5(file) != "e1f96ddb45ee7fe7b932ef3317a84ae7": + @if get_md5(file) != "8291438a9db26cff19e7f2d33b32b005": :fetch {fetch = $fetcha} $file file = doc/usr_07.txt @if get_md5(file) != "d46f1307d30706e7a3dc4ec6e8228555": @@ -358,7 +358,7 @@ all fetch: @if get_md5(file) != "071b5794f5b13e3820d1229182bfd0bf": :fetch {fetch = $fetcha} $file file = doc/usr_30.txt - @if get_md5(file) != "cd29ad8e82902185e6e95e70deeee98c": + @if get_md5(file) != "b612be3081d4406e14fc3b1ed6459017": :fetch {fetch = $fetcha} $file file = doc/usr_44.txt @if get_md5(file) != "a5b2ebb3e928a61a1227f22d7d9b7ad4": @@ -372,12 +372,12 @@ all fetch: file = doc/hebrew.txt @if get_md5(file) != "ac1ffad847ac701c94776cbbd4cfc630": :fetch {fetch = $fetcha} $file + file = doc/eval.txt + @if get_md5(file) != "b8e2a90507f8e748a5e803f1e82b2c04": + :fetch {fetch = $fetcha} $file file = doc/debug.txt @if get_md5(file) != "ba7e69822ab30a1839827a9e778e52dc": :fetch {fetch = $fetcha} $file - file = doc/pi_tar.txt - @if get_md5(file) != "7d8e785a1108c5e57d499a88d104bc49": - :fetch {fetch = $fetcha} $file file = doc/usr_03.txt @if get_md5(file) != "1c6d65dc815e38d097ec1bece77e6bd5": :fetch {fetch = $fetcha} $file @@ -400,7 +400,7 @@ all fetch: @if get_md5(file) != "8e7b28c7343d7c62f53454d8de820b20": :fetch {fetch = $fetcha} $file file = doc/pi_paren.txt - @if get_md5(file) != "caaf9368fa7357888cbb927d83ed69a8": + @if get_md5(file) != "ca73b5b000b07766169c538dc35fc8da": :fetch {fetch = $fetcha} $file file = doc/Makefile @if get_md5(file) != "cebac4966250f4516d71fd4abf60203a": @@ -614,16 +614,16 @@ all fetch: @if get_md5(file) != "8e25f2fe3e864e6b6dcc095aa79dc481": :fetch {fetch = $fetcha} $file file = vimrc_example.vim - @if get_md5(file) != "a4a06b78cf32020ef9a9463dec40f1b8": + @if get_md5(file) != "f4e95a89fa9ff5db75e7c10fceda2753": :fetch {fetch = $fetcha} $file file = filetype.vim - @if get_md5(file) != "6bfc9942af1cc71c87eb30db0a96fa53": + @if get_md5(file) != "fb719f00172217df2889cdd39cdd8f9a": :fetch {fetch = $fetcha} $file file = scripts.vim @if get_md5(file) != "a60f76688abbee456b84a5026957145b": :fetch {fetch = $fetcha} $file file = menu.vim - @if get_md5(file) != "c84caf9493491cffdcf0a0c2802fffc7": + @if get_md5(file) != "7b2981209c77be17016e9f7be851b43d": :fetch {fetch = $fetcha} $file file = macmap.vim @if get_md5(file) != "ed5a8c76cb5d4f1a41388190a2710bd8": @@ -642,13 +642,13 @@ all fetch: @if get_md5(file) != "7998e4986ae0e42c49d32d5ebaf451a3": :fetch {fetch = $fetcha} $file file = autoload/tar.vim - @if get_md5(file) != "d4bfc0f2c5b15370e07f7a381887fe2f": + @if get_md5(file) != "a50fee2ec2729ba6ab6b329cff6bfea2": :fetch {fetch = $fetcha} $file file = autoload/zip.vim - @if get_md5(file) != "53a30c5c9f61b1e19ea86db3025a5379": + @if get_md5(file) != "92ada147f11add57fb5502911e32660f": :fetch {fetch = $fetcha} $file file = autoload/netrw.vim - @if get_md5(file) != "8d8f7596b600226a9fc658a13eca9d34": + @if get_md5(file) != "f464850da51dd7c81925467af21eb356": :fetch {fetch = $fetcha} $file file = autoload/htmlcomplete.vim @if get_md5(file) != "d9d1276818e532f0a6257e6e9ad8d2d6": @@ -678,10 +678,10 @@ all fetch: @if get_md5(file) != "1f1968eab49f4a4639b319c82479506b": :fetch {fetch = $fetcha} $file file = autoload/vimball.vim - @if get_md5(file) != "f2dcd6b653434338a03b465914917540": + @if get_md5(file) != "3e0031d7fa463ebc2d4af5ecb7c5ebd5": :fetch {fetch = $fetcha} $file file = autoload/netrwSettings.vim - @if get_md5(file) != "ca1b361013dcd7af76d7a7244341c47a": + @if get_md5(file) != "d8d481fbc20416a78d6e08150fea14e2": :fetch {fetch = $fetcha} $file file = autoload/javascriptcomplete.vim @if get_md5(file) != "2b939814050b10dab16f7d2c9af2c130": @@ -693,7 +693,7 @@ all fetch: @if get_md5(file) != "fa0b605b88451ef0f273fa07e4910708": :fetch {fetch = $fetcha} $file file = autoload/rubycomplete.vim - @if get_md5(file) != "728e7be76eecf7e684afb16185182374": + @if get_md5(file) != "407aeddfed54e12d31c01e4ef6b075fd": :fetch {fetch = $fetcha} $file file = autoload/pythoncomplete.vim @if get_md5(file) != "9edb84845c5f6b2c8bf9cb4814091b4b": @@ -1192,7 +1192,7 @@ all fetch: @if get_md5(file) != "962491efdb2cb28c6f5fb23c675b1694": :fetch {fetch = $fetcha} $file file = indent/gitconfig.vim - @if get_md5(file) != "a6b84b4eeb87e4bd9aebdaa1ccb9d2b2": + @if get_md5(file) != "ea7de2612cb354b4321d38cd367ddd2c": :fetch {fetch = $fetcha} $file file = indent/dtrace.vim @if get_md5(file) != "1057c3812cd98eaeed5c03da2b9650b4": @@ -1238,7 +1238,7 @@ all fetch: @if get_md5(file) != "e10ec208f1fedcd1e399d833ce24b9e7": :fetch {fetch = $fetcha} $file file = ftplugin/debchangelog.vim - @if get_md5(file) != "1a26b842d33732b6e4ec85a40b136566": + @if get_md5(file) != "80fdc08b08c0293e771639384e0d1206": :fetch {fetch = $fetcha} $file file = ftplugin/java.vim @if get_md5(file) != "0e32895f6071e299ff5ac44ff0eb5b1c": @@ -1607,7 +1607,7 @@ all fetch: @if get_md5(file) != "ae8597af5718b84da333762765e56665": :fetch {fetch = $fetcha} $file file = ftplugin/javascript.vim - @if get_md5(file) != "2e895163703bf84317fec28a567c1503": + @if get_md5(file) != "7689de94647eb8e0358590b7951a2a8b": :fetch {fetch = $fetcha} $file file = ftplugin/plaintex.vim @if get_md5(file) != "c035f3c412751170669435450708b225": @@ -1658,7 +1658,7 @@ all fetch: @if get_md5(file) != "f39746a4d4bd370b97700cdf394db145": :fetch {fetch = $fetcha} $file file = ftplugin/gitcommit.vim - @if get_md5(file) != "77af7f78fab74e2981dcdd50cbd240bc": + @if get_md5(file) != "f514c0b9fc40f58842619287772ffd8a": :fetch {fetch = $fetcha} $file file = ftplugin/gitconfig.vim @if get_md5(file) != "3c138b787077ede2b91db570efc5a586": @@ -1681,12 +1681,15 @@ all fetch: file = ftplugin/git.vim @if get_md5(file) != "db021719272e941d11408c853ffc302b": :fetch {fetch = $fetcha} $file + file = ftplugin/debcontrol.vim + @if get_md5(file) != "6fb6950902fc4575a564ecda0e3ef32d": + :fetch {fetch = $fetcha} $file file = ftplugin/README.txt @if get_md5(file) != "6fc526040d33514956850e8f314427d1": :fetch {fetch = $fetcha} $file :mkdir {f} plugin file = plugin/netrwPlugin.vim - @if get_md5(file) != "5c0a590691301b3f8e4aa70f0354f702": + @if get_md5(file) != "554ae4738c5ea7dad50d1ce5f992cab7": :fetch {fetch = $fetcha} $file file = plugin/gzip.vim @if get_md5(file) != "88a9ecef58f00ddc5775c242c3be525a": @@ -1701,16 +1704,16 @@ all fetch: @if get_md5(file) != "6240025a6335fd51ee25ce626465830f": :fetch {fetch = $fetcha} $file file = plugin/vimballPlugin.vim - @if get_md5(file) != "feb1bd9ef06f95d565af6550fdee221b": + @if get_md5(file) != "69f84c47faf4ecabaaeecd258f7e8a4e": :fetch {fetch = $fetcha} $file file = plugin/spellfile.vim @if get_md5(file) != "561f55a478fee8efcce9313fc26c5f90": :fetch {fetch = $fetcha} $file file = plugin/tarPlugin.vim - @if get_md5(file) != "05514ae8162111f40f965d974d2e7e4b": + @if get_md5(file) != "3894f3a0633f9206b4721871e4cb147c": :fetch {fetch = $fetcha} $file file = plugin/zipPlugin.vim - @if get_md5(file) != "1793f4475e46c6de0df89dac27031c1a": + @if get_md5(file) != "776293240b3674e6c07e81436ba04fda": :fetch {fetch = $fetcha} $file file = plugin/getscriptPlugin.vim @if get_md5(file) != "4de07fd9f67eab35681cd9f1605b4b8b": @@ -1779,6 +1782,9 @@ all fetch: file = syntax/antlr.vim @if get_md5(file) != "7e20587386e8d6079951de0235c7d8b5": :fetch {fetch = $fetcha} $file + file = syntax/debchangelog.vim + @if get_md5(file) != "7877609d0b40976100426edb3efecf09": + :fetch {fetch = $fetcha} $file file = syntax/apache.vim @if get_md5(file) != "1d37288929be8bfc044976a51316d15d": :fetch {fetch = $fetcha} $file @@ -1825,7 +1831,7 @@ all fetch: @if get_md5(file) != "84dd0907f02514ebbdf05ac5f5f75c69": :fetch {fetch = $fetcha} $file file = syntax/automake.vim - @if get_md5(file) != "c9669865be9faf156079c3f16dbd171c": + @if get_md5(file) != "2f83ef62bc3dd5f3e364ae2749b42d3a": :fetch {fetch = $fetcha} $file file = syntax/ave.vim @if get_md5(file) != "0830bf2d8b330b562bd0356e3abeb4c8": @@ -1942,7 +1948,7 @@ all fetch: @if get_md5(file) != "2173c44ef6b1044da95c78c0c2040495": :fetch {fetch = $fetcha} $file file = syntax/colortest.vim - @if get_md5(file) != "3f1e987b5b3ce3a47533356ef650edee": + @if get_md5(file) != "1c2438f0b0241aae121c3a3eee622339": :fetch {fetch = $fetcha} $file file = syntax/conf.vim @if get_md5(file) != "a9881c410f91621ac8dfb9e710fb4c43": @@ -2025,11 +2031,8 @@ all fetch: file = syntax/dcl.vim @if get_md5(file) != "49a63d556b2324eb94d295dc70c8f720": :fetch {fetch = $fetcha} $file - file = syntax/debchangelog.vim - @if get_md5(file) != "bb5932a4aac73162a419499ec9129d5b": - :fetch {fetch = $fetcha} $file file = syntax/debcontrol.vim - @if get_md5(file) != "19221347527b3695a6fd8a9fce6c9853": + @if get_md5(file) != "c986341aa795af83cd6106b84ca80ffe": :fetch {fetch = $fetcha} $file file = syntax/debsources.vim @if get_md5(file) != "1f07afc3fe3543f9e4f9f725c9f98e97": @@ -2085,6 +2088,9 @@ all fetch: file = syntax/doxygen.vim @if get_md5(file) != "b70ac073e48f63401fe63639defba76c": :fetch {fetch = $fetcha} $file + file = syntax/haste.vim + @if get_md5(file) != "f4b4c2e652d84421b5c35e77ca5b69c5": + :fetch {fetch = $fetcha} $file file = syntax/dracula.vim @if get_md5(file) != "0b1b567ee97ec2c49bd9b29218c8f954": :fetch {fetch = $fetcha} $file @@ -2209,7 +2215,7 @@ all fetch: @if get_md5(file) != "f7933fea6405f507794d8ee7d9d2ab0a": :fetch {fetch = $fetcha} $file file = syntax/gitconfig.vim - @if get_md5(file) != "b2f476615219ef9eacf44cbe03aba064": + @if get_md5(file) != "993f94a6e04af19ef0c8021c28f4fdbf": :fetch {fetch = $fetcha} $file file = syntax/gitsendemail.vim @if get_md5(file) != "9058fb261a4700853842fbdc73572e03": @@ -2701,7 +2707,7 @@ all fetch: @if get_md5(file) != "4cf923deae5675d13839756bdfdbacfd": :fetch {fetch = $fetcha} $file file = syntax/po.vim - @if get_md5(file) != "d459dbfc7064a38d1d0d81f66bdc1d53": + @if get_md5(file) != "95463cc6992d1cf161766b4012f25cee": :fetch {fetch = $fetcha} $file file = syntax/pod.vim @if get_md5(file) != "f733d74963addab4277964e20dc9d3ec": @@ -3103,7 +3109,7 @@ all fetch: @if get_md5(file) != "6f071a4fbd1c58140e54d31b201a2983": :fetch {fetch = $fetcha} $file file = syntax/tpp.vim - @if get_md5(file) != "9dfa4d9b56d142b14aea26a376ac197c": + @if get_md5(file) != "b8f43ed8a753733646d0fe082a79c728": :fetch {fetch = $fetcha} $file file = syntax/trasys.vim @if get_md5(file) != "60f2870c5a0c6ba5bf305eb607a8cf90": @@ -3566,7 +3572,7 @@ all fetch: @if get_md5(file) != "dacda02e780a8a80d1feabf5844bd2f2": :fetch {fetch = $fetcha} $file file = lang/menu_ca_es.latin1.vim - @if get_md5(file) != "728dd224f0684b1d13e38c7809f6d583": + @if get_md5(file) != "365409ffae805f434068ee0f7fe6b247": :fetch {fetch = $fetcha} $file file = lang/menu_ca_es.utf-8.vim @if get_md5(file) != "06f557c713f6a110bd76fbd5d414cb5e": @@ -4020,7 +4026,7 @@ all fetch: @if get_md5(file) != "2609af0095927b4c57cf14d22b28e7d9": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr - @if get_md5(file) != "87fd40000ce1f99ac094b16d098e000f": + @if get_md5(file) != "d9a24dc3d132dc59ad49a28419b9b01f": :fetch {fetch = $fetcha} $file file = tutor/tutor.cs.utf-8 @if get_md5(file) != "a3f279aff5a7480f46025f852904230a": @@ -4035,10 +4041,10 @@ all fetch: @if get_md5(file) != "90708d8d6dc9d31579851d43eced1881": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr.utf-8 - @if get_md5(file) != "635aef990d290b19e15e6ad6f9292def": + @if get_md5(file) != "afdee32e7bf7f08f276cb881d826b62e": :fetch {fetch = $fetcha} $file file = tutor/tutor.hr.cp1250 - @if get_md5(file) != "8ae7ab89dac108187562a7e723d3413a": + @if get_md5(file) != "7b74b73fddb1010ef696ba3d93b6f1fd": :fetch {fetch = $fetcha} $file file = tutor/tutor.hu.utf-8 @if get_md5(file) != "58beb10ecfd9aa926c58a361803f74c6": @@ -4474,7 +4480,7 @@ all fetch: @if get_md5(file) != "2e454cde5b8895278e044360f2abd63c": :fetch {fetch = $fetcha} $file file = spell/cleanadd.vim - @if get_md5(file) != "79f4168e03e726c18825ea4419741f47": + @if get_md5(file) != "ec7950f1d6f0cd7988c13003a3f6ada6": :fetch {fetch = $fetcha} $file file = spell/yi.vim @if get_md5(file) != "8f922928be4b5e4493c7c5e985c02d77": @@ -4483,7 +4489,7 @@ all fetch: @if get_md5(file) != "75feaee80c55b0733734050fe6928260": :fetch {fetch = $fetcha} $file file = spell/cleanadd.vim - @if get_md5(file) != "79f4168e03e726c18825ea4419741f47": + @if get_md5(file) != "ec7950f1d6f0cd7988c13003a3f6ada6": :fetch {fetch = $fetcha} $file file = spell/fixdup @if get_md5(file) != "bc2d05429eedcaa2ee6654c288d893a3": @@ -4510,7 +4516,7 @@ all fetch: @if get_md5(file) != "af0da03b5c998a8f8ed94a66763febd9": :fetch {fetch = $fetcha} $file file = doc/tags - @if get_md5(file) != "62b9a208c36ac2639b5156472363bd7c": + @if get_md5(file) != "490e1add05d911707745d2d458cdb464": :fetch {fetch = $fetcha} $file :mkdir {f} print file = print/cp1253.ps diff --git a/runtime/indent/gitconfig.vim b/runtime/indent/gitconfig.vim index 9909cab5..7ce0c715 100644 --- a/runtime/indent/gitconfig.vim +++ b/runtime/indent/gitconfig.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: git config file " Maintainer: Tim Pope -" Last Change: 2007 Dec 16 +" Last Change: 2008 Jun 04 if exists("b:did_indent") finish @@ -18,11 +18,11 @@ if exists("*GetGitconfigIndent") endif function! GetGitconfigIndent() - let line = getline(v:lnum-1) + let line = getline(prevnonblank(v:lnum-1)) let cline = getline(v:lnum) - if line =~ '[^\\]\@<=\%(\\\\\)*\\$' - " odd number of slashes, in a line continuation - return -1 + if line =~ '\\\@ -" Last Change: 18 Jan 2004 +" Last Change: 6 Jun 2008 " " Quit when menu translations have already been done. @@ -16,7 +16,6 @@ if &enc != "cp1252" && &enc != "iso-8859-15" scriptencoding latin1 endif - " menú Ajuda menutrans &Help &Ajuda menutrans &Overview &Introducció @@ -25,17 +24,18 @@ menutrans &How-to\ links Com\ &fer\.\.\.? menutrans &Find\.\.\. &Cerca\.\.\. menutrans &Credits &Autors menutrans Co&pying Con&dicions +menutrans &Sponsor/Register &Patrocini/Registre menutrans O&rphans &Orfes menutrans &Version &Versió menutrans &About &Quant\ a\.\.\. " text del diàleg Ajuda/Cerca... let g:menutrans_help_dialog = "Introduïu el terme sobre el qual necessiteu ajuda.\n\nUseu el prefix i_ per ordres d'entrada (p.ex.: i_CTRL-X)\nUseu el prefix c_ per ordres de la línia d'ordres (p.ex.: c_)\nUseu el prefix ' per noms d'opcions (p.ex.: 'shiftwidth')" - " menú Fitxer menutrans &File &Fitxer menutrans &Open\.\.\.:e &Obre\.\.\.:e menutrans Sp&lit-Open\.\.\.:sp Obre\ en\ una\ &finestra\ nova\.\.\.:sp +menutrans Open\ Tab\.\.\.:tabnew Obre\ pestanya\.\.\.:tabnew menutrans &New:enew &Nou:enew menutrans &Close:close &Tanca:close menutrans &Save:w &Desa:w @@ -46,7 +46,6 @@ menutrans &Print &Imprimeix menutrans Sa&ve-Exit:wqa Desa\ i\ s&urt:wqa menutrans E&xit:qa &Surt:qa - " menú Edita menutrans &Edit &Edita menutrans &Undou &Desfésu @@ -58,14 +57,15 @@ menutrans &Paste"+gP Engan&xa"+gP menutrans Put\ &Before[p Posa\ &abans[p menutrans Put\ &After]p P&osa\ després]p menutrans &Deletex Suprimeixx -menutrans &Select\ allggVG &Selecciona-ho\ totggVG +menutrans &Select\ AllggVG &Selecciona-ho\ totggVG menutrans &Find\.\.\. &Cerca\.\.\. menutrans &Find/ &Cerca/ menutrans Find\ and\ Rep&lace Cerca\ i\ s&ubstitueix menutrans Find\ and\ Rep&lace\.\.\. Cerca\ i\ s&ubstitueix\.\.\. menutrans Find\ and\ Rep&lace:%s Cerca\ i\ s&ubstitueix:%s menutrans Find\ and\ Rep&lace:s Cerca\ i\ s&ubstitueix:s -menutrans Settings\ &Window &Finestra\ d'opcions +menutrans Settings\ &Window Fin&estra\ d'opcions +menutrans Startup\ &Settings Opcions\ i&nicials menutrans &Global\ Settings Opcions\ &globals " submenú Edita/Opcions Globals menutrans Toggle\ Pattern\ &Highlight:set\ hls! Ressalt\ de\ &patrons:set\ hls! @@ -100,7 +100,7 @@ menutrans F&ile\ Settings Opcions\ del\ f&itxer menutrans Soft\ &Tabstop Amplada\ de\ &tabulació menutrans Te&xt\ Width\.\.\. &Amplada\ del\ text\.\.\. menutrans &File\ Format\.\.\. &Format\ del\ fitxer\.\.\. -menutrans Select\ Fo&nt\.\.\. Tipus\ de\ &lletra\.\.\. +menutrans Select\ Fo&nt\.\.\. &Fosa\.\.\. menutrans C&olor\ Scheme Es&quema\ de\ colors " submenú Edita/Esquema de colors menutrans blue blau @@ -144,6 +144,25 @@ menutrans &Tools Ei&nes menutrans &Jump\ to\ this\ tagg^] &Salta\ a\ aquesta\ etiquetag^] menutrans Jump\ &back^T Salta\ en&rere^T menutrans Build\ &Tags\ File Crea\ un\ fitxer\ d'eti&quetes +menutrans &Spelling &Ortografia +" submenú Eines/Ortografia + menutrans &Spell\ Check\ On Activa\ la\ &revisió\ ortogràfica + menutrans Spell\ Check\ &Off &Desactiva\ la\ revisió\ ortogràfica + menutrans To\ &Next\ error]s Error\ &següent]s + menutrans To\ &Previous\ error[s Error\ &anterior[s + menutrans Suggest\ &Correctionsz= Su&ggerimentsz= + menutrans &Repeat\ correction:spellrepall Re&peteix\ la\ correcció:spellrepall + menutrans Set\ language\ to\ "en" Selecciona\ l'idioma\ "en" + menutrans Set\ language\ to\ "en_au" Selecciona\ l'idioma\ "en_au" + menutrans Set\ language\ to\ "en_ca" Selecciona\ l'idioma\ "en_ca" + menutrans Set\ language\ to\ "en_gb" Selecciona\ l'idioma\ "en_gb" + menutrans Set\ language\ to\ "en_nz" Selecciona\ l'idioma\ "en_nz" + menutrans Set\ language\ to\ "en_us" Selecciona\ l'idioma\ "en_us" + menutrans Set\ language\ to\ "ca" Selecciona\ l'idioma\ "ca" + menutrans Set\ language\ to\ "es" Selecciona\ l'idioma\ "es" + menutrans Set\ language\ to\ "fr" Selecciona\ l'idioma\ "fr" + menutrans Set\ language\ to\ "it" Selecciona\ l'idioma\ "it" + menutrans &Find\ More\ Languages &Cerca\ altres\ idiomes menutrans &Folding &Plecs " submenú Eines/Plecs menutrans &Enable/Disable\ foldszi &Habilita/Deshabilita\ els\ plecszi @@ -183,6 +202,7 @@ menutrans Error\ &Window F&inestra\ d'errors menutrans &Open:copen &Obre:copen menutrans &Close:cclose &Tanca:cclose menutrans &Set\ Compiler &Compilador +menutrans &SeT\ Compiler &Compilador menutrans &Convert\ to\ HEX:%!xxd Converteix\ a\ &HEX:%!xxd menutrans Conve&rt\ back:%!xxd\ -r Torna\ al\ format\ &original:%!xxd\ -r diff --git a/runtime/menu.vim b/runtime/menu.vim index 0d2460b6..d120ce29 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -2,7 +2,7 @@ " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar -" Last Change: 2008 May 29 +" Last Change: 2008 Jun 16 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. @@ -812,7 +812,7 @@ if has("vertsplit") if @% == "" 20vsp . else - exe "20vsp " . expand("%:p:h") + exe "20vsp " . s:FnameEscape(expand("%:p:h")) endif endfun endif diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index 03b9591d..b0a29ad7 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -1,6 +1,6 @@ " netrwPlugin.vim: Handles file transfer and remote directory listing across a network " PLUGIN SECTION -" Date: Aug 09, 2007 +" Date: Apr 07, 2008 " Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v123" +let g:loaded_netrwPlugin = "v125" let s:keepcpo = &cpo if v:version < 700 echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None @@ -52,14 +52,14 @@ augroup Network au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://localhost/\(.*\)','\1',"")|exe "bwipe ".substitute(expand(""),'file://\(\k\+@\)\=','','')|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) endif - au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("")|exe '2Nread "'.expand("").'"'|exe "silent doau BufReadPost ".expand("") - au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("")|exe 'Nread "' .expand("").'"'|exe "silent doau FileReadPost ".expand("") - au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("")|exe 'Nwrite "' .expand("").'"'|exe "silent doau BufWritePost ".expand("") - au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("")|exe "'[,']".'Nwrite "' .expand("").'"'|exe "silent doau FileWritePost ".expand("") + au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("")|exe '2Nread "'.expand("").'"'|exe "silent doau BufReadPost ".expand("") + au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("")|exe 'Nread "' .expand("").'"'|exe "silent doau FileReadPost ".expand("") + au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("")|exe 'Nwrite "' .expand("").'"'|exe "silent doau BufWritePost ".expand("") + au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("")|exe "'[,']".'Nwrite "' .expand("").'"'|exe "silent doau FileWritePost ".expand("") try - au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' catch /^Vim\%((\a\+)\)\=:E216/ - au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' endtry augroup END @@ -87,7 +87,7 @@ if !exists("g:netrw_nogx") && maparg('g','n') == "" if !hasmapto('NetrwBrowseX') nmap gx NetrwBrowseX endif - nno NetrwBrowseX :call netrw#NetBrowseX(expand(""),0) + nno NetrwBrowseX :call netrw#NetrwBrowseX(expand(""),0) endif " --------------------------------------------------------------------- diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim index 6ee29c9e..42fd96a3 100644 --- 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 = "v14" +let g:loaded_tarPlugin = "v16" let s:keepcpo = &cpo set cpo&vim @@ -22,16 +22,16 @@ set cpo&vim " Public Interface: {{{1 augroup tar au! - au BufReadCmd tarfile:* call tar#Read(expand(""), 1) - au FileReadCmd tarfile:* call tar#Read(expand(""), 0) - au BufWriteCmd tarfile:* call tar#Write(expand("")) - au FileWriteCmd tarfile:* call tar#Write(expand("")) + au BufReadCmd tarfile::* call tar#Read(expand(""), 1) + au FileReadCmd tarfile::* call tar#Read(expand(""), 0) + au BufWriteCmd tarfile::* call tar#Write(expand("")) + au FileWriteCmd tarfile::* call tar#Write(expand("")) if has("unix") - au BufReadCmd tarfile:*/* call tar#Read(expand(""), 1) - au FileReadCmd tarfile:*/* call tar#Read(expand(""), 0) - au BufWriteCmd tarfile:*/* call tar#Write(expand("")) - au FileWriteCmd tarfile:*/* call tar#Write(expand("")) + au BufReadCmd tarfile::*/* call tar#Read(expand(""), 1) + au FileReadCmd tarfile::*/* call tar#Read(expand(""), 0) + au BufWriteCmd tarfile::*/* call tar#Write(expand("")) + au FileWriteCmd tarfile::*/* call tar#Write(expand("")) endif au BufReadCmd *.tar.gz call tar#Browse(expand("")) diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim index 04d13ac8..502c8216 100644 --- a/runtime/plugin/vimballPlugin.vim +++ b/runtime/plugin/vimballPlugin.vim @@ -16,7 +16,7 @@ if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballPlugin = "v26" +let g:loaded_vimballPlugin = "v27" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim index 18235666..e98686bb 100644 --- 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 = "v16" +let g:loaded_zipPlugin = "v18" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim index b2dd0f93..02ed74fa 100644 --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -1,9 +1,15 @@ " Vim syntax file -" Language: automake Makefile.am -" Maintainer: Felipe Contreras -" Former Maintainer: John Williams -" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $ -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/automake.vim?op=file&rev=0&sc=0 +" 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 +" +" 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 +" former maintainer was MIA (Missing In Action), taking over its +" maintenance was thus the only way to include those patches. +" If you care about this file, and have time to maintain it please do so! " " This script adds support for automake's Makefile.am format. It highlights " Makefile variables significant to automake as well as highlighting @@ -19,18 +25,11 @@ else runtime! syntax/make.vim endif -syn match automakePrimary "^[A-Za-z0-9_]\+_\(PROGRAMS\|LIBRARIES\|LISP\|PYTHON\|JAVA\|SCRIPTS\|DATA\|HEADERS\|MANS\|TEXINFOS\|LTLIBRARIES\)\s*="me=e-1 - -syn match automakeSecondary "^[A-Za-z0-9_]\+_\(SOURCES\|AR\|LIBADD\|LDADD\|LDFLAGS\|DEPENDENCIES\|LINK\|SHORTNAME\)\s*="me=e-1 -syn match automakeSecondary "^[A-Za-z0-9_]\+_\(CCASFLAGS\|CFLAGS\|CPPFLAGS\|CXXFLAGS\|FFLAGS\|GCJFLAGS\|LFLAGS\|OBJCFLAGS\|RFLAGS\|YFLAGS\)\s*="me=e-1 - -syn match automakeExtra "^EXTRA_DIST\s*="me=e-1 -syn match automakeExtra "^EXTRA_PROGRAMS\s*="me=e-1 -syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+_SOURCES\s*="me=e-1 - -" TODO: Check these: +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 diff --git a/runtime/syntax/colortest.vim b/runtime/syntax/colortest.vim index 377eba98..58de7aaf 100644 --- a/runtime/syntax/colortest.vim +++ b/runtime/syntax/colortest.vim @@ -1,7 +1,7 @@ " Vim script for testing colors " Maintainer: Bram Moolenaar " Contributors: Rafael Garcia-Suarez, Charles Campbell -" Last Change: 2006 Feb 20 +" Last Change: 2008 Jun 04 " edit this file, then do ":source %", and check if the colors match @@ -55,11 +55,18 @@ " Open this file in a window if it isn't edited yet. " Use the current window if it's empty. if expand('%:p') != expand(':p') + let s:fname = expand('') + if exists('*fnameescape') + let s:fname = fnameescape(s:fname) + else + let s:fname = escape(s:fname, ' \|') + endif if &mod || line('$') != 1 || getline(1) != '' - exe "new " . expand('') + exe "new " . s:fname else - exe "edit " . expand('') + exe "edit " . s:fname endif + unlet s:fname endif syn clear diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 24a9c963..28fe8547 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: Debian changelog files " Maintainer: Debian Vim Maintainers -" Former Maintainer: Wichert Akkerman -" Last Change: $LastChangedDate: 2006-04-16 21:50:31 -0400 (dom, 16 apr 2006) $ -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/debchangelog.vim?op=file&rev=0&sc=0 +" Former Maintainers: Gerfried Fuchs +" Wichert Akkerman +" Last Change: 2008-01-16 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/debchangelog.vim;hb=debian " Standard syntax initialization if version < 600 @@ -18,16 +19,17 @@ syn case ignore " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ " syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" -syn match debchangelogTarget contained "\( stable\| frozen\| unstable\| testing-proposed-updates\| experimental\| sarge-backports\| sarge-volatile\| stable-security\| testing-security\)\+" +syn match debchangelogTarget contained "\( \(old\)\=stable\| frozen\| unstable\| testing-proposed-updates\| experimental\| \%(sarge\|etch\|lenny\)-\%(backports\|-volatile\)\| \(old\)\=stable-security\| testing-security\| \(dapper\|edgy\|feisty\|gutsy\|hardy\)\(-\(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 debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" +syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" syn match debchangelogEmail contained "<.\{-}>" " Define the entries that make up the changelog syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline -syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses oneline +syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline " Associate our matches and regions with pretty colours if version >= 508 || !exists("did_debchangelog_syn_inits") @@ -42,6 +44,7 @@ if version >= 508 || !exists("did_debchangelog_syn_inits") HiLink debchangelogFooter Identifier HiLink debchangelogEntry Normal HiLink debchangelogCloses Statement + HiLink debchangelogLP Statement HiLink debchangelogUrgency Identifier HiLink debchangelogName Comment HiLink debchangelogVersion Identifier diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index f15e83cb..3b01fb50 100644 --- 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: $LastChangedDate: 2006-04-16 21:50:31 -0400 (Sun, 16 Apr 2006) $ -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/debcontrol.vim?op=file&rev=0&sc=0 +" Last Change: 2008-02-23 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debcontrol.vim;hb=debian " Comments are very welcome - but please make sure that you are commenting on " the latest version of this file. @@ -17,6 +17,9 @@ elseif exists("b:current_syntax") finish endif +" Should match case except for the keys of each field +syn case match + " Everything that is not explicitly matched by the rules below syn match debcontrolElse "^.*$" @@ -25,28 +28,47 @@ syn match debControlComma ", *" syn match debControlSpace " " " Define some common expressions we can use later on -syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\(eb\)\=\|hppa\|i386\|ia64\|m32r\|m68k\|mipsel\|mips\|powerpc\|ppc64\|s390\|sheb\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-\(i386\|gnu\)\|knetbsd-i386\|netbsd-\(alpha\|i386\)\)" -syn match debcontrolName contained "[a-z][a-z0-9+-]*" +syn match debcontrolArchitecture contained "\(all\|any\|alpha\|amd64\|arm\(e[bl]\)\=\|hppa\|i386\|ia64\|m32r\|m68k\|mipsel\|mips\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc64\|sparc\|hurd-i386\|kfreebsd-\(i386\|gnu\)\|knetbsd-i386\|netbsd-\(alpha\|i386\)\)" +syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" -syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)" +syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)" +syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" +" A URL (using the domain name definitions from RFC 1034 and 1738), right now +" only enforce protocol and some sanity on the server/path part; +syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$" +syn match debcontrolVcsGit contained "\vgit://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" + " An email address syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" syn match debcontrolEmail "<.\{-}>" +" #-Comments +syn match debcontrolComment "^#.*$" + +syn case ignore + " List of all legal keys -syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\): *" +syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\): *" " Fields for which we do strict syntax checking syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace 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="^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 +syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend +syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend " Catch-all for the other legal fields -syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\|Enhances\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline -syn region debcontrolMultiField start="^\(Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable +syn region debcontrolField start="^\(Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X\(S\|B\)-Python-Version\|XSBC-Original-Maintainer\|\(XS-\)\?Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField start="^\(Build-\(Conflicts\|Depends\)\(-Indep\)\=\|\(Pre-\)\=Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Enhances\|Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable " Associate our matches and regions with pretty colours if version >= 508 || !exists("did_debcontrol_syn_inits") @@ -65,8 +87,14 @@ if version >= 508 || !exists("did_debcontrol_syn_inits") HiLink debcontrolName Normal HiLink debcontrolPriority Normal HiLink debcontrolSection Normal + HiLink debcontrolPackageType Normal HiLink debcontrolVariable Identifier HiLink debcontrolEmail Identifier + HiLink debcontrolVcsSvn Identifier + HiLink debcontrolVcsCvs Identifier + HiLink debcontrolVcsGit Identifier + HiLink debcontrolHTTPUrl Identifier + HiLink debcontrolComment Comment HiLink debcontrolElse Special delcommand HiLink diff --git a/runtime/syntax/gitconfig.vim b/runtime/syntax/gitconfig.vim index e57a32d7..f44ce2b5 100644 --- a/runtime/syntax/gitconfig.vim +++ b/runtime/syntax/gitconfig.vim @@ -2,15 +2,16 @@ " Language: git config file " Maintainer: Tim Pope " Filenames: gitconfig, .gitconfig, *.git/config -" Last Change: 2007 Dec 16 +" Last Change: 2008 Jun 04 if exists("b:current_syntax") finish endif -syn case ignore setlocal iskeyword+=- setlocal iskeyword-=_ +syn case ignore +syn sync minlines=10 syn match gitconfigComment "[#;].*" syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]" diff --git a/runtime/syntax/haste.vim b/runtime/syntax/haste.vim new file mode 100644 index 00000000..cf943f10 --- /dev/null +++ b/runtime/syntax/haste.vim @@ -0,0 +1,150 @@ +" Vim syntax file +" Language: HASTE +" Maintainer: M. Tranchero - maurizio.tranchero?gmail.com +" Credits: some parts have been taken from vhdl, verilog, and C syntax +" files +" version: 0.5 + +" HASTE +if exists("b:current_syntax") + finish +endif +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case is significant +syn case match + +" HASTE keywords +syn keyword hasteStatement act alias arb array begin bitvec +syn keyword hasteStatement bitwidth boolvec broad case +syn keyword hasteStatement cast chan const dataprobe do edge +syn keyword hasteStatement else end export false ff fi file +syn keyword hasteStatement fit for forever func if import +syn keyword hasteStatement inprobe is les main narb narrow +syn keyword hasteStatement negedge od of or outprobe pas +syn keyword hasteStatement posedge probe proc ram ramreg +syn keyword hasteStatement repeat rom romreg sample sel si +syn keyword hasteStatement sign sizeof skip stop then true +syn keyword hasteStatement type until var wait wire +syn keyword hasteFutureExt Z ffe partial +syn keyword hasteVerilog buf reg while + +" Special match for "if", "or", and "else" since "else if" +" and other "else+if" combination shouldn't be highlighted. +" The right keyword is "or" +syn match hasteStatement "\<\(if\|then\|else\|fi\)\>" +syn match hasteNone "\$" +syn match hasteNone "\\s" +syn match hasteNone "\\s" +syn match hasteNone "\\s" +syn match hasteStatement "\<\(case\|is\|si\)\>" +syn match hasteStatement "\<\(repeat\|until\)\>" +syn match hasteStatement "\<\(forever\|do\|od\)\>" +syn match hasteStatement "\<\(for\|do\|od\)\>" +syn match hasteStatement "\<\(do\|or\|od\)\>" +syn match hasteStatement "\<\(sel\|les\)\>" +syn match hasteError "\<\d\+[_a-zA-Z]\+\>" + +" Predifined Haste types +syn keyword hasteType bool + +" Values for standard Haste types +" syn match hasteVector "\'[0L1HXWZU\-\?]\'" + +syn match hasteVector "0b\"[01_]\+\"" +syn match hasteVector "0x\"[0-9a-f_]\+\"" +syn match hasteCharacter "'.'" +syn region hasteString start=+"+ end=+"+ +" C pre-processor directives +"syn region hasteIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match hasteIncluded display contained "<[^>]*>" +syn match hasteIncluded display contained "<[^"]*>" +syn match hasteInclude display "^\s*#include\>\s*["<]" contains=hasteIncluded +syn region hasteDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@hastePreProcGroup,@Spell +syn region hasteDefine start="^\s*\(%:\|#\)\s*\(ifndef\|ifdef\|endif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=@Spell +syn region hastePreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=hasteComment,hasteCppString,hasteCharacter,hasteCppParen,hasteParenError,hasteNumbers,hasteCommentError,hasteSpaceError +syn region hastePreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@hastePreProcGroup,@Spell +syn cluster hastePreProcGroup contains=hasteIncluded,hasteInclude,hasteDefine +syn region hasteCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=hasteSpaceError,hasteCppSkip + +" floating numbers +syn match hasteNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" +syn match hasteNumber "-\=\<\d\+\.\d\+\>" +syn match hasteNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match hasteNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" integer numbers +syn match hasteNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" +syn match hasteNumber "-\=\<\d\+\>" +syn match hasteNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match hasteNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" operators +syn keyword hasteSeparators & , . \| : +syn keyword hasteExecution \|\| ; @ +syn keyword hasteOperator := ? ! +syn keyword hasteTypeConstr "[" << >> .. "]" ~ +syn keyword hasteExprOp < <= >= > = # <> + - * == ## +syn keyword hasteMisc ( ) 0x 0b +" +syn match hasteSeparators "[&:\|,.]" +syn match hasteOperator ":=" +syn match hasteOperator "?" +syn match hasteOperator "!" +syn match hasteExecution "||" +syn match hasteExecution ";" +syn match hasteExecution "@" +syn match hasteType "\[\[" +syn match hasteType "\]\]" +syn match hasteType "<<" +syn match hasteType ">>" +syn match hasteExprOp "<" +syn match hasteExprOp "<=" +syn match hasteExprOp ">=" +syn match hasteExprOp ">" +syn match hasteExprOp "<>" +syn match hasteExprOp "=" +syn match hasteExprOp "==" +syn match hasteExprOp "##" +syn match hasteExprOp "#" +syn match hasteExprOp "*" +syn match hasteExprOp "+" + +syn region hasteComment start="/\*" end="\*/" contains=@Spell +syn region hasteComment start="{" end="}" contains=@Spell +syn match hasteComment "//.*" contains=@Spell + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link hasteSpecial Special +hi def link hasteStatement Statement +hi def link hasteCharacter String +hi def link hasteString String +hi def link hasteVector String +hi def link hasteBoolean String +hi def link hasteComment Comment +hi def link hasteNumber String +hi def link hasteTime String +hi def link hasteType Type +hi def link hasteGlobal Error +hi def link hasteError Error +hi def link hasteAttribute Type +hi def link hasteSeparators Special +hi def link hasteExecution Special +hi def link hasteTypeConstr Special +hi def link hasteOperator Type +hi def link hasteExprOp Type +hi def link hasteMisc String +hi def link hasteFutureExt Error +hi def link hasteVerilog Error +hi def link hasteDefine Macro +hi def link hasteInclude Include +hi def link hastePreProc PreProc + +let b:current_syntax = "haste" + +" vim: ts=8 diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index 06b6e42f..124d5245 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: po (gettext) " Maintainer: Dwayne Bailey -" Last Change: 2007 Aug 23 +" Last Change: 2008 Jan 08 " Contributors: Dwayne Bailey (Most advanced syntax highlighting) " Leonardo Fontenelle (Spell checking) " Nam SungHyun (Original maintainer) @@ -23,9 +23,10 @@ syn match poPluralCaseN "[0-9]" contained syn match poStatementMsgstr "^msgstr\(\[[0-9]\]\)" contains=poPluralCaseN " Simple HTML and XML highlighting -syn match poHtml "<[^<>]\+>" contains=poHtmlTranslatables +syn match poHtml "<\_[^<>]\+>" contains=poHtmlTranslatables,poLineBreak syn match poHtmlNot +"<[^<]\+>"+ms=s+1,me=e-1 -syn region poHtmlTranslatables start=+alt=\\"+ms=e-1 end=+\\"+ contained +syn region poHtmlTranslatables start=+\(abbr\|alt\|content\|summary\|standby\|title\)=\\"+ms=e-1 end=+\\"+ contained contains=@Spell +syn match poLineBreak +"\n"+ contained " Translation blocks syn region poMsgCTxt matchgroup=poStatementMsgCTxt start=+^msgctxt "+rs=e-1 matchgroup=poStringCTxt end=+^msgid "+me=s-1 contains=poStringCTxt @@ -115,6 +116,7 @@ if version >= 508 || !exists("did_po_syn_inits") HiLink poHtml Identifier HiLink poHtmlNot String HiLink poHtmlTranslatables String + HiLink poLineBreak String HiLink poFormat poSpecial HiLink poSpecial Special diff --git a/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim index 92fa6f82..050a2ba7 100644 --- a/runtime/syntax/tpp.vim +++ b/runtime/syntax/tpp.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: tpp - Text Presentation Program -" Maintainer: Debian VIM Maintainers +" Maintainer: Debian Vim Maintainers " Former Maintainer: Gerfried Fuchs -" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $ -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/tpp.vim?op=file&rev=0&sc=0 +" Last Change: 2007-10-14 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/tpp.vim;hb=debian " Filenames: *.tpp " License: BSD " diff --git a/runtime/tutor/tutor.hr b/runtime/tutor/tutor.hr index 2acff99f..f1d346c2 100644 --- a/runtime/tutor/tutor.hr +++ b/runtime/tutor/tutor.hr @@ -15,11 +15,11 @@ (ako ste pokrenuli "vimtutor" ovo je veæ kopija). Vrlo je va¾no primijetiti da je ovaj priruènik namijenjen za vje¾banje. - Preciznije, morate izvr¹iti naredbe u Vim-u kako bi ste iste pravilno - nauèili koristiti. Ako samo èitate tekst, zaboravit æete naredbe! + Preciznije, morate izvr¹iti naredbe u Vim-u kako bi ste iste nauèili + pravilno koristiti. Ako samo èitate tekst, zaboraviti æe te naredbe! Ako je CapsLock ukljuèen ISKLJUÈITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni cijeli ekran. + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.1: POMICANJE KURSORA @@ -27,7 +27,7 @@ ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** ^ - k Hint: h tipka je ljevo i pomièe kursor ljevo. + k Savjet: h tipka je lijevo i pomièe kursor lijevo. < h l > l tipka je desno i pomièe kursor desno. j j izgleda kao strelica usmjerena dolje. v @@ -36,13 +36,13 @@ 2. Dr¾ite tipku (j) pritisnutom. Sada znate kako doæi do sljedeæe lekcije. - 3. Koristeæi tipku j preðite na sljedeæu lekciju 1.2. + 3. Koristeæi tipku j prijeðite na sljedeæu lekciju 1.2. NAPOMENA: Ako niste sigurni ¹to ste zapravo pritisnuli uvijek koristite tipku kako bi pre¹li u Normal mod i onda poku¹ajte ponovno. -NAPOMENA: Kursorske tipke rade isto. No kori¹tenje hjkl tipaka je znatno - br¾e, kad se jednom naviknete na njihovo kori¹tenje. Stvarno! +NAPOMENA: Kursorske tipke rade isto. Kori¹tenje hjkl tipaka je znatno + br¾e, nakon ¹to se jednom naviknete na njihovo kori¹tenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.2: IZLAZ IZ VIM-a @@ -60,31 +60,31 @@ NAPOMENA: Kursorske tipke rade isto. No kori ovaj priruènik: vimtutor 4. Ako ste upamtili ove korake, izvr¹ite ih redom od 1 do 3 - kako bi ste ponovno pokrenuli editor. + kako bi ponovno pokrenuli editor. NAPOMENA: :q! poni¹tava sve promjene koje ste napravili. U sljedeæim lekcijama nauèit æe te kako promjene saèuvati. - 5. Pomaknite kursor na Lekciju 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** - 1. Pomaknite kursor na liniju oznaèenom s --->. + 1. Pomaknite kursor na liniju oznaèenu s --->. - 2. Kako bi ste ispravili gre¹ke, pomièite kursor dok se + 2. Kako bi ste ispravili pogre¹ke, pomièite kursor dok se ne bude nalazio na slovu kojeg trebate izbrisati. 3. Pritisnite tipku x kako bi uklonili ne¾eljeno slovo. - 4. Ponovite korake od 2 do 4 dok ne ispravite sve gre¹ke. + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogre¹ke. ---> KKKravaa jee presskoèila mmjeseccc. - 5. Nakon ¹to ispravite liniju, preðite na lekciju 1.4. + 5. Nakon ¹to ispravite liniju, prijeðite na lekciju 1.4. NAPOMENA: Koristeæi ovaj priruènik ne poku¹avajte pamtiti veæ uèite primjenom. @@ -96,21 +96,21 @@ NAPOMENA: Koriste ** Pritisnite i za ubacivanje teksta ispred kursora. ** - 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenom s --->. + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite kursor na prvi znak POSLIJE kojeg æe te utipkati potreban tekst. 3. Pritisnite i te utipkajte potrebne nadopune. - 4. Nakon ¹to ispravite gre¹ku pritisnite kako bi ste - vratili Vim u Normal mod. Ponovite korake od 2. do 4. - kako bi ispravili sve gre¹ke. + 4. Nakon ¹to ispravite pogre¹ku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogre¹ke. ---> Nedje no teka od v lin. ---> Nedostaje ne¹to teksta od ove linije. - 5. Preðite na sljedeæu lekciju. + 5. Prijeðite na sljedeæu lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -119,7 +119,7 @@ NAPOMENA: Koriste ** Pritisnite A za dodavanje teksta. ** - 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenom s --->. + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. Nije va¾no na kojem se slovu nalazi kursor na toj liniji. 2. Pritisnite A i napravite potrebne promjene. @@ -127,7 +127,7 @@ NAPOMENA: Koriste 3. Nakon ¹to ste dodali tekst, pritisnite za povratak u Normal mod. - 4. Pomaknite kursor na drugu liniju oznaèenom s ---> + 4. Pomaknite kursor na drugu liniju oznaèenu s ---> i ponovite korake 2 i 3 dok ne popravite tekst. ---> Ima ne¹to teksta koji nedostaje n @@ -135,7 +135,7 @@ NAPOMENA: Koriste ---> Ima ne¹to teksta koji ne Ima ne¹to teksta koji nedostaje ba¹ ovdje. - 5. Preðite na lekciju 1.6. + 5. Prijeðite na lekciju 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.6: PROMJENA DATOTEKE @@ -152,9 +152,9 @@ NAPOMENA: Koriste 3. Ubacite i izbri¹ite tekst kao ¹to ste to napravili u lekcijama prije. - 4. Saèuvajte promijenjeni tekst i izaðite iz Vim-a: :wq + 4. Saèuvajte promjenjeni tekst i izaðite iz Vim-a: :wq - 5. Ponovno pokrenite vimtutor i nastavite èitati sa¾etak koji slijedi. + 5. Ponovno pokrenite vimtutor i nastavite èitati sa¾etak koji sljedi. 6. Nakon sto proèitate gornje korake i u potpunosti ih razumijete: izvr¹ite ih. @@ -164,11 +164,11 @@ NAPOMENA: Koriste 1. Kursor se pomièe strelicama ili pomoæu hjkl tipaka. - h (ljevo) j (dolje) k (gore) l (desno) + h (lijevo) j (dolje) k (gore) l (desno) 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE - 3. Izlaz: :q! sve promijene su izgubljene. + 3. Izlaz: :q! sve promjene su izgubljene. ILI: :wq promjene su saèuvane. 4. Brisanje znaka na kojem se nalazi kursor: x @@ -177,8 +177,8 @@ NAPOMENA: Koriste i utipkajte tekst unos ispred kursora A utipkajte tekst dodavanje na kraju linije -NAPOMENA: Tipkanjem tipke æe prebaciti Vim u Normal mod i - prekinuti ne¾eljenu ili djelomièno zavr¹enu naredbu. +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida ne¾eljenu ili djelomièno zavr¹enu naredbu. Nastavite èitati Lekciju 2. @@ -190,20 +190,20 @@ Nastavite 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju oznaèenom s --->. + 2. Pomaknite kursor na liniju oznaèenu s --->. 3. Pomaknite kursor na poèetak rijeèi koju treba izbrisati. 4. Otipkajte dw kako bi uklonili rijeè. NAPOMENA: Vim æe prikazati slovo d na zadnjoj liniji kad ga otipkate. - Vim èeka da otipkate w . Ako je prikazano neko drugo slovo - otipkali ste krivo; pritisnite i poku¹ajte ponovno. + Vim èeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i poku¹ajte ponovno. ---> Neke rijeèi smije¹no ne pripadaju na papir ovoj reèenici. 5. Ponovite korake 3 i 4 dok ne ispravite reèenicu; - preðite na Lekciju 2.2. + prijeðite na Lekciju 2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2.2: JO© BRISANJA @@ -214,8 +214,7 @@ NAPOMENA: Vim 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju - oznaèenom s --->. + 2. Pomaknite kursor na liniju oznaèenu s --->. 3. Pomaknite kursor do kraja ispravne reèenice (POSLJE prve . ). @@ -225,7 +224,8 @@ NAPOMENA: Vim ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Preðite na Lekciju 2.3 za bolje obja¹njenje. + 5. Prijeðite na Lekciju 2.3 za bolje obja¹njenje. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,14 +239,14 @@ NAPOMENA: Vim Pri èemu je: d - operator brisanja. - pokret - ono na èemu æe se operacija izvr¹avati (vidi tekst ni¾e). + pokret - ono na èemu æe se operacija izvr¹avati (navedeno u nastavku). Kratka lista pokreta: - w - sve do poèetka sljedeæe rijeèi, BEZ prvog slova. + w - sve do poèetka sljedeæe rijeèi, NE UKLJUÈUJUÆI prvo slovo. e - sve do kraja trenutaène rijeèi, UKLJUÈUJUÆI zadnje slovo. $ - sve do kraje linije, UKLJUÈUJUÆI zadnje slovo. - Tipkanjem de znakovi æe se brisati od kursora do kraja rijeèi. + Tipkanjem de æe se brisati od kursora do kraja rijeèi. NAPOMENA: Pritiskajuæi samo pokrete dok ste u Normal modu bez operatora æe pomicati kursor kao ¹to je navedeno. @@ -255,10 +255,9 @@ NAPOMENA: Pritiskaju Lekcija 2.4: KORI©TENJE BROJANJA ZA POKRETE - ** Tipkanjem nekog broja prije pokreta, - pokret æe se izvr¹avati toliko puta. ** + ** Tipkanjem nekog broja prije pokreta, pokret se izvr¹ava toliko puta. ** - 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. + 1. Pomaknite kursor na liniju oznaèenu s --->. 2. Otipkajte 2w da pomaknete kursor dvije rijeèi naprijed. @@ -268,9 +267,10 @@ NAPOMENA: Pritiskaju 5. Ponovite korake 2 i 3 s nekim drugim brojevima. ----> Reèenica sadr¾i nekoliko rijeèi po kojima mo¾ete pomicati kursor. +---> Reèenica sa rijeèima po kojoj mo¾ete pomicati kursor. + + 6. Prijeðite na Lekciju 2.5. - 6. Preðite na Lekciju 2.5. @@ -293,7 +293,7 @@ NAPOMENA: Pritiskaju 3. Ponovite korake 1 i 2 sa razlièitim brojevima da izbri¹ete uzastopne rijeèi sa VELIKIM SLOVIMA sa samo jednom naredbom. ----> ova ABC DE linija FGHI JK LMN OP rijeèi je RS T TUV popravljena. +---> ova ABCÈÆ DÐE linija FGHI JK LMN OP rijeèi je RS© TUVZ® popravljena. @@ -303,8 +303,8 @@ NAPOMENA: Pritiskaju ** Otipkajte dd za brisanje cijele linije. ** - Zbog uèestalosti brisanja cijelih linija, kreatori Vi-a su - odluèili za lak¹e brisanje linije tipkanjem d dvaput. + Zbog uèestalosti brisanja cijelih linija, dizajneri Vi-a su odluèili da + je lak¹e brisati linije tipkanjem d dvaput. 1. Pomaknite kursor na drugu liniju u donjoj kitici. 2. Otipkajte dd kako bi izbrisali liniju. @@ -326,22 +326,22 @@ NAPOMENA: Pritiskaju ** Pritisnite u za poni¹tenje zadnje naredbe, U za cijelu liniju. ** - 1. Pomaknite kursor na sljedeæu liniju oznaèenu s ---> - i postavite kursor na prvu gre¹ku. + 1. Pomaknite kursor na liniju oznaèenu s ---> i postavite kursor na prvu + pogre¹ku. 2. Otipkajte x kako bi izbrisali prvi ne¾eljeni znak. 3. Otipkajte u kako bi poni¹tili zadnju izvr¹enu naredbu. 4. Ovaj put ispravite sve pogre¹ke na liniji koristeæi x naredbu. 5. Sada utipkajte veliko U kako bi poni¹tili sve promjene - na liniji, i time je vratili u prija¹nje stanje. - 6. Sada utipkajte u nekoliko puta kako bi - poni¹tili U i prija¹nje naredbe. + na liniji, vraæajuæi je u prija¹nje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poni¹tili U + i prija¹nje naredbe. 7. Sada utipkajte CTRL-R (dr¾eæi CTRL tipku pritisnutom dok ne pritisnete R) nekoliko puta kako bi vratili promjene (poni¹tili poni¹tenja). ----> Poopravite gre¹ke nna ovvoj liniji ii pooni¹titeee ih. +---> Poopravite pogre¹ke nna ovvoj liniji ii pooni¹titeee ih. - 8. Vrlo korisne naredbe. Preðite na sa¾etak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeðite na sa¾etak Lekcije 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2 SA®ETAK @@ -374,21 +374,21 @@ NAPOMENA: Pritiskaju 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 2. Otipkajte dd kako bi izbrisali liniju i - spremili je u Vim registar. + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. 4. Otipkajte p kako bi postavili liniju ispod kursora. - 5. Ponovite korake 2 do 4 kako bi postavili - sve linije u pravilnom rasporedu. + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. ----> d) Mo¾e¹ li i ti uèiti? +---> d) Mo¾e¹ li i ti nauèiti? ---> b) Ljubice su plave, ---> c) Inteligencija je nauèena, ---> a) Ru¾e su crvene, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.2: NAREDBA PROMJENE @@ -397,17 +397,17 @@ NAPOMENA: Pritiskaju 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 2. Pomaknite kursor tako da se nalazi na prvoj gre¹ci. + 2. Pomaknite kursor tako da se nalazi na prvoj pogre¹ci. 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. 4. Ponovite korake 2 i 3 sve dok prva linije ne bude istovjetna drugoj. ----> Kede ju ovu limija tupjana, netko je prutuskao kruve tupke! +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Preðite na Lekciju 3.2. + 5. Prijeðite na Lekciju 3.2. NAPOMENA: Prisjetite da trebate uèiti vje¾banjem, ne pamæenjem. @@ -422,19 +422,19 @@ NAPOMENA: Prisjetite da trebate u 2. Postavite kursor na a u lackmb. - 3. Otipkajte ce i ispravite rijeè - (u ovom sluèaju otipkajte inija ). + 3. Otipkajte ce i ispravite rijeè (u ovom sluèaju otipkajte inija ). 4. Pritisnite i pomaknite kursor na sljedeæi znak kojeg je potrebno ispraviti. - 5. Ponovite korake 3 i 4 sve dok prva reèenica - ne postane istovjetna drugoj. + 5. Ponovite korake 3 i 4 sve dok prva reèenica ne postane istovjetna + drugoj. ---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. ---> Ova linija ima nekoliko rijeèi koje treba mijenjati. Primijetite da ce bri¹e rijeè i postavlja Vim u Insert mod. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.4: JO© MIJENJANJA KORI©TENJEM c @@ -449,7 +449,7 @@ Primijetite da ce bri 3. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 4. Pomaknite kursor na prvu gre¹ku. + 4. Pomaknite kursor na prvu pogre¹ku. 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna drugoj te pritisnite . @@ -462,23 +462,23 @@ NAPOMENA: Mo Lekcija 3 SA®ETAK - 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . - Ovo postavlja tekst IZA kursora (ako je pak linija izbrisana - tekst se postavlja na liniju ispod kursora). + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). - 2. Za promjenu znaka na kojem se nalazi kursor, - pritisnite r i nakon toga ¾eljeni znak. + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + ¾eljeni znak. - 3. Operator mijenjanja dozvoljava promjenu teksta - od kursora do pozicije do koje dovede pokret. - tj. Otipkajte ce za mijenjanje od kursora do kraja rijeèi, - c$ za mijenjanje od kursora do kraja linije. + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + rijeèi, c$ za mijenjanje od kursora do kraja linije. 4. Oblik naredbe mijenjanja: c [broj] pokret -Preðite na sljedeæu lekciju. +Prijeðite na sljedeæu lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -520,12 +520,12 @@ NAPOMENA: Mo 4. Za tra¾enje izraza unatrag, koristite ? umjesto / . 5. Za povratak na prethodnu poziciju koristite CTRL-O (dr¾ite Ctrl - pritisnutim dok ne pritisnete slovo o). Ponavljajte sve dok se ne + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne vratite na poèetak. CTRL-I slièno kao CTRL-O ali u suprotnom smjeru. ----> "grrrre¹ka" je pogre¹no; umjesto grrrre¹ka treba stajati gre¹ka. +---> "pogrrrre¹ka" je pogre¹no; umjesto pogrrrre¹ka treba stajati pogre¹ka. -NAPOMENA: Ako tra¾enje doðe do kraja datoteke nastavit æe se od njenog +NAPOMENA: Ako se tra¾enjem doðe do kraja datoteke nastavit æe se od njenog poèetka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4.3: TRA®ENJE PRIPADAJUÆE ZAGRADE @@ -534,13 +534,13 @@ NAPOMENA: Ako tra ** Otipkajte % za pronalazak pripadajuæe ), ] ili } . ** 1. Postavite kursor na bilo koju od ( , [ ili { - otvorenih zagrada u liniji oznaèenom s --->. + otvorenih zagrada u liniji oznaèenoj s --->. 2. Otipkajte znak % . 3. Kursor æe se pomaknuti na pripadajuæu zatvorenu zagradu. - 4. Otipkajte % da pomaknete kursor na drugu pripadajuæu zagradu. + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuæu zagradu. 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. @@ -554,12 +554,12 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju Lekcija 4.4: NAREDBE ZAMIJENE - ** Otipkajte :s/staro/novo/g da zamjenite 'staro' za 'novo'. ** + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** 1. Pomaknite kursor na liniju oznaèenu s --->. 2. Otipkajte :s/cvræè/cvrè . Primjetite da ova naredba zamjenjuje - samo prvi "cvrèè" u liniji. + samo prvi "cvræè" u liniji. 3. Otipkajte :s/cvræè/cvrè/g . Dodavanje g stavke znaèi da æe se naredba izvr¹iti na cijeloj liniji, zamjenjivanjem svih "cvræè" u liniji. @@ -571,7 +571,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju te izmeðu njih æe se izvr¹iti zamjena. Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i - potvrdu zamijene. + potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4 SA®ETAK @@ -579,13 +579,13 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. G postavlja kursor na zadnju liniju datoteke. - broj G postavlja kursor na odreðeni broj linije.. + broj G postavlja kursor na broj liniju. gg postavlja kursor na prvu liniju. 2. Tipkanje / sa izrazom tra¾i UNAPRIJED taj izraz. Tipkanje ? sa izrazom tra¾i UNATRAG taj izraz. Nakon naredbe tra¾enja koristite n za pronalazak izraza u istom - smjeru, ili N za pronalazak istog izraza ali u suprotnom smjeru. + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. CTRL-O vraæa kursor na prethodnu poziciju, CTRL-I na sljedeæu poziciju. 3. Tipkanje % dok je kursor na zagradi pomièe ga na pripadajuæu zagradu. @@ -602,7 +602,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju ** Otipkajte :! sa vanjskom naredbom koju ¾elite izvr¹iti. ** - 1. Otipkajte poznatu naredbu : kako bi se kursor premjestio na dno + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno ekrana. Time omoguæavate unos naredbe u naredbenoj liniji. 2. Otipkajte znak ! (uskliènik). Tako omoguæavate @@ -615,7 +615,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju NAPOMENA: Moguæe je izvr¹avati bilo koju vanjsku naredbu na ovaj naèin, zajedno sa njenim argumentima. -NAPOMENA: Sve : naredbe se izvr¹avaju jedino ako pritisnete +NAPOMENA: Sve : naredbe se izvr¹avaju nakon ¹to pritisnete U daljnjem tekstu to neæe uvijek biti napomenuto. @@ -631,11 +631,11 @@ NAPOMENA: Sve : naredbe se izvr 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) - 4. Time æete spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. - Kako bi to provjerili, otipkajte ponovno :!dir ili :!ls + 4. Time æe te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls za pregled direktorija. -NAPOMENA: Ako bi napustili Vim i pokrenuli ga ponovno sa vim TEST , +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , datoteka bi bila potpuna kopija ove datoteke u trenutku kada ste je spremili. @@ -673,21 +673,21 @@ NAPOMENA: Tipka v zapo 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon ¹to izvr¹ite 2. korak vidjeti æe te tekst - iz Lekcije 5.3. Stoga pomaknite kursor DOLJE - kako bi ponovno vidjeli ovu lekciju. +NAPOMENA: Nakon ¹to izvr¹ite 2. korak vidjeti æe te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Uèitajte va¹u TEST datoteku koristeæi naredbu :r TEST gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. Sadr¾aj uèitane datoteke je ubaèen liniju ispod kursora. - 3. Kako bi provjerili da je datoteka uèitana, - vratite kursor unatrag i primijetite dvije kopije - Lekcije 5.3, originalnu i onu iz datoteke. + 3. Kako bi provjerili da je datoteka uèitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. NAPOMENA: Mo¾ete takoðer uèitati ispis vanjske naredbe. Npr, :r !ls æe uèitati ispis ls naredbe i postaviti ispis liniju ispod kursora. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 5 SA®ETAK @@ -699,17 +699,17 @@ NAPOMENA: Mo :!dir :!ls - pregled direktorija. :!del DATOTEKA :!rm DATOTEKA - bri¹e datoteku DATOTEKA. - 2. :w DATOTEKA zapisuje trenutaènu datoteku - na disk sa imenom DATOTEKA. + 2. :w DATOTEKA zapisuje trenutaènu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno oznaèene linije u + datoteku IME_DATOTEKE. - 3. v pokret :w IME_DATOTEKE sprema vizualno - oznaèene linije u datoteku IME_DATOTEKE. + 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadr¾aj liniju ispod kursora. - 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa - diska i stavlja njen sadr¾aj liniju ispod kursora. + 5. :r !dir uèitava ispis naredbe dir i postavlja sadr¾aj ispisa liniju + ispod kursora. - 5. :r !dir uèitava ispis naredbe dir i postavlja - sadr¾aj ispisa liniju ispod kursora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 6.1: NAREDBA OTVORI @@ -720,8 +720,8 @@ NAPOMENA: Mo 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. - 2. Otipkajte malo o kako bi otvorili novu - liniju ISPOD kursora i pre¹li u Insert mod. + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i pre¹li u Insert mod. 3. Otipkajte ne¹to teksta i nakon toga pritisnite kako bi napustili Insert mod. @@ -749,12 +749,12 @@ NAPOMENA: Mo 4. Dopunite rijeè kao ¹to je na liniji ispod. Pritisnite za izlaz iz Insert moda. - 5. Sa e preðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. + 5. Sa e prijeðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. ---> Ova li omoguæava vje dodav teksta nekoj liniji. ---> Ova linija omoguæava vje¾banje dodavanja teksta nekoj liniji. -NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje æe se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -763,14 +763,14 @@ NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina ** Otipkajte veliko R kako bi zamijelili vi¹e od jednog znaka. ** - 1. Pomaknite kursor na prvu slijedeæu liniju oznaèenu s --->. - Pomaknite kusor na poèetak prvog xxx . + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Pomaknite kursor na poèetak prvog xxx . 2. Pritisnite R i otipkajte broj koji je liniju ispod, tako da zamijeni xxx . 3. Pritisnite za izlaz iz Replace moda. - Primijetite da je ostatak linije ostao nepromijenjen. + Primijetite da je ostatak linije ostao nepromjenjen. 5. Ponovite korake kako bi zamijenili preostali xxx. @@ -784,7 +784,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA - ** Koristite y operator za kopiranje i p za lijepljenje teksta. ** + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". @@ -792,7 +792,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, 3. Pritisnite y kako bi kopirali oznaèeni tekst. - 4. Pomaknite kursor do kraja slijedeæe linije: j$ + 4. Pomaknite kursor do kraja sljedeæe linije: j$ 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . @@ -807,7 +807,7 @@ NAPOMENA: mo Lekcija 6.5: MIJENJANJE POSTAVKI - ** Postavka: naredbe tra¾enja i zamjene ne razlikuju VELIKA i mala slova ** + ** Postavka: naredbe tra¾enja i zamijene ne razlikuju VELIKA i mala slova ** 1. Potra¾ite 'razlika' tipkanjem: /razlika Nekoliko puta ponovite pritiskanjem n . @@ -823,7 +823,7 @@ NAPOMENA: mo 6. Za deaktiviranje ic postavke koristite: :set noic -NAPOMENA: Za ne oznaèavanje pronaðenih izraza otipkajte: :nohlsearch +NAPOMENA: Za neoznaèavanje pronaðenih izraza otipkajte: :nohlsearch NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -847,7 +847,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 'hls' 'hlsearch' oznaèi sve pronaðene izraze Mo¾ete koristite dugo ili kratko ime postavke. - 7. Prethodite "no" imenu postavke za deaktivaciju iste: :set noic + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 7.1: DOBIVANJE POMOÆI @@ -862,10 +862,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi - utipkajte :help Proèitajte tekst u prozoru pomoæi kako bi ste se znali slu¾iti istom. - tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. Otipkajte :q kako bi zatvorili prozor pomoæi. - Pronaæi æete pomoæ o bilo kojoj temi, tako da dodate upit samoj + Pronaæi æe te pomoæ o bilo kojoj temi, tako da dodate upit samoj ":help" naredbi. Poku¹ajte (ne zaboravite pritisnuti ): :help w @@ -876,10 +876,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Lekcija 7.2: PRAVLJENJE SKRIPTE - ** Aktiviranjte Vim moguænosti ** + ** Aktivirajte Vim moguænosti ** - Vim ima mnogo vi¹e alata od Vi-ja, ali veæina njih je deaktivirana. - Kako bi zapoèeli koristiti vi¹e moguænosti napravite "vimrc" datoteku. + Vim ima mnogo vi¹e alata od Vi-ja, ali veæina njih nije aktivirana. + Kako bi mogli koristiti vi¹e moguænosti napravite "vimrc" datoteku. 1. Uredite "vimrc" datoteku. Ovo ovisi o va¹em sistemu: :e ~/.vimrc za Unix @@ -891,8 +891,8 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 3. Saèuvajte datoteku sa: :w - Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta je - aktivno. Mo¾ete dodati sve va¹e postavke u "vimrc" datoteku. + Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta biti æe + aktivirano. Sve va¹e postavke mo¾ete dodati u "vimrc" datoteku. Za vi¹e informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -924,27 +924,27 @@ NAPOMENA: Mogu 1. Otipkajte :help ili pritisnite ili za pomoæ. - 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . + 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor 4. Otipkajte :q kako bi zatvorili prozor pomoæi - 5. Napravite vimrc startup scriptu kako bi u nju spremali va¹e - najdra¾e postavke. + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + va¹e omiljene postavke. - 6. Kada tipkate naredbu koja zapoèinje sa : , - pritisnite CTRL-D kako bi vidjeli - moguæe valjane vrijednosti. + 6. Kada tipkate naredbu koja zapoèinje sa : + pritisnite CTRL-D kako bi vidjeli moguæe valjane vrijednosti. Pritisnite kako bi odabrali jednu od njih. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Kraj priruènika. Cilj priruènika je da poka¾e kratak pregled Vim - editora, tek toliko da omoguæi njegovo kori¹tenje. Priruènik nije potpun - jer Vim ima mnogo vi¹e naredbi. Za vi¹e informacija: ":help user-manual". + Kraj. Cilj priruènika je da poka¾e kratak pregled Vim editora, tek toliko + da omoguæi njegovo kori¹tenje. Priruènik nije potpun jer Vim ima mnogo vi¹e + naredbi. Za vi¹e informacija: ":help user-manual". Za èitanje i kori¹tenje, preporuèamo: Vim - Vi Improved - by Steve Oualline @@ -961,12 +961,12 @@ NAPOMENA: Mogu Ovaj priruènik su napisali: Michael C. Pierce i Robert K. Ware, Colorado School of Mines koristeæi ideje Charles Smith, - Colorado State University. E-mail: bware@mines.colorado.edu. + Colorado State University. E-po¹ta: bware@mines.colorado.edu. Naknadne promjene napravio je Bram Moolenaar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Prijevod na hrvatski: Paul B. Mahol - Prva verzija, Sijeèanj 2008. + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 diff --git a/runtime/tutor/tutor.hr.cp1250 b/runtime/tutor/tutor.hr.cp1250 index a6c8717f..92771ab2 100644 --- a/runtime/tutor/tutor.hr.cp1250 +++ b/runtime/tutor/tutor.hr.cp1250 @@ -15,11 +15,11 @@ (ako ste pokrenuli "vimtutor" ovo je veæ kopija). Vrlo je važno primijetiti da je ovaj priruènik namijenjen za vježbanje. - Preciznije, morate izvršiti naredbe u Vim-u kako bi ste iste pravilno - nauèili koristiti. Ako samo èitate tekst, zaboravit æete naredbe! + Preciznije, morate izvršiti naredbe u Vim-u kako bi ste iste nauèili + pravilno koristiti. Ako samo èitate tekst, zaboraviti æe te naredbe! Ako je CapsLock ukljuèen ISKLJUÈITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni cijeli ekran. + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.1: POMICANJE KURSORA @@ -27,7 +27,7 @@ ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** ^ - k Hint: h tipka je ljevo i pomièe kursor ljevo. + k Savjet: h tipka je lijevo i pomièe kursor lijevo. < h l > l tipka je desno i pomièe kursor desno. j j izgleda kao strelica usmjerena dolje. v @@ -36,13 +36,13 @@ 2. Držite tipku (j) pritisnutom. Sada znate kako doæi do sljedeæe lekcije. - 3. Koristeæi tipku j preðite na sljedeæu lekciju 1.2. + 3. Koristeæi tipku j prijeðite na sljedeæu lekciju 1.2. NAPOMENA: Ako niste sigurni što ste zapravo pritisnuli uvijek koristite tipku kako bi prešli u Normal mod i onda pokušajte ponovno. -NAPOMENA: Kursorske tipke rade isto. No korištenje hjkl tipaka je znatno - brže, kad se jednom naviknete na njihovo korištenje. Stvarno! +NAPOMENA: Kursorske tipke rade isto. Korištenje hjkl tipaka je znatno + brže, nakon što se jednom naviknete na njihovo korištenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.2: IZLAZ IZ VIM-a @@ -60,31 +60,31 @@ NAPOMENA: Kursorske tipke rade isto. No kori ovaj priruènik: vimtutor 4. Ako ste upamtili ove korake, izvršite ih redom od 1 do 3 - kako bi ste ponovno pokrenuli editor. + kako bi ponovno pokrenuli editor. NAPOMENA: :q! poništava sve promjene koje ste napravili. U sljedeæim lekcijama nauèit æe te kako promjene saèuvati. - 5. Pomaknite kursor na Lekciju 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** - 1. Pomaknite kursor na liniju oznaèenom s --->. + 1. Pomaknite kursor na liniju oznaèenu s --->. - 2. Kako bi ste ispravili greške, pomièite kursor dok se + 2. Kako bi ste ispravili pogreške, pomièite kursor dok se ne bude nalazio na slovu kojeg trebate izbrisati. 3. Pritisnite tipku x kako bi uklonili neželjeno slovo. - 4. Ponovite korake od 2 do 4 dok ne ispravite sve greške. + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogreške. ---> KKKravaa jee presskoèila mmjeseccc. - 5. Nakon što ispravite liniju, preðite na lekciju 1.4. + 5. Nakon što ispravite liniju, prijeðite na lekciju 1.4. NAPOMENA: Koristeæi ovaj priruènik ne pokušavajte pamtiti veæ uèite primjenom. @@ -96,21 +96,21 @@ NAPOMENA: Koriste ** Pritisnite i za ubacivanje teksta ispred kursora. ** - 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenom s --->. + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite kursor na prvi znak POSLIJE kojeg æe te utipkati potreban tekst. 3. Pritisnite i te utipkajte potrebne nadopune. - 4. Nakon što ispravite grešku pritisnite kako bi ste - vratili Vim u Normal mod. Ponovite korake od 2. do 4. - kako bi ispravili sve greške. + 4. Nakon što ispravite pogrešku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogreške. ---> Nedje no teka od v lin. ---> Nedostaje nešto teksta od ove linije. - 5. Preðite na sljedeæu lekciju. + 5. Prijeðite na sljedeæu lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -119,7 +119,7 @@ NAPOMENA: Koriste ** Pritisnite A za dodavanje teksta. ** - 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenom s --->. + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. Nije važno na kojem se slovu nalazi kursor na toj liniji. 2. Pritisnite A i napravite potrebne promjene. @@ -127,7 +127,7 @@ NAPOMENA: Koriste 3. Nakon što ste dodali tekst, pritisnite za povratak u Normal mod. - 4. Pomaknite kursor na drugu liniju oznaèenom s ---> + 4. Pomaknite kursor na drugu liniju oznaèenu s ---> i ponovite korake 2 i 3 dok ne popravite tekst. ---> Ima nešto teksta koji nedostaje n @@ -135,7 +135,7 @@ NAPOMENA: Koriste ---> Ima nešto teksta koji ne Ima nešto teksta koji nedostaje baš ovdje. - 5. Preðite na lekciju 1.6. + 5. Prijeðite na lekciju 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.6: PROMJENA DATOTEKE @@ -152,9 +152,9 @@ NAPOMENA: Koriste 3. Ubacite i izbrišite tekst kao što ste to napravili u lekcijama prije. - 4. Saèuvajte promijenjeni tekst i izaðite iz Vim-a: :wq + 4. Saèuvajte promjenjeni tekst i izaðite iz Vim-a: :wq - 5. Ponovno pokrenite vimtutor i nastavite èitati sažetak koji slijedi. + 5. Ponovno pokrenite vimtutor i nastavite èitati sažetak koji sljedi. 6. Nakon sto proèitate gornje korake i u potpunosti ih razumijete: izvršite ih. @@ -164,11 +164,11 @@ NAPOMENA: Koriste 1. Kursor se pomièe strelicama ili pomoæu hjkl tipaka. - h (ljevo) j (dolje) k (gore) l (desno) + h (lijevo) j (dolje) k (gore) l (desno) 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE - 3. Izlaz: :q! sve promijene su izgubljene. + 3. Izlaz: :q! sve promjene su izgubljene. ILI: :wq promjene su saèuvane. 4. Brisanje znaka na kojem se nalazi kursor: x @@ -177,8 +177,8 @@ NAPOMENA: Koriste i utipkajte tekst unos ispred kursora A utipkajte tekst dodavanje na kraju linije -NAPOMENA: Tipkanjem tipke æe prebaciti Vim u Normal mod i - prekinuti neželjenu ili djelomièno završenu naredbu. +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida neželjenu ili djelomièno završenu naredbu. Nastavite èitati Lekciju 2. @@ -190,20 +190,20 @@ Nastavite 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju oznaèenom s --->. + 2. Pomaknite kursor na liniju oznaèenu s --->. 3. Pomaknite kursor na poèetak rijeèi koju treba izbrisati. 4. Otipkajte dw kako bi uklonili rijeè. NAPOMENA: Vim æe prikazati slovo d na zadnjoj liniji kad ga otipkate. - Vim èeka da otipkate w . Ako je prikazano neko drugo slovo - otipkali ste krivo; pritisnite i pokušajte ponovno. + Vim èeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i pokušajte ponovno. ---> Neke rijeèi smiješno ne pripadaju na papir ovoj reèenici. 5. Ponovite korake 3 i 4 dok ne ispravite reèenicu; - preðite na Lekciju 2.2. + prijeðite na Lekciju 2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2.2: JOŠ BRISANJA @@ -214,8 +214,7 @@ NAPOMENA: Vim 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju - oznaèenom s --->. + 2. Pomaknite kursor na liniju oznaèenu s --->. 3. Pomaknite kursor do kraja ispravne reèenice (POSLJE prve . ). @@ -225,7 +224,8 @@ NAPOMENA: Vim ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Preðite na Lekciju 2.3 za bolje objašnjenje. + 5. Prijeðite na Lekciju 2.3 za bolje objašnjenje. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,14 +239,14 @@ NAPOMENA: Vim Pri èemu je: d - operator brisanja. - pokret - ono na èemu æe se operacija izvršavati (vidi tekst niže). + pokret - ono na èemu æe se operacija izvršavati (navedeno u nastavku). Kratka lista pokreta: - w - sve do poèetka sljedeæe rijeèi, BEZ prvog slova. + w - sve do poèetka sljedeæe rijeèi, NE UKLJUÈUJUÆI prvo slovo. e - sve do kraja trenutaène rijeèi, UKLJUÈUJUÆI zadnje slovo. $ - sve do kraje linije, UKLJUÈUJUÆI zadnje slovo. - Tipkanjem de znakovi æe se brisati od kursora do kraja rijeèi. + Tipkanjem de æe se brisati od kursora do kraja rijeèi. NAPOMENA: Pritiskajuæi samo pokrete dok ste u Normal modu bez operatora æe pomicati kursor kao što je navedeno. @@ -255,10 +255,9 @@ NAPOMENA: Pritiskaju Lekcija 2.4: KORIŠTENJE BROJANJA ZA POKRETE - ** Tipkanjem nekog broja prije pokreta, - pokret æe se izvršavati toliko puta. ** + ** Tipkanjem nekog broja prije pokreta, pokret se izvršava toliko puta. ** - 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. + 1. Pomaknite kursor na liniju oznaèenu s --->. 2. Otipkajte 2w da pomaknete kursor dvije rijeèi naprijed. @@ -268,9 +267,10 @@ NAPOMENA: Pritiskaju 5. Ponovite korake 2 i 3 s nekim drugim brojevima. ----> Reèenica sadrži nekoliko rijeèi po kojima možete pomicati kursor. +---> Reèenica sa rijeèima po kojoj možete pomicati kursor. + + 6. Prijeðite na Lekciju 2.5. - 6. Preðite na Lekciju 2.5. @@ -293,7 +293,7 @@ NAPOMENA: Pritiskaju 3. Ponovite korake 1 i 2 sa razlièitim brojevima da izbrišete uzastopne rijeèi sa VELIKIM SLOVIMA sa samo jednom naredbom. ----> ova ABC DE linija FGHI JK LMN OP rijeèi je RS T TUV popravljena. +---> ova ABCÈÆ DÐE linija FGHI JK LMN OP rijeèi je RSŠ TUVZŽ popravljena. @@ -303,8 +303,8 @@ NAPOMENA: Pritiskaju ** Otipkajte dd za brisanje cijele linije. ** - Zbog uèestalosti brisanja cijelih linija, kreatori Vi-a su - odluèili za lakše brisanje linije tipkanjem d dvaput. + Zbog uèestalosti brisanja cijelih linija, dizajneri Vi-a su odluèili da + je lakše brisati linije tipkanjem d dvaput. 1. Pomaknite kursor na drugu liniju u donjoj kitici. 2. Otipkajte dd kako bi izbrisali liniju. @@ -326,22 +326,22 @@ NAPOMENA: Pritiskaju ** Pritisnite u za poništenje zadnje naredbe, U za cijelu liniju. ** - 1. Pomaknite kursor na sljedeæu liniju oznaèenu s ---> - i postavite kursor na prvu grešku. + 1. Pomaknite kursor na liniju oznaèenu s ---> i postavite kursor na prvu + pogrešku. 2. Otipkajte x kako bi izbrisali prvi neželjeni znak. 3. Otipkajte u kako bi poništili zadnju izvršenu naredbu. 4. Ovaj put ispravite sve pogreške na liniji koristeæi x naredbu. 5. Sada utipkajte veliko U kako bi poništili sve promjene - na liniji, i time je vratili u prijašnje stanje. - 6. Sada utipkajte u nekoliko puta kako bi - poništili U i prijašnje naredbe. + na liniji, vraæajuæi je u prijašnje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poništili U + i prijašnje naredbe. 7. Sada utipkajte CTRL-R (držeæi CTRL tipku pritisnutom dok ne pritisnete R) nekoliko puta kako bi vratili promjene (poništili poništenja). ----> Poopravite greške nna ovvoj liniji ii pooništiteee ih. +---> Poopravite pogreške nna ovvoj liniji ii pooništiteee ih. - 8. Vrlo korisne naredbe. Preðite na sažetak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeðite na sažetak Lekcije 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2 SAŽETAK @@ -374,21 +374,21 @@ NAPOMENA: Pritiskaju 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 2. Otipkajte dd kako bi izbrisali liniju i - spremili je u Vim registar. + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. 4. Otipkajte p kako bi postavili liniju ispod kursora. - 5. Ponovite korake 2 do 4 kako bi postavili - sve linije u pravilnom rasporedu. + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. ----> d) Možeš li i ti uèiti? +---> d) Možeš li i ti nauèiti? ---> b) Ljubice su plave, ---> c) Inteligencija je nauèena, ---> a) Ruže su crvene, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.2: NAREDBA PROMJENE @@ -397,17 +397,17 @@ NAPOMENA: Pritiskaju 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 2. Pomaknite kursor tako da se nalazi na prvoj grešci. + 2. Pomaknite kursor tako da se nalazi na prvoj pogrešci. 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. 4. Ponovite korake 2 i 3 sve dok prva linije ne bude istovjetna drugoj. ----> Kede ju ovu limija tupjana, netko je prutuskao kruve tupke! +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Preðite na Lekciju 3.2. + 5. Prijeðite na Lekciju 3.2. NAPOMENA: Prisjetite da trebate uèiti vježbanjem, ne pamæenjem. @@ -422,19 +422,19 @@ NAPOMENA: Prisjetite da trebate u 2. Postavite kursor na a u lackmb. - 3. Otipkajte ce i ispravite rijeè - (u ovom sluèaju otipkajte inija ). + 3. Otipkajte ce i ispravite rijeè (u ovom sluèaju otipkajte inija ). 4. Pritisnite i pomaknite kursor na sljedeæi znak kojeg je potrebno ispraviti. - 5. Ponovite korake 3 i 4 sve dok prva reèenica - ne postane istovjetna drugoj. + 5. Ponovite korake 3 i 4 sve dok prva reèenica ne postane istovjetna + drugoj. ---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. ---> Ova linija ima nekoliko rijeèi koje treba mijenjati. Primijetite da ce briše rijeè i postavlja Vim u Insert mod. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.4: JOŠ MIJENJANJA KORIŠTENJEM c @@ -449,7 +449,7 @@ Primijetite da ce bri 3. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. - 4. Pomaknite kursor na prvu grešku. + 4. Pomaknite kursor na prvu pogrešku. 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna drugoj te pritisnite . @@ -462,23 +462,23 @@ NAPOMENA: Mo Lekcija 3 SAŽETAK - 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . - Ovo postavlja tekst IZA kursora (ako je pak linija izbrisana - tekst se postavlja na liniju ispod kursora). + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). - 2. Za promjenu znaka na kojem se nalazi kursor, - pritisnite r i nakon toga željeni znak. + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + željeni znak. - 3. Operator mijenjanja dozvoljava promjenu teksta - od kursora do pozicije do koje dovede pokret. - tj. Otipkajte ce za mijenjanje od kursora do kraja rijeèi, - c$ za mijenjanje od kursora do kraja linije. + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + rijeèi, c$ za mijenjanje od kursora do kraja linije. 4. Oblik naredbe mijenjanja: c [broj] pokret -Preðite na sljedeæu lekciju. +Prijeðite na sljedeæu lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -520,12 +520,12 @@ NAPOMENA: Mo 4. Za traženje izraza unatrag, koristite ? umjesto / . 5. Za povratak na prethodnu poziciju koristite CTRL-O (držite Ctrl - pritisnutim dok ne pritisnete slovo o). Ponavljajte sve dok se ne + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne vratite na poèetak. CTRL-I slièno kao CTRL-O ali u suprotnom smjeru. ----> "grrrreška" je pogrešno; umjesto grrrreška treba stajati greška. +---> "pogrrrreška" je pogrešno; umjesto pogrrrreška treba stajati pogreška. -NAPOMENA: Ako traženje doðe do kraja datoteke nastavit æe se od njenog +NAPOMENA: Ako se traženjem doðe do kraja datoteke nastavit æe se od njenog poèetka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4.3: TRAŽENJE PRIPADAJUÆE ZAGRADE @@ -534,13 +534,13 @@ NAPOMENA: Ako tra ** Otipkajte % za pronalazak pripadajuæe ), ] ili } . ** 1. Postavite kursor na bilo koju od ( , [ ili { - otvorenih zagrada u liniji oznaèenom s --->. + otvorenih zagrada u liniji oznaèenoj s --->. 2. Otipkajte znak % . 3. Kursor æe se pomaknuti na pripadajuæu zatvorenu zagradu. - 4. Otipkajte % da pomaknete kursor na drugu pripadajuæu zagradu. + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuæu zagradu. 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. @@ -554,12 +554,12 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju Lekcija 4.4: NAREDBE ZAMIJENE - ** Otipkajte :s/staro/novo/g da zamjenite 'staro' za 'novo'. ** + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** 1. Pomaknite kursor na liniju oznaèenu s --->. 2. Otipkajte :s/cvræè/cvrè . Primjetite da ova naredba zamjenjuje - samo prvi "cvrèè" u liniji. + samo prvi "cvræè" u liniji. 3. Otipkajte :s/cvræè/cvrè/g . Dodavanje g stavke znaèi da æe se naredba izvršiti na cijeloj liniji, zamjenjivanjem svih "cvræè" u liniji. @@ -571,7 +571,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju te izmeðu njih æe se izvršiti zamjena. Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i - potvrdu zamijene. + potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4 SAŽETAK @@ -579,13 +579,13 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. G postavlja kursor na zadnju liniju datoteke. - broj G postavlja kursor na odreðeni broj linije.. + broj G postavlja kursor na broj liniju. gg postavlja kursor na prvu liniju. 2. Tipkanje / sa izrazom traži UNAPRIJED taj izraz. Tipkanje ? sa izrazom traži UNATRAG taj izraz. Nakon naredbe traženja koristite n za pronalazak izraza u istom - smjeru, ili N za pronalazak istog izraza ali u suprotnom smjeru. + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. CTRL-O vraæa kursor na prethodnu poziciju, CTRL-I na sljedeæu poziciju. 3. Tipkanje % dok je kursor na zagradi pomièe ga na pripadajuæu zagradu. @@ -602,7 +602,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju ** Otipkajte :! sa vanjskom naredbom koju želite izvršiti. ** - 1. Otipkajte poznatu naredbu : kako bi se kursor premjestio na dno + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno ekrana. Time omoguæavate unos naredbe u naredbenoj liniji. 2. Otipkajte znak ! (uskliènik). Tako omoguæavate @@ -615,7 +615,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadaju NAPOMENA: Moguæe je izvršavati bilo koju vanjsku naredbu na ovaj naèin, zajedno sa njenim argumentima. -NAPOMENA: Sve : naredbe se izvršavaju jedino ako pritisnete +NAPOMENA: Sve : naredbe se izvršavaju nakon što pritisnete U daljnjem tekstu to neæe uvijek biti napomenuto. @@ -631,11 +631,11 @@ NAPOMENA: Sve : naredbe se izvr 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) - 4. Time æete spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. - Kako bi to provjerili, otipkajte ponovno :!dir ili :!ls + 4. Time æe te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls za pregled direktorija. -NAPOMENA: Ako bi napustili Vim i pokrenuli ga ponovno sa vim TEST , +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , datoteka bi bila potpuna kopija ove datoteke u trenutku kada ste je spremili. @@ -673,21 +673,21 @@ NAPOMENA: Tipka v zapo 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon što izvršite 2. korak vidjeti æe te tekst - iz Lekcije 5.3. Stoga pomaknite kursor DOLJE - kako bi ponovno vidjeli ovu lekciju. +NAPOMENA: Nakon što izvršite 2. korak vidjeti æe te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Uèitajte vašu TEST datoteku koristeæi naredbu :r TEST gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. Sadržaj uèitane datoteke je ubaèen liniju ispod kursora. - 3. Kako bi provjerili da je datoteka uèitana, - vratite kursor unatrag i primijetite dvije kopije - Lekcije 5.3, originalnu i onu iz datoteke. + 3. Kako bi provjerili da je datoteka uèitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. NAPOMENA: Možete takoðer uèitati ispis vanjske naredbe. Npr, :r !ls æe uèitati ispis ls naredbe i postaviti ispis liniju ispod kursora. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 5 SAŽETAK @@ -699,17 +699,17 @@ NAPOMENA: Mo :!dir :!ls - pregled direktorija. :!del DATOTEKA :!rm DATOTEKA - briše datoteku DATOTEKA. - 2. :w DATOTEKA zapisuje trenutaènu datoteku - na disk sa imenom DATOTEKA. + 2. :w DATOTEKA zapisuje trenutaènu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno oznaèene linije u + datoteku IME_DATOTEKE. - 3. v pokret :w IME_DATOTEKE sprema vizualno - oznaèene linije u datoteku IME_DATOTEKE. + 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadržaj liniju ispod kursora. - 4. :r IME_DATOTEKE uèitava datoteku IME_DATOTEKE sa - diska i stavlja njen sadržaj liniju ispod kursora. + 5. :r !dir uèitava ispis naredbe dir i postavlja sadržaj ispisa liniju + ispod kursora. - 5. :r !dir uèitava ispis naredbe dir i postavlja - sadržaj ispisa liniju ispod kursora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 6.1: NAREDBA OTVORI @@ -720,8 +720,8 @@ NAPOMENA: Mo 1. Pomaknite kursor na sljedeæu liniju oznaèenu s --->. - 2. Otipkajte malo o kako bi otvorili novu - liniju ISPOD kursora i prešli u Insert mod. + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i prešli u Insert mod. 3. Otipkajte nešto teksta i nakon toga pritisnite kako bi napustili Insert mod. @@ -749,12 +749,12 @@ NAPOMENA: Mo 4. Dopunite rijeè kao što je na liniji ispod. Pritisnite za izlaz iz Insert moda. - 5. Sa e preðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. + 5. Sa e prijeðite na sljedeæu nepotpunu rijeè i ponovite korake 3 i 4. ---> Ova li omoguæava vje dodav teksta nekoj liniji. ---> Ova linija omoguæava vježbanje dodavanja teksta nekoj liniji. -NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje æe se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -763,14 +763,14 @@ NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina ** Otipkajte veliko R kako bi zamijelili više od jednog znaka. ** - 1. Pomaknite kursor na prvu slijedeæu liniju oznaèenu s --->. - Pomaknite kusor na poèetak prvog xxx . + 1. Pomaknite kursor na prvu sljedeæu liniju oznaèenu s --->. + Pomaknite kursor na poèetak prvog xxx . 2. Pritisnite R i otipkajte broj koji je liniju ispod, tako da zamijeni xxx . 3. Pritisnite za izlaz iz Replace moda. - Primijetite da je ostatak linije ostao nepromijenjen. + Primijetite da je ostatak linije ostao nepromjenjen. 5. Ponovite korake kako bi zamijenili preostali xxx. @@ -784,7 +784,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA - ** Koristite y operator za kopiranje i p za lijepljenje teksta. ** + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". @@ -792,7 +792,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, 3. Pritisnite y kako bi kopirali oznaèeni tekst. - 4. Pomaknite kursor do kraja slijedeæe linije: j$ + 4. Pomaknite kursor do kraja sljedeæe linije: j$ 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . @@ -807,7 +807,7 @@ NAPOMENA: mo Lekcija 6.5: MIJENJANJE POSTAVKI - ** Postavka: naredbe traženja i zamjene ne razlikuju VELIKA i mala slova ** + ** Postavka: naredbe traženja i zamijene ne razlikuju VELIKA i mala slova ** 1. Potražite 'razlika' tipkanjem: /razlika Nekoliko puta ponovite pritiskanjem n . @@ -823,7 +823,7 @@ NAPOMENA: mo 6. Za deaktiviranje ic postavke koristite: :set noic -NAPOMENA: Za ne oznaèavanje pronaðenih izraza otipkajte: :nohlsearch +NAPOMENA: Za neoznaèavanje pronaðenih izraza otipkajte: :nohlsearch NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -847,7 +847,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 'hls' 'hlsearch' oznaèi sve pronaðene izraze Možete koristite dugo ili kratko ime postavke. - 7. Prethodite "no" imenu postavke za deaktivaciju iste: :set noic + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 7.1: DOBIVANJE POMOÆI @@ -862,10 +862,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi - utipkajte :help Proèitajte tekst u prozoru pomoæi kako bi ste se znali služiti istom. - tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. Otipkajte :q kako bi zatvorili prozor pomoæi. - Pronaæi æete pomoæ o bilo kojoj temi, tako da dodate upit samoj + Pronaæi æe te pomoæ o bilo kojoj temi, tako da dodate upit samoj ":help" naredbi. Pokušajte (ne zaboravite pritisnuti ): :help w @@ -876,10 +876,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Lekcija 7.2: PRAVLJENJE SKRIPTE - ** Aktiviranjte Vim moguænosti ** + ** Aktivirajte Vim moguænosti ** - Vim ima mnogo više alata od Vi-ja, ali veæina njih je deaktivirana. - Kako bi zapoèeli koristiti više moguænosti napravite "vimrc" datoteku. + Vim ima mnogo više alata od Vi-ja, ali veæina njih nije aktivirana. + Kako bi mogli koristiti više moguænosti napravite "vimrc" datoteku. 1. Uredite "vimrc" datoteku. Ovo ovisi o vašem sistemu: :e ~/.vimrc za Unix @@ -891,8 +891,8 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 3. Saèuvajte datoteku sa: :w - Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta je - aktivno. Možete dodati sve vaše postavke u "vimrc" datoteku. + Sljedeæeg puta kada pokrenete Vim, bojanje sintakse teksta biti æe + aktivirano. Sve vaše postavke možete dodati u "vimrc" datoteku. Za više informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -924,27 +924,27 @@ NAPOMENA: Mogu 1. Otipkajte :help ili pritisnite ili za pomoæ. - 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . + 2. Otipkajte :help naredba kako bi dobili pomoæ za naredba . 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor 4. Otipkajte :q kako bi zatvorili prozor pomoæi - 5. Napravite vimrc startup scriptu kako bi u nju spremali vaše - najdraže postavke. + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + vaše omiljene postavke. - 6. Kada tipkate naredbu koja zapoèinje sa : , - pritisnite CTRL-D kako bi vidjeli - moguæe valjane vrijednosti. + 6. Kada tipkate naredbu koja zapoèinje sa : + pritisnite CTRL-D kako bi vidjeli moguæe valjane vrijednosti. Pritisnite kako bi odabrali jednu od njih. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Kraj priruènika. Cilj priruènika je da pokaže kratak pregled Vim - editora, tek toliko da omoguæi njegovo korištenje. Priruènik nije potpun - jer Vim ima mnogo više naredbi. Za više informacija: ":help user-manual". + Kraj. Cilj priruènika je da pokaže kratak pregled Vim editora, tek toliko + da omoguæi njegovo korištenje. Priruènik nije potpun jer Vim ima mnogo više + naredbi. Za više informacija: ":help user-manual". Za èitanje i korištenje, preporuèamo: Vim - Vi Improved - by Steve Oualline @@ -961,12 +961,12 @@ NAPOMENA: Mogu Ovaj priruènik su napisali: Michael C. Pierce i Robert K. Ware, Colorado School of Mines koristeæi ideje Charles Smith, - Colorado State University. E-mail: bware@mines.colorado.edu. + Colorado State University. E-pošta: bware@mines.colorado.edu. Naknadne promjene napravio je Bram Moolenaar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Prijevod na hrvatski: Paul B. Mahol - Prva verzija, Sijeèanj 2008. + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 diff --git a/runtime/tutor/tutor.hr.utf-8 b/runtime/tutor/tutor.hr.utf-8 index 3255609a..396bdfeb 100644 --- a/runtime/tutor/tutor.hr.utf-8 +++ b/runtime/tutor/tutor.hr.utf-8 @@ -15,11 +15,11 @@ (ako ste pokrenuli "vimtutor" ovo je već kopija). Vrlo je važno primijetiti da je ovaj priručnik namijenjen za vježbanje. - Preciznije, morate izvršiti naredbe u Vim-u kako bi ste iste pravilno - naučili koristiti. Ako samo čitate tekst, zaboravit ćete naredbe! + Preciznije, morate izvršiti naredbe u Vim-u kako bi ste iste naučili + pravilno koristiti. Ako samo čitate tekst, zaboraviti će te naredbe! Ako je CapsLock uključen ISKLJUČITE ga. Pritiskajte tipku j kako - bi pomakli kursor sve dok Lekcija 1.1 ne ispuni cijeli ekran. + bi pomakli kursor sve dok Lekcija 1.1 ne ispuni ekran. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.1: POMICANJE KURSORA @@ -27,7 +27,7 @@ ** Za pomicanje kursora, pritisnite h,j,k,l tipke kako je prikazano ** ^ - k Hint: h tipka je ljevo i pomiče kursor ljevo. + k Savjet: h tipka je lijevo i pomiče kursor lijevo. < h l > l tipka je desno i pomiče kursor desno. j j izgleda kao strelica usmjerena dolje. v @@ -36,13 +36,13 @@ 2. Držite tipku (j) pritisnutom. Sada znate kako doći do sljedeće lekcije. - 3. Koristeći tipku j pređite na sljedeću lekciju 1.2. + 3. Koristeći tipku j prijeđite na sljedeću lekciju 1.2. NAPOMENA: Ako niste sigurni što ste zapravo pritisnuli uvijek koristite tipku kako bi prešli u Normal mod i onda pokušajte ponovno. -NAPOMENA: Kursorske tipke rade isto. No korištenje hjkl tipaka je znatno - brže, kad se jednom naviknete na njihovo korištenje. Stvarno! +NAPOMENA: Kursorske tipke rade isto. Korištenje hjkl tipaka je znatno + brže, nakon što se jednom naviknete na njihovo korištenje. Stvarno! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.2: IZLAZ IZ VIM-a @@ -60,31 +60,31 @@ NAPOMENA: Kursorske tipke rade isto. No korištenje hjkl tipaka je znatno ovaj priručnik: vimtutor 4. Ako ste upamtili ove korake, izvršite ih redom od 1 do 3 - kako bi ste ponovno pokrenuli editor. + kako bi ponovno pokrenuli editor. NAPOMENA: :q! poništava sve promjene koje ste napravili. U sljedećim lekcijama naučit će te kako promjene sačuvati. - 5. Pomaknite kursor na Lekciju 1.3. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.3: PROMJENA TEKSTA - BRISANJE ** Pritisnite x za brisanje znaka pod kursorom. ** - 1. Pomaknite kursor na liniju označenom s --->. + 1. Pomaknite kursor na liniju označenu s --->. - 2. Kako bi ste ispravili greške, pomičite kursor dok se + 2. Kako bi ste ispravili pogreške, pomičite kursor dok se ne bude nalazio na slovu kojeg trebate izbrisati. 3. Pritisnite tipku x kako bi uklonili neželjeno slovo. - 4. Ponovite korake od 2 do 4 dok ne ispravite sve greške. + 4. Ponovite korake od 2 do 4 dok ne ispravite sve pogreške. ---> KKKravaa jee presskočila mmjeseccc. - 5. Nakon što ispravite liniju, pređite na lekciju 1.4. + 5. Nakon što ispravite liniju, prijeđite na lekciju 1.4. NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti već učite primjenom. @@ -96,21 +96,21 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti ** Pritisnite i za ubacivanje teksta ispred kursora. ** - 1. Pomaknite kursor na prvu sljedeću liniju označenom s --->. + 1. Pomaknite kursor na prvu sljedeću liniju označenu s --->. 2. Kako bi napravili prvu liniju istovjetnoj drugoj, pomaknite kursor na prvi znak POSLIJE kojeg će te utipkati potreban tekst. 3. Pritisnite i te utipkajte potrebne nadopune. - 4. Nakon što ispravite grešku pritisnite kako bi ste - vratili Vim u Normal mod. Ponovite korake od 2. do 4. - kako bi ispravili sve greške. + 4. Nakon što ispravite pogrešku pritisnite kako bi vratili Vim + u Normal mod. Ponovite korake od 2 do 4 kako bi ispravili sve pogreške. ---> Nedje no teka od v lin. ---> Nedostaje nešto teksta od ove linije. - 5. Pređite na sljedeću lekciju. + 5. Prijeđite na sljedeću lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -119,7 +119,7 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti ** Pritisnite A za dodavanje teksta. ** - 1. Pomaknite kursor na prvu sljedeću liniju označenom s --->. + 1. Pomaknite kursor na prvu sljedeću liniju označenu s --->. Nije važno na kojem se slovu nalazi kursor na toj liniji. 2. Pritisnite A i napravite potrebne promjene. @@ -127,7 +127,7 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti 3. Nakon što ste dodali tekst, pritisnite za povratak u Normal mod. - 4. Pomaknite kursor na drugu liniju označenom s ---> + 4. Pomaknite kursor na drugu liniju označenu s ---> i ponovite korake 2 i 3 dok ne popravite tekst. ---> Ima nešto teksta koji nedostaje n @@ -135,7 +135,7 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti ---> Ima nešto teksta koji ne Ima nešto teksta koji nedostaje baš ovdje. - 5. Pređite na lekciju 1.6. + 5. Prijeđite na lekciju 1.6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 1.6: PROMJENA DATOTEKE @@ -152,9 +152,9 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti 3. Ubacite i izbrišite tekst kao što ste to napravili u lekcijama prije. - 4. Sačuvajte promijenjeni tekst i izađite iz Vim-a: :wq + 4. Sačuvajte promjenjeni tekst i izađite iz Vim-a: :wq - 5. Ponovno pokrenite vimtutor i nastavite čitati sažetak koji slijedi. + 5. Ponovno pokrenite vimtutor i nastavite čitati sažetak koji sljedi. 6. Nakon sto pročitate gornje korake i u potpunosti ih razumijete: izvršite ih. @@ -164,11 +164,11 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti 1. Kursor se pomiče strelicama ili pomoću hjkl tipaka. - h (ljevo) j (dolje) k (gore) l (desno) + h (lijevo) j (dolje) k (gore) l (desno) 2. Pokretanje Vim-a iz ljuske: vim IME_DATOTEKE - 3. Izlaz: :q! sve promijene su izgubljene. + 3. Izlaz: :q! sve promjene su izgubljene. ILI: :wq promjene su sačuvane. 4. Brisanje znaka na kojem se nalazi kursor: x @@ -177,8 +177,8 @@ NAPOMENA: Koristeći ovaj priručnik ne pokušavajte pamtiti i utipkajte tekst unos ispred kursora A utipkajte tekst dodavanje na kraju linije -NAPOMENA: Tipkanjem tipke će prebaciti Vim u Normal mod i - prekinuti neželjenu ili djelomično završenu naredbu. +NAPOMENA: Tipkanjem tipke prebacuje Vim u Normal mod i + prekida neželjenu ili djelomično završenu naredbu. Nastavite čitati Lekciju 2. @@ -190,20 +190,20 @@ Nastavite čitati Lekciju 2. 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju označenom s --->. + 2. Pomaknite kursor na liniju označenu s --->. 3. Pomaknite kursor na početak riječi koju treba izbrisati. 4. Otipkajte dw kako bi uklonili riječ. NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. - Vim čeka da otipkate w . Ako je prikazano neko drugo slovo - otipkali ste krivo; pritisnite i pokušajte ponovno. + Vim čeka da otipkate w . Ako je prikazano neko drugo slovo, + krivo ste otipkali; pritisnite i pokušajte ponovno. ---> Neke riječi smiješno ne pripadaju na papir ovoj rečenici. 5. Ponovite korake 3 i 4 dok ne ispravite rečenicu; - pređite na Lekciju 2.2. + prijeđite na Lekciju 2.2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2.2: JOŠ BRISANJA @@ -214,8 +214,7 @@ NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. 1. Pritisnite kako bi bili sigurni da je Vim u Normal modu. - 2. Pomaknite kursor na liniju - označenom s --->. + 2. Pomaknite kursor na liniju označenu s --->. 3. Pomaknite kursor do kraja ispravne rečenice (POSLJE prve . ). @@ -225,7 +224,8 @@ NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. ---> Netko je utipkao kraj ove linije dvaput. kraj ove linije dvaput. - 5. Pređite na Lekciju 2.3 za bolje objašnjenje. + 5. Prijeđite na Lekciju 2.3 za bolje objašnjenje. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -239,14 +239,14 @@ NAPOMENA: Vim će prikazati slovo d na zadnjoj liniji kad ga otipkate. Pri čemu je: d - operator brisanja. - pokret - ono na čemu će se operacija izvršavati (vidi tekst niže). + pokret - ono na čemu će se operacija izvršavati (navedeno u nastavku). Kratka lista pokreta: - w - sve do početka sljedeće riječi, BEZ prvog slova. + w - sve do početka sljedeće riječi, NE UKLJUČUJUĆI prvo slovo. e - sve do kraja trenutačne riječi, UKLJUČUJUĆI zadnje slovo. $ - sve do kraje linije, UKLJUČUJUĆI zadnje slovo. - Tipkanjem de znakovi će se brisati od kursora do kraja riječi. + Tipkanjem de će se brisati od kursora do kraja riječi. NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će pomicati kursor kao što je navedeno. @@ -255,10 +255,9 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će Lekcija 2.4: KORIŠTENJE BROJANJA ZA POKRETE - ** Tipkanjem nekog broja prije pokreta, - pokret će se izvršavati toliko puta. ** + ** Tipkanjem nekog broja prije pokreta, pokret se izvršava toliko puta. ** - 1. Pomaknite kursor na sljedeću liniju označenu s --->. + 1. Pomaknite kursor na liniju označenu s --->. 2. Otipkajte 2w da pomaknete kursor dvije riječi naprijed. @@ -268,9 +267,10 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će 5. Ponovite korake 2 i 3 s nekim drugim brojevima. ----> Rečenica sadrži nekoliko riječi po kojima možete pomicati kursor. +---> Rečenica sa riječima po kojoj možete pomicati kursor. + + 6. Prijeđite na Lekciju 2.5. - 6. Pređite na Lekciju 2.5. @@ -293,7 +293,7 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će 3. Ponovite korake 1 i 2 sa različitim brojevima da izbrišete uzastopne riječi sa VELIKIM SLOVIMA sa samo jednom naredbom. ----> ova ABC DE linija FGHI JK LMN OP riječi je RS T TUV popravljena. +---> ova ABCČĆ DĐE linija FGHI JK LMN OP riječi je RSŠ TUVZŽ popravljena. @@ -303,8 +303,8 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ** Otipkajte dd za brisanje cijele linije. ** - Zbog učestalosti brisanja cijelih linija, kreatori Vi-a su - odlučili za lakše brisanje linije tipkanjem d dvaput. + Zbog učestalosti brisanja cijelih linija, dizajneri Vi-a su odlučili da + je lakše brisati linije tipkanjem d dvaput. 1. Pomaknite kursor na drugu liniju u donjoj kitici. 2. Otipkajte dd kako bi izbrisali liniju. @@ -326,22 +326,22 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će ** Pritisnite u za poništenje zadnje naredbe, U za cijelu liniju. ** - 1. Pomaknite kursor na sljedeću liniju označenu s ---> - i postavite kursor na prvu grešku. + 1. Pomaknite kursor na liniju označenu s ---> i postavite kursor na prvu + pogrešku. 2. Otipkajte x kako bi izbrisali prvi neželjeni znak. 3. Otipkajte u kako bi poništili zadnju izvršenu naredbu. 4. Ovaj put ispravite sve pogreške na liniji koristeći x naredbu. 5. Sada utipkajte veliko U kako bi poništili sve promjene - na liniji, i time je vratili u prijašnje stanje. - 6. Sada utipkajte u nekoliko puta kako bi - poništili U i prijašnje naredbe. + na liniji, vraćajući je u prijašnje stanje. + 6. Sada utipkajte u nekoliko puta kako bi poništili U + i prijašnje naredbe. 7. Sada utipkajte CTRL-R (držeći CTRL tipku pritisnutom dok ne pritisnete R) nekoliko puta kako bi vratili promjene (poništili poništenja). ----> Poopravite greške nna ovvoj liniji ii pooništiteee ih. +---> Poopravite pogreške nna ovvoj liniji ii pooništiteee ih. - 8. Vrlo korisne naredbe. Pređite na sažetak Lekcije 2. + 8. Vrlo korisne naredbe. Prijeđite na sažetak Lekcije 2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 2 SAŽETAK @@ -374,21 +374,21 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će 1. Pomaknite kursor na prvu sljedeću liniju označenu s --->. - 2. Otipkajte dd kako bi izbrisali liniju i - spremili je u Vim registar. + 2. Otipkajte dd kako bi izbrisali liniju i spremili je u Vim registar. 3. Pomaknite kursor na liniju c), IZNAD linije koju trebate unijeti. 4. Otipkajte p kako bi postavili liniju ispod kursora. - 5. Ponovite korake 2 do 4 kako bi postavili - sve linije u pravilnom rasporedu. + 5. Ponovite korake 2 do 4 kako bi postavili sve linije u pravilnom + rasporedu. ----> d) Možeš li i ti učiti? +---> d) Možeš li i ti naučiti? ---> b) Ljubice su plave, ---> c) Inteligencija je naučena, ---> a) Ruže su crvene, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.2: NAREDBA PROMJENE @@ -397,17 +397,17 @@ NAPOMENA: Pritiskajući samo pokrete dok ste u Normal modu bez operatora će 1. Pomaknite kursor na prvu sljedeću liniju označenu s --->. - 2. Pomaknite kursor tako da se nalazi na prvoj grešci. + 2. Pomaknite kursor tako da se nalazi na prvoj pogrešci. 3. Otipkajte r i nakon toga ispravan znak na tom mjestu. 4. Ponovite korake 2 i 3 sve dok prva linije ne bude istovjetna drugoj. ----> Kede ju ovu limija tupjana, netko je prutuskao kruve tupke! +---> Kede ju ovu limija tupjana, natko je protuskao kruve tupke! ---> Kada je ova linija tipkana, netko je pritiskao krive tipke! - 5. Pređite na Lekciju 3.2. + 5. Prijeđite na Lekciju 3.2. NAPOMENA: Prisjetite da trebate učiti vježbanjem, ne pamćenjem. @@ -422,19 +422,19 @@ NAPOMENA: Prisjetite da trebate učiti vježbanjem, ne pamćenjem. 2. Postavite kursor na a u lackmb. - 3. Otipkajte ce i ispravite riječ - (u ovom slučaju otipkajte inija ). + 3. Otipkajte ce i ispravite riječ (u ovom slučaju otipkajte inija ). 4. Pritisnite i pomaknite kursor na sljedeći znak kojeg je potrebno ispraviti. - 5. Ponovite korake 3 i 4 sve dok prva rečenica - ne postane istovjetna drugoj. + 5. Ponovite korake 3 i 4 sve dok prva rečenica ne postane istovjetna + drugoj. ---> Ova lackmb ima nekoliko rjlcah koje trfcb mijdmlfsz. ---> Ova linija ima nekoliko riječi koje treba mijenjati. Primijetite da ce briše riječ i postavlja Vim u Insert mod. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 3.4: JOŠ MIJENJANJA KORIŠTENJEM c @@ -449,7 +449,7 @@ Primijetite da ce briše riječ i postavlja Vim u Insert mod. 3. Pomaknite kursor na prvu sljedeću liniju označenu s --->. - 4. Pomaknite kursor na prvu grešku. + 4. Pomaknite kursor na prvu pogrešku. 5. Otipkajte c$ i utipkajte ostatak linije tako da bude istovjetna drugoj te pritisnite . @@ -462,23 +462,23 @@ NAPOMENA: Možete koristiti Backspace za ispravljanje grešaka. Lekcija 3 SAŽETAK - 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . - Ovo postavlja tekst IZA kursora (ako je pak linija izbrisana - tekst se postavlja na liniju ispod kursora). + 1. Za postavljanje teksta koji je upravo izbrisan, pritisnite p . Ovo + postavlja tekst IZA kursora (ako je pak linija izbrisana tekst se + postavlja na liniju ispod kursora). - 2. Za promjenu znaka na kojem se nalazi kursor, - pritisnite r i nakon toga željeni znak. + 2. Za promjenu znaka na kojem se nalazi kursor, pritisnite r i nakon toga + željeni znak. - 3. Operator mijenjanja dozvoljava promjenu teksta - od kursora do pozicije do koje dovede pokret. - tj. Otipkajte ce za mijenjanje od kursora do kraja riječi, - c$ za mijenjanje od kursora do kraja linije. + 3. Operator mijenjanja dozvoljava promjenu teksta od kursora do pozicije do + koje dovede pokret. tj. Otipkajte ce za mijenjanje od kursora do kraja + riječi, c$ za mijenjanje od kursora do kraja linije. 4. Oblik naredbe mijenjanja: c [broj] pokret -Pređite na sljedeću lekciju. +Prijeđite na sljedeću lekciju. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -520,12 +520,12 @@ NAPOMENA: Možete vidjeti poziciju kursora u donjem desnom kutu ako 4. Za traženje izraza unatrag, koristite ? umjesto / . 5. Za povratak na prethodnu poziciju koristite CTRL-O (držite Ctrl - pritisnutim dok ne pritisnete slovo o). Ponavljajte sve dok se ne + pritisnutim dok ne pritisnete tipku o). Ponavljajte sve dok se ne vratite na početak. CTRL-I slično kao CTRL-O ali u suprotnom smjeru. ----> "grrrreška" je pogrešno; umjesto grrrreška treba stajati greška. +---> "pogrrrreška" je pogrešno; umjesto pogrrrreška treba stajati pogreška. -NAPOMENA: Ako traženje dođe do kraja datoteke nastavit će se od njenog +NAPOMENA: Ako se traženjem dođe do kraja datoteke nastavit će se od njenog početka osim ako je postavka 'wrapscan' deaktivirana. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4.3: TRAŽENJE PRIPADAJUĆE ZAGRADE @@ -534,13 +534,13 @@ NAPOMENA: Ako traženje dođe do kraja datoteke nastavit će se od njenog ** Otipkajte % za pronalazak pripadajuće ), ] ili } . ** 1. Postavite kursor na bilo koju od ( , [ ili { - otvorenih zagrada u liniji označenom s --->. + otvorenih zagrada u liniji označenoj s --->. 2. Otipkajte znak % . 3. Kursor će se pomaknuti na pripadajuću zatvorenu zagradu. - 4. Otipkajte % da pomaknete kursor na drugu pripadajuću zagradu. + 4. Otipkajte % kako bi pomakli kursor na drugu pripadajuću zagradu. 5. Pomaknite kursor na neku od (,),[,],{ ili } i ponovite % naredbu. @@ -554,12 +554,12 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! Lekcija 4.4: NAREDBE ZAMIJENE - ** Otipkajte :s/staro/novo/g da zamjenite 'staro' za 'novo'. ** + ** Otipkajte :s/staro/novo/g da zamijenite 'staro' za 'novo'. ** 1. Pomaknite kursor na liniju označenu s --->. 2. Otipkajte :s/cvrćč/cvrč . Primjetite da ova naredba zamjenjuje - samo prvi "cvrčč" u liniji. + samo prvi "cvrćč" u liniji. 3. Otipkajte :s/cvrćč/cvrč/g . Dodavanje g stavke znači da će se naredba izvršiti na cijeloj liniji, zamjenjivanjem svih "cvrćč" u liniji. @@ -571,7 +571,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! te između njih će se izvršiti zamjena. Otipkajte :%s/staro/novo/g za zamjenu svih izraza u cijeloj datoteci. Otipkajte :%s/staro/novo/gc za pronalazak svakog izraza u datoteci i - potvrdu zamijene. + potvrdu zamjene. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 4 SAŽETAK @@ -579,13 +579,13 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! 1. CTRL-G prikazuje poziciju kursora u datoteci i status datoteke. G postavlja kursor na zadnju liniju datoteke. - broj G postavlja kursor na određeni broj linije.. + broj G postavlja kursor na broj liniju. gg postavlja kursor na prvu liniju. 2. Tipkanje / sa izrazom traži UNAPRIJED taj izraz. Tipkanje ? sa izrazom traži UNATRAG taj izraz. Nakon naredbe traženja koristite n za pronalazak izraza u istom - smjeru, ili N za pronalazak istog izraza ali u suprotnom smjeru. + smjeru, i N za pronalazak istog izraza ali u suprotnom smjeru. CTRL-O vraća kursor na prethodnu poziciju, CTRL-I na sljedeću poziciju. 3. Tipkanje % dok je kursor na zagradi pomiče ga na pripadajuću zagradu. @@ -602,7 +602,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! ** Otipkajte :! sa vanjskom naredbom koju želite izvršiti. ** - 1. Otipkajte poznatu naredbu : kako bi se kursor premjestio na dno + 1. Otipkajte poznatu naredbu : kako bi kursor premjestili na dno ekrana. Time omogućavate unos naredbe u naredbenoj liniji. 2. Otipkajte znak ! (uskličnik). Tako omogućavate @@ -615,7 +615,7 @@ NAPOMENA: Vrlo korisno u ispravljanju koda sa nepripadajućim zagradama! NAPOMENA: Moguće je izvršavati bilo koju vanjsku naredbu na ovaj način, zajedno sa njenim argumentima. -NAPOMENA: Sve : naredbe se izvršavaju jedino ako pritisnete +NAPOMENA: Sve : naredbe se izvršavaju nakon što pritisnete U daljnjem tekstu to neće uvijek biti napomenuto. @@ -631,11 +631,11 @@ NAPOMENA: Sve : naredbe se izvršavaju jedino ako pritisnete 3. Otipkajte: :w TEST (gdje je TEST ime koje ste prethodno odabrali.) - 4. Time ćete spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. - Kako bi to provjerili, otipkajte ponovno :!dir ili :!ls + 4. Time će te spremiti cijelu datoteku (Vim Tutor) pod imenom TEST. + Za provjeru, otipkajte ponovno :!dir ili :!ls za pregled direktorija. -NAPOMENA: Ako bi napustili Vim i pokrenuli ga ponovno sa vim TEST , +NAPOMENA: Ako bi napustili Vim i ponovno ga pokrenuli sa vim TEST , datoteka bi bila potpuna kopija ove datoteke u trenutku kada ste je spremili. @@ -673,21 +673,21 @@ NAPOMENA: Tipka v započinje Vizualno označavanje. Možete pomicati kursor 1. Postavite kursor iznad ove linije. -NAPOMENA: Nakon što izvršite 2. korak vidjeti će te tekst - iz Lekcije 5.3. Stoga pomaknite kursor DOLJE - kako bi ponovno vidjeli ovu lekciju. +NAPOMENA: Nakon što izvršite 2. korak vidjeti će te tekst iz Lekcije 5.3. + Stoga pomaknite kursor DOLJE kako bi ponovno vidjeli ovu lekciju. 2. Učitajte vašu TEST datoteku koristeći naredbu :r TEST gdje je TEST ime datoteke koju ste koristili u prethodnoj lekciji. Sadržaj učitane datoteke je ubačen liniju ispod kursora. - 3. Kako bi provjerili da je datoteka učitana, - vratite kursor unatrag i primijetite dvije kopije - Lekcije 5.3, originalnu i onu iz datoteke. + 3. Kako bi provjerili da je datoteka učitana, vratite kursor unatrag i + primijetite dvije kopije Lekcije 5.3, originalnu i onu iz datoteke. NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls će učitati ispis ls naredbe i postaviti ispis liniju ispod kursora. + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 5 SAŽETAK @@ -699,17 +699,17 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls :!dir :!ls - pregled direktorija. :!del DATOTEKA :!rm DATOTEKA - briše datoteku DATOTEKA. - 2. :w DATOTEKA zapisuje trenutačnu datoteku - na disk sa imenom DATOTEKA. + 2. :w DATOTEKA zapisuje trenutačnu datoteku na disk sa imenom DATOTEKA. + + 3. v pokret :w IME_DATOTEKE sprema vizualno označene linije u + datoteku IME_DATOTEKE. - 3. v pokret :w IME_DATOTEKE sprema vizualno - označene linije u datoteku IME_DATOTEKE. + 4. :r IME_DATOTEKE učitava datoteku IME_DATOTEKE sa diska i stavlja + njen sadržaj liniju ispod kursora. - 4. :r IME_DATOTEKE učitava datoteku IME_DATOTEKE sa - diska i stavlja njen sadržaj liniju ispod kursora. + 5. :r !dir učitava ispis naredbe dir i postavlja sadržaj ispisa liniju + ispod kursora. - 5. :r !dir učitava ispis naredbe dir i postavlja - sadržaj ispisa liniju ispod kursora. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 6.1: NAREDBA OTVORI @@ -720,8 +720,8 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls 1. Pomaknite kursor na sljedeću liniju označenu s --->. - 2. Otipkajte malo o kako bi otvorili novu - liniju ISPOD kursora i prešli u Insert mod. + 2. Otipkajte malo o kako bi otvorili novu liniju ISPOD kursora + i prešli u Insert mod. 3. Otipkajte nešto teksta i nakon toga pritisnite kako bi napustili Insert mod. @@ -749,12 +749,12 @@ NAPOMENA: Možete također učitati ispis vanjske naredbe. Npr, :r !ls 4. Dopunite riječ kao što je na liniji ispod. Pritisnite za izlaz iz Insert moda. - 5. Sa e pređite na sljedeću nepotpunu riječ i ponovite korake 3 i 4. + 5. Sa e prijeđite na sljedeću nepotpunu riječ i ponovite korake 3 i 4. ---> Ova li omogućava vje dodav teksta nekoj liniji. ---> Ova linija omogućava vježbanje dodavanja teksta nekoj liniji. -NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina +NAPOMENA: Sa i, a, i A prelazite u isti Insert mod, jedina razlika je u poziciji od koje će se tekst ubacivati. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -763,14 +763,14 @@ NAPOMENA: Sa a, A, i prelazite u isti Insert mod, jedina ** Otipkajte veliko R kako bi zamijelili više od jednog znaka. ** - 1. Pomaknite kursor na prvu slijedeću liniju označenu s --->. - Pomaknite kusor na početak prvog xxx . + 1. Pomaknite kursor na prvu sljedeću liniju označenu s --->. + Pomaknite kursor na početak prvog xxx . 2. Pritisnite R i otipkajte broj koji je liniju ispod, tako da zamijeni xxx . 3. Pritisnite za izlaz iz Replace moda. - Primijetite da je ostatak linije ostao nepromijenjen. + Primijetite da je ostatak linije ostao nepromjenjen. 5. Ponovite korake kako bi zamijenili preostali xxx. @@ -784,7 +784,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, Lekcija 6.4: KOPIRANJE I LIJEPLJENJE TEKSTA - ** Koristite y operator za kopiranje i p za lijepljenje teksta. ** + ** Koristite y operator za kopiranje a p za lijepljenje teksta. ** 1. Pomaknite kursor na liniju s ---> i postavite kursor nakon "a)". @@ -792,7 +792,7 @@ NAPOMENA: Replace mod je kao Insert mod, ali sa bitnom razlikom, 3. Pritisnite y kako bi kopirali označeni tekst. - 4. Pomaknite kursor do kraja slijedeće linije: j$ + 4. Pomaknite kursor do kraja sljedeće linije: j$ 5. Pritisnite p kako bi zalijepili tekst. Onda utipkajte: druga . @@ -807,7 +807,7 @@ NAPOMENA: možete koristiti y kao operator; yw kopira jednu riječ. Lekcija 6.5: MIJENJANJE POSTAVKI - ** Postavka: naredbe traženja i zamjene ne razlikuju VELIKA i mala slova ** + ** Postavka: naredbe traženja i zamijene ne razlikuju VELIKA i mala slova ** 1. Potražite 'razlika' tipkanjem: /razlika Nekoliko puta ponovite pritiskanjem n . @@ -823,7 +823,7 @@ NAPOMENA: možete koristiti y kao operator; yw kopira jednu riječ. 6. Za deaktiviranje ic postavke koristite: :set noic -NAPOMENA: Za ne označavanje pronađenih izraza otipkajte: :nohlsearch +NAPOMENA: Za neoznačavanje pronađenih izraza otipkajte: :nohlsearch NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi koristite \c u izrazu: /razlika\c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -847,7 +847,7 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 'hls' 'hlsearch' označi sve pronađene izraze Možete koristite dugo ili kratko ime postavke. - 7. Prethodite "no" imenu postavke za deaktivaciju iste: :set noic + 7. Prethodite "no" imenu postavke za deaktiviranje iste: :set noic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lekcija 7.1: DOBIVANJE POMOĆI @@ -862,10 +862,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi - utipkajte :help Pročitajte tekst u prozoru pomoći kako bi ste se znali služiti istom. - tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. + Tipkanjem CTRL-W CTRL-W prelazite iz jednog prozora u drugi. Otipkajte :q kako bi zatvorili prozor pomoći. - Pronaći ćete pomoć o bilo kojoj temi, tako da dodate upit samoj + Pronaći će te pomoć o bilo kojoj temi, tako da dodate upit samoj ":help" naredbi. Pokušajte (ne zaboravite pritisnuti ): :help w @@ -876,10 +876,10 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi Lekcija 7.2: PRAVLJENJE SKRIPTE - ** Aktiviranjte Vim mogućnosti ** + ** Aktivirajte Vim mogućnosti ** - Vim ima mnogo više alata od Vi-ja, ali većina njih je deaktivirana. - Kako bi započeli koristiti više mogućnosti napravite "vimrc" datoteku. + Vim ima mnogo više alata od Vi-ja, ali većina njih nije aktivirana. + Kako bi mogli koristiti više mogućnosti napravite "vimrc" datoteku. 1. Uredite "vimrc" datoteku. Ovo ovisi o vašem sistemu: :e ~/.vimrc za Unix @@ -891,8 +891,8 @@ NAPOMENA: Bez razlikovanja velikih i malih slova u samo jednoj naredbi 3. Sačuvajte datoteku sa: :w - Sljedećeg puta kada pokrenete Vim, bojanje sintakse teksta je - aktivno. Možete dodati sve vaše postavke u "vimrc" datoteku. + Sljedećeg puta kada pokrenete Vim, bojanje sintakse teksta biti će + aktivirano. Sve vaše postavke možete dodati u "vimrc" datoteku. Za više informacija otipkajte :help vimrc-intro ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -924,27 +924,27 @@ NAPOMENA: Moguće je dopuniti mnoge naredbe. Koristite CTRL-D i . 1. Otipkajte :help ili pritisnite ili za pomoć. - 2. Otipkajte :help naredba kako bi dobili pomoć za naredba . + 2. Otipkajte :help naredba kako bi dobili pomoć za naredba . 3. Otipkajte CTRL-W CTRL-W za prelazak u drugi prozor 4. Otipkajte :q kako bi zatvorili prozor pomoći - 5. Napravite vimrc startup scriptu kako bi u nju spremali vaše - najdraže postavke. + 5. Napravite vimrc skriptu za podizanje kako bi u nju spremali + vaše omiljene postavke. - 6. Kada tipkate naredbu koja započinje sa : , - pritisnite CTRL-D kako bi vidjeli - moguće valjane vrijednosti. + 6. Kada tipkate naredbu koja započinje sa : + pritisnite CTRL-D kako bi vidjeli moguće valjane vrijednosti. Pritisnite kako bi odabrali jednu od njih. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Kraj priručnika. Cilj priručnika je da pokaže kratak pregled Vim - editora, tek toliko da omogući njegovo korištenje. Priručnik nije potpun - jer Vim ima mnogo više naredbi. Za više informacija: ":help user-manual". + Kraj. Cilj priručnika je da pokaže kratak pregled Vim editora, tek toliko + da omogući njegovo korištenje. Priručnik nije potpun jer Vim ima mnogo više + naredbi. Za više informacija: ":help user-manual". Za čitanje i korištenje, preporučamo: Vim - Vi Improved - by Steve Oualline @@ -961,12 +961,12 @@ NAPOMENA: Moguće je dopuniti mnoge naredbe. Koristite CTRL-D i . Ovaj priručnik su napisali: Michael C. Pierce i Robert K. Ware, Colorado School of Mines koristeći ideje Charles Smith, - Colorado State University. E-mail: bware@mines.colorado.edu. + Colorado State University. E-pošta: bware@mines.colorado.edu. Naknadne promjene napravio je Bram Moolenaar. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Prijevod na hrvatski: Paul B. Mahol - Prva verzija, Siječanj 2008. + Preveo na hrvatski: Paul B. Mahol + Preinaka 1.42, Lipanj 2008 diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim index 57f3c2df..a2a891c1 100644 --- a/runtime/vimrc_example.vim +++ b/runtime/vimrc_example.vim @@ -1,7 +1,7 @@ " An example for a vimrc file. " " Maintainer: Bram Moolenaar -" Last change: 2008 Mar 19 +" Last change: 2008 Jun 16 " " To use it, copy it to " for Unix and OS/2: ~/.vimrc @@ -87,5 +87,8 @@ endif " has("autocmd") " Convenient command to see the difference between the current buffer and the " file it was loaded from, thus the changes you made. -command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis - \ | wincmd p | diffthis +" Only define it when not defined already. +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis + \ | wincmd p | diffthis +endif -- 2.11.4.GIT