# HG changeset patch # User Bram Moolenaar # Date 1563567308 -7200 # Node ID ca8e754bdd539cefd999e54c8a0938a4e98f8416 # Parent d13620591637134161f04e80e5e25f2b689cd1f0 Update runtime files commit https://github.com/vim/vim/commit/85850f3a5ef9f5a9d22e908ef263de8faa265a95 Author: Bram Moolenaar Date: Fri Jul 19 22:05:51 2019 +0200 Update runtime files diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Apr 20, 2016 -" Version: 156 +" Date: Jul 16, 2019 +" Version: 165 " Maintainer: Charles E Campbell " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -22,15 +22,24 @@ if &cp || exists("g:loaded_netrw") finish endif -" netrw requires vim having patch 7.4.213; netrw will benefit from vim's having patch#656, too -if v:version < 704 || (v:version == 704 && !has("patch213")) - if !exists("s:needpatch213") - unsilent echomsg "***sorry*** this version of netrw requires vim v7.4 with patch 213" - endif - let s:needpatch213= 1 - finish + +" Check that vim has patches that netrw requires. +" Patches needed for v7.4: 1557, and 213. +" (netrw will benefit from vim's having patch#656, too) +let s:needspatches=[1557,213] +if exists("s:needspatches") + for ptch in s:needspatches + if v:version < 704 || (v:version == 704 && !has("patch".ptch)) + if !exists("s:needpatch{ptch}") + unsilent echomsg "***sorry*** this version of netrw requires vim v7.4 with patch#".ptch + endif + let s:needpatch{ptch}= 1 + finish + endif + endfor endif -let g:loaded_netrw = "v156" + +let g:loaded_netrw = "v165" if !exists("s:NOTE") let s:NOTE = 0 let s:WARNING = 1 @@ -39,7 +48,7 @@ endif let s:keepcpo= &cpo setl cpo&vim -"let g:dechofuncname= 1 +"DechoFuncName 1 "DechoRemOn "call Decho("doing autoload/netrw.vim version ".g:loaded_netrw,'~'.expand("")) @@ -55,7 +64,7 @@ setl cpo&vim " Usage: netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,"some message",error-number) " netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,["message1","message2",...],error-number) " (this function can optionally take a list of messages) -" Jan 19, 2016 : max errnum currently is 103 +" Mar 21, 2017 : max errnum currently is 105 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) @@ -100,7 +109,7 @@ fun! netrw#ErrorMsg(level,msg,errnum) " call Decho("create a NetrwMessage buffer window",'~'.expand("")) bo 1split sil! call s:NetrwEnew() - sil! NetrwKeepj call s:NetrwSafeOptions() + sil! NetrwKeepj call s:NetrwOptionsSafe(1) setl bt=nofile NetrwKeepj file NetrwMessage " call Decho("setl ma noro",'~'.expand("")) @@ -171,7 +180,7 @@ endfun " --------------------------------------------------------------------- " Netrw Constants: {{{2 -call s:NetrwInit("g:netrw_dirhist_cnt",0) +call s:NetrwInit("g:netrw_dirhistcnt",0) if !exists("s:LONGLIST") call s:NetrwInit("s:THINLIST",0) call s:NetrwInit("s:LONGLIST",1) @@ -181,6 +190,14 @@ if !exists("s:LONGLIST") endif " --------------------------------------------------------------------- +" Default option values: {{{2 +let g:netrw_localcopycmdopt = "" +let g:netrw_localcopydircmdopt = "" +let g:netrw_localmkdiropt = "" +let g:netrw_localmovecmdopt = "" +let g:netrw_localrmdiropt = "" + +" --------------------------------------------------------------------- " Default values for netrw's global protocol variables {{{2 call s:NetrwInit("g:netrw_use_errorwindow",1) @@ -215,21 +232,21 @@ if !exists("g:netrw_ftp_options") let g:netrw_ftp_options= "-i -n" endif if !exists("g:netrw_http_cmd") - if executable("elinks") - let g:netrw_http_cmd = "elinks" - call s:NetrwInit("g:netrw_http_xcmd","-source >") - elseif executable("links") - let g:netrw_http_cmd = "links" - call s:NetrwInit("g:netrw_http_xcmd","-source >") - elseif executable("curl") + if executable("curl") let g:netrw_http_cmd = "curl" - call s:NetrwInit("g:netrw_http_xcmd","-o") + call s:NetrwInit("g:netrw_http_xcmd","-L -o") elseif executable("wget") let g:netrw_http_cmd = "wget" call s:NetrwInit("g:netrw_http_xcmd","-q -O") + elseif executable("elinks") + let g:netrw_http_cmd = "elinks" + call s:NetrwInit("g:netrw_http_xcmd","-source >") elseif executable("fetch") let g:netrw_http_cmd = "fetch" call s:NetrwInit("g:netrw_http_xcmd","-o") + elseif executable("links") + let g:netrw_http_cmd = "links" + call s:NetrwInit("g:netrw_http_xcmd","-http.extra-header ".shellescape("Accept-Encoding: identity", 1)." -source >") else let g:netrw_http_cmd = "" endif @@ -238,6 +255,7 @@ call s:NetrwInit("g:netrw_http_put_cmd", call s:NetrwInit("g:netrw_keepj","keepj") call s:NetrwInit("g:netrw_rcp_cmd" , "rcp") call s:NetrwInit("g:netrw_rsync_cmd", "rsync") +call s:NetrwInit("g:netrw_rsync_sep", "/") if !exists("g:netrw_scp_cmd") if executable("scp") call s:NetrwInit("g:netrw_scp_cmd" , "scp -q") @@ -299,7 +317,7 @@ let s:netrw_usercuc = &cursorcolumn call s:NetrwInit("g:netrw_cygdrive","/cygdrive") " Default values - d-g ---------- {{{3 call s:NetrwInit("s:didstarstar",0) -call s:NetrwInit("g:netrw_dirhist_cnt" , 0) +call s:NetrwInit("g:netrw_dirhistcnt" , 0) call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf", ".xz" : "unxz" }') call s:NetrwInit("g:netrw_dirhistmax" , 10) call s:NetrwInit("g:netrw_errorlvl" , s:NOTE) @@ -364,7 +382,8 @@ if !exists("g:netrw_localcopycmd") if g:netrw_cygwin let g:netrw_localcopycmd= "cp" else - let g:netrw_localcopycmd= expand("$COMSPEC")." /c copy" + let g:netrw_localcopycmd = expand("$COMSPEC") + let g:netrw_localcopycmdopt= " /c copy" endif elseif has("unix") || has("macunix") let g:netrw_localcopycmd= "cp" @@ -375,14 +394,20 @@ endif if !exists("g:netrw_localcopydircmd") if has("win32") || has("win95") || has("win64") || has("win16") if g:netrw_cygwin - let g:netrw_localcopydircmd= "cp -R" - else - let g:netrw_localcopycmd= expand("$COMSPEC")." /c xcopy /e /c /h /i /k" - endif - elseif has("unix") || has("macunix") - let g:netrw_localcopydircmd= "cp -R" + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" + else + let g:netrw_localcopydircmd = expand("$COMSPEC") + let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k" + endif + elseif has("unix") + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" + elseif has("macunix") + let g:netrw_localcopydircmd = "cp" + let g:netrw_localcopydircmdopt= " -R" else - let g:netrw_localcopycmd= "" + let g:netrw_localcopydircmd= "" endif endif if exists("g:netrw_local_mkdir") @@ -393,7 +418,8 @@ if has("win32") || has("win95") || has(" if g:netrw_cygwin call s:NetrwInit("g:netrw_localmkdir","mkdir") else - let g:netrw_localmkdir= expand("$COMSPEC")." /c mkdir" + let g:netrw_localmkdir = expand("$COMSPEC") + let g:netrw_localmkdiropt= " /c mkdir" endif else call s:NetrwInit("g:netrw_localmkdir","mkdir") @@ -408,7 +434,8 @@ if !exists("g:netrw_localmovecmd") if g:netrw_cygwin let g:netrw_localmovecmd= "mv" else - let g:netrw_localmovecmd= expand("$COMSPEC")." /c move" + let g:netrw_localmovecmd = expand("$COMSPEC") + let g:netrw_localmovecmdopt= " /c move" endif elseif has("unix") || has("macunix") let g:netrw_localmovecmd= "mv" @@ -416,7 +443,8 @@ if !exists("g:netrw_localmovecmd") let g:netrw_localmovecmd= "" endif endif -if v:version < 704 || !has("patch1109") +if v:version < 704 || (v:version == 704 && !has("patch1107")) + " 1109 provides for delete(tmpdir,"d") which is what will be used if exists("g:netrw_local_rmdir") let g:netrw_localrmdir= g:netrw_local_rmdir call netrw#ErrorMsg(s:NOTE,"g:netrw_local_rmdir is deprecated in favor of g:netrw_localrmdir",86) @@ -425,7 +453,8 @@ if v:version < 704 || !has("patch1109") if g:netrw_cygwin call s:NetrwInit("g:netrw_localrmdir","rmdir") else - let g:netrw_localrmdir= expand("$COMSPEC")." /c rmdir" + let g:netrw_localrmdir = expand("$COMSPEC") + let g:netrw_localrmdiropt= " /c rmdir" endif else call s:NetrwInit("g:netrw_localrmdir","rmdir") @@ -527,7 +556,7 @@ if has("gui_running") && (&enc == 'utf-8 else let s:treedepthstring= "| " endif -call s:NetrwInit("s:netrw_nbcd",'{}') +call s:NetrwInit("s:netrw_posn",'{}') " BufEnter event ignored by decho when following variable is true " Has a side effect that doau BufReadPost doesn't work, so @@ -888,7 +917,7 @@ fun! netrw#Explore(indx,dosplit,style,.. NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) if has("clipboard") sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore") @@ -913,7 +942,7 @@ fun! netrw#Explore(indx,dosplit,style,.. NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) if has("clipboard") sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore") @@ -967,8 +996,8 @@ fun! netrw#Explore(indx,dosplit,style,.. keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif if has("clipboard") - sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @* = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched pattern") @@ -1004,7 +1033,7 @@ fun! netrw#Explore(indx,dosplit,style,.. keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no files matched",42) if has("clipboard") sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore : no files matched") @@ -1052,7 +1081,7 @@ fun! netrw#Explore(indx,dosplit,style,.. endif if has("clipboard") sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore : missing +path_extra") @@ -1106,7 +1135,9 @@ fun! netrw#Explore(indx,dosplit,style,.. let prvfname= fname endfor " call Decho("explore_match<".s:explore_match.">",'~'.expand("")) - exe "2match netrwMarkFile /".s:explore_match."/" + if has("syntax") && exists("g:syntax_on") && g:syntax_on + exe "2match netrwMarkFile /".s:explore_match."/" + endif endif echo "==Pexplore ==Nexplore" else @@ -1123,7 +1154,7 @@ fun! netrw#Explore(indx,dosplit,style,.. let s:netrw_events= 2 if has("clipboard") sil! let @* = keepregstar - sil! let @+ = keepregstar + sil! let @+ = keepregplus endif sil! let @/ = keepregslash " call Dret("netrw#Explore : @/<".@/.">") @@ -1132,13 +1163,14 @@ endfun " --------------------------------------------------------------------- " netrw#Lexplore: toggle Explorer window, keeping it on the left of the current tab {{{2 fun! netrw#Lexplore(count,rightside,...) -" call Dfunc("netrw#Lexplore(count=".a:count."rightside=".a:rightside.",...) a:0=".a:0." ft=".&ft) +" call Dfunc("netrw#Lexplore(count=".a:count." rightside=".a:rightside.",...) a:0=".a:0." ft=".&ft) let curwin= winnr() if a:0 > 0 && a:1 != "" " if a netrw window is already on the left-side of the tab " and a directory has been specified, explore with that " directory. +" call Decho("case has input argument(s) (a:1<".a:1.">)") let a1 = expand(a:1) " call Decho("a:1<".a:1."> curwin#".curwin,'~'.expand("")) exe "1wincmd w" @@ -1156,18 +1188,22 @@ fun! netrw#Lexplore(count,rightside,...) exe curwin."wincmd w" else let a1= "" +" call Decho("no input arguments") endif if exists("t:netrw_lexbufnr") " check if t:netrw_lexbufnr refers to a netrw window let lexwinnr = bufwinnr(t:netrw_lexbufnr) +" call Decho("lexwinnr= bufwinnr(t:netrw_lexbufnr#".t:netrw_lexbufnr.")=".lexwinnr) else let lexwinnr= 0 - endif +" call Decho("t:netrw_lexbufnr doesn't exist") + endif +" call Decho("lexwinnr=".lexwinnr,'~'.expand("")) if lexwinnr > 0 " close down netrw explorer window -" call Decho("t:netrw_lexbufnr#".t:netrw_lexbufnr.": close down netrw window",'~'.expand("")) +" call Decho("t:netrw_lexbufnr#".t:netrw_lexbufnr.": close down netrw window",'~'.expand("")) exe lexwinnr."wincmd w" let g:netrw_winsize = -winwidth(0) let t:netrw_lexposn = winsaveview() @@ -1177,8 +1213,11 @@ fun! netrw#Lexplore(count,rightside,...) if lexwinnr < curwin let curwin= curwin - 1 endif - exe curwin."wincmd w" + if lexwinnr != curwin + exe curwin."wincmd w" + endif unlet t:netrw_lexbufnr +" call Decho("unlet t:netrw_lexbufnr") else " open netrw explorer window @@ -1193,15 +1232,17 @@ fun! netrw#Lexplore(count,rightside,...) let curfile= expand("%") " call Decho("curfile<".curfile.">",'~'.expand("")) exe (a:rightside? "botright" : "topleft")." vertical ".((g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize) . " new" +" call Decho("new buf#".bufnr("%")." win#".winnr()) if a:0 > 0 && a1 != "" " call Decho("case 1: Explore ".a1,'~'.expand("")) + call netrw#Explore(0,0,0,a1) exe "Explore ".fnameescape(a1) elseif curfile =~ '^\a\{3,}://' " call Decho("case 2: Explore ".substitute(curfile,'[^/\\]*$','',''),'~'.expand("")) - exe "Explore ".substitute(curfile,'[^/\\]*$','','') + call netrw#Explore(0,0,0,substitute(curfile,'[^/\\]*$','','')) else " call Decho("case 3: Explore .",'~'.expand("")) - Explore . + call netrw#Explore(0,0,0,".") endif if a:count != 0 let g:netrw_winsize = netrw_winsize @@ -1209,6 +1250,8 @@ fun! netrw#Lexplore(count,rightside,...) setlocal winfixwidth let g:netrw_altv = keep_altv let t:netrw_lexbufnr = bufnr("%") +" call Decho("let t:netrw_lexbufnr=".t:netrw_lexbufnr) +" call Decho("t:netrw_lexposn".(exists("t:netrw_lexposn")? string(t:netrw_lexposn) : " n/a")) if exists("t:netrw_lexposn") " call Decho("restoring to t:netrw_lexposn",'~'.expand("")) " call Decho("restoring posn to t:netrw_lexposn<".string(t:netrw_lexposn).">",'~'.expand("")) @@ -1224,6 +1267,7 @@ fun! netrw#Lexplore(count,rightside,...) else let g:netrw_chgwin= 2 endif +" call Decho("let g:netrw_chgwin=".g:netrw_chgwin) endif " call Dret("netrw#Lexplore") @@ -1341,7 +1385,7 @@ fun! netrw#Obtain(islocal,fname,...) " call Decho("transfer files one at a time",'~'.expand("")) for fname in fnamelist " call Decho("system(".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath).")",'~'.expand("")) - call system(g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) + call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) if v:shell_error != 0 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) " call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath)) @@ -1353,7 +1397,7 @@ fun! netrw#Obtain(islocal,fname,...) " call Decho("transfer files with one command",'~'.expand("")) let filelist= join(map(deepcopy(fnamelist),"s:ShellEscape(v:val)")) " call Decho("system(".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath).")",'~'.expand("")) - call system(g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath)) + call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".filelist." ".s:ShellEscape(topath)) if v:shell_error != 0 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80) " call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath)) @@ -1387,7 +1431,7 @@ fun! netrw#Obtain(islocal,fname,...) else let path= "" endif - let filelist= join(map(deepcopy(fnamelist),'s:ShellEscape(g:netrw_machine.":".path.v:val,1)')) + let filelist= join(map(deepcopy(fnamelist),'escape(s:ShellEscape(g:netrw_machine.":".path.v:val,1)," ")')) call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".filelist." ".s:ShellEscape(tgtdir,1)) elseif b:netrw_method == 2 @@ -1557,15 +1601,153 @@ fun! netrw#Nread(mode,fname) endfun " ------------------------------------------------------------------------ -" s:NetrwOptionRestore: restore options (based on prior s:NetrwOptionSave) {{{2 -fun! s:NetrwOptionRestore(vt) -" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) +" s:NetrwOptionsSave: save options prior to setting to "netrw-buffer-standard" form {{{2 +" Options get restored by s:NetrwOptionsRestore() +" +" Option handling: +" * save user's options (s:NetrwOptionsSave) +" * set netrw-safe options (s:NetrwOptionsSafe) +" - change an option only when user option != safe option (s:netrwSetSafeSetting) +" * restore user's options (s:netrwOPtionsRestore) +" - restore a user option when != safe option (s:NetrwRestoreSetting) +" vt: (variable type) normally its either "w:" or "s:" +fun! s:NetrwOptionsSave(vt) +" call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) +" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) + + if !exists("{a:vt}netrw_optionsave") + let {a:vt}netrw_optionsave= 1 + else +" call Dret("s:NetrwOptionsSave : options already saved") + return + endif +" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff,'~'.expand("")) + + " Save current settings and current directory +" call Decho("saving current settings and current directory",'~'.expand("")) + let s:yykeep = @@ + if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif + let {a:vt}netrw_aikeep = &l:ai + let {a:vt}netrw_awkeep = &l:aw + let {a:vt}netrw_bhkeep = &l:bh + let {a:vt}netrw_blkeep = &l:bl + let {a:vt}netrw_btkeep = &l:bt + let {a:vt}netrw_bombkeep = &l:bomb + let {a:vt}netrw_cedit = &cedit + let {a:vt}netrw_cikeep = &l:ci + let {a:vt}netrw_cinkeep = &l:cin + let {a:vt}netrw_cinokeep = &l:cino + let {a:vt}netrw_comkeep = &l:com + let {a:vt}netrw_cpokeep = &l:cpo + let {a:vt}netrw_diffkeep = &l:diff + let {a:vt}netrw_fenkeep = &l:fen +" call Decho("saving current settings: got here#1",'~'.expand("")) + if !exists("g:netrw_ffkeep") || g:netrw_ffkeep + let {a:vt}netrw_ffkeep = &l:ff + endif + let {a:vt}netrw_fokeep = &l:fo " formatoptions + let {a:vt}netrw_gdkeep = &l:gd " gdefault + let {a:vt}netrw_hidkeep = &l:hidden + let {a:vt}netrw_imkeep = &l:im + let {a:vt}netrw_iskkeep = &l:isk + let {a:vt}netrw_lskeep = &l:ls + let {a:vt}netrw_makeep = &l:ma + let {a:vt}netrw_magickeep = &l:magic + let {a:vt}netrw_modkeep = &l:mod + let {a:vt}netrw_nukeep = &l:nu + let {a:vt}netrw_rnukeep = &l:rnu + let {a:vt}netrw_repkeep = &l:report + let {a:vt}netrw_rokeep = &l:ro + let {a:vt}netrw_selkeep = &l:sel + let {a:vt}netrw_spellkeep = &l:spell +" call Decho("saving current settings: got here#2",'~'.expand("")) + if !g:netrw_use_noswf + let {a:vt}netrw_swfkeep = &l:swf + endif + let {a:vt}netrw_tskeep = &l:ts + let {a:vt}netrw_twkeep = &l:tw " textwidth + let {a:vt}netrw_wigkeep = &l:wig " wildignore + let {a:vt}netrw_wrapkeep = &l:wrap + let {a:vt}netrw_writekeep = &l:write + + " save a few selected netrw-related variables +" call Decho("saving a few selected netrw-related variables",'~'.expand("")) + if g:netrw_keepdir + let {a:vt}netrw_dirkeep = getcwd() + endif + if has("clipboard") + sil! let {a:vt}netrw_starkeep = @* + sil! let {a:vt}netrw_pluskeep = @+ + endif + sil! let {a:vt}netrw_slashkeep= @/ + +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) +" call Dret("s:NetrwOptionsSave : tab#".tabpagenr()." win#".winnr()) +endfun + +" --------------------------------------------------------------------- +" s:NetrwOptionsSafe: sets options to help netrw do its job {{{2 +" Use s:NetrwSaveOptions() to save user settings +" Use s:NetrwOptionsRestore() to restore user settings +fun! s:NetrwOptionsSafe(islocal) +" call Dfunc("s:NetrwOptionsSafe(islocal=".a:islocal.") win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) +" call Decho("win#".winnr()."'s ft=".&ft,'~'.expand("")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) + if exists("+acd") | call s:NetrwSetSafeSetting("&l:acd",0)|endif + call s:NetrwSetSafeSetting("&l:ai",0) + call s:NetrwSetSafeSetting("&l:aw",0) + call s:NetrwSetSafeSetting("&l:bl",0) + call s:NetrwSetSafeSetting("&l:bomb",0) + if a:islocal + call s:NetrwSetSafeSetting("&l:bt","nofile") + else + call s:NetrwSetSafeSetting("&l:bt","acwrite") + endif + call s:NetrwSetSafeSetting("&l:ci",0) + call s:NetrwSetSafeSetting("&l:cin",0) + call s:NetrwSetSafeSetting("&l:bh","hide") + call s:NetrwSetSafeSetting("&l:cino","") + call s:NetrwSetSafeSetting("&l:com","") + if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif + if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif + setl fo=nroql2 + call s:NetrwSetSafeSetting("&l:hid",0) + call s:NetrwSetSafeSetting("&l:im",0) + setl isk+=@ isk+=* isk+=/ + call s:NetrwSetSafeSetting("&l:magic",1) + if g:netrw_use_noswf + call s:NetrwSetSafeSetting("swf",0) + endif + call s:NetrwSetSafeSetting("&l:report",10000) + call s:NetrwSetSafeSetting("&l:sel","inclusive") + call s:NetrwSetSafeSetting("&l:spell",0) + call s:NetrwSetSafeSetting("&l:tw",0) + call s:NetrwSetSafeSetting("&l:wig","") + setl cedit& + call s:NetrwCursor() + + " allow the user to override safe options +" call Decho("ft<".&ft."> ei=".&ei,'~'.expand("")) + if &ft == "netrw" +" call Decho("do any netrw FileType autocmds (doau FileType netrw)",'~'.expand("")) + keepalt NetrwKeepj doau FileType netrw + endif + +" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh." bt<".&bt.">",'~'.expand("")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) +" call Dret("s:NetrwOptionsSafe") +endfun + +" --------------------------------------------------------------------- +" s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2 +fun! s:NetrwOptionsRestore(vt) +" call Dfunc("s:NetrwOptionsRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) if !exists("{a:vt}netrw_optionsave") - call s:RestorePosn(s:netrw_nbcd) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") +" call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist") return endif unlet {a:vt}netrw_optionsave @@ -1581,47 +1763,47 @@ fun! s:NetrwOptionRestore(vt) endif endif endif - if exists("{a:vt}netrw_aikeep") |let &l:ai = {a:vt}netrw_aikeep |unlet {a:vt}netrw_aikeep |endif - if exists("{a:vt}netrw_awkeep") |let &l:aw = {a:vt}netrw_awkeep |unlet {a:vt}netrw_awkeep |endif - if exists("{a:vt}netrw_blkeep") |let &l:bl = {a:vt}netrw_blkeep |unlet {a:vt}netrw_blkeep |endif - if exists("{a:vt}netrw_btkeep") |let &l:bt = {a:vt}netrw_btkeep |unlet {a:vt}netrw_btkeep |endif - if exists("{a:vt}netrw_bombkeep") |let &l:bomb = {a:vt}netrw_bombkeep |unlet {a:vt}netrw_bombkeep |endif - if exists("{a:vt}netrw_cedit") |let &cedit = {a:vt}netrw_cedit |unlet {a:vt}netrw_cedit |endif - if exists("{a:vt}netrw_cikeep") |let &l:ci = {a:vt}netrw_cikeep |unlet {a:vt}netrw_cikeep |endif - if exists("{a:vt}netrw_cinkeep") |let &l:cin = {a:vt}netrw_cinkeep |unlet {a:vt}netrw_cinkeep |endif - if exists("{a:vt}netrw_cinokeep") |let &l:cino = {a:vt}netrw_cinokeep |unlet {a:vt}netrw_cinokeep |endif - if exists("{a:vt}netrw_comkeep") |let &l:com = {a:vt}netrw_comkeep |unlet {a:vt}netrw_comkeep |endif - if exists("{a:vt}netrw_cpokeep") |let &l:cpo = {a:vt}netrw_cpokeep |unlet {a:vt}netrw_cpokeep |endif - if exists("{a:vt}netrw_diffkeep") |let &l:diff = {a:vt}netrw_diffkeep |unlet {a:vt}netrw_diffkeep |endif - if exists("{a:vt}netrw_fenkeep") |let &l:fen = {a:vt}netrw_fenkeep |unlet {a:vt}netrw_fenkeep |endif - if exists("g:netrw_ffkep") && g:netrw_ffkeep - if exists("{a:vt}netrw_ffkeep") |let &l:ff = {a:vt}netrw_ffkeep |unlet {a:vt}netrw_ffkeep |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 - if exists("{a:vt}netrw_hidkeep") |let &l:hidden = {a:vt}netrw_hidkeep |unlet {a:vt}netrw_hidkeep |endif - if exists("{a:vt}netrw_imkeep") |let &l:im = {a:vt}netrw_imkeep |unlet {a:vt}netrw_imkeep |endif - if exists("{a:vt}netrw_iskkeep") |let &l:isk = {a:vt}netrw_iskkeep |unlet {a:vt}netrw_iskkeep |endif - if exists("{a:vt}netrw_lskeep") |let &l:ls = {a:vt}netrw_lskeep |unlet {a:vt}netrw_lskeep |endif - if exists("{a:vt}netrw_makeep") |let &l:ma = {a:vt}netrw_makeep |unlet {a:vt}netrw_makeep |endif - if exists("{a:vt}netrw_magickeep")|let &l:magic = {a:vt}netrw_magickeep |unlet {a:vt}netrw_magickeep|endif - if exists("{a:vt}netrw_modkeep") |let &l:mod = {a:vt}netrw_modkeep |unlet {a:vt}netrw_modkeep |endif - if exists("{a:vt}netrw_nukeep") |let &l:nu = {a:vt}netrw_nukeep |unlet {a:vt}netrw_nukeep |endif - if exists("{a:vt}netrw_rnukeep") |let &l:rnu = {a:vt}netrw_rnukeep |unlet {a:vt}netrw_rnukeep |endif - if exists("{a:vt}netrw_repkeep") |let &l:report = {a:vt}netrw_repkeep |unlet {a:vt}netrw_repkeep |endif - if exists("{a:vt}netrw_rokeep") |let &l:ro = {a:vt}netrw_rokeep |unlet {a:vt}netrw_rokeep |endif - if exists("{a:vt}netrw_selkeep") |let &l:sel = {a:vt}netrw_selkeep |unlet {a:vt}netrw_selkeep |endif - if exists("{a:vt}netrw_spellkeep")|let &l:spell = {a:vt}netrw_spellkeep |unlet {a:vt}netrw_spellkeep|endif - if has("clipboard") - if exists("{a:vt}netrw_starkeep") |let @* = {a:vt}netrw_starkeep |unlet {a:vt}netrw_starkeep |endif - endif - " Problem: start with liststyle=0; press : result, following line resets l:ts. -" if exists("{a:vt}netrw_tskeep") |let &l:ts = {a:vt}netrw_tskeep |unlet {a:vt}netrw_tskeep |endif - if exists("{a:vt}netrw_twkeep") |let &l:tw = {a:vt}netrw_twkeep |unlet {a:vt}netrw_twkeep |endif - if exists("{a:vt}netrw_wigkeep") |let &l:wig = {a:vt}netrw_wigkeep |unlet {a:vt}netrw_wigkeep |endif - if exists("{a:vt}netrw_wrapkeep") |let &l:wrap = {a:vt}netrw_wrapkeep |unlet {a:vt}netrw_wrapkeep |endif - if exists("{a:vt}netrw_writekeep")|let &l:write = {a:vt}netrw_writekeep |unlet {a:vt}netrw_writekeep|endif - if exists("s:yykeep") |let @@ = s:yykeep |unlet s:yykeep |endif + call s:NetrwRestoreSetting(a:vt."netrw_aikeep","&l:ai") + call s:NetrwRestoreSetting(a:vt."netrw_awkeep","&l:aw") + call s:NetrwRestoreSetting(a:vt."netrw_blkeep","&l:bl") + call s:NetrwRestoreSetting(a:vt."netrw_btkeep","&l:bt") + call s:NetrwRestoreSetting(a:vt."netrw_bombkeep","&l:bomb") + call s:NetrwRestoreSetting(a:vt."netrw_cedit","&cedit") + call s:NetrwRestoreSetting(a:vt."netrw_cikeep","&l:ci") + call s:NetrwRestoreSetting(a:vt."netrw_cinkeep","&l:cin") + call s:NetrwRestoreSetting(a:vt."netrw_cinokeep","&l:cino") + call s:NetrwRestoreSetting(a:vt."netrw_comkeep","&l:com") + call s:NetrwRestoreSetting(a:vt."netrw_cpokeep","&l:cpo") + call s:NetrwRestoreSetting(a:vt."netrw_diffkeep","&l:diff") + call s:NetrwRestoreSetting(a:vt."netrw_fenkeep","&l:fen") + if exists("g:netrw_ffkeep") && g:netrw_ffkeep + call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff") + endif + call s:NetrwRestoreSetting(a:vt."netrw_fokeep","&l:fo") + call s:NetrwRestoreSetting(a:vt."netrw_gdkeep","&l:gd") + call s:NetrwRestoreSetting(a:vt."netrw_hidkeep","&l:hidden") + call s:NetrwRestoreSetting(a:vt."netrw_imkeep","&l:im") + call s:NetrwRestoreSetting(a:vt."netrw_iskkeep","&l:isk") + call s:NetrwRestoreSetting(a:vt."netrw_lskeep","&l:ls") + call s:NetrwRestoreSetting(a:vt."netrw_makeep","&l:ma") + call s:NetrwRestoreSetting(a:vt."netrw_magickeep","&l:magic") + call s:NetrwRestoreSetting(a:vt."netrw_modkeep","&l:mod") + call s:NetrwRestoreSetting(a:vt."netrw_nukeep","&l:nu") + call s:NetrwRestoreSetting(a:vt."netrw_rnukeep","&l:rnu") + call s:NetrwRestoreSetting(a:vt."netrw_repkeep","&l:report") + call s:NetrwRestoreSetting(a:vt."netrw_rokeep","&l:ro") + call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel") + call s:NetrwRestoreSetting(a:vt."netrw_spellkeep","&l:spell") + call s:NetrwRestoreSetting(a:vt."netrw_twkeep","&l:tw") + call s:NetrwRestoreSetting(a:vt."netrw_wigkeep","&l:wig") + call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep","&l:wrap") + call s:NetrwRestoreSetting(a:vt."netrw_writekeep","&l:write") + call s:NetrwRestoreSetting("s:yykeep","@@") + " former problem: start with liststyle=0; press : result, following line resets l:ts. + " Fixed; in s:PerformListing, when w:netrw_liststyle is s:LONGLIST, will use a printf to pad filename with spaces + " rather than by appending a tab which previously was using "&ts" to set the desired spacing. (Sep 28, 2018) + call s:NetrwRestoreSetting(a:vt."netrw_tskeep","&l:ts") + if exists("{a:vt}netrw_swfkeep") if &directory == "" " user hasn't specified a swapfile directory; @@ -1647,10 +1829,10 @@ fun! s:NetrwOptionRestore(vt) endif endif if has("clipboard") - if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif - endif - if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif - call s:RestorePosn(s:netrw_nbcd) + call s:NetrwRestoreSetting(a:vt."netrw_starkeep","@*") + call s:NetrwRestoreSetting(a:vt."netrw_pluskeep","@+") + endif + call s:NetrwRestoreSetting(a:vt."netrw_slashkeep","@/") " call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("")) " call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist"),'~'.expand("")) @@ -1665,139 +1847,78 @@ fun! s:NetrwOptionRestore(vt) filetype detect endif " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) -" call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) -endfun - -" --------------------------------------------------------------------- -" s:NetrwOptionSave: save options prior to setting to "netrw-buffer-standard" form {{{2 -" Options get restored by s:NetrwOptionRestore() -" 06/08/07 : removed call to NetrwSafeOptions(), either placed -" immediately after NetrwOptionSave() calls in NetRead -" and NetWrite, or after the s:NetrwEnew() call in -" NetrwBrowse. -" vt: normally its "w:" or "s:" (a variable type) -fun! s:NetrwOptionSave(vt) -" call Dfunc("s:NetrwOptionSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) -" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) - - if !exists("{a:vt}netrw_optionsave") - let {a:vt}netrw_optionsave= 1 - else -" call Dret("s:NetrwOptionSave : options already saved") - return - endif -" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff,'~'.expand("")) - - " Save current settings and current directory -" call Decho("saving current settings and current directory",'~'.expand("")) - let s:yykeep = @@ - if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif - let {a:vt}netrw_aikeep = &l:ai - let {a:vt}netrw_awkeep = &l:aw - let {a:vt}netrw_bhkeep = &l:bh - let {a:vt}netrw_blkeep = &l:bl - let {a:vt}netrw_btkeep = &l:bt - let {a:vt}netrw_bombkeep = &l:bomb - let {a:vt}netrw_cedit = &cedit - let {a:vt}netrw_cikeep = &l:ci - let {a:vt}netrw_cinkeep = &l:cin - let {a:vt}netrw_cinokeep = &l:cino - let {a:vt}netrw_comkeep = &l:com - let {a:vt}netrw_cpokeep = &l:cpo - let {a:vt}netrw_diffkeep = &l:diff - let {a:vt}netrw_fenkeep = &l:fen - if !exists("g:netrw_ffkeep") || g:netrw_ffkeep - let {a:vt}netrw_ffkeep = &l:ff - endif - let {a:vt}netrw_fokeep = &l:fo " formatoptions - let {a:vt}netrw_gdkeep = &l:gd " gdefault - let {a:vt}netrw_hidkeep = &l:hidden - let {a:vt}netrw_imkeep = &l:im - let {a:vt}netrw_iskkeep = &l:isk - let {a:vt}netrw_lskeep = &l:ls - let {a:vt}netrw_makeep = &l:ma - let {a:vt}netrw_magickeep = &l:magic - let {a:vt}netrw_modkeep = &l:mod - let {a:vt}netrw_nukeep = &l:nu - let {a:vt}netrw_rnukeep = &l:rnu - let {a:vt}netrw_repkeep = &l:report - let {a:vt}netrw_rokeep = &l:ro - let {a:vt}netrw_selkeep = &l:sel - let {a:vt}netrw_spellkeep = &l:spell - if !g:netrw_use_noswf - let {a:vt}netrw_swfkeep = &l:swf - endif - if has("clipboard") - let {a:vt}netrw_starkeep = @* - endif - let {a:vt}netrw_tskeep = &l:ts - let {a:vt}netrw_twkeep = &l:tw " textwidth - let {a:vt}netrw_wigkeep = &l:wig " wildignore - let {a:vt}netrw_wrapkeep = &l:wrap - let {a:vt}netrw_writekeep = &l:write - - " save a few selected netrw-related variables -" call Decho("saving a few selected netrw-related variables",'~'.expand("")) - if g:netrw_keepdir - let {a:vt}netrw_dirkeep = getcwd() - endif - if has("clipboard") - if &go =~# 'a' | sil! let {a:vt}netrw_regstar = @* | endif - endif - sil! let {a:vt}netrw_regslash= @/ - -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("")) -" call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()) +" call Dret("s:NetrwOptionsRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) +endfun + +" --------------------------------------------------------------------- +" s:NetrwSetSafeSetting: sets an option to a safe setting {{{2 +" but only when the options' value and the safe setting differ +" Doing this means that netrw will not come up as having changed a +" setting last when it really didn't actually change it. +" +" Called from s:NetrwOptionsSafe +" ex. call s:NetrwSetSafeSetting("&l:sel","inclusive") +fun! s:NetrwSetSafeSetting(setting,safesetting) +" call Dfunc("s:NetrwSetSafeSetting(setting<".a:setting."> safesetting<".a:safesetting.">)") + + if a:setting =~ '^&' +" call Decho("fyi: a:setting starts with &") + exe "let settingval= ".a:setting +" call Decho("fyi: settingval<".settingval.">") + + if settingval != a:safesetting +" call Decho("set setting<".a:setting."> to option value<".a:safesetting.">") + if type(a:safesetting) == 0 + exe "let ".a:setting."=".a:safesetting + elseif type(a:safesetting) == 1 + exe "let ".a:setting."= '".a:safesetting."'" + else + call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:setting." with a safesetting of type#".type(a:safesetting),105) + endif + endif + endif + +" call Dret("s:NetrwSetSafeSetting") endfun " ------------------------------------------------------------------------ -" s:NetrwSafeOptions: sets options to help netrw do its job {{{2 -" Use s:NetrwSaveOptions() to save user settings -" Use s:NetrwOptionRestore() to restore user settings -fun! s:NetrwSafeOptions() -" call Dfunc("s:NetrwSafeOptions() win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$")) -" call Decho("win#".winnr()."'s ft=".&ft,'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) - if exists("+acd") | setl noacd | endif - setl noai - setl noaw - setl nobl - setl nobomb - setl bt=nofile - setl noci - setl nocin - setl bh=hide - setl cino= - setl com= - setl cpo-=a - setl cpo-=A - setl fo=nroql2 - setl nohid - setl noim - setl isk+=@ isk+=* isk+=/ - setl magic - if g:netrw_use_noswf - setl noswf - endif - setl report=10000 - setl sel=inclusive - setl nospell - setl tw=0 - setl wig= - setl cedit& - call s:NetrwCursor() - - " allow the user to override safe options -" call Decho("ft<".&ft."> ei=".&ei,'~'.expand("")) - if &ft == "netrw" -" call Decho("do any netrw FileType autocmds (doau FileType netrw)",'~'.expand("")) - sil! keepalt NetrwKeepj doau FileType netrw - endif - -" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh." bt<".&bt.">",'~'.expand("")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Dret("s:NetrwSafeOptions") +" s:NetrwRestoreSetting: restores specified setting using associated keepvar, {{{2 +" but only if the setting value differs from the associated keepvar. +" Doing this means that netrw will not come up as having changed a +" setting last when it really didn't actually change it. +" +" Used by s:NetrwOptionsRestore() to restore each netrw-senstive setting +" keepvars are set up by s:NetrwOptionsSave +fun! s:NetrwRestoreSetting(keepvar,setting) +"" call Dfunc("s:NetrwRestoreSetting(a:keepvar<".a:keepvar."> a:setting<".a:setting.">)") + + " typically called from s:NetrwOptionsRestore + " call s:NetrwRestoreSettings(keep-option-variable-name,'associated-option') + " ex. call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel") + " Restores option (if different) from a keepvar + if exists(a:keepvar) + exe "let keepvarval= ".a:keepvar + exe "let setting= ".a:setting + +"" call Decho("fyi: a:keepvar<".a:keepvar."> exists") +"" call Decho("fyi: keepvarval=".keepvarval) +"" call Decho("fyi: a:setting<".a:setting."> setting<".setting.">") + + if setting != keepvarval +"" call Decho("restore setting<".a:setting."=".setting."> to keepvarval<".keepvarval.">") + if type(a:setting) == 0 + exe "let ".a:setting."= ".keepvarval + elseif type(a:setting) == 1 + exe "let ".a:setting."= '".keepvarval."'" + else + call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105) + endif + endif + + exe "unlet ".a:keepvar + endif + +"" call Dret("s:NetrwRestoreSetting") endfun " --------------------------------------------------------------------- @@ -1833,7 +1954,7 @@ fun! NetrwStatusLine() endif endfun -" --------------------------------------------------------------------- +" =============================== " Netrw Transfer Functions: {{{1 " =============================== @@ -1847,13 +1968,13 @@ fun! netrw#NetRead(mode,...) " call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : "")) " NetRead: save options {{{3 - call s:NetrwOptionSave("w:") - call s:NetrwSafeOptions() + call s:NetrwOptionsSave("w:") + call s:NetrwOptionsSafe(0) call s:RestoreCursorline() " NetrwSafeOptions sets a buffer up for a netrw listing, which includes buflisting off. " However, this setting is not wanted for a remote editing session. The buffer should be "nofile", still. setl bl -" call Decho("(netrw#NetRead) buf#".bufnr("%")."<".bufname("%")."> bl=".&bl." bt=".&bt." bh=".&bh,'~'.expand("")) +" call Decho("buf#".bufnr("%")."<".bufname("%")."> bl=".&bl." bt=".&bt." bh=".&bh,'~'.expand("")) " NetRead: interpret mode into a readcmd {{{3 if a:mode == 0 " read remote file before current line @@ -1943,7 +2064,7 @@ fun! netrw#NetRead(mode,...) " NetRead: Determine method of read (ftp, rcp, etc) {{{3 call s:NetrwMethod(choice) if !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetRead : unsupported method") +" call Dret("netrw#NetRead : unsupported method") return endif let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix @@ -2103,7 +2224,7 @@ fun! netrw#NetRead(mode,...) else let tmpfile_get = tmpfile endif - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)." ".s:ShellEscape(tmpfile_get,1)) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".escape(s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1),' ')." ".s:ShellEscape(tmpfile_get,1)) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -2185,7 +2306,7 @@ fun! netrw#NetRead(mode,...) " NetRead: (rsync) NetRead Method #7 {{{3 elseif b:netrw_method == 7 " call Decho("read via rsync (method #7)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1)) let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -2252,7 +2373,7 @@ fun! netrw#NetRead(mode,...) " call Decho("cleanup by deleting tmpfile<".tmpfile.">",'~'.expand("")) NetrwKeepj call s:NetrwDelete(tmpfile) endif - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") " call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun @@ -2264,8 +2385,8 @@ fun! netrw#NetWrite(...) range " NetWrite: option handling {{{3 let mod= 0 - call s:NetrwOptionSave("w:") - call s:NetrwSafeOptions() + call s:NetrwOptionsSave("w:") + call s:NetrwOptionsSafe(0) " NetWrite: Get Temporary Filename {{{3 let tmpfile= s:GetTempfile("") @@ -2374,7 +2495,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...",'~'.expand("")) +" call Decho("Processing your write request...",'~'.expand("")) endif "......................................... @@ -2527,7 +2648,7 @@ fun! netrw#NetWrite(...) range let url= g:netrw_choice call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) ) elseif !exists("g:netrw_quiet") - call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd".">".",16) + call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">".",16) endif "......................................... @@ -2571,7 +2692,7 @@ fun! netrw#NetWrite(...) range " NetWrite: (rsync) NetWrite Method #7 {{{3 elseif b:netrw_method == 7 " call Decho("write via rsync (method #7)",'~'.expand("")) - call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)) + call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)) let b:netrw_lastfile = choice "......................................... @@ -2616,7 +2737,7 @@ fun! netrw#NetWrite(...) range " call Decho("tmpfile<".tmpfile."> readable, will now delete it",'~'.expand("")) call s:NetrwDelete(tmpfile) endif - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") if a:firstline == 1 && a:lastline == line("$") " restore modifiability; usually equivalent to set nomod @@ -2676,9 +2797,13 @@ endfun " --------------------------------------------------------------------- " netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2 " (implements the :Ntree command) -fun! netrw#SetTreetop(...) -" call Dfunc("netrw#SetTreetop(".((a:0 > 0)? a:1 : "").") a:0=".a:0) - +fun! netrw#SetTreetop(iscmd,...) +" call Dfunc("netrw#SetTreetop(iscmd=".a:iscmd." ".((a:0 > 0)? a:1 : "").") a:0=".a:0) +" call Decho("w:netrw_treetop<".w:netrw_treetop.">") + + " iscmd==0: netrw#SetTreetop called using gn mapping + " iscmd==1: netrw#SetTreetop called using :Ntree from the command line +" call Decho("(iscmd=".a:iscmd.": called using :Ntree from command line",'~'.expand("")) " clear out the current tree if exists("w:netrw_treetop") " call Decho("clearing out current tree",'~'.expand("")) @@ -2689,8 +2814,9 @@ fun! netrw#SetTreetop(...) " call Decho("freeing w:netrw_treedict",'~'.expand("")) unlet w:netrw_treedict endif - - if a:1 == "" && exists("inittreetop") +" call Decho("inittreetop<".(exists("inittreetop")? inittreetop : "n/a").">") + + if (a:iscmd == 0 || a:1 == "") && exists("inittreetop") let treedir= s:NetrwTreePath(inittreetop) " call Decho("treedir<".treedir.">",'~'.expand("")) else @@ -2699,7 +2825,7 @@ fun! netrw#SetTreetop(...) let treedir= a:1 elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://') let treedir= b:netrw_curdir."/".a:1 -" call Decho("a:1<".a:1."> is NOT a directory, trying treedir<".treedir.">",'~'.expand("")) +" call Decho("a:1<".a:1."> is NOT a directory, using treedir<".treedir.">",'~'.expand("")) else " normally the cursor is left in the message window. " However, here this results in the directory being listed in the message window, which is not wanted. @@ -2710,13 +2836,18 @@ fun! netrw#SetTreetop(...) endif endif " call Decho("treedir<".treedir.">",'~'.expand("")) + + " determine if treedir is remote or local let islocal= expand("%") !~ '^\a\{3,}://' " call Decho("islocal=".islocal,'~'.expand("")) + + " browse the resulting directory if islocal call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(islocal,treedir)) else call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir)) endif + " call Dret("netrw#SetTreetop") endfun @@ -2755,8 +2886,7 @@ fun! s:NetrwGetFile(readcmd, tfile, meth else let tfile= a:tfile endif -" call Decho("exe sil! keepalt file ".fnameescape(tfile),'~'.expand("")) - exe "sil! keepalt file ".fnameescape(tfile) + call s:NetrwBufRename(tfile) " edit temporary file (ie. read the temporary file in) if rfile =~ '\.zip$' @@ -2783,8 +2913,7 @@ fun! s:NetrwGetFile(readcmd, tfile, meth endif " rename buffer back to remote filename -" call Decho("exe sil! keepalt file ".fnameescape(rfile),'~'.expand("")) - exe "sil! NetrwKeepj keepalt file ".fnameescape(rfile) + call s:NetrwBufRename(rfile) " Detect filetype of local version of remote file. " Note that isk must not include a "/" for scripts.vim @@ -2793,7 +2922,7 @@ fun! s:NetrwGetFile(readcmd, tfile, meth let iskkeep= &l:isk setl isk-=/ let &l:isk= iskkeep -" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") +" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") let line1 = 1 let line2 = line("$") @@ -2864,13 +2993,13 @@ endfun " g:netrw_port = optional port number (for ftp) " g:netrw_choice = copy of input url (choice) fun! s:NetrwMethod(choice) -" call Dfunc("NetrwMethod(a:choice<".a:choice.">)") +" call Dfunc("s:NetrwMethod(a:choice<".a:choice.">)") " sanity check: choice should have at least three slashes in it if strlen(substitute(a:choice,'[^/]','','g')) < 3 call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78) let b:netrw_method = -1 -" call Dret("NetrwMethod : incorrect url format<".a:choice.">") +" call Dret("s:NetrwMethod : incorrect url format<".a:choice.">") return endif @@ -2983,7 +3112,7 @@ fun! s:NetrwMethod(choice) endif if curmachine != g:netrw_machine - if exists("s:netwr_hup[".g:netrw_machine."]") + if exists("s:netrw_hup[".g:netrw_machine."]") call NetUserPass("ftp:".g:netrw_machine) elseif exists("s:netrw_passwd") " if there's a change in hostname, require password re-entry @@ -3113,7 +3242,7 @@ fun! s:NetrwMethod(choice) " call Decho("s:netrw_passwd <".s:netrw_passwd.">",'~'.expand("")) " endif "Decho " call Decho("b:netrw_fname <".b:netrw_fname.">",'~'.expand("")) -" call Dret("NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) +" call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port) endfun " ------------------------------------------------------------------------ @@ -3257,9 +3386,9 @@ fun! NetUserPass(...) " call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">") endfun -" =========================================== +" ================================= " Shared Browsing Support: {{{1 -" =========================================== +" ================================= " --------------------------------------------------------------------- " s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 @@ -3284,7 +3413,7 @@ endfun " 5: (user: ) go down (next) directory, using history " 6: (user: ) delete bookmark fun! s:NetrwBookHistHandler(chg,curdir) -" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhist_cnt." histmax=".g:netrw_dirhistmax) +" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhistcnt." histmax=".g:netrw_dirhistmax) if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 " " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax") return @@ -3331,12 +3460,14 @@ fun! s:NetrwBookHistHandler(chg,curdir) endif " list directory history - let cnt = g:netrw_dirhist_cnt + " Note: history is saved only when PerformListing is done; + " ie. when netrw can re-use a netrw buffer, the current directory is not saved in the history. + let cnt = g:netrw_dirhistcnt let first = 1 let histcnt = 0 if g:netrw_dirhistmax > 0 - while ( first || cnt != g:netrw_dirhist_cnt ) -" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:netrw_dirhist_cnt,'~'.expand("")) + while ( first || cnt != g:netrw_dirhistcnt ) +" call Decho("first=".first." cnt=".cnt." dirhistcnt=".g:netrw_dirhistcnt,'~'.expand("")) if exists("g:netrw_dirhist_{cnt}") " call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt},'~'.expand("")) echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt}) @@ -3350,7 +3481,7 @@ fun! s:NetrwBookHistHandler(chg,curdir) endif endwhile else - let g:netrw_dirhist_cnt= 0 + let g:netrw_dirhistcnt= 0 endif if didwork call inputsave()|call input("Press to continue")|call inputrestore() @@ -3359,27 +3490,27 @@ fun! s:NetrwBookHistHandler(chg,curdir) elseif a:chg == 3 " saves most recently visited directories (when they differ) " call Decho("(browsing) record curdir history",'~'.expand("")) - if !exists("g:netrw_dirhist_cnt") || !exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") || g:netrw_dirhist_{g:netrw_dirhist_cnt} != a:curdir + if !exists("g:netrw_dirhistcnt") || !exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") || g:netrw_dirhist_{g:netrw_dirhistcnt} != a:curdir if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt = ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax - let g:netrw_dirhist_{g:netrw_dirhist_cnt} = a:curdir - endif -" call Decho("save dirhist#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">",'~'.expand("")) + let g:netrw_dirhistcnt = ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax + let g:netrw_dirhist_{g:netrw_dirhistcnt} = a:curdir + endif +" call Decho("save dirhist#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) endif elseif a:chg == 4 " u: change to the previous directory stored on the history list " call Decho("(user: ) chg to prev dir from history",'~'.expand("")) if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - v:count1 ) % g:netrw_dirhistmax - if g:netrw_dirhist_cnt < 0 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax - endif - else - let g:netrw_dirhist_cnt= 0 - endif - if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") -" call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">",'~'.expand("")) + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - v:count1 ) % g:netrw_dirhistmax + if g:netrw_dirhistcnt < 0 + let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax + endif + else + let g:netrw_dirhistcnt= 0 + endif + if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") +" call Decho("changedir u#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") setl ma noro " call Decho("setl ma noro",'~'.expand("")) @@ -3388,13 +3519,13 @@ fun! s:NetrwBookHistHandler(chg,curdir) " call Decho("setl nomod",'~'.expand("")) " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) endif -" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}),'~'.expand("")) - exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) +" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) + exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) else if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + v:count1 ) % g:netrw_dirhistmax - else - let g:netrw_dirhist_cnt= 0 + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + v:count1 ) % g:netrw_dirhistmax + else + let g:netrw_dirhistcnt= 0 endif echo "Sorry, no predecessor directory exists yet" endif @@ -3403,9 +3534,9 @@ fun! s:NetrwBookHistHandler(chg,curdir) " U: change to the subsequent directory stored on the history list " call Decho("(user: ) chg to next dir from history",'~'.expand("")) if g:netrw_dirhistmax > 0 - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt + 1 ) % g:netrw_dirhistmax - if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}") -" call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">",'~'.expand("")) + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax + if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") +" call Decho("changedir U#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("")) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") " call Decho("setl ma noro",'~'.expand("")) setl ma noro @@ -3415,17 +3546,17 @@ fun! s:NetrwBookHistHandler(chg,curdir) setl nomod " call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) endif -" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}),'~'.expand("")) - exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}) - else - let g:netrw_dirhist_cnt= ( g:netrw_dirhist_cnt - 1 ) % g:netrw_dirhistmax - if g:netrw_dirhist_cnt < 0 - let g:netrw_dirhist_cnt= g:netrw_dirhist_cnt + g:netrw_dirhistmax +" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("")) + exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}) + else + let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - 1 ) % g:netrw_dirhistmax + if g:netrw_dirhistcnt < 0 + let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax endif echo "Sorry, no successor directory exists yet" endif else - let g:netrw_dirhist_cnt= 0 + let g:netrw_dirhistcnt= 0 echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")" endif @@ -3460,10 +3591,12 @@ endfun fun! s:NetrwBookHistRead() " call Dfunc("s:NetrwBookHistRead()") if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" " call Dret("s:NetrwBookHistRead - suppressed due to g:netrw_dirhistmax") +" call Dret("s:NetrwBookHistRead - nothing read (suppressed due to dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a").")") return endif let ykeep= @@ + + " read bookmarks if !exists("s:netrw_initbookhist") let home = s:NetrwHome() let savefile= home."/.netrwbook" @@ -3471,6 +3604,8 @@ fun! s:NetrwBookHistRead() " call Decho("sourcing .netrwbook",'~'.expand("")) exe "keepalt NetrwKeepj so ".savefile endif + + " read history if g:netrw_dirhistmax > 0 let savefile= home."/.netrwhist" if filereadable(s:NetrwFile(savefile)) @@ -3481,27 +3616,33 @@ fun! s:NetrwBookHistRead() au VimLeave * call s:NetrwBookHistSave() endif endif + let @@= ykeep +" call Decho("dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a"),'~'.expand("")) +" call Decho("dirhistcnt=".(exists("g:netrw_dirhistcnt")? g:netrw_dirhistcnt : "n/a"),'~'.expand("")) " call Dret("s:NetrwBookHistRead") endfun " --------------------------------------------------------------------- -" s:NetrwBookHistSave: this function saves bookmarks and history {{{2 +" s:NetrwBookHistSave: this function saves bookmarks and history to files {{{2 " Sister function: s:NetrwBookHistRead() " I used to do this via viminfo but that appears to " be unreliable for long-term storage " If g:netrw_dirhistmax is <= 0, no history or bookmarks " will be saved. +" (s:NetrwBookHistHandler(3,...) used to record history) fun! s:NetrwBookHistSave() -" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax) +" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt) if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0 -" call Dret("s:NetrwBookHistSave : dirhistmax=".g:netrw_dirhistmax) +" call Dret("s:NetrwBookHistSave : nothing saved (dirhistmax=".g:netrw_dirhistmax.")") return endif let savefile= s:NetrwHome()."/.netrwhist" +" call Decho("savefile<".savefile.">",'~'.expand("")) 1split call s:NetrwEnew() +" call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("")) if g:netrw_use_noswf setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf else @@ -3512,20 +3653,37 @@ fun! s:NetrwBookHistSave() if exists("+acd") | setl noacd | endif sil! NetrwKeepj keepalt %d _ - " save .netrwhist -- no attempt to merge + " rename enew'd file: .netrwhist -- no attempt to merge + " record dirhistmax and current dirhistcnt + " save history +" call Decho("saving history: dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt." lastline=".line("$"),'~'.expand("")) sil! keepalt file .netrwhist call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax) - call setline(2,"let g:netrw_dirhist_cnt =".g:netrw_dirhist_cnt) - let lastline = line("$") - let cnt = 1 - while cnt <= g:netrw_dirhist_cnt - call setline((cnt+lastline),'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") - let cnt= cnt + 1 - endwhile - exe "sil! w! ".savefile - + call setline(2,"let g:netrw_dirhistcnt =".g:netrw_dirhistcnt) + if g:netrw_dirhistmax > 0 + let lastline = line("$") + let cnt = g:netrw_dirhistcnt + let first = 1 + while ( first || cnt != g:netrw_dirhistcnt ) + let lastline= lastline + 1 + if exists("g:netrw_dirhist_{cnt}") + call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'") +" call Decho("..".lastline.'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'",'~'.expand("")) + endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile + exe "sil! w! ".savefile +" call Decho("exe sil! w! ".savefile,'~'.expand("")) + endif + + " save bookmarks sil NetrwKeepj %d _ if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] +" call Decho("saving bookmarks",'~'.expand("")) " merge and write .netrwbook let savefile= s:NetrwHome()."/.netrwbook" @@ -3543,7 +3701,10 @@ fun! s:NetrwBookHistSave() " construct and save .netrwbook call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist)) exe "sil! w! ".savefile - endif +" call Decho("exe sil! w! ".savefile,'~'.expand("")) + endif + + " cleanup -- remove buffer used to construct history let bgone= bufnr("%") q! exe "keepalt ".bgone."bwipe!" @@ -3560,9 +3721,9 @@ endfun fun! s:NetrwBrowse(islocal,dirname) if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif " call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr()) -" call Decho("modified=".&modified." modifiable=".&modifiable." readonly=".&readonly,'~'.expand("")) -" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) -" call Dredir("ls!") +" call Decho("fyi: modified=".&modified." modifiable=".&modifiable." readonly=".&readonly,'~'.expand("")) +" call Decho("fyi: tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) +" call Dredir("ls!","s:NetrwBrowse") " save alternate-file's filename if w:netrw_rexlocal doesn't exist " This is useful when one edits a local file, then :e ., then :Rex @@ -3579,18 +3740,24 @@ fun! s:NetrwBrowse(islocal,dirname) " s:NetrwBrowse : simplify the dirname (especially for ".."s in dirnames) {{{3 if a:dirname !~ '^\a\{3,}://' let dirname= simplify(a:dirname) +" call Decho("simplified dirname<".dirname.">") else let dirname= a:dirname endif + " repoint t:netrw_lexbufnr if appropriate + if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr +" call Decho("set repointlexbufnr to true!") + let repointlexbufnr= 1 + endif + + " s:NetrwBrowse : sanity checks: {{{3 if exists("s:netrw_skipbrowse") unlet s:netrw_skipbrowse " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." filename<".expand("%")."> win#".winnr()." ft<".&ft.">",'~'.expand("")) " call Dret("s:NetrwBrowse : s:netrw_skipbrowse existed") return endif - - " s:NetrwBrowse : sanity checks: {{{3 if !exists("*shellescape") NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69) " call Dret("s:NetrwBrowse : missing shellescape()") @@ -3603,20 +3770,25 @@ fun! s:NetrwBrowse(islocal,dirname) endif " s:NetrwBrowse : save options: {{{3 - call s:NetrwOptionSave("w:") + call s:NetrwOptionsSave("w:") " s:NetrwBrowse : re-instate any marked files {{{3 - if exists("s:netrwmarkfilelist_{bufnr('%')}") -" call Decho("clearing marked files",'~'.expand("")) - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + if has("syntax") && exists("g:syntax_on") && g:syntax_on + if exists("s:netrwmarkfilelist_{bufnr('%')}") +" call Decho("clearing marked files",'~'.expand("")) + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + endif endif if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep " s:NetrwBrowse : set up "safe" options for local directory/file {{{3 " call Decho("handle w:netrw_acdkeep:",'~'.expand("")) " call Decho("NetrwKeepj lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")",'~'.expand("")) - call s:NetrwLcd(dirname) - call s:NetrwSafeOptions() + if s:NetrwLcd(dirname) +" call Dret("s:NetrwBrowse : lcd failure") + return + endif + " call s:NetrwOptionsSafe() " tst952 failed with this enabled. " call Decho("getcwd<".getcwd().">",'~'.expand("")) elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"' @@ -3638,13 +3810,12 @@ fun! s:NetrwBrowse(islocal,dirname) " s:NetrwBrowse : remote-read the requested file into current buffer {{{3 call s:NetrwEnew(dirname) - call s:NetrwSafeOptions() + call s:NetrwOptionsSafe(a:islocal) setl ma noro " call Decho("setl ma noro",'~'.expand("")) let b:netrw_curdir = dirname let url = s:method."://".((s:user == "")? "" : s:user."@").s:machine.(s:port ? ":".s:port : "")."/".s:path -" call Decho("exe sil! keepalt file ".fnameescape(url)." (bt=".&bt.")",'~'.expand("")) - exe "sil! NetrwKeepj keepalt file ".fnameescape(url) + call s:NetrwBufRename(url) exe "sil! NetrwKeepj keepalt doau BufReadPre ".fnameescape(s:fname) sil call netrw#NetRead(2,url) " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error @@ -3664,7 +3835,7 @@ fun! s:NetrwBrowse(islocal,dirname) " s:NetrwBrowse : save certain window-oriented variables into buffer-oriented variables {{{3 call s:SetBufWinVars() - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") " call Decho("setl ma nomod",'~'.expand("")) setl ma nomod noro " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) @@ -3691,16 +3862,18 @@ fun! s:NetrwBrowse(islocal,dirname) let reusing= s:NetrwGetBuffer(a:islocal,dirname) " maintain markfile highlighting - if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" -" call Decho("bufnr(%)=".bufnr('%'),'~'.expand("")) -" call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - else -" call Decho("2match none",'~'.expand("")) - 2match none + if has("syntax") && exists("g:syntax_on") && g:syntax_on + if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" +" " call Decho("bufnr(%)=".bufnr('%'),'~'.expand("")) +" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + else +" " call Decho("2match none",'~'.expand("")) + 2match none + endif endif if reusing && line("$") > 1 - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") " call Decho("setl noma nomod nowrap",'~'.expand("")) setl noma nomod nowrap " call Decho("(set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) @@ -3746,7 +3919,10 @@ fun! s:NetrwBrowse(islocal,dirname) " call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("")) " call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"),'~'.expand("")) if !exists("&l:acd") || !&l:acd - call s:NetrwLcd(b:netrw_curdir) + if s:NetrwLcd(b:netrw_curdir) +" call Dret("s:NetrwBrowse : lcd failure") + return + endif endif endif @@ -3778,7 +3954,7 @@ fun! s:NetrwBrowse(islocal,dirname) if !exists("g:netrw_quiet") NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) endif - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") " call Decho("setl noma nomod nowrap",'~'.expand("")) setl noma nomod nowrap " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) @@ -3789,15 +3965,15 @@ fun! s:NetrwBrowse(islocal,dirname) " call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)",'~'.expand("")) endif " (additional remote handling) - " ----------------------- - " Directory Listing: {{{3 - " ----------------------- + " ------------------------------- + " Perform Directory Listing: {{{3 + " ------------------------------- NetrwKeepj call s:NetrwMaps(a:islocal) NetrwKeepj call s:NetrwCommands(a:islocal) NetrwKeepj call s:PerformListing(a:islocal) " restore option(s) - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) " If there is a rexposn: restore position with rexposn @@ -3817,6 +3993,12 @@ fun! s:NetrwBrowse(islocal,dirname) setl beval endif + " repoint t:netrw_lexbufnr if appropriate + if exists("repointlexbufnr") + let t:netrw_lexbufnr= bufnr("%") +" call Decho("repoint t:netrw_lexbufnr to #".t:netrw_lexbufnr) + endif + " restore position if reusing " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) @@ -3824,8 +4006,8 @@ fun! s:NetrwBrowse(islocal,dirname) endif " The s:LocalBrowseRefresh() function is called by an autocmd - " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow, medium speed). - " However, s:NetrwBrowse() causes the FocusGained event to fire the firstt time. + " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow or medium speed). + " However, s:NetrwBrowse() causes the FocusGained event to fire the first time. " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) " call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">") @@ -3837,17 +4019,18 @@ endfun " may not apply correctly; ie. netrw's idea of the current directory may " differ from vim's. This function insures that netrw's idea of the current " directory is used. +" Returns a path to the file specified by a:fname fun! s:NetrwFile(fname) -" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr()) -" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("")) -" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("")) -" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("")) -" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) +" "" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr()) +" "" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("")) +" "" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("")) +" "" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("")) +" "" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) " clean up any leading treedepthstring if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST let fname= substitute(a:fname,'^'.s:treedepthstring.'\+','','') -" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("")) +" "" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("")) else let fname= a:fname endif @@ -3862,31 +4045,31 @@ fun! s:NetrwFile(fname) if fname =~ '^\' || fname =~ '^\a:\' " windows, but full path given let ret= fname -" call Decho("windows+full path: isdirectory(".fname.")",'~'.expand("")) +" "" call Decho("windows+full path: isdirectory(".fname.")",'~'.expand("")) else " windows, relative path given let ret= s:ComposePath(b:netrw_curdir,fname) -" call Decho("windows+rltv path: isdirectory(".fname.")",'~'.expand("")) +" "" call Decho("windows+rltv path: isdirectory(".fname.")",'~'.expand("")) endif elseif fname =~ '^/' " not windows, full path given let ret= fname -" call Decho("unix+full path: isdirectory(".fname.")",'~'.expand("")) +" "" call Decho("unix+full path: isdirectory(".fname.")",'~'.expand("")) else " not windows, relative path given let ret= s:ComposePath(b:netrw_curdir,fname) -" call Decho("unix+rltv path: isdirectory(".fname.")",'~'.expand("")) +" "" call Decho("unix+rltv path: isdirectory(".fname.")",'~'.expand("")) endif else " vim and netrw agree on the current directory let ret= fname -" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("")) -" call Decho("vim directory: ".getcwd(),'~'.expand("")) -" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("")) - endif - -" call Dret("s:NetrwFile ".ret) +" "" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("")) +" "" call Decho("vim directory: ".getcwd(),'~'.expand("")) +" "" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("")) + endif + +" "" call Dret("s:NetrwFile ".ret) return ret endfun @@ -3960,31 +4143,72 @@ fun! s:NetrwFullPath(filename) endfun " --------------------------------------------------------------------- -" s:NetrwGetBuffer: {{{2 +" s:NetrwGetBuffer: [get a new|find an old netrw] buffer for a netrw listing {{{2 " returns 0=cleared buffer " 1=re-used buffer (buffer not cleared) fun! s:NetrwGetBuffer(islocal,dirname) " call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("")) +" call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("")) +" call Dredir("ls!","s:NetrwGetBuffer") let dirname= a:dirname " re-use buffer if possible {{{3 " call Decho("--re-use a buffer if possible--",'~'.expand("")) if !exists("s:netrwbuf") +" call Decho(" s:netrwbuf initialized to {}",'~'.expand("")) let s:netrwbuf= {} endif - if has_key(s:netrwbuf,s:NetrwFullPath(dirname)) +" call Decho(" s:netrwbuf =".string(s:netrwbuf),'~'.expand("")) +" call Decho(" w:netrw_liststyle =".(exists("w:netrw_liststyle")? w:netrw_liststyle : "n/a"),'~'.expand("")) + + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + let bufnum = -1 + + if !empty(s:netrwbuf) && has_key(s:netrwbuf,s:NetrwFullPath(dirname)) + if has_key(s:netrwbuf,"NetrwTreeListing") + let bufnum= s:netrwbuf["NetrwTreeListing"] + else + let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] + endif +" call Decho(" NetrwTreeListing: bufnum#".bufnum,'~'.expand("")) + if !bufexists(bufnum) + call remove(s:netrwbuf,"NetrwTreeListing"]) + let bufnum= -1 + endif + elseif bufnr("NetrwTreeListing") != -1 + let bufnum= bufnr("NetrwTreeListing") +" call Decho(" NetrwTreeListing".": bufnum#".bufnum,'~'.expand("")) + else +" call Decho(" did not find a NetrwTreeListing buffer",'~'.expand("")) + let bufnum= -1 + endif + + elseif has_key(s:netrwbuf,s:NetrwFullPath(dirname)) let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)] -" call Decho("lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum) +" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum,'~'.expand("")) if !bufexists(bufnum) call remove(s:netrwbuf,s:NetrwFullPath(dirname)) let bufnum= -1 endif - else -" call Decho("lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key") + + else +" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("")) let bufnum= -1 endif +" call Decho(" bufnum#".bufnum,'~'.expand("")) + + " highjack the current buffer if + " it has the desired name + " it is empty +" call Decho("deciding if I can highjack the current buffer#".bufnr("%"),'~'.expand("")) +" call Decho("..dirname<".dirname.">",'~'.expand("")) +" call Decho("..bufname<".bufname("%").">",'~'.expand("")) +" call Decho("..getline($)<".getline("$").">",'~'.expand("")) + if dirname == bufname("%") && line("$") == 1 && getline("%") == "" +" call Dret("s:NetrwGetBuffer 0 : highjacking buffer#".bufnr("%")) + return 0 + endif " get enew buffer and name it -or- re-use buffer {{{3 if bufnum < 0 " get enew buffer and name it @@ -3995,14 +4219,8 @@ fun! s:NetrwGetBuffer(islocal,dirname) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " Got enew buffer; transform into a NetrwTreeListing " call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --",'~'.expand("")) - if !exists("s:netrw_treelistnum") - let s:netrw_treelistnum= 1 - else - let s:netrw_treelistnum= s:netrw_treelistnum + 1 - endif - let w:netrw_treebufnr= bufnr("%") -" call Decho(" exe sil! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum),'~'.expand("")) - exe 'sil! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) + let w:netrw_treebufnr = bufnr("%") + call s:NetrwBufRename("NetrwTreeListing") if g:netrw_use_noswf setl nobl bt=nofile noswf else @@ -4012,15 +4230,9 @@ fun! s:NetrwGetBuffer(islocal,dirname) nnoremap ]] :sil call TreeListMove(']]') nnoremap [] :sil call TreeListMove('[]') nnoremap ][ :sil call TreeListMove('][') -" call Decho(" tree listing#".s:netrw_treelistnum." bufnr=".w:netrw_treebufnr,'~'.expand("")) - else -" let v:errmsg = "" " Decho - let escdirname = fnameescape(dirname) -" call Decho(" errmsg<".v:errmsg."> bufnr(escdirname<".escdirname.">)=".bufnr(escdirname)." bufname()<".bufname(bufnr(escdirname)).">",'~'.expand("")) -" call Decho(' exe sil! keepalt file '.escdirname,'~'.expand("")) -" let v:errmsg= "" " Decho - exe 'sil! keepj keepalt file '.escdirname -" call Decho(" errmsg<".v:errmsg."> bufnr(".escdirname.")=".bufnr(escdirname)."<".bufname(bufnr(escdirname)).">",'~'.expand("")) +" call Decho(" tree listing bufnr=".w:netrw_treebufnr,'~'.expand("")) + else + call s:NetrwBufRename(dirname) " enter the new buffer into the s:netrwbuf dictionary let s:netrwbuf[s:NetrwFullPath(dirname)]= bufnr("%") " call Decho("update netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnr("%"),'~'.expand("")) @@ -4041,8 +4253,7 @@ fun! s:NetrwGetBuffer(islocal,dirname) endif " call Decho(" line($)=".line("$"),'~'.expand("")) if bufname("%") == '.' -" call Decho("exe sil! keepalt file ".fnameescape(getcwd()),'~'.expand("")) - exe "sil! NetrwKeepj keepalt file ".fnameescape(getcwd()) + call s:NetrwBufRename(getcwd()) endif let &ei= eikeep @@ -4066,6 +4277,7 @@ fun! s:NetrwGetBuffer(islocal,dirname) elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST " call Decho("--re-use tree listing--",'~'.expand("")) " call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("")) + setl ma sil NetrwKeepj %d _ NetrwKeepj call s:NetrwListSettings(a:islocal) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) @@ -4089,8 +4301,7 @@ fun! s:NetrwGetBuffer(islocal,dirname) " call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--",'~'.expand("")) let fname= expand("%") NetrwKeepj call s:NetrwListSettings(a:islocal) -" call Decho("exe sil! keepalt file ".fnameescape(fname),'~'.expand("")) - exe "sil! NetrwKeepj keepalt file ".fnameescape(fname) + call s:NetrwBufRename(fname) " delete all lines from buffer {{{3 " call Decho("--delete all lines from buffer--",'~'.expand("")) @@ -4148,7 +4359,7 @@ fun! s:NetrwGetWord() let curline= getline('.') if curline =~# '"\s*Sorted by\s' - NetrwKeepj norm s + NetrwKeepj norm! s let s:netrw_skipbrowse= 1 echo 'Pressing "s" also works' @@ -4157,11 +4368,11 @@ fun! s:NetrwGetWord() echo 'Press "S" to edit sorting sequence' elseif curline =~# '"\s*Quick Help:' - NetrwKeepj norm ? + NetrwKeepj norm! ? let s:netrw_skipbrowse= 1 elseif curline =~# '"\s*\%(Hiding\|Showing\):' - NetrwKeepj norm a + NetrwKeepj norm! a let s:netrw_skipbrowse= 1 echo 'Pressing "a" also works' @@ -4233,20 +4444,22 @@ fun! s:NetrwGetWord() endfun " --------------------------------------------------------------------- -" s:NetrwListSettings: make standard settings for a netrw listing {{{2 +" s:NetrwListSettings: make standard settings for making a netrw listing {{{2 +" g:netrw_bufsettings will be used after the listing is produced. +" Called by s:NetrwGetBuffer() fun! s:NetrwListSettings(islocal) " call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) let fname= bufname("%") -" " call Decho("(NetrwListSettings) setl bt=nofile nobl ma nonu nowrap noro nornu",'~'.expand("")) - setl bt=nofile nobl ma nonu nowrap noro nornu -" call Decho("(NetrwListSettings) exe sil! keepalt file ".fnameescape(fname),'~'.expand("")) - exe "sil! keepalt file ".fnameescape(fname) +" " call Decho("setl bt=nofile nobl ma nonu nowrap noro nornu",'~'.expand("")) + " nobl noma nomod nonu noma nowrap ro nornu (std g:netrw_bufsettings) + setl bt=nofile nobl ma nonu nowrap noro nornu + call s:NetrwBufRename(fname) if g:netrw_use_noswf setl noswf endif -" call Dredir("ls!") -" call Decho("(NetrwListSettings) exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) +" call Dredir("ls!","s:NetrwListSettings") +" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) exe "setl ts=".(g:netrw_maxfilenamelen+1) setl isk+=.,~,- if g:netrw_fastbrowse > a:islocal @@ -4259,7 +4472,7 @@ fun! s:NetrwListSettings(islocal) endfun " --------------------------------------------------------------------- -" s:NetrwListStyle: {{{2 +" s:NetrwListStyle: change list style (thin - long - wide - tree) {{{2 " islocal=0: remote browsing " =1: local browsing fun! s:NetrwListStyle(islocal) @@ -4275,6 +4488,12 @@ fun! s:NetrwListStyle(islocal) " call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle,'~'.expand("")) " call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">",'~'.expand("")) + " repoint t:netrw_lexbufnr if appropriate + if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr +" call Decho("set repointlexbufnr to true!") + let repointlexbufnr= 1 + endif + if w:netrw_liststyle == s:THINLIST " use one column listing " call Decho("use one column list",'~'.expand("")) @@ -4316,6 +4535,12 @@ fun! s:NetrwListStyle(islocal) NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) NetrwKeepj call s:NetrwCursor() + " repoint t:netrw_lexbufnr if appropriate + if exists("repointlexbufnr") + let t:netrw_lexbufnr= bufnr("%") +" call Decho("repoint t:netrw_lexbufnr to #".t:netrw_lexbufnr) + endif + " restore position; keep cursor on the filename " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("")) NetrwKeepj call winrestview(svpos) @@ -4339,12 +4564,14 @@ fun! s:NetrwBannerCtrl(islocal) call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) " keep cursor on the filename - let fname= s:NetrwGetWord() - sil NetrwKeepj $ - let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') -" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'),'~'.expand("")) - if result <= 0 && exists("w:netrw_bannercnt") - exe "NetrwKeepj ".w:netrw_bannercnt + if g:netrw_banner && exists("w:netrw_bannercnt") && line(".") >= w:netrw_bannercnt + let fname= s:NetrwGetWord() + sil NetrwKeepj $ + let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') +" " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'),'~'.expand("")) + if result <= 0 && exists("w:netrw_bannercnt") + exe "NetrwKeepj ".w:netrw_bannercnt + endif endif let @@= ykeep " call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner) @@ -4435,7 +4662,7 @@ fun! s:NetrwBookmarkMenu() if !exists("s:netrw_menucnt") return endif -" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhist_cnt." menucnt=".s:netrw_menucnt) +" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhistcnt." menucnt=".s:netrw_menucnt) " 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 @@ -4467,12 +4694,12 @@ fun! s:NetrwBookmarkMenu() " show directory browsing history if g:netrw_dirhistmax > 0 - let cnt = g:netrw_dirhist_cnt + let cnt = g:netrw_dirhistcnt let first = 1 let histcnt = 0 - while ( first || cnt != g:netrw_dirhist_cnt ) + while ( first || cnt != g:netrw_dirhistcnt ) let histcnt = histcnt + 1 - let priority = g:netrw_dirhist_cnt + histcnt + let priority = g:netrw_dirhistcnt + histcnt if exists("g:netrw_dirhist_{cnt}") let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape) " call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir,'~'.expand("")) @@ -4506,7 +4733,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, let @@= ykeep " call Decho("b:netrw_curdir doesn't exist!",'~'.expand("")) " call Decho("getcwd<".getcwd().">",'~'.expand("")) -" call Dredir("ls!") +" call Dredir("ls!","s:NetrwBrowseChgDir") " call Dret("s:NetrwBrowseChgDir") return endif @@ -4514,9 +4741,9 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " NetrwBrowseChgDir: save options and initialize {{{3 " call Decho("saving options",'~'.expand("")) - call s:SavePosn(s:netrw_nbcd) - NetrwKeepj call s:NetrwOptionSave("s:") - NetrwKeepj call s:NetrwSafeOptions() + call s:SavePosn(s:netrw_posn) + NetrwKeepj call s:NetrwOptionsSave("s:") + NetrwKeepj call s:NetrwOptionsSafe(a:islocal) if (has("win32") || has("win95") || has("win64") || has("win16")) let dirname = substitute(b:netrw_curdir,'\\','/','ge') else @@ -4526,9 +4753,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, let dolockout = 0 let dorestore = 1 " call Decho("dirname<".dirname.">",'~'.expand("")) +" call Decho("newdir<".newdir.">",'~'.expand("")) " ignore s when done in the banner -" call Decho('ignore [return]s when done in banner (g:netrw_banner='.g:netrw_banner.")",'~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir) ignore [return]s when done in banner (g:netrw_banner='.g:netrw_banner.")",'~'.expand("")) if g:netrw_banner " call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("")) if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt @@ -4539,13 +4767,12 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, setl ma noro nowrap NetrwKeepj call setline(line('.'),'" Quick Help: :help '.s:QuickHelp[g:netrw_quickhelp]) setl noma nomod nowrap - call s:RestorePosn(s:netrw_nbcd) - NetrwKeepj call s:NetrwOptionRestore("s:") + NetrwKeepj call s:NetrwOptionsRestore("s:") " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) endif endif " else " Decho -" call Decho("(s:NetrwBrowseChgdir) g:netrw_banner=".g:netrw_banner." (no banner)",'~'.expand("")) +" call Decho("g:netrw_banner=".g:netrw_banner." (no banner)",'~'.expand("")) endif " set up o/s-dependent directory recognition pattern @@ -4568,7 +4795,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " ------------------------------ " NetrwBrowseChgDir: edit a file {{{3 " ------------------------------ -" call Decho('edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir) edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("")) " save position for benefit of Rexplore let s:rexposn_{bufnr("%")}= winsaveview() @@ -4580,6 +4807,9 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">",'~'.expand("")) " call Decho("edit-a-file: newdir<".newdir.">",'~'.expand("")) let dirname= s:NetrwTreeDir(a:islocal) + "COMBAK : not working for a symlink -- but what about a regular file? a directory? +" call Decho("COMBAK : not working for a symlink -- but what about a regular file? a directory?") + " Feb 17, 2019: following if-else-endif restored -- wasn't editing a file in tree mode if dirname =~ '/$' let dirname= dirname.newdir else @@ -4597,7 +4827,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " this lets netrw#BrowseX avoid the edit if a:0 < 1 " call Decho("edit-a-file: (a:0=".a:0."<1) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"),'~'.expand("")) - NetrwKeepj call s:NetrwOptionRestore("s:") + NetrwKeepj call s:NetrwOptionsRestore("s:") let curdir= b:netrw_curdir if !exists("s:didsplit") " call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr(),'~'.expand("")) @@ -4712,14 +4942,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " call Decho('goto-newdir: case "just go to new directory spec": newdir<'.newdir.'>','~'.expand("")) let dirname = newdir NetrwKeepj call s:SetRexDir(a:islocal,dirname) - NetrwKeepj call s:NetrwOptionRestore("s:") + NetrwKeepj call s:NetrwOptionsRestore("s:") norm! m` elseif newdir == './' " --------------------------------------------- " NetrwBrowseChgDir: refresh the directory list {{{3 " --------------------------------------------- -" call Decho('refresh-dirlist: case "refresh directory listing": newdir == "./"','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)refresh-dirlist: case "refresh directory listing": newdir == "./"','~'.expand("")) NetrwKeepj call s:SetRexDir(a:islocal,dirname) norm! m` @@ -4727,7 +4957,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " -------------------------------------- " NetrwBrowseChgDir: go up one directory {{{3 " -------------------------------------- -" call Decho('go-up: case "go up one directory": newdir == "../"','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)go-up: case "go up one directory": newdir == "../"','~'.expand("")) if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " force a refresh @@ -4765,7 +4995,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, else " unix or cygwin -" call Decho('go-up: case "go up one directory": newdir == "../" and unix or cygwin','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)go-up: case "go up one directory": newdir == "../" and unix or cygwin','~'.expand("")) if a:islocal let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') if dirname == "" @@ -4777,13 +5007,13 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " call Decho("go-up: unix: dirname<".dirname."> (go up one dir)",'~'.expand("")) endif NetrwKeepj call s:SetRexDir(a:islocal,dirname) - norm m` + norm! m` elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " -------------------------------------- " NetrwBrowseChgDir: Handle Tree Listing {{{3 " -------------------------------------- -" call Decho('tree-list: case liststyle is TREELIST and w:netrw_treedict exists','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: case liststyle is TREELIST and w:netrw_treedict exists','~'.expand("")) " force a refresh (for TREELIST, NetrwTreeDir() will force the refresh) " call Decho("tree-list: setl noro ma",'~'.expand("")) setl noro ma @@ -4800,10 +5030,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " search treedict for tree dir as-is " call Decho("tree-list: search treedict for tree dir as-is",'~'.expand("")) if has_key(w:netrw_treedict,treedir) -" call Decho('tree-list: ....searched for treedir<'.treedir.'> : found it!','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : found it!','~'.expand("")) let haskey= 1 else -" call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("")) endif " search treedict for treedir with a [/@] appended @@ -4811,10 +5041,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, if !haskey && treedir !~ '[/@]$' if has_key(w:netrw_treedict,treedir."/") let treedir= treedir."/" -" call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("")) let haskey = 1 else -" call Decho('tree-list: ....searched for treedir<'.treedir.'/> : not found','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'/> : not found','~'.expand("")) endif endif @@ -4823,10 +5053,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, if !haskey && treedir =~ '/$' let treedir= substitute(treedir,'/$','','') if has_key(w:netrw_treedict,treedir) -" call Decho('tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("")) let haskey = 1 else -" call Decho('tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("")) +" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("")) endif endif @@ -4855,7 +5085,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, let dirname = s:ComposePath(dirname,newdir) " call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">",'~'.expand("")) NetrwKeepj call s:SetRexDir(a:islocal,dirname) - norm m` + norm! m` endif " -------------------------------------- @@ -4865,11 +5095,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " dorestore is zero'd when a local file was hidden or bufhidden; " in such a case, we want to keep whatever settings it may have. " call Decho("doing option restore (dorestore=".dorestore.")",'~'.expand("")) - NetrwKeepj call s:NetrwOptionRestore("s:") + NetrwKeepj call s:NetrwOptionsRestore("s:") " else " Decho " call Decho("skipping option restore (dorestore==0): hidden=".&hidden." bufhidden=".&bufhidden." mod=".&mod,'~'.expand("")) endif - call s:RestorePosn(s:netrw_nbcd) if dolockout && dorestore " call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname),'~'.expand("")) if filewritable(dirname) @@ -4884,6 +5113,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir, " call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) endif endif + call s:RestorePosn(s:netrw_posn) let @@= ykeep " call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") @@ -4905,10 +5135,6 @@ fun! s:NetrwBrowseUpDir(islocal) return endif - if !exists("w:netrw_liststyle") || w:netrw_liststyle != s:TREELIST - call s:SavePosn(s:netrw_nbcd) - endif - norm! 0 if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") " call Decho("case: treestyle",'~'.expand("")) @@ -4916,28 +5142,40 @@ fun! s:NetrwBrowseUpDir(islocal) let swwline= winline() - 1 if exists("w:netrw_treetop") let b:netrw_curdir= w:netrw_treetop - endif - let curdir= b:netrw_curdir + elseif exists("b:netrw_curdir") + let w:netrw_treetop= b:netrw_curdir + else + let w:netrw_treetop= getcwd() + let b:netrw_curdir = w:netrw_treetop + endif + let curfile = getline(".") + let curpath = s:NetrwTreePath(w:netrw_treetop) if a:islocal call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../')) else call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../')) endif - if !search('\c^'.s:treedepthstring.curline,'cw') - if !search('\c^'.curline,'cw') - sil! NetrwKeepj 1 - endif - endif - exe "sil! NetrwKeepj norm! z\" - while winline() < swwline - let curwinline= winline() - exe "sil! NetrwKeepj norm! \" - if curwinline == winline() - break - endif - endwhile +" call Decho("looking for curfile<^".s:treedepthstring.curfile.">",'~'.expand("")) +" call Decho("having curpath<".curpath.">",'~'.expand("")) + if w:netrw_treetop == '/' + keepj call search('^\M'.curfile,"w") + elseif curfile == '../' + keepj call search('^\M'.curfile,"wb") + else +" call Decho("search(^\\M".s:treedepthstring.curfile.") backwards")) + while 1 + keepj call search('^\M'.s:treedepthstring.curfile,"wb") + let treepath= s:NetrwTreePath(w:netrw_treetop) +" call Decho("..current treepath<".treepath.">",'~'.expand("")) + if treepath == curpath + break + endif + endwhile + endif + else " call Decho("case: not treestyle",'~'.expand("")) + call s:SavePosn(s:netrw_posn) if exists("b:netrw_curdir") let curdir= b:netrw_curdir else @@ -4948,17 +5186,10 @@ fun! s:NetrwBrowseUpDir(islocal) else call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../')) endif - if has_key(s:netrw_nbcd,bufnr("%")) - call s:RestorePosn(s:netrw_nbcd) - elseif exists("w:netrw_bannercnt") -" call Decho("moving to line#".w:netrw_bannercnt,'~'.expand("")) - exe w:netrw_bannercnt - else - 1 - endif - endif - let curdir= substitute(curdir,'^.*[\/]','','') - call search('\<'.curdir.'\>','wc') + call s:RestorePosn(s:netrw_posn) + let curdir= substitute(curdir,'^.*[\/]','','') + call search('\<'.curdir.'/','wc') + endif " call Dret("s:NetrwBrowseUpDir") endfun @@ -4969,12 +5200,11 @@ endfun fun! netrw#BrowseX(fname,remote) " call Dfunc("netrw#BrowseX(fname<".a:fname."> remote=".a:remote.")") - " if its really just a directory, then do a "gf" instead - if (a:remote == 0 && isdirectory(a:fname)) || (a:remote == 1 && fname =~ '/$' && fname !~ '^https\=:') + " if its really just a local directory, then do a "gf" instead + if (a:remote == 0 && isdirectory(a:fname)) || (a:remote == 1 && a:fname =~ '/$' && a:fname !~ '^https\=:') norm! gf -" call Dret("netrw#BrowseX : did gf instead") - endif - +" call Dret("(netrw#BrowseX) did gf instead") + endif let ykeep = @@ let screenposn = winsaveview() @@ -5000,7 +5230,7 @@ fun! netrw#BrowseX(fname,remote) endif endfor endif -" call Decho("restoring posn to screenposn<".string(screenposn).">,'~'.expand(""))" +" call Decho("restoring posn: screenposn<".string(screenposn).">,'~'.expand(""))" call winrestview(screenposn) let @@= ykeep let &aw= awkeep @@ -5015,6 +5245,9 @@ fun! netrw#BrowseX(fname,remote) if has("win32") || has("win95") || has("win64") || has("win16") let exten= substitute(exten,'^.*$','\L&\E','') endif + if exten =~ "[\\/]" + let exten= "" + endif " call Decho("exten<".exten.">",'~'.expand("")) if a:remote == 1 @@ -5027,11 +5260,17 @@ fun! netrw#BrowseX(fname,remote) let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','') " call Decho("basename<".basename.">",'~'.expand("")) " call Decho("newname <".newname.">",'~'.expand("")) - if rename(s:netrw_tmpfile,newname) == 0 - " renaming succeeded - let fname= newname - else - " renaming failed + if s:netrw_tmpfile != newname && newname != "" + if rename(s:netrw_tmpfile,newname) == 0 + " renaming succeeded +" call Decho("renaming succeeded (tmpfile<".s:netrw_tmpfile."> to <".newname.">)") + let fname= newname + else + " renaming failed +" call Decho("renaming failed (tmpfile<".s:netrw_tmpfile."> to <".newname.">)") + let fname= s:netrw_tmpfile + endif + else let fname= s:netrw_tmpfile endif else @@ -5098,7 +5337,7 @@ fun! netrw#BrowseX(fname,remote) let ret= v:shell_error elseif has("win32") || has("win64") -" call Decho("windows",'~'.expand("")) +" call Decho("win".(has("win32")? "32" : "64")",'~'.expand("")) if executable("start") call s:NetrwExe('sil! !start rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(fname,1)) elseif executable("rundll32") @@ -5106,7 +5345,7 @@ fun! netrw#BrowseX(fname,remote) else call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) endif - call inputsave()|call input("Press to continue")|call inputrestore() + " call inputsave()|call input("Press to continue")|call inputrestore() let ret= v:shell_error elseif has("win32unix") @@ -5121,7 +5360,7 @@ fun! netrw#BrowseX(fname,remote) else call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74) endif - call inputsave()|call input("Press to continue")|call inputrestore() + " call inputsave()|call input("Press to continue")|call inputrestore() let ret= v:shell_error elseif has("unix") && executable("kfmclient") && s:CheckIfKde() @@ -5134,6 +5373,11 @@ fun! netrw#BrowseX(fname,remote) call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir) let ret= v:shell_error + elseif has("unix") && $DESKTOP_SESSION == "mate" && executable("atril") +" call Decho("unix and atril",'~'.expand("")) + call s:NetrwExe("sil !atril ".s:ShellEscape(fname,1).redir) + let ret= v:shell_error + elseif has("unix") && executable("xdg-open") " call Decho("unix and xdg-open",'~'.expand("")) call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir) @@ -5184,22 +5428,76 @@ fun! netrw#BrowseX(fname,remote) endfun " --------------------------------------------------------------------- +" netrw#GX: gets word under cursor for gx support {{{2 +" See also: netrw#BrowseXVis +" netrw#BrowseX +fun! netrw#GX() +" call Dfunc("netrw#GX()") + if &ft == "netrw" + let fname= s:NetrwGetWord() + else + let fname= expand((exists("g:netrw_gx")? g:netrw_gx : '')) + endif +" call Dret("netrw#GX <".fname.">") + return fname +endfun + +" --------------------------------------------------------------------- " netrw#BrowseXVis: used by gx in visual mode to select a file for browsing {{{2 fun! netrw#BrowseXVis() " call Dfunc("netrw#BrowseXVis()") let atkeep = @@ norm! gvy " call Decho("@@<".@@.">",'~'.expand("")) - call netrw#BrowseX(@@,netrw#CheckIfRemote()) + call netrw#BrowseX(@@,netrw#CheckIfRemote(@@)) let @@ = atkeep " call Dret("netrw#BrowseXVis") endfun " --------------------------------------------------------------------- +" s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2 +" Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer +" to become an unlisted buffer, so in that case don't bwipe it. +fun! s:NetrwBufRename(newname) +" call Dfunc("s:NetrwBufRename(newname<".a:newname.">) buf(%)#".bufnr("%")."<".bufname(bufnr("%")).">") +" call Dredir("ls!","s:NetrwBufRename (before rename)") + let oldbufname= bufname(bufnr("%")) +" call Decho("buf#".bufnr("%").": oldbufname<".oldbufname.">",'~'.expand("")) + + if oldbufname != a:newname +" call Decho("do buffer rename: oldbufname<".oldbufname."> ≠ a:newname<".a:newname.">",'~'.expand("")) + let b:junk= 1 +" call Decho("rename buffer: sil! keepj keepalt file ".fnameescape(a:newname),'~'.expand("")) + exe 'sil! keepj keepalt file '.fnameescape(a:newname) +" call Dredir("ls!","s:NetrwBufRename (before bwipe)") + let oldbufnr= bufnr(oldbufname) +" call Decho("oldbufname<".oldbufname."> oldbufnr#".oldbufnr,'~'.expand("")) +" call Decho("bufnr(%)=".bufnr("%"),'~'.expand("")) + if oldbufname != "" && oldbufnr != -1 && oldbufnr != bufnr("%") +" call Decho("bwipe ".oldbufnr,'~'.expand("")) + exe "bwipe! ".oldbufnr +" else " Decho +" call Decho("did *not* bwipe buf#".oldbufnr,'~'.expand("")) + endif +" call Dredir("ls!","s:NetrwBufRename (after rename)") +" else " Decho +" call Decho("oldbufname<".oldbufname."> == a:newname: did *not* rename",'~'.expand("")) + endif + +" call Dret("s:NetrwBufRename : buf#".bufnr("%").": oldname<".oldbufname."> newname<".a:newname."> expand(%)<".expand("%").">") +endfun + +" --------------------------------------------------------------------- " netrw#CheckIfRemote: returns 1 if current file looks like an url, 0 else {{{2 -fun! netrw#CheckIfRemote() -" call Dfunc("netrw#CheckIfRemote()") - if expand("%") =~ '^\a\{3,}://' +fun! netrw#CheckIfRemote(...) +" call Dfunc("netrw#CheckIfRemote() a:0=".a:0) + if a:0 > 0 + let curfile= a:1 + else + let curfile= expand("%") + endif +" call Decho("curfile<".curfile.">") + if curfile =~ '^\a\{3,}://' " call Dret("netrw#CheckIfRemote 1") return 1 else @@ -5465,17 +5763,23 @@ fun! s:NetrwHidden(islocal) " call Dfunc("s:NetrwHidden()") let ykeep= @@ " save current position - let svpos= winsaveview() + let svpos = winsaveview() " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+' - " remove pattern from hiding list + " remove .file pattern from hiding list +" call Decho("remove .file pattern from hiding list",'~'.expand("")) let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','') elseif s:Strlen(g:netrw_list_hide) >= 1 +" call Decho("add .file pattern from hiding list",'~'.expand("")) let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+' else +" call Decho("set .file pattern as hiding list",'~'.expand("")) let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' endif + if g:netrw_list_hide =~ '^,' + let g:netrw_list_hide= strpart(g:netrw_list_hide,1) + endif " refresh screen and return to saved position NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) @@ -5489,7 +5793,7 @@ endfun " s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2 fun! s:NetrwHome() if exists("g:netrw_home") - let home= g:netrw_home + let home= expand(g:netrw_home) else " go to vim plugin home for home in split(&rtp,',') + [''] @@ -5510,9 +5814,12 @@ fun! s:NetrwHome() endif " insure that the home directory exists if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home)) +" call Decho("insure that the home<".home."> directory exists") if exists("g:netrw_mkdir") +" call Decho("call system(".g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)).")") call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home))) else +" call Decho("mkdir(".home.")") call mkdir(home) endif endif @@ -5526,6 +5833,9 @@ fun! s:NetrwLeftmouse(islocal) if exists("s:netrwdrag") return endif + if &ft != "netrw" + return + endif " call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")") let ykeep= @@ @@ -5573,6 +5883,9 @@ endfun " --------------------------------------------------------------------- " s:NetrwCLeftmouse: used to select a file/directory for a target {{{2 fun! s:NetrwCLeftmouse(islocal) + if &ft != "netrw" + return + endif " call Dfunc("s:NetrwCLeftmouse(islocal=".a:islocal.")") call s:NetrwMarkFileTgt(a:islocal) " call Dret("s:NetrwCLeftmouse") @@ -5581,7 +5894,7 @@ endfun " --------------------------------------------------------------------- " s:NetrwServerEdit: edit file in a server gvim, usually NETRWSERVER (implements ){{{2 " a:islocal=0 : not used, remote -" a:islocal=1 : no used, local +" a:islocal=1 : not used, local " a:islocal=2 : used, remote " a:islocal=3 : used, local fun! s:NetrwServerEdit(islocal,fname) @@ -5706,6 +6019,9 @@ endfun " --------------------------------------------------------------------- " s:NetrwSLeftmouse: marks the file under the cursor. May be dragged to select additional files {{{2 fun! s:NetrwSLeftmouse(islocal) + if &ft != "netrw" + return + endif " call Dfunc("s:NetrwSLeftmouse(islocal=".a:islocal.")") let s:ngw= s:NetrwGetWord() @@ -5758,12 +6074,16 @@ endfun " separated patterns given in g:netrw_list_hide fun! s:NetrwListHide() " call Dfunc("s:NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") +" call Decho("initial: ".string(getline(w:netrw_bannercnt,'$'))) let ykeep= @@ +" call DechoBuf(bufnr("%"),"COMBAK#3") " find a character not in the "hide" string to use as a separator for :g and :v commands - " How-it-works: take the hiding command, convert it into a range. Duplicate - " characters don't matter. Remove all such characters from the '/~...90' - " string. Use the first character left as a separator character. + " How-it-works: take the hiding command, convert it into a range. + " Duplicate characters don't matter. + " Remove all such characters from the '/~@#...890' string. + " Use the first character left as a separator character. +" call Decho("find a character not in the hide string to use as a separator") let listhide= g:netrw_list_hide let sep = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) " call Decho("sep=".sep,'~'.expand("")) @@ -5776,24 +6096,31 @@ fun! s:NetrwListHide() let hide = listhide let listhide = "" endif +" call Decho("hide<".hide."> listhide<".listhide.'>','~'.expand("")) " Prune the list by hiding any files which match +" call Decho("prune the list by hiding any files which ",((g:netrw_hide == 1)? "" : "don't")." match hide<".hide.">") if g:netrw_hide == 1 -" call Decho("hiding<".hide."> listhide<".listhide.">",'~'.expand("")) +" call Decho("..hiding<".hide.">",'~'.expand("")) exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' elseif g:netrw_hide == 2 -" call Decho("showing<".hide."> listhide<".listhide.">",'~'.expand("")) +" call Decho("..showing<".hide.">",'~'.expand("")) exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' endif +" call Decho("..result: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) endwhile + if g:netrw_hide == 2 exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' +" call Decho("..v KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' +" call Decho("..g KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("")) endif " remove any blank lines that have somehow remained. " This seems to happen under Windows. exe 'sil! NetrwKeepj 1,$g@^\s*$@d' +" call DechoBuf(bufnr("%"),"COMBAK#4") let @@= ykeep " call Dret("s:NetrwListHide") @@ -5854,9 +6181,12 @@ fun! s:NetrwMakeDir(usrhost) endif else let netrw_origdir= s:NetrwGetcwd(1) - call s:NetrwLcd(b:netrw_curdir) + if s:NetrwLcd(b:netrw_curdir) +" call Dret("s:NetrwMakeDir : lcd failure") + return + endif " call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">",'~'.expand("")) - call s:NetrwExe("sil! !".g:netrw_localmkdir.' '.s:ShellEscape(newdirname,1)) + call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(newdirname,1)) if v:shell_error != 0 let @@= ykeep call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) @@ -5865,7 +6195,10 @@ fun! s:NetrwMakeDir(usrhost) endif if !g:netrw_keepdir " call Decho("restoring netrw_origdir since g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("")) - call s:NetrwLcd(netrw_origdir) + if s:NetrwLcd(netrw_origdir) +" call Dret("s:NetrwBrowse : lcd failure") + return + endif endif endif @@ -5977,6 +6310,7 @@ endfun fun! s:NetrwMaps(islocal) " call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + " mouse maps: {{{3 if g:netrw_mousemaps && g:netrw_retmap " call Decho("set up Rexplore 2-leftmouse",'~'.expand("")) if !hasmapto("NetrwReturn") @@ -5992,22 +6326,87 @@ fun! s:NetrwMaps(islocal) " call Decho("made NetrwReturn map",'~'.expand("")) endif + " generate default maps {{{3 + if !hasmapto('NetrwHide') |nmap a NetrwHide_a|endif + if !hasmapto('NetrwBrowseUpDir') |nmap - NetrwBrowseUpDir |endif + if !hasmapto('NetrwOpenFile') |nmap % NetrwOpenFile|endif + if !hasmapto('NetrwBadd_cb') |nmap cb NetrwBadd_cb|endif + if !hasmapto('NetrwBadd_cB') |nmap cB NetrwBadd_cB|endif + if !hasmapto('NetrwLcd') |nmap cd NetrwLcd|endif + if !hasmapto('NetrwSetChgwin') |nmap C NetrwSetChgwin|endif + if !hasmapto('NetrwRefresh') |nmap NetrwRefresh|endif + if !hasmapto('NetrwLocalBrowseCheck') |nmap NetrwLocalBrowseCheck|endif + if !hasmapto('NetrwServerEdit') |nmap NetrwServerEdit|endif + if !hasmapto('NetrwMakeDir') |nmap d NetrwMakeDir|endif + if !hasmapto('NetrwBookHistHandler_gb')|nmap gb NetrwBookHistHandler_gb|endif +" --------------------------------------------------------------------- +" if !hasmapto('NetrwForceChgDir') |nmap gd NetrwForceChgDir|endif +" if !hasmapto('NetrwForceFile') |nmap gf NetrwForceFile|endif +" if !hasmapto('NetrwHidden') |nmap gh NetrwHidden|endif +" if !hasmapto('NetrwSetTreetop') |nmap gn NetrwSetTreetop|endif +" if !hasmapto('NetrwChgPerm') |nmap gp NetrwChgPerm|endif +" if !hasmapto('NetrwBannerCtrl') |nmap I NetrwBannerCtrl|endif +" if !hasmapto('NetrwListStyle') |nmap i NetrwListStyle|endif +" if !hasmapto('NetrwMarkMoveMF2Arglist')|nmap ma NetrwMarkMoveMF2Arglist|endif +" if !hasmapto('NetrwMarkMoveArglist2MF')|nmap mA NetrwMarkMoveArglist2MF|endif +" if !hasmapto('NetrwBookHistHandler_mA')|nmap mb NetrwBookHistHandler_mA|endif +" if !hasmapto('NetrwBookHistHandler_mB')|nmap mB NetrwBookHistHandler_mB|endif +" if !hasmapto('NetrwMarkFileCopy') |nmap mc NetrwMarkFileCopy|endif +" if !hasmapto('NetrwMarkFileDiff') |nmap md NetrwMarkFileDiff|endif +" if !hasmapto('NetrwMarkFileEdit') |nmap me NetrwMarkFileEdit|endif +" if !hasmapto('NetrwMarkFile') |nmap mf NetrwMarkFile|endif +" if !hasmapto('NetrwUnmarkList') |nmap mF NetrwUnmarkList|endif +" if !hasmapto('NetrwMarkFileGrep') |nmap mg NetrwMarkFileGrep|endif +" if !hasmapto('NetrwMarkHideSfx') |nmap mh NetrwMarkHideSfx|endif +" if !hasmapto('NetrwMarkFileMove') |nmap mm NetrwMarkFileMove|endif +" if !hasmapto('NetrwMarkFilePrint') |nmap mp NetrwMarkFilePrint|endif +" if !hasmapto('NetrwMarkFileRegexp') |nmap mr NetrwMarkFileRegexp|endif +" if !hasmapto('NetrwMarkFileSource') |nmap ms NetrwMarkFileSource|endif +" if !hasmapto('NetrwMarkFileTag') |nmap mT NetrwMarkFileTag|endif +" if !hasmapto('NetrwMarkFileTgt') |nmap mt NetrwMarkFileTgt|endif +" if !hasmapto('NetrwUnMarkFile') |nmap mu NetrwUnMarkFile|endif +" if !hasmapto('NetrwMarkFileVimCmd') |nmap mv NetrwMarkFileVimCmd|endif +" if !hasmapto('NetrwMarkFileExe_mx') |nmap mx NetrwMarkFileExe_mx|endif +" if !hasmapto('NetrwMarkFileExe_mX') |nmap mX NetrwMarkFileExe_mX|endif +" if !hasmapto('NetrwMarkFileCompress') |nmap mz NetrwMarkFileCompress|endif +" if !hasmapto('NetrwObtain') |nmap O NetrwObtain|endif +" if !hasmapto('NetrwSplit_o') |nmap o NetrwSplit_o|endif +" if !hasmapto('NetrwPreview') |nmap p NetrwPreview|endif +" if !hasmapto('NetrwPrevWinOpen') |nmap P NetrwPrevWinOpen|endif +" if !hasmapto('NetrwBookHistHandler_qb')|nmap qb NetrwBookHistHandler_qb|endif +" if !hasmapto('NetrwFileInfo') |nmap qf NetrwFileInfo|endif +" if !hasmapto('NetrwMarkFileQFEL_qF') |nmap qF NetrwMarkFileQFEL_qF|endif +" if !hasmapto('NetrwMarkFileQFEL_qL') |nmap qL NetrwMarkFileQFEL_qL|endif +" if !hasmapto('NetrwSortStyle') |nmap s NetrwSortStyle|endif +" if !hasmapto('NetSortSequence') |nmap S NetSortSequence|endif +" if !hasmapto('NetrwSetTgt_Tb') |nmap Tb NetrwSetTgt_Tb|endif +" if !hasmapto('NetrwSetTgt_Th') |nmap Th NetrwSetTgt_Th|endif +" if !hasmapto('NetrwSplit_t') |nmap t NetrwSplit_t|endif +" if !hasmapto('NetrwBookHistHandler_u') |nmap u NetrwBookHistHandler_u|endif +" if !hasmapto('NetrwBookHistHandler_U') |nmap U NetrwBookHistHandler_U|endif +" if !hasmapto('NetrwSplit_v') |nmap v NetrwSplit_v|endif +" if !hasmapto('NetrwBrowseX') |nmap x NetrwBrowseX|endif +" if !hasmapto('NetrwLocalExecute') |nmap X NetrwLocalExecute|endif + if a:islocal " call Decho("make local maps",'~'.expand("")) - " local normal-mode maps - nnoremap a :call NetrwHide(1) - nnoremap - :call NetrwBrowseUpDir(1) - nnoremap % :call NetrwOpenFile(1) - nnoremap c :call NetrwLcd(b:netrw_curdir) - nnoremap C :call NetrwSetChgwin() - nnoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) - nnoremap :call NetrwServerEdit(3,NetrwGetWord()) - nnoremap d :call NetrwMakeDir("") - nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + " local normal-mode maps {{{3 + nnoremap NetrwHide_a :call NetrwHide(1) + nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(1) + nnoremap NetrwOpenFile :call NetrwOpenFile(1) + nnoremap NetrwBadd_cb :call NetrwBadd(1,0) + nnoremap NetrwBadd_cB :call NetrwBadd(1,1) + nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) + nnoremap NetrwSetChgwin :call NetrwSetChgwin() + nnoremap NetrwLocalBrowseCheck :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) + nnoremap NetrwServerEdit :call NetrwServerEdit(3,NetrwGetWord()) + nnoremap NetrwMakeDir :call NetrwMakeDir("") + nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) +" --------------------------------------------------------------------- nnoremap gd :call NetrwForceChgDir(1,NetrwGetWord()) nnoremap gf :call NetrwForceFile(1,NetrwGetWord()) nnoremap gh :call NetrwHidden(1) - nnoremap gn :call netrw#SetTreetop(NetrwGetWord()) + nnoremap gn :call netrw#SetTreetop(0,NetrwGetWord()) nnoremap gp :call NetrwChgPerm(1,b:netrw_curdir) nnoremap I :call NetrwBannerCtrl(1) nnoremap i :call NetrwListStyle(1) @@ -6041,7 +6440,6 @@ fun! s:NetrwMaps(islocal) nnoremap qf :call NetrwFileInfo(1,NetrwGetWord()) nnoremap qF :call NetrwMarkFileQFEL(1,getqflist()) nnoremap qL :call NetrwMarkFileQFEL(1,getloclist(v:count)) - 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) nnoremap S :call NetSortSequence(1) nnoremap Tb :call NetrwSetTgt(1,'b',v:count1) @@ -6052,104 +6450,44 @@ fun! s:NetrwMaps(islocal) nnoremap v :call NetrwSplit(5) nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" nnoremap X :call NetrwLocalExecute(expand(""))" -" " local insert-mode maps -" inoremap a :call NetrwHide(1) -" inoremap c :exe "NetrwKeepj lcd ".fnameescape(b:netrw_curdir) -" inoremap c :call NetrwLcd(b:netrw_curdir) -" inoremap C :call NetrwSetChgwin() -" inoremap % :call NetrwOpenFile(1) -" inoremap - :call NetrwBrowseUpDir(1) -" inoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) -" inoremap d :call NetrwMakeDir("") -" inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) -" inoremap gh :call NetrwHidden(1) -" nnoremap gn :call netrw#SetTreetop(NetrwGetWord()) -" inoremap gp :call NetrwChgPerm(1,b:netrw_curdir) -" inoremap I :call NetrwBannerCtrl(1) -" inoremap i :call NetrwListStyle(1) -" inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) -" inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) -" inoremap mc :call NetrwMarkFileCopy(1) -" inoremap md :call NetrwMarkFileDiff(1) -" inoremap me :call NetrwMarkFileEdit(1) -" inoremap mf :call NetrwMarkFile(1,NetrwGetWord()) -" inoremap mg :call NetrwMarkFileGrep(1) -" inoremap mh :call NetrwMarkHideSfx(1) -" inoremap mm :call NetrwMarkFileMove(1) -" inoremap mp :call NetrwMarkFilePrint(1) -" inoremap mr :call NetrwMarkFileRegexp(1) -" inoremap ms :call NetrwMarkFileSource(1) -" inoremap mT :call NetrwMarkFileTag(1) -" inoremap mt :call NetrwMarkFileTgt(1) -" inoremap mu :call NetrwUnMarkFile(1) -" inoremap mv :call NetrwMarkFileVimCmd(1) -" inoremap mx :call NetrwMarkFileExe(1,0) -" inoremap mX :call NetrwMarkFileExe(1,1) -" inoremap mz :call NetrwMarkFileCompress(1) -" inoremap O :call NetrwObtain(1) -" inoremap o :call NetrwSplit(3) -" inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) -" inoremap P :call NetrwPrevWinOpen(1) -" inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) -" inoremap qf :call NetrwFileInfo(1,NetrwGetWord()) -" inoremap qF :call NetrwMarkFileQFEL(1,getqflist()) -" inoremap qL :call NetrwMarkFileQFEL(1,getloclist(v:count)) -" inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) -" inoremap s :call NetrwSortStyle(1) -" inoremap S :call NetSortSequence(1) -" inoremap t :call NetrwSplit(4) -" inoremap Tb :call NetrwSetTgt(1,'b',v:count1) -" inoremap Th :call NetrwSetTgt(1,'h',v:count) -" inoremap u :call NetrwBookHistHandler(4,expand("%")) -" inoremap U :call NetrwBookHistHandler(5,expand("%")) -" inoremap v :call NetrwSplit(5) -" inoremap x :call netrw#BrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" + + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwRefresh(1,NetrwBrowseChgDir(1,'./')) if !hasmapto('NetrwHideEdit') nmap NetrwHideEdit -" imap NetrwHideEdit endif nnoremap NetrwHideEdit :call NetrwHideEdit(1) if !hasmapto('NetrwRefresh') nmap NetrwRefresh -" imap NetrwRefresh endif nnoremap NetrwRefresh :call NetrwRefresh(1,NetrwBrowseChgDir(1,(w:netrw_liststyle == 3)? w:netrw_treetop : './')) if s:didstarstar || !mapcheck("","n") nnoremap :Nexplore -" inoremap :Nexplore endif if s:didstarstar || !mapcheck("","n") nnoremap :Pexplore -" inoremap :Pexplore endif if !hasmapto('NetrwTreeSqueeze') nmap NetrwTreeSqueeze -" imap NetrwTreeSqueeze endif nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(1) let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) if g:netrw_mousemaps == 1 - nmap NetrwLeftmouse + nmap NetrwLeftmouse + nmap NetrwCLeftmouse + nmap NetrwMiddlemouse + nmap NetrwSLeftmouse + nmap NetrwSLeftdrag + nmap <2-leftmouse> Netrw2Leftmouse + imap ILeftmouse + imap IMiddlemouse nno NetrwLeftmouse :call NetrwLeftmouse(1) - nmap NetrwCLeftmouse nno NetrwCLeftmouse :call NetrwCLeftmouse(1) - nmap NetrwMiddlemouse nno NetrwMiddlemouse :call NetrwPrevWinOpen(1) - nmap NetrwSLeftmouse nno NetrwSLeftmouse :call NetrwSLeftmouse(1) - nmap NetrwSLeftdrag nno NetrwSLeftdrag :call NetrwSLeftdrag(1) - nmap <2-leftmouse> Netrw2Leftmouse nmap Netrw2Leftmouse - - imap ILeftmouse -" ino ILeftmouse :call NetrwLeftmouse(1) - imap IMiddlemouse -" ino IMiddlemouse :call NetrwPrevWinOpen(1) -" imap ISLeftmouse -" ino ISLeftmouse :call NetrwMarkFile(1,NetrwGetWord()) exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' -" exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' endif exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' @@ -6158,27 +6496,27 @@ fun! s:NetrwMaps(islocal) exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' -" exe 'inoremap :call NetrwLocalRm("'.mapsafecurdir.'")' -" exe 'inoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' -" exe 'inoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' -" exe 'inoremap d :call NetrwMakeDir("")' nnoremap :he netrw-quickhelp " support user-specified maps call netrw#UserMaps(1) - else " remote + else + " remote normal-mode maps {{{3 " call Decho("make remote maps",'~'.expand("")) call s:RemotePathAnalysis(b:netrw_curdir) - " remote normal-mode maps - nnoremap a :call NetrwHide(0) - nnoremap - :call NetrwBrowseUpDir(0) - nnoremap % :call NetrwOpenFile(0) - nnoremap C :call NetrwSetChgwin() - nnoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) - nnoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) - nnoremap :call NetrwServerEdit(2,NetrwGetWord()) - nnoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) + nnoremap NetrwHide_a :call NetrwHide(0) + nnoremap NetrwBrowseUpDir :call NetrwBrowseUpDir(0) + nnoremap NetrwOpenFile :call NetrwOpenFile(0) + nnoremap NetrwBadd_cb :call NetrwBadd(0,0) + nnoremap NetrwBadd_cB :call NetrwBadd(0,1) + nnoremap NetrwLcd :call NetrwLcd(b:netrw_curdir) + nnoremap NetrwSetChgwin :call NetrwSetChgwin() + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) + nnoremap NetrwLocalBrowseCheck :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) + nnoremap NetrwServerEdit :call NetrwServerEdit(2,NetrwGetWord()) + nnoremap NetrwBookHistHandler_gb :call NetrwBookHistHandler(1,b:netrw_curdir) +" --------------------------------------------------------------------- nnoremap gd :call NetrwForceChgDir(0,NetrwGetWord()) nnoremap gf :call NetrwForceFile(0,NetrwGetWord()) nnoremap gh :call NetrwHidden(0) @@ -6225,69 +6563,15 @@ fun! s:NetrwMaps(islocal) nnoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) nnoremap v :call NetrwSplit(2) nnoremap x :call netrw#BrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) -" " remote insert-mode maps -" inoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) -" inoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) -" inoremap :call TreeSqueezeDir(0) -" inoremap - :call NetrwBrowseUpDir(0) -" inoremap a :call NetrwHide(0) -" inoremap mb :call NetrwBookHistHandler(0,b:netrw_curdir) -" inoremap mc :call NetrwMarkFileCopy(0) -" inoremap md :call NetrwMarkFileDiff(0) -" inoremap me :call NetrwMarkFileEdit(0) -" inoremap mf :call NetrwMarkFile(0,NetrwGetWord()) -" inoremap mg :call NetrwMarkFileGrep(0) -" inoremap mh :call NetrwMarkHideSfx(0) -" inoremap mm :call NetrwMarkFileMove(0) -" inoremap mp :call NetrwMarkFilePrint(0) -" inoremap mr :call NetrwMarkFileRegexp(0) -" inoremap ms :call NetrwMarkFileSource(0) -" inoremap mt :call NetrwMarkFileTgt(0) -" inoremap mT :call NetrwMarkFileTag(0) -" inoremap mu :call NetrwUnMarkFile(0) -" nnoremap mv :call NetrwMarkFileVimCmd(1) -" inoremap mx :call NetrwMarkFileExe(0,0) -" inoremap mX :call NetrwMarkFileExe(0,1) -" inoremap mv :call NetrwMarkFileVimCmd(0) -" inoremap mz :call NetrwMarkFileCompress(0) -" inoremap gb :call NetrwBookHistHandler(1,b:netrw_curdir) -" inoremap gh :call NetrwHidden(0) -" inoremap gp :call NetrwChgPerm(0,b:netrw_curdir) -" inoremap C :call NetrwSetChgwin() -" inoremap i :call NetrwListStyle(0) -" inoremap I :call NetrwBannerCtrl(1) -" inoremap o :call NetrwSplit(0) -" inoremap O :call NetrwObtain(0) -" inoremap p :call NetrwPreview(NetrwBrowseChgDir(1,NetrwGetWord(),1)) -" inoremap P :call NetrwPrevWinOpen(0) -" inoremap qb :call NetrwBookHistHandler(2,b:netrw_curdir) -" inoremap mB :call NetrwBookHistHandler(6,b:netrw_curdir) -" inoremap qf :call NetrwFileInfo(0,NetrwGetWord()) -" inoremap qF :call NetrwMarkFileQFEL(0,getqflist()) -" inoremap qL :call NetrwMarkFileQFEL(0,getloclist(v:count)) -" inoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'exe "norm! 0"call NetrwBrowse(0,NetrwBrowseChgDir(0,'./')) -" inoremap s :call NetrwSortStyle(0) -" inoremap S :call NetSortSequence(0) -" inoremap t :call NetrwSplit(1) -" inoremap Tb :call NetrwSetTgt('b',v:count1) -" inoremap Th :call NetrwSetTgt('h',v:count) -" inoremap u :call NetrwBookHistHandler(4,b:netrw_curdir) -" inoremap U :call NetrwBookHistHandler(5,b:netrw_curdir) -" inoremap v :call NetrwSplit(2) -" inoremap x :call netrw#BrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) -" inoremap % :call NetrwOpenFile(0) if !hasmapto('NetrwHideEdit') nmap NetrwHideEdit -" imap NetrwHideEdit endif nnoremap NetrwHideEdit :call NetrwHideEdit(0) if !hasmapto('NetrwRefresh') nmap NetrwRefresh -" imap NetrwRefresh endif if !hasmapto('NetrwTreeSqueeze') nmap NetrwTreeSqueeze -" imap NetrwTreeSqueeze endif nnoremap NetrwTreeSqueeze :call TreeSqueezeDir(0) @@ -6309,14 +6593,10 @@ fun! s:NetrwMaps(islocal) nmap <2-leftmouse> Netrw2Leftmouse nmap Netrw2Leftmouse - imap ILeftmouse -" ino ILeftmouse :call NetrwLeftmouse(0) imap IMiddlemouse -" ino IMiddlemouse :call NetrwPrevWinOpen(0) imap ISLeftmouse -" ino ISLeftmouse :call NetrwMarkFile(0,NetrwGetWord()) exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' -" exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' endif exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' @@ -6325,16 +6605,11 @@ fun! s:NetrwMaps(islocal) exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' -" exe 'inoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' -" exe 'inoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' -" exe 'inoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' -" exe 'inoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' nnoremap :he netrw-quickhelp -" inoremap :he netrw-quickhelp " support user-specified maps call netrw#UserMaps(0) - endif + endif " }}}3 " call Dret("s:NetrwMaps") endfun @@ -6531,14 +6806,16 @@ fun! s:NetrwMarkFile(islocal,fname) endif " set up 2match'ing to netrwmarkfilemtch_# list - if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != "" -" call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/",'~'.expand("")) - if exists("g:did_drchip_netrwlist_syntax") - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/" - endif - else -" call Decho("2match none",'~'.expand("")) - 2match none + if has("syntax") && exists("g:syntax_on") && g:syntax_on + if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != "" +" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/",'~'.expand("")) + if exists("g:did_drchip_netrwlist_syntax") + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/" + endif + else +" " call Decho("2match none",'~'.expand("")) + 2match none + endif endif let @@= ykeep " call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist").">") @@ -6624,18 +6901,15 @@ fun! s:NetrwMarkFileCompress(islocal) if g:netrw_keepdir let fname= s:ShellEscape(s:ComposePath(curdir,fname)) endif + call system(exe." ".fname) + if v:shell_error + NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) + endif else let fname= s:ShellEscape(b:netrw_curdir.fname,1) - endif - if executable(exe) - if a:islocal - call system(exe." ".fname) - else - NetrwKeepj call s:RemoteSystem(exe." ".fname) - endif - else - NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50) - endif + NetrwKeepj call s:RemoteSystem(exe." ".fname) + endif + endif unlet sfx @@ -6644,6 +6918,9 @@ fun! s:NetrwMarkFileCompress(islocal) elseif a:islocal " fname not a compressed file, so compress it call system(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,fname))) + if v:shell_error + call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_compress<".g:netrw_compress."> to something that works",104) + endif else " fname not a compressed file, so compress it NetrwKeepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(fname)) @@ -6695,7 +6972,7 @@ fun! s:NetrwMarkFileCopy(islocal,...) if a:islocal && s:netrwmftgt_islocal " Copy marked files, local directory to local directory " call Decho("copy from local to local",'~'.expand("")) - if !executable(g:netrw_localcopycmd) && g:netrw_localcopycmd !~ '^'.expand("$COMSPEC").'\s' + if !executable(g:netrw_localcopycmd) call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91) " call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!") return @@ -6777,10 +7054,10 @@ fun! s:NetrwMarkFileCopy(islocal,...) " call Decho("tgt <".tgt.">",'~'.expand("")) " call Decho("copycmd<".copycmd.">",'~'.expand("")) " call Decho("system(".copycmd." '".args."' '".tgt."')",'~'.expand("")) - call system(copycmd." '".args."' '".tgt."'") + call system(copycmd.g:netrw_localcopycmdopt." '".args."' '".tgt."'") if v:shell_error != 0 if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"copy failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-c)",101) + call netrw#ErrorMsg(s:ERROR,"copy failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",101) else call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localcopycmd<".g:netrw_localcopycmd.">; it doesn't work!",80) endif @@ -6809,7 +7086,7 @@ fun! s:NetrwMarkFileCopy(islocal,...) if exists("*mkdir") call mkdir(tmpdir) else - call s:NetrwExe("sil! !".g:netrw_localmkdir.' '.s:ShellEscape(tmpdir,1)) + call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(tmpdir,1)) if v:shell_error != 0 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80) " call Dret("s:NetrwMarkFileCopy : failed: sil! !".g:netrw_localmkdir.' '.s:ShellEscape(tmpdir,1) ) @@ -6817,7 +7094,10 @@ fun! s:NetrwMarkFileCopy(islocal,...) endif endif if isdirectory(s:NetrwFile(tmpdir)) - call s:NetrwLcd(tmpdir) + if s:NetrwLcd(tmpdir) +" call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') NetrwKeepj call s:NetrwUpload(localfiles,s:netrwmftgt) @@ -6825,9 +7105,12 @@ fun! s:NetrwMarkFileCopy(islocal,...) for fname in s:netrwmarkfilelist_{bufnr('%')} NetrwKeepj call s:NetrwDelete(fname) endfor - call s:NetrwLcd(curdir) - if v:version < 704 || !has("patch1109") - call s:NetrwExe("sil !".g:netrw_localrmdir." ".s:ShellEscape(tmpdir,1)) + if s:NetrwLcd(curdir) +" call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif + if v:version < 704 || (v:version == 704 && !has("patch1107")) + call s:NetrwExe("sil !".g:netrw_localrmdir.g:netrw_localrmdiropt." ".s:ShellEscape(tmpdir,1)) if v:shell_error != 0 call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",80) " " call Dret("s:NetrwMarkFileCopy : failed: sil !".g:netrw_localrmdir." ".s:ShellEscape(tmpdir,1) ) @@ -6839,7 +7122,10 @@ fun! s:NetrwMarkFileCopy(islocal,...) endif endif else - call s:NetrwLcd(curdir) + if s:NetrwLcd(curdir) +" call Dret("s:NetrwMarkFileCopy : lcd failure") + return + endif endif endif endif @@ -7366,15 +7652,15 @@ fun! s:NetrwMarkFileMove(islocal) " move: local -> local " call Decho("move from local to local",'~'.expand("")) " call Decho("local to local move",'~'.expand("")) - if !executable(g:netrw_localmovecmd) && g:netrw_localmovecmd !~ '^'.expand("$COMSPEC").'\s' + if !executable(g:netrw_localmovecmd) call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90) " call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!") return endif - let tgt = s:ShellEscape(s:netrwmftgt) + let tgt = s:ShellEscape(s:netrwmftgt) " call Decho("tgt<".tgt.">",'~'.expand("")) if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) - let tgt = substitute(tgt, '/','\\','g') + let tgt= substitute(tgt, '/','\\','g') " call Decho("windows exception: tgt<".tgt.">",'~'.expand("")) if g:netrw_localmovecmd =~ '\s' let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') @@ -7394,10 +7680,10 @@ fun! s:NetrwMarkFileMove(islocal) let fname= substitute(fname,'/','\\','g') endif " call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("")) - let ret= system(movecmd." ".s:ShellEscape(fname)." ".tgt) + let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt) if v:shell_error != 0 if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"move failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-c)",100) + call netrw#ErrorMsg(s:ERROR,"move failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",100) else call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localmovecmd<".g:netrw_localmovecmd.">; it doesn't work!",54) endif @@ -7524,21 +7810,27 @@ fun! s:NetrwMarkFileRegexp(islocal) if a:islocal let curdir= s:NetrwGetCurdir(a:islocal) +" call Decho("curdir<".fnameescape(curdir).">") " get the matching list of files using local glob() " call Decho("handle local regexp",'~'.expand("")) let dirname = escape(b:netrw_curdir,g:netrw_glob_escape) if v:version > 704 || (v:version == 704 && has("patch656")) - let files = glob(s:ComposePath(dirname,regexp),0,0,1) + let filelist= glob(s:ComposePath(dirname,regexp),0,1,1) else let files = glob(s:ComposePath(dirname,regexp),0,0) - endif -" call Decho("files<".files.">",'~'.expand("")) - let filelist= split(files,"\n") + let filelist= split(files,"\n") + endif +" call Decho("files<".string(filelist).">",'~'.expand("")) " mark the list of files for fname in filelist -" call Decho("fname<".fname.">",'~'.expand("")) - NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','','')) + if fname =~ '^'.fnameescape(curdir) +" call Decho("fname<".substitute(fname,'^'.fnameescape(curdir).'/','','').">",'~'.expand("")) + NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^'.fnameescape(curdir).'/','','')) + else +" call Decho("fname<".fname.">",'~'.expand("")) + NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','','')) + endif endfor else @@ -7552,7 +7844,7 @@ fun! s:NetrwMarkFileRegexp(islocal) " call Decho("setl ei=all ma",'~'.expand("")) 1split NetrwKeepj call s:NetrwEnew() - NetrwKeepj call s:NetrwSafeOptions() + NetrwKeepj call s:NetrwOptionsSafe(a:islocal) sil NetrwKeepj norm! "ap NetrwKeepj 2 let bannercnt= search('^" =====','W') @@ -7649,12 +7941,13 @@ fun! s:NetrwMarkFileTag(islocal) call s:NetrwUnmarkAll() if a:islocal - if executable(g:netrw_ctags) -" call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")",'~'.expand("")) - call system(g:netrw_ctags." ".netrwmarkfilelist) - else + +" call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")",'~'.expand("")) + call system(g:netrw_ctags." ".netrwmarkfilelist) + if v:shell_error call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51) endif + else let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) call netrw#Obtain(a:islocal,"tags") @@ -8109,7 +8402,7 @@ fun! s:NetrwObtain(islocal) call netrw#Obtain(islocal,s:netrwmarkfilelist_{bufnr('%')}) call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir) else - call netrw#Obtain(a:islocal,expand("")) + call netrw#Obtain(a:islocal,s:NetrwGetWord()) endif let @@= ykeep @@ -8144,14 +8437,16 @@ fun! s:NetrwPrevWinOpen(islocal) if lastwinnr == 1 " if only one window, open a new one first " call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")",'~'.expand("")) + " g:netrw_preview=0: preview window shown in a horizontally split window + " g:netrw_preview=1: preview window shown in a vertically split window if g:netrw_preview " vertically split preview window - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s",'~'.expand("")) exe (g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s" else " horizontally split preview window - let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize + let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize " call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s",'~'.expand("")) exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s" endif @@ -8189,7 +8484,7 @@ fun! s:NetrwPrevWinOpen(islocal) " only one copy of the modified buffer in a window, and " hidden not set, so overwriting will lose the modified file. Ask first... let choice = confirm("Save modified buffer<".prevbufname."> first?","&Yes\n&No\n&Cancel") -" call Decho("(NetrwPrevWinOpen) prevbufname<".prevbufname."> choice=".choice." current-winnr#".winnr(),'~'.expand("")) +" call Decho("prevbufname<".prevbufname."> choice=".choice." current-winnr#".winnr(),'~'.expand("")) let &ei= eikeep if choice == 1 @@ -8283,7 +8578,10 @@ fun! s:NetrwUpload(fname,tgt,...) " call Decho("handle uploading a list of files via scp",'~'.expand("")) let curdir= getcwd() if a:tgt =~ '^scp:' - call s:NetrwLcd(fromdir) + if s:NetrwLcd(fromdir) +" call Dret("s:NetrwUpload : lcd failure") + return + endif let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) let args = join(map(filelist,"s:ShellEscape(v:val, 1)")) if exists("g:netrw_port") && g:netrw_port != "" @@ -8294,7 +8592,10 @@ fun! s:NetrwUpload(fname,tgt,...) let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".args." ".s:ShellEscape(machine.":".tgt,1)) - call s:NetrwLcd(curdir) + if s:NetrwLcd(curdir) +" call Dret("s:NetrwUpload : lcd failure") + return + endif elseif a:tgt =~ '^ftp:' call s:NetrwMethod(a:tgt) @@ -8408,7 +8709,7 @@ fun! s:NetrwUpload(fname,tgt,...) bw!|q endif elseif !exists("b:netrw_method") || b:netrw_method < 0 -" call Dfunc("netrw#NetrwUpload : unsupported method") +" call Dret("s:#NetrwUpload : unsupported method") return endif else @@ -8420,20 +8721,49 @@ fun! s:NetrwUpload(fname,tgt,...) endfun " --------------------------------------------------------------------- -" s:NetrwPreview: {{{2 +" s:NetrwPreview: supports netrw's "p" map {{{2 fun! s:NetrwPreview(path) range " call Dfunc("NetrwPreview(path<".a:path.">)") +" call Decho("g:netrw_alto =".(exists("g:netrw_alto")? g:netrw_alto : 'n/a'),'~'.expand("")) +" call Decho("g:netrw_preview=".(exists("g:netrw_preview")? g:netrw_preview : 'n/a'),'~'.expand("")) let ykeep= @@ - NetrwKeepj call s:NetrwOptionSave("s:") - NetrwKeepj call s:NetrwSafeOptions() + NetrwKeepj call s:NetrwOptionsSave("s:") + if a:path !~ '^\*\{1,2}/' && a:path !~ '^\a\{3,}://' + NetrwKeepj call s:NetrwOptionsSafe(1) + else + NetrwKeepj call s:NetrwOptionsSafe(0) + endif if has("quickfix") +" call Decho("has quickfix",'~'.expand("")) if !isdirectory(s:NetrwFile(a:path)) - if g:netrw_preview && !g:netrw_alto +" call Decho("good; not previewing a directory",'~'.expand("")) + if g:netrw_preview + " vertical split let pvhkeep = &pvh let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize let &pvh = winwidth(0) - winsz - endif +" call Decho("g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) + else + " horizontal split + let pvhkeep = &pvh + let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize + let &pvh = winheight(0) - winsz +" call Decho("!g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("")) + endif + " g:netrw_preview g:netrw_alto + " 1 : vert 1: top -- preview window is vertically split off and on the left + " 1 : vert 0: bot -- preview window is vertically split off and on the right + " 0 : 1: top -- preview window is horizontally split off and on the top + " 0 : 0: bot -- preview window is horizontally split off and on the bottom + " + " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowse() check via + " the BufEnter event set up in netrwPlugin.vim +" call Decho("exe ".(g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path),'~'.expand("")) + let eikeep = &ei + set ei=BufEnter exe (g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path) + let &ei= eikeep +" call Decho("winnr($)=".winnr("$"),'~'.expand("")) if exists("pvhkeep") let &pvh= pvhkeep endif @@ -8443,7 +8773,7 @@ fun! s:NetrwPreview(path) range elseif !exists("g:netrw_quiet") NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) endif - NetrwKeepj call s:NetrwOptionRestore("s:") + NetrwKeepj call s:NetrwOptionsRestore("s:") let @@= ykeep " call Dret("NetrwPreview") endfun @@ -8451,12 +8781,22 @@ endfun " --------------------------------------------------------------------- " s:NetrwRefresh: {{{2 fun! s:NetrwRefresh(islocal,dirname) -" call Dfunc("s:NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction) +" call Dfunc("s:NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") g:netrw_hide=".g:netrw_hide." g:netrw_sort_direction=".g:netrw_sort_direction) " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first. setl ma noro " call Decho("setl ma noro",'~'.expand("")) " call Decho("clear buffer<".expand("%")."> with :%d",'~'.expand("")) let ykeep = @@ + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + if !exists("w:netrw_treetop") + if exists("b:netrw_curdir") + let w:netrw_treetop= b:netrw_curdir + else + let w:netrw_treetop= getcwd() + endif + endif + NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop) + endif " save the cursor position before refresh. let screenposn = winsaveview() @@ -8476,13 +8816,15 @@ fun! s:NetrwRefresh(islocal,dirname) NetrwKeepj call winrestview(screenposn) " restore file marks - if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" -" call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) - exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" - else -" call Decho("2match none (bufnr(%)=".bufnr("%")."<".bufname("%").">)",'~'.expand("")) - 2match none - endif + if has("syntax") && exists("g:syntax_on") && g:syntax_on + if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != "" +" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("")) + exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/" + else +" " call Decho("2match none (bufnr(%)=".bufnr("%")."<".bufname("%").">)",'~'.expand("")) + 2match none + endif + endif " restore let @@= ykeep @@ -8657,7 +8999,7 @@ fun! s:NetrwSetTgt(islocal,bookhist,choi endfun " ===================================================================== -" s:NetrwSortStyle: change sorting style (name - time - size) and refresh display {{{2 +" s:NetrwSortStyle: change sorting style (name - time - size - exten) and refresh display {{{2 fun! s:NetrwSortStyle(islocal) " call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">") NetrwKeepj call s:NetrwSaveWordPosn() @@ -8821,7 +9163,7 @@ fun! s:NetrwTgtMenu() " call Decho("installing history as easy targets (histmax=".g:netrw_dirhistmax.")",'~'.expand("")) let histcnt = 1 while histcnt <= g:netrw_dirhistmax - let priority = g:netrw_dirhist_cnt + histcnt + let priority = g:netrw_dirhistcnt + histcnt if exists("g:netrw_dirhist_{histcnt}") let histentry = g:netrw_dirhist_{histcnt} if has_key(tgtdict,histentry) @@ -8958,6 +9300,36 @@ fun! s:NetrwTreeDisplay(dir,depth) let depth= s:treedepthstring.a:depth " call Decho("display subtrees with depth<".depth."> and current leaves",'~'.expand("")) + " implement g:netrw_hide for tree listings (uses g:netrw_list_hide) + if g:netrw_hide == 1 + " hide given patterns + let listhide= split(g:netrw_list_hide,',') +" call Decho("listhide=".string(listhide)) + for pat in listhide + call filter(w:netrw_treedict[dir],'v:val !~ "'.pat.'"') + endfor + + elseif g:netrw_hide == 2 + " show given patterns (only) + let listhide= split(g:netrw_list_hide,',') +" call Decho("listhide=".string(listhide)) + let entries=[] + for entry in w:netrw_treedict[dir] + for pat in listhide + if entry =~ pat + call add(entries,entry) + break + endif + endfor + endfor + let w:netrw_treedict[dir]= entries + endif + if depth != "" + " always remove "." and ".." entries when there's depth + call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\.$"') + call filter(w:netrw_treedict[dir],'v:val !~ "\\.$"') + endif + " call Decho("for every entry in w:netrw_treedict[".dir."]=".string(w:netrw_treedict[dir]),'~'.expand("")) for entry in w:netrw_treedict[dir] if dir =~ '/$' @@ -8980,6 +9352,7 @@ fun! s:NetrwTreeDisplay(dir,depth) sil! NetrwKeepj call setline(line("$")+1,depth.entry) endif endfor +" call Decho("displaying: ".string(getline(w:netrw_bannercnt,'$'))) " call Dret("NetrwTreeDisplay") endfun @@ -8988,6 +9361,11 @@ endfun " s:NetrwRefreshTreeDict: updates the contents information for a tree (w:netrw_treedict) {{{2 fun! s:NetrwRefreshTreeDict(dir) " call Dfunc("s:NetrwRefreshTreeDict(dir<".a:dir.">)") + if !exists("w:netrw_treedict") +" call Dret("s:NetrwRefreshTreeDict : w:netrw_treedict doesn't exist") + return + endif + for entry in w:netrw_treedict[a:dir] let direntry= substitute(a:dir.'/'.entry,'[@/]$','','e') " call Decho("a:dir<".a:dir."> entry<".entry."> direntry<".direntry.">",'~'.expand("")) @@ -9016,7 +9394,7 @@ fun! s:NetrwRefreshTreeDict(dir) " call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("")) else -" call Decho('not updating w:netrw_treedict['.direntry.'] with entry<'.entry.'> (no subtree)',,'~'.expand("")) +" call Decho('not updating w:netrw_treedict['.string(direntry).'] with entry<'.string(entry).'> (no subtree)','~'.expand("")) endif endfor " call Dret("s:NetrwRefreshTreeDict") @@ -9083,12 +9461,21 @@ fun! s:NetrwTreeListing(dirname) endfun " --------------------------------------------------------------------- -" s:NetrwTreePath: returns path to current file in tree listing {{{2 +" s:NetrwTreePath: returns path to current file/directory in tree listing {{{2 " Normally, treetop is w:netrw_treetop, but a " user of the function ( netrw#SetTreetop() ) " wipes that out prior to calling this function fun! s:NetrwTreePath(treetop) -" call Dfunc("s:NetrwTreePath() line#".line(".")."<".getline(".").">") +" call Dfunc("s:NetrwTreePath(treetop<".a:treetop.">) line#".line(".")."<".getline(".").">") + if line(".") < w:netrw_bannercnt + 2 + let treedir= a:treetop + if treedir !~ '/$' + let treedir= treedir.'/' + endif +" call Dret("s:NetrwTreePath ".treedir." : line#".line(".")." ≤ ".(w:netrw_bannercnt+2)) + return treedir + endif + let svpos = winsaveview() " call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("")) let depth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e') @@ -9119,12 +9506,15 @@ fun! s:NetrwTreePath(treetop) let depth = substitute(depth,'^'.s:treedepthstring,'','') " call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">",'~'.expand("")) endwhile +" call Decho("treedir#1<".treedir.">",'~'.expand("")) if a:treetop =~ '/$' let treedir= a:treetop.treedir else let treedir= a:treetop.'/'.treedir endif +" call Decho("treedir#2<".treedir.">",'~'.expand("")) let treedir= substitute(treedir,'//$','/','') +" call Decho("treedir#3<".treedir.">",'~'.expand("")) " call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand(""))" call winrestview(svpos) " call Dret("s:NetrwTreePath <".treedir.">") @@ -9195,7 +9585,7 @@ fun! s:NetrwWideListing() exe 'nno b :call search(''^.\\|\s\s\zs\S'',''bW'')'."\" " call Decho("NetrwWideListing) setl noma nomod ro",'~'.expand("")) exe "setl ".g:netrw_bufsettings -" call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) " call Dret("NetrwWideListing") return else @@ -9214,18 +9604,20 @@ endfun fun! s:PerformListing(islocal) " call Dfunc("s:PerformListing(islocal=".a:islocal.")") " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) -" call Decho("settings: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)",'~'.expand("")) +" call Decho("settings: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)"." ei<".&ei.">",'~'.expand("")) + sil! NetrwKeepj %d _ +" call DechoBuf(bufnr("%")) " set up syntax highlighting {{{3 " call Decho("--set up syntax highlighting (ie. setl ft=netrw)",'~'.expand("")) sil! setl ft=netrw - NetrwKeepj call s:NetrwSafeOptions() + NetrwKeepj call s:NetrwOptionsSafe(a:islocal) setl noro ma " call Decho("setl noro ma bh=".&bh,'~'.expand("")) " if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho -" call Decho("(netrw) Processing your browsing request...",'~'.expand("")) +" call Decho("Processing your browsing request...",'~'.expand("")) " endif " Decho " call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("")) @@ -9269,6 +9661,7 @@ fun! s:PerformListing(islocal) " call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." win#".winnr(),'~'.expand("")) " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("")) + " construct sortby string: [name|time|size|exten] [reversed] let sortby= g:netrw_sort_by if g:netrw_sort_direction =~# "^r" let sortby= sortby." reversed" @@ -9279,13 +9672,13 @@ fun! s:PerformListing(islocal) " call Decho("--handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("")) if g:netrw_sort_by =~# "^n" " call Decho("directories will be sorted by name",'~'.expand("")) - " sorted by name + " sorted by name (also includes the sorting sequence in the banner) NetrwKeepj put ='\" Sorted by '.sortby NetrwKeepj put ='\" Sort sequence: '.g:netrw_sort_sequence let w:netrw_bannercnt= w:netrw_bannercnt + 2 else " call Decho("directories will be sorted by size or time",'~'.expand("")) - " sorted by size or date + " sorted by time, size, exten NetrwKeepj put ='\" Sorted by '.sortby let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif @@ -9294,7 +9687,7 @@ fun! s:PerformListing(islocal) " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) endif - " show copy/move target, if any + " show copy/move target, if any {{{3 if g:netrw_banner if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") " call Decho("--show copy/move target<".s:netrwmftgt.">",'~'.expand("")) @@ -9313,7 +9706,7 @@ fun! s:PerformListing(islocal) " Hiding... -or- Showing... {{{3 if g:netrw_banner -" call Decho("--handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("")) +" call Decho("--handle hiding/showing (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("")) if g:netrw_list_hide != "" && g:netrw_hide if g:netrw_hide == 1 NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide @@ -9376,12 +9769,13 @@ fun! s:PerformListing(islocal) if g:netrw_sort_by =~# "^n" " sort by name +" call Decho("sort by name",'~'.expand("")) NetrwKeepj call s:NetrwSetSort() if !g:netrw_banner || w:netrw_bannercnt < line("$") " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("")) if g:netrw_sort_direction =~# 'n' - " normal direction sorting + " name: sort by name of file exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options else " reverse direction sorting @@ -9394,7 +9788,9 @@ fun! s:PerformListing(islocal) NetrwKeepj call histdel("/",-1) elseif g:netrw_sort_by =~# "^ext" - " sort by extension + " exten: sort by extension + " The histdel(...,-1) calls remove the last search from the search history +" call Decho("sort by extension",'~'.expand("")) exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g+/+s/^/001'.g:netrw_sepchr.'/' NetrwKeepj call histdel("/",-1) exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+[./]+s/^/002'.g:netrw_sepchr.'/' @@ -9450,7 +9846,7 @@ fun! s:PerformListing(islocal) " resolve symbolic links if local and (thin or tree) if a:islocal && (w:netrw_liststyle == s:THINLIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST)) " call Decho("--resolve symbolic links if local and thin|tree",'~'.expand("")) - g/@$/call s:ShowLink() + sil! g/@$/call s:ShowLink() endif if exists("w:netrw_bannercnt") && (line("$") >= w:netrw_bannercnt || !g:netrw_banner) @@ -9475,7 +9871,7 @@ fun! s:PerformListing(islocal) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#4)",'~'.expand("")) NetrwKeepj call s:SetBufWinVars() " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#5)",'~'.expand("")) - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#6)",'~'.expand("")) " set display to netrw display settings @@ -9486,6 +9882,7 @@ fun! s:PerformListing(islocal) " call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("")) exe "setl ts=".(g:netrw_maxfilenamelen+1) endif +" call DechoBuf(bufnr("%")) if exists("s:treecurpos") " call Decho("s:treecurpos exists; restore posn",'~'.expand("")) @@ -9543,9 +9940,9 @@ fun! s:SetupNetrwStatusLine(statline) " call Dret("SetupNetrwStatusLine : stl=".&stl) endfun -" --------------------------------------------------------------------- -" Remote Directory Browsing Support: {{{1 -" =========================================== +" ========================================= +" Remote Directory Browsing Support: {{{1 +" ========================================= " --------------------------------------------------------------------- " s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 @@ -9714,7 +10111,7 @@ fun! s:NetrwRemoteListing() if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) endif - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") " call Dret("s:NetrwRemoteListing -1") return -1 endif @@ -9729,7 +10126,7 @@ fun! s:NetrwRemoteListing() endif endif - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") " call Dret("s:NetrwRemoteListing -1") return -1 endif " (remote handling sanity check) @@ -9762,7 +10159,7 @@ fun! s:NetrwRemoteListing() exe w:netrw_bannercnt.",$d _" setl noma endif - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") call netrw#ErrorMsg(s:WARNING,mesg,96) " call Dret("s:NetrwRemoteListing : -1") return -1 @@ -10005,7 +10402,7 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all let ret= system(netrw_rm_cmd) if v:shell_error != 0 if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir - call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-c)",102) + call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102) else call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60) endif @@ -10146,12 +10543,12 @@ fun! s:NetrwRemoteRename(usrhost,path) r " call Dret("NetrwRemoteRename") endfun -" --------------------------------------------------------------------- +" ========================================== " Local Directory Browsing Support: {{{1 " ========================================== " --------------------------------------------------------------------- -" netrw#FileUrlRead: handles reading file://* files {{{2 +" netrw#FileUrlEdit: handles editing file://* files {{{2 " Should accept: file://localhost/etc/fstab " file:///etc/fstab " file:///c:/WINDOWS/clock.avi @@ -10161,8 +10558,8 @@ endfun " file://c:/foo.txt " file:///c:/foo.txt " and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value -fun! netrw#FileUrlRead(fname) -" call Dfunc("netrw#FileUrlRead(fname<".a:fname.">)") +fun! netrw#FileUrlEdit(fname) +" call Dfunc("netrw#FileUrlEdit(fname<".a:fname.">)") let fname = a:fname if fname =~ '^file://localhost/' " call Decho('converting file://localhost/ -to- file:///','~'.expand("")) @@ -10186,35 +10583,36 @@ fun! netrw#FileUrlRead(fname) let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','') endif endif + " call Decho("fname2396<".fname2396.">",'~'.expand("")) " call Decho("plainfname<".plainfname.">",'~'.expand("")) exe "sil doau BufReadPre ".fname2396e - exe 'NetrwKeepj r '.plainfname - exe 'sil! bdelete '.plainfname - exe 'keepalt file! '.plainfname - NetrwKeepj 1d -" call Decho("setl nomod",'~'.expand("")) - setl nomod + exe 'NetrwKeepj keepalt edit '.plainfname + exe 'sil! NetrwKeepj keepalt bdelete '.fnameescape(a:fname) + " call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) -" call Dret("netrw#FileUrlRead") +" call Dret("netrw#FileUrlEdit") exe "sil doau BufReadPost ".fname2396e endfun " --------------------------------------------------------------------- " netrw#LocalBrowseCheck: {{{2 fun! netrw#LocalBrowseCheck(dirname) - " This function is called by netrwPlugin.vim's s:LocalBrowse(), s:NetrwRexplore(), and by when atop listed file/directory - " unfortunate interaction -- split window debugging can't be - " used here, must use D-echoRemOn or D-echoTabOn -- the BufEnter - " event triggers another call to LocalBrowseCheck() when attempts - " to write to the DBG buffer are made. + " This function is called by netrwPlugin.vim's s:LocalBrowse(), s:NetrwRexplore(), + " and by when atop a listed file/directory (via a buffer-local map) + " + " unfortunate interaction -- split window debugging can't be used here, must use + " D-echoRemOn or D-echoTabOn as the BufEnter event triggers + " another call to LocalBrowseCheck() when attempts to write + " to the DBG buffer are made. + " " 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 Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">)") " call Decho("isdir<".a:dirname."> =".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).'~'.expand("")) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) -" call Dredir("ls!","ls!") +" call Dredir("ls!","netrw#LocalBrowseCheck") " call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("")) " call Decho("current buffer#".bufnr("%")."<".bufname("%")."> ft=".&ft,'~'.expand("")) @@ -10241,7 +10639,7 @@ fun! netrw#LocalBrowseCheck(dirname) return endif - " following code wipes out currently unused netrw buffers + " The following code wipes out currently unused netrw buffers " IF g:netrw_fastbrowse is zero (ie. slow browsing selected) " AND IF the listing style is not a tree listing if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST @@ -10293,19 +10691,21 @@ fun! s:LocalBrowseRefresh() while itab <= tabpagenr("$") let buftablist = buftablist + tabpagebuflist() let itab = itab + 1 - tabn + sil! tabn endwhile " call Decho("buftablist".string(buftablist),'~'.expand("")) " call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">",'~'.expand("")) " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): " | refresh any netrw window " | wipe out any non-displaying netrw buffer - let curwin = winnr() + let curwinid = win_getid(winnr()) let ibl = 0 for ibuf in s:netrw_browselist " call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf),'~'.expand("")) if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 " wipe out any non-displaying netrw buffer + " (ibuf not shown in a current window AND + " ibuf not in any tab) " call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">",'~'.expand("")) exe "sil! keepj bd ".fnameescape(ibuf) call remove(s:netrw_browselist,ibl) @@ -10329,8 +10729,8 @@ fun! s:LocalBrowseRefresh() let ibl= ibl + 1 " call Decho("bottom of s:netrw_browselist for loop: ibl=".ibl,'~'.expand("")) endfor -" call Decho("restore window: exe ".curwin."wincmd w",'~'.expand("")) - exe curwin."wincmd w" +" call Decho("restore window: win_gotoid(".curwinid.")") + call win_gotoid(curwinid) let @@= ykeep " call Dret("s:LocalBrowseRefresh") @@ -10355,10 +10755,10 @@ endfun " If :Explore used: it sets s:netrw_events to 2, so no FocusGained events are ignored. " =2: autocmds installed (doesn't ignore any FocusGained events) fun! s:LocalFastBrowser() -" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) -" call Decho("s:netrw_events ".(exists("s:netrw_events")? "exists" : 'n/a'),'~'.expand("")) -" call Decho("autocmd: ShellCmdPost ".(exists("#ShellCmdPost")? "installed" : "not installed"),'~'.expand("")) -" call Decho("autocmd: FocusGained ".(exists("#FocusGained")? "installed" : "not installed"),'~'.expand("")) +" call Dfunc("s:LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) +" call Decho("s:netrw_events ".(exists("s:netrw_events")? "exists" : 'n/a'),'~'.expand("")) +" call Decho("autocmd: ShellCmdPost ".(exists("#ShellCmdPost")? "already installed" : "not installed"),'~'.expand("")) +" call Decho("autocmd: FocusGained ".(exists("#FocusGained")? "already installed" : "not installed"),'~'.expand("")) " initialize browselist, a list of buffer numbers that the local browser has used if !exists("s:netrw_browselist") @@ -10403,7 +10803,7 @@ fun! s:LocalFastBrowser() augroup! AuNetrwEvent endif -" call Dret("LocalFastBrowser : browselist<".string(s:netrw_browselist).">") +" call Dret("s:LocalFastBrowser : browselist<".string(s:netrw_browselist).">") endfun " --------------------------------------------------------------------- @@ -10449,6 +10849,7 @@ fun! s:LocalListing() for filename in filelist " call Decho(" ",'~'.expand("")) " call Decho("for filename in filelist: filename<".filename.">",'~'.expand("")) +" call DechoBuf(bufnr("%"),"COMBAK#1") if getftype(filename) == "link" " indicate a symbolic link @@ -10509,8 +10910,9 @@ fun! s:LocalListing() if g:netrw_sizestyle =~# "[hH]" let sz= s:NetrwHumanReadable(sz) endif - let fsz = strpart(" ",1,15-strlen(sz)).sz - let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) + let fsz = strpart(" ",1,15-strlen(sz)).sz + let longfile= printf("%-".(g:netrw_maxfilenamelen+1)."s",pfile) + let pfile = longfile.fsz." ".strftime(g:netrw_timefmt,getftime(filename)) " call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("")) endif @@ -10540,6 +10942,7 @@ fun! s:LocalListing() " call Decho("exe NetrwKeepj put ='".pfile."'",'~'.expand("")) sil! NetrwKeepj put=pfile endif +" call DechoBuf(bufnr("%"),"COMBAK#2") endfor " cleanup any windows mess at end-of-line @@ -10786,7 +11189,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~# 'y\%[es]' || ok == "" - if v:version < 704 || !has("patch1109") + if v:version < 704 || (v:version == 704 && !has("patch1107")) " " call Decho("1st attempt: system(netrw#WinPath(".g:netrw_localrmdir.') '.s:ShellEscape(rmfile).')','~'.expand("")) call system(netrw#WinPath(g:netrw_localrmdir).' '.s:ShellEscape(rmfile)) " " call Decho("v:shell_error=".v:shell_error,'~'.expand("")) @@ -10822,21 +11225,10 @@ fun! s:NetrwLocalRmFile(path,fname,all) return ok endfun -" --------------------------------------------------------------------- +" ===================================================================== " Support Functions: {{{1 " --------------------------------------------------------------------- -" s:WinNames: COMBAK {{{2 -fun! s:WinNames(id) - let curwin= winnr() - 1wincmd w -" call Decho("--- Windows By Name --- #".a:id) -" windo call Decho("win#".winnr()."<".expand("%").">") -" call Decho("--- --- --- --- --- ---") - exe curwin."wincmd w" -endfun - -" --------------------------------------------------------------------- " netrw#Access: intended to provide access to variable values for netrw's test suite {{{2 " 0: marked file list of current buffer " 1: marked file target @@ -10849,18 +11241,13 @@ fun! netrw#Access(ilist) endif elseif a:ilist == 1 return s:netrwmftgt + endif endfun " --------------------------------------------------------------------- " netrw#Call: allows user-specified mappings to call internal netrw functions {{{2 fun! netrw#Call(funcname,...) -" call Dfunc("netrw#Call(funcname<".a:funcname.">,".string(a:000).")") - if a:0 > 0 - exe "call s:".a:funcname."(".string(a:000).")" - else - exe "call s:".a:funcname."()" - endif -" call Dret("netrw#Call") + return call("s:".a:funcname,a:000) endfun " --------------------------------------------------------------------- @@ -10922,7 +11309,7 @@ endfun " or it may return a List of strings. " " Each keymap-sequence will be set up with a nnoremap -" to invoke netrw#UserMaps(islocal). +" to invoke netrw#UserMaps(a:islocal). " Related functions: " netrw#Expose(varname) -- see s:varname variables " netrw#Modify(varname,newvalue) -- modify value of s:varname variable @@ -10970,6 +11357,35 @@ fun! netrw#WinPath(path) endfun " --------------------------------------------------------------------- +" s:NetrwBadd: adds marked files to buffer list or vice versa {{{2 +" cb : bl2mf=0 add marked files to buffer list +" cB : bl2mf=1 use bufferlist to mark files +" (mnemonic: cb = copy (marked files) to buffer list) +fun! s:NetrwBadd(islocal,bl2mf) +" " call Dfunc("s:NetrwBadd(islocal=".a:islocal." mf2bl=".mf2bl.")") + if a:bl2mf + " cB: add buffer list to marked files + redir => bufl + ls + redir END + let bufl = map(split(bufl,"\n"),'substitute(v:val,''^.\{-}"\(.*\)".\{-}$'',''\1'','''')') + for fname in bufl + call s:NetrwMarkFile(a:islocal,fname) + endfor + else + " cb: add marked files to buffer list + for fname in s:netrwmarkfilelist_{bufnr("%")} +" " call Decho("badd ".fname,'~'.expand("")) + exe "badd ".fnameescape(fname) + endfor + let curbufnr = bufnr("%") + let curdir = s:NetrwGetCurdir(a:islocal) + call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer + endif +" call Dret("s:NetrwBadd") +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.">)") @@ -10983,11 +11399,12 @@ fun! s:ComposePath(base,subdir) let ret = a:base.a:subdir endif - elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) + " COMBAK: test on windows with changing to root directory: :e C:/ + elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("windows",'~'.expand("")) let ret= a:subdir - elseif a:base =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) + elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16")) " call Decho("windows",'~'.expand("")) if a:base =~ '[/\\]$' let ret= a:base.a:subdir @@ -11329,7 +11746,7 @@ endfun " --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) -" call Dfunc("s:NetrwEnew() a:0=".a:0." bufnr($)=".bufnr("$")) +" call Dfunc("s:NetrwEnew() a:0=".a:0." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">") " call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("")) " grab a function-local-variable copy of buffer variables @@ -11351,7 +11768,7 @@ fun! s:NetrwEnew(...) if exists("b:netrw_option") |let netrw_option = b:netrw_option |endif if exists("b:netrw_prvdir") |let netrw_prvdir = b:netrw_prvdir |endif - NetrwKeepj call s:NetrwOptionRestore("w:") + NetrwKeepj call s:NetrwOptionsRestore("w:") " call Decho("generate a buffer with NetrwKeepj keepalt enew!",'~'.expand("")) " when tree listing uses file TreeListing... a new buffer is made. " Want the old buffer to be unlisted. @@ -11361,7 +11778,7 @@ fun! s:NetrwEnew(...) noswapfile NetrwKeepj keepalt enew! let &l:diff= netrw_keepdiff " call Decho("bufnr($)=".bufnr("$")."<".bufname(bufnr("$"))."> winnr($)=".winnr("$"),'~'.expand("")) - NetrwKeepj call s:NetrwOptionSave("w:") + NetrwKeepj call s:NetrwOptionsSave("w:") " copy function-local-variables to buffer variable equivalents " call Decho("copy function-local variables back to buffer netrw variables",'~'.expand("")) @@ -11392,7 +11809,7 @@ fun! s:NetrwEnew(...) nno [ :sil call TreeListMove('[') nno ] :sil call TreeListMove(']') else - exe "sil! keepalt file ".fnameescape(b:netrw_curdir) + call s:NetrwBufRename(b:netrw_curdir) endif endif endif @@ -11403,17 +11820,19 @@ endfun " --------------------------------------------------------------------- " s:NetrwExe: executes a string using "!" {{{2 fun! s:NetrwExe(cmd) -" call Dfunc("s:NetrwExe(a:cmd)") +" call Dfunc("s:NetrwExe(a:cmd<".a:cmd.">)") if has("win32") && &shell !~? 'cmd' && !g:netrw_cygwin +" call Decho("using win32:",expand("")) let savedShell=[&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] set shell& shellcmdflag& shellxquote& shellxescape& set shellquote& shellpipe& shellredir& shellslash& exe a:cmd let [&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] = savedShell else +" call Decho("exe ".a:cmd,'~'.expand("")) exe a:cmd endif -" call Dret("s:NetrwExe") +" call Dret("s:NetrwExe : v:shell_error=".v:shell_error) endfun " --------------------------------------------------------------------- @@ -11446,9 +11865,12 @@ endfun " --------------------------------------------------------------------- " s:NetrwLcd: handles changing the (local) directory {{{2 +" Returns: 0=success +" -1=failed fun! s:NetrwLcd(newdir) " call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)") + let err472= 0 try exe 'NetrwKeepj sil lcd '.fnameescape(a:newdir) catch /^Vim\%((\a\+)\)\=:E344/ @@ -11464,21 +11886,26 @@ fun! s:NetrwLcd(newdir) endif endif catch /^Vim\%((\a\+)\)\=:E472/ + let err472= 1 + endtry + + if err472 call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".a:newdir."> (permissions?)",61) if exists("w:netrw_prvdir") let a:newdir= w:netrw_prvdir else - call s:NetrwOptionRestore("w:") + call s:NetrwOptionsRestore("w:") " call Decho("setl noma nomod nowrap",'~'.expand("")) exe "setl ".g:netrw_bufsettings " call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("")) let a:newdir= dirname -" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") - return - endif - endtry - -" call Dret("s:NetrwLcd") + endif +" call Dret("s:NetrwBrowse -1 : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") + return -1 + endif + +" call Dret("s:NetrwLcd 0") + return 0 endfun " ------------------------------------------------------------------------ @@ -11646,7 +12073,7 @@ endfun " s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap " is true) and a command, :Rexplore, which call this function. " -" s:netrw_nbcd is set up by s:NetrwBrowseChgDir() +" s:netrw_posn is set up by s:NetrwBrowseChgDir() " " s:rexposn_BUFNR used to save/restore cursor position fun! s:NetrwRexplore(islocal,dirname) @@ -11702,8 +12129,10 @@ fun! s:NetrwRexplore(islocal,dirname) " call Decho("s:rexposn_".bufnr('%')."<".bufname("%")."> doesn't exist",'~'.expand("")) endif - if exists("s:explore_match") - exe "2match netrwMarkFile /".s:explore_match."/" + if has("syntax") && exists("g:syntax_on") && g:syntax_on + if exists("s:explore_match") + exe "2match netrwMarkFile /".s:explore_match."/" + endif endif " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("")) @@ -11731,8 +12160,12 @@ endfun fun! s:SavePosn(posndict) " call Dfunc("s:SavePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") - let a:posndict[bufnr("%")]= winsaveview() -" call Decho("saving posn: posndict[".bufnr("%")."]=".string(winsaveview()),'~'.expand("")) + if !exists("a:posndict[bufnr('%')]") + let a:posndict[bufnr("%")]= [] + endif +" call Decho("before push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + call add(a:posndict[bufnr("%")],winsaveview()) +" call Decho("after push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) " call Dret("s:SavePosn posndict") return a:posndict @@ -11742,9 +12175,18 @@ endfun " s:RestorePosn: restores position associated with current buffer using dictionary {{{2 fun! s:RestorePosn(posndict) " call Dfunc("s:RestorePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">") - if has_key(a:posndict,bufnr("%")) - call winrestview(a:posndict[bufnr("%")]) -" call Decho("restoring posn: posndict[".bufnr("%")."]=".string(a:posndict[bufnr("%")]),'~'.expand("")) + if exists("a:posndict") + if has_key(a:posndict,bufnr("%")) +" call Decho("before pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + let posnlen= len(a:posndict[bufnr("%")]) + if posnlen > 0 + let posnlen= posnlen - 1 +" call Decho("restoring posn posndict[".bufnr("%")."][".posnlen."]=".string(a:posndict[bufnr("%")][posnlen]),'~'.expand("")) + call winrestview(a:posndict[bufnr("%")][posnlen]) + call remove(a:posndict[bufnr("%")],posnlen) +" call Decho("after pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')])) + endif + endif endif " call Dret("s:RestorePosn") endfun @@ -12032,11 +12474,13 @@ fun! s:UserMaps(islocal,funcname) " call Dret("s:UserMaps") endfun -" --------------------------------------------------------------------- +" ========================== " Settings Restoration: {{{1 +" ========================== let &cpo= s:keepcpo unlet s:keepcpo -" ------------------------------------------------------------------------ +" =============== " Modelines: {{{1 +" =============== " vim:ts=8 fdm=marker diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -1,7 +1,7 @@ " netrwSettings.vim: makes netrw settings simpler -" Date: Dec 30, 2014 +" Date: Nov 09, 2016 " Maintainer: Charles E Campbell -" Version: 15 +" Version: 16 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -19,7 +19,7 @@ if exists("g:loaded_netrwSettings") || &cp finish endif -let g:loaded_netrwSettings = "v15" +let g:loaded_netrwSettings = "v16" if v:version < 700 echohl WarningMsg echo "***warning*** this version of netrwSettings needs vim 7.0" @@ -154,9 +154,13 @@ fun! netrwSettings#NetrwSettings() put = 'let g:netrw_list_hide = '.g:netrw_list_hide put = 'let g:netrw_liststyle = '.g:netrw_liststyle put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd + put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir + put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd + put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir + put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen put = 'let g:netrw_menu = '.g:netrw_menu put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.1. Last change: 2019 Jul 13 +*eval.txt* For Vim version 8.1. Last change: 2019 Jul 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8867,7 +8867,7 @@ sign_placelist({list}) Examples: > " Place sign s1 with id 5 at line 20 and id 10 at line " 30 in buffer a.c - let [n1, n2] = sign_place([ + let [n1, n2] = sign_placelist([ \ {'id' : 5, \ 'name' : 's1', \ 'buffer' : 'a.c', @@ -8880,7 +8880,7 @@ sign_placelist({list}) " Place sign s1 in buffer a.c at line 40 and 50 " with auto-generated identifiers - let [n1, n2] = sign_place([ + let [n1, n2] = sign_placelist([ \ {'name' : 's1', \ 'buffer' : 'a.c', \ 'lnum' : 40}, @@ -8977,8 +8977,10 @@ sign_unplacelist({list}) *sign_unplac Example: > " Remove sign with id 10 from buffer a.vim and sign " with id 20 from buffer b.vim - call sign_unplace([{'id' : 10, 'buffer' : "a.vim"}, - \ {'id' : 20, 'buffer' : 'b.vim'}]) + call sign_unplacelist([ + \ {'id' : 10, 'buffer' : "a.vim"}, + \ {'id' : 20, 'buffer' : 'b.vim'}, + \ ]) < simplify({filename}) *simplify()* Simplify the file name as much as possible without changing @@ -11503,6 +11505,11 @@ text... register values cannot be used here, since they cannot be locked. +:cons[t] +:cons[t] {var-name} + If no argument is given or only {var-name} is given, + the behavior is the same as |:let|. + :lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv* Lock the internal variable {name}. Locking means that it can no longer be changed (until it is unlocked). diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 8.1. Last change: 2019 May 05 +*filetype.txt* For Vim version 8.1. Last change: 2019 Jul 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -642,6 +642,16 @@ To disable this behavior, set the follow let g:python_recommended_style = 0 +QF QUICKFIX *qf.vim* *ft-qf-plugin* + +The "qf" filetype is used for the quickfix window, see |quickfix-window|. + +The quickfix filetype plugin includes configuration for displaying the command +that produced the quickfix list in the |status-line|. To disable this setting, +configure as follows: > + :let g:qf_disable_statusline = 1 + + R MARKDOWN *ft-rmd-plugin* By default ftplugin/html.vim is not sourced. If you want it sourced, add to diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.1. Last change: 2019 Jul 06 +*options.txt* For Vim version 8.1. Last change: 2019 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 8.1. Last change: 2019 May 05 +*pi_netrw.txt* For Vim version 8.1. Last change: 2019 Jul 17 ------------------------------------------------ NETRW REFERENCE MANUAL by Charles E. Campbell @@ -1184,7 +1184,7 @@ One may easily "bookmark" the currently *.netrwbook* Bookmarks are retained in between sessions of vim in a file called .netrwbook as a |List|, which is typically stored in the first directory on the user's -'|runtimepath|'; entries are kept in sorted order. +'runtimepath'; entries are kept in sorted order. If there are marked files and/or directories, mb will add them to the bookmark list. @@ -2094,7 +2094,7 @@ track netrw's browsing directory. However, given the default setting for g:netrw_keepdir of 1 where netrw maintains its own separate notion of the current directory, in order to make -the two directories the same, use the "c" map (just type c). That map will +the two directories the same, use the "cd" map (type cd). That map will set Vim's notion of the current directory to netrw's current browsing directory. @@ -2739,7 +2739,7 @@ your browsing preferences. (see also: | =0 : show all =1 : show not-hidden files =2 : show hidden files only - default: =0 + default: =1 *g:netrw_home* The home directory for where bookmarks and history are saved (as .netrwbook and @@ -2940,14 +2940,23 @@ your browsing preferences. (see also: | netrwBak : *.bak netrwCompress: *.gz *.bz2 *.Z *.zip + netrwCoreDump: core.\d\+ netrwData : *.dat + netrwDoc : *.doc,*.txt,*.pdf, + *.pdf,*.docx netrwHdr : *.h + netrwLex : *.l *.lex netrwLib : *.a *.so *.lib *.dll netrwMakefile: [mM]akefile *.mak netrwObj : *.o *.obj + netrwPix : *.bmp,*.fit,*.fits,*.gif, + *.jpg,*.jpeg,*.pcx,*.ppc + *.pgm,*.png,*.psd,*.rgb + *.tif,*.xbm,*.xcf netrwTags : tags ANmenu ANtags netrwTilde : * netrwTmp : tmp* *tmp + netrwYacc : *.y In addition, those groups mentioned in |'suffixes'| are also added to the special @@ -3032,8 +3041,9 @@ your browsing preferences. (see also: | current netrw buffer's window to be used for the new window. If g:netrw_winsize is less than zero, then - the absolute value of g:netrw_winsize lines - or columns will be used for the new window. + the absolute value of g:netrw_winsize will be + used to specify the quantity of lines or + columns for the new window. If g:netrw_winsize is zero, then a normal split will be made (ie. |'equalalways'| will take effect, for example). @@ -3371,7 +3381,7 @@ 10. Problems and Fixes *netrw-proble (This section is likely to grow as I get feedback) (also see |netrw-debug|) *netrw-p1* - P1. I use windows 95, and my ftp dumps four blank lines at the + P1. I use windows 95, and my ftp dumps four blank lines at the {{{2 end of every read. See |netrw-fixup|, and put the following into your @@ -3380,7 +3390,7 @@ 10. Problems and Fixes *netrw-proble let g:netrw_win95ftp= 1 *netrw-p2* - P2. I use Windows, and my network browsing with ftp doesn't sort by + P2. I use Windows, and my network browsing with ftp doesn't sort by {{{2 time or size! -or- The remote system is a Windows server; why don't I get sorts by time or size? @@ -3407,7 +3417,7 @@ 10. Problems and Fixes *netrw-proble *netrw-p3* - P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw + P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw {{{2 used ssh! That wasn't what I asked for... Netrw has two methods for browsing remote directories: ssh @@ -3416,7 +3426,7 @@ 10. Problems and Fixes *netrw-proble listing), netrw will use the given protocol to do so. *netrw-p4* - P4. I would like long listings to be the default. + P4. I would like long listings to be the default. {{{2 Put the following statement into your |.vimrc|: > @@ -3426,7 +3436,7 @@ 10. Problems and Fixes *netrw-proble you can set. *netrw-p5* - P5. My times come up oddly in local browsing + P5. My times come up oddly in local browsing {{{2 Does your system's strftime() accept the "%c" to yield dates such as "Sun Apr 27 11:49:23 1997"? If not, do a @@ -3436,7 +3446,7 @@ 10. Problems and Fixes *netrw-proble let g:netrw_timefmt= "%X" (where X is the option) < *netrw-p6* - P6. I want my current directory to track my browsing. + P6. I want my current directory to track my browsing. {{{2 How do I do that? Put the following line in your |.vimrc|: @@ -3444,8 +3454,8 @@ 10. Problems and Fixes *netrw-proble let g:netrw_keepdir= 0 < *netrw-p7* - P7. I use Chinese (or other non-ascii) characters in my filenames, and - netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! + P7. I use Chinese (or other non-ascii) characters in my filenames, {{{2 + and netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! (taken from an answer provided by Wu Yongwei on the vim mailing list) @@ -3459,7 +3469,7 @@ 10. Problems and Fixes *netrw-proble (...it is one more reason to recommend that people use utf-8!) *netrw-p8* - P8. I'm getting "ssh is not executable on your system" -- what do I + P8. I'm getting "ssh is not executable on your system" -- what do I {{{2 do? (Dudley Fox) Most people I know use putty for windows ssh. It @@ -3502,7 +3512,7 @@ 10. Problems and Fixes *netrw-proble - Click "Add..." - Set External Editor (adjust path as needed, include the quotes and !.! at the end): - "c:\Program Files\Vim\vim81\gvim.exe" !.! + "c:\Program Files\Vim\vim70\gvim.exe" !.! - Check that the filetype in the box below is {asterisk}.{asterisk} (all files), or whatever types you want (cec: change {asterisk} to * ; I had to @@ -3542,7 +3552,7 @@ 10. Problems and Fixes *netrw-proble default. *netrw-p9* *netrw-ml_get* - P9. I'm browsing, changing directory, and bang! ml_get errors + P9. I'm browsing, changing directory, and bang! ml_get errors {{{2 appear and I have to kill vim. Any way around this? Normally netrw attempts to avoid writing swapfiles for @@ -3553,7 +3563,7 @@ 10. Problems and Fixes *netrw-proble let g:netrw_use_noswf= 0 < *netrw-p10* - P10. I'm being pestered with "[something] is a directory" and + P10. I'm being pestered with "[something] is a directory" and {{{2 "Press ENTER or type command to continue" prompts... The "[something] is a directory" prompt is issued by Vim, @@ -3564,8 +3574,8 @@ 10. Problems and Fixes *netrw-proble your <.vimrc> file. *netrw-p11* - P11. I want to have two windows; a thin one on the left and my editing - window on the right. How may I accomplish this? + P11. I want to have two windows; a thin one on the left and my {{{2 + editing window on the right. How may I accomplish this? You probably want netrw running as in a side window. If so, you will likely find that ":[N]Lexplore" does what you want. The @@ -3590,7 +3600,7 @@ 10. Problems and Fixes *netrw-proble *netrw-p12* - P12. My directory isn't sorting correctly, or unwanted letters are + P12. My directory isn't sorting correctly, or unwanted letters are {{{2 appearing in the listed filenames, or things aren't lining up properly in the wide listing, ... @@ -3600,9 +3610,9 @@ 10. Problems and Fixes *netrw-proble You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|. *netrw-p13* - P13. I'm a Windows + putty + ssh user, and when I attempt to browse, - the directories are missing trailing "/"s so netrw treats them - as file transfers instead of as attempts to browse + P13. I'm a Windows + putty + ssh user, and when I attempt to {{{2 + browse, the directories are missing trailing "/"s so netrw treats + them as file transfers instead of as attempts to browse subdirectories. How may I fix this? (mikeyao) If you want to use vim via ssh and putty under Windows, @@ -3621,7 +3631,7 @@ 10. Problems and Fixes *netrw-proble "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" < *netrw-p14* - P14. I would like to speed up writes using Nwrite and scp/ssh + P14. I would like to speed up writes using Nwrite and scp/ssh {{{2 style connections. How? (Thomer M. Gil) Try using ssh's ControlMaster and ControlPath (see the ssh_config @@ -3648,8 +3658,8 @@ 10. Problems and Fixes *netrw-proble vim scp://host.domain.com//home/user/.bashrc < *netrw-p15* - P15. How may I use a double-click instead of netrw's usual single click - to open a file or directory? (Ben Fritz) + P15. How may I use a double-click instead of netrw's usual single {{{2 + click to open a file or directory? (Ben Fritz) First, disable netrw's mapping with > let g:netrw_mousemaps= 0 @@ -3661,7 +3671,7 @@ 10. Problems and Fixes *netrw-proble (see |g:netrw_mousemaps|) *netrw-p16* - P16. When editing remote files (ex. :e ftp://hostname/path/file), + P16. When editing remote files (ex. :e ftp://hostname/path/file), {{{2 under Windows I get an |E303| message complaining that its unable to open a swap file. @@ -3670,7 +3680,7 @@ 10. Problems and Fixes *netrw-proble directory. *netrw-p17* - P17. Netrw is closing buffers on its own. + P17. Netrw is closing buffers on its own. {{{2 What steps will reproduce the problem? 1. :Explore, navigate directories, open a file 2. :Explore, open another file @@ -3684,14 +3694,14 @@ 10. Problems and Fixes *netrw-proble a ":ls!" will show them (although ":ls" does not). *netrw-P18* - P18. How to locally edit a file that's only available via + P18. How to locally edit a file that's only available via {{{2 another server accessible via ssh? See http://stackoverflow.com/questions/12469645/ "Using Vim to Remotely Edit A File on ServerB Only Accessible From ServerA" *netrw-P19* - P19. How do I get numbering on in directory listings? + P19. How do I get numbering on in directory listings? {{{2 With |g:netrw_bufsettings|, you can control netrw's buffer settings; try putting > let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu" @@ -3700,7 +3710,7 @@ 10. Problems and Fixes *netrw-proble let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu" < *netrw-P20* - P20. How may I have gvim start up showing a directory listing? + P20. How may I have gvim start up showing a directory listing? {{{2 Try putting the following code snippet into your .vimrc: > augroup VimStartup au! @@ -3713,8 +3723,8 @@ 10. Problems and Fixes *netrw-proble (ie. a "huge" vim version). *netrw-P21* - P21. I've made a directory (or file) with an accented character, but - netrw isn't letting me enter that directory/read that file: + P21. I've made a directory (or file) with an accented character, {{{2 + but netrw isn't letting me enter that directory/read that file: Its likely that the shell or o/s is using a different encoding than you have vim (netrw) using. A patch to vim supporting @@ -3724,7 +3734,7 @@ 10. Problems and Fixes *netrw-proble au FileType netrw set enc=latin1 < *netrw-P22* - P22. I get an error message when I try to copy or move a file: + P22. I get an error message when I try to copy or move a file: {{{2 **error** (netrw) tried using g:netrw_localcopycmd; it doesn't work! @@ -3752,8 +3762,8 @@ by obtaining a copy of the latest (often The script is typically installed on systems as something like: > - /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim - /usr/local/share/vim/vim8x/autoload/netrw.vim + /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim + /usr/local/share/vim/vim7x/autoload/netrw.vim (see output of :echo &rtp) < which is loaded automatically at startup (assuming :set nocp). If you @@ -3832,6 +3842,16 @@ netrw: ============================================================================== 12. History *netrw-history* {{{1 + v163: Dec 05, 2017 * (Cristi Balan) reported that a setting ('sel') + was left changed + * (Holger Mitschke) reported a problem with + saving and restoring history. Fixed. + * Hopefully I fixed a nasty bug that caused a + file rename to wipe out a buffer that it + should not have wiped out. + * (Holger Mitschke) amended this help file + with additional |g:netrw_special_syntax| + items v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors with a patch; these are now fixed. Oct 26, 2016 * I started using mate-terminal and found that diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 8.1. Last change: 2019 Jul 14 +*popup.txt* For Vim version 8.1. Last change: 2019 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -702,9 +702,9 @@ If the text does not fit in the popup a the window. This can be disabled by setting the "scrollbar" option to zero. When the scrollbar is displayed mouse scroll events, while the mouse pointer is on the popup, will cause the text to scroll up or down as you would expect. -A click in the upper half of the scrollbar will scroll the text one line -down. A click in the lower half wil scroll the text one line up. However, -this is limited so that the popup does not get smaller. +A click in the upper half of the scrollbar will scroll the text down one line. +A click in the lower half will scroll the text up one line. However, this is +limited so that the popup does not get smaller. POPUP MASK *popup-mask* diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.1. Last change: 2019 Jun 02 +*quickfix.txt* For Vim version 8.1. Last change: 2019 Jul 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -650,9 +650,9 @@ You can use CTRL-W to open a new When the quickfix window has been filled, two autocommand events are triggered. First the 'filetype' option is set to "qf", which triggers the -FileType event. Then the BufReadPost event is triggered, using "quickfix" for -the buffer name. This can be used to perform some action on the listed -errors. Example: > +FileType event (also see |qf.vim|). Then the BufReadPost event is triggered, +using "quickfix" for the buffer name. This can be used to perform some action +on the listed errors. Example: > au BufReadPost quickfix setlocal modifiable \ | silent exe 'g/^/s//\=line(".")." "/' \ | setlocal nomodifiable diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 8.1. Last change: 2019 May 31 +*quickref.txt* For Vim version 8.1. Last change: 2019 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -829,6 +829,7 @@ Short explanation of each option: *opti 'perldll' name of the Perl dynamic library 'preserveindent' 'pi' preserve the indent structure when reindenting 'previewheight' 'pvh' height of the preview window +'previewpopup' 'pvp' use popup window for preview 'previewwindow' 'pvw' identifies the preview window 'printdevice' 'pdev' name of the printer to be used for :hardcopy 'printencoding' 'penc' encoding to be used for printing diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.1. Last change: 2019 Jun 13 +*syntax.txt* For Vim version 8.1. Last change: 2019 Jul 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2623,7 +2623,6 @@ preceding last option and unsetting all Note: only existence of these options matter, not their value. You can replace 1 above with anything. - QUAKE *quake.vim* *ft-quake-syntax* The Quake syntax definition should work for most any FPS (First Person diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -775,6 +775,7 @@ 'pp' options.txt /*'pp'* 'preserveindent' options.txt /*'preserveindent'* 'previewheight' options.txt /*'previewheight'* +'previewpopup' options.txt /*'previewpopup'* 'previewwindow' options.txt /*'previewwindow'* 'printdevice' options.txt /*'printdevice'* 'printencoding' options.txt /*'printencoding'* @@ -789,6 +790,7 @@ 'pumheight' options.txt /*'pumheight'* 'pumwidth' options.txt /*'pumwidth'* 'pvh' options.txt /*'pvh'* +'pvp' options.txt /*'pvp'* 'pvw' options.txt /*'pvw'* 'pw' options.txt /*'pw'* 'pythondll' options.txt /*'pythondll'* @@ -6440,6 +6442,7 @@ ft-ptcap-syntax syntax.txt /*ft-ptcap-sy ft-python-indent indent.txt /*ft-python-indent* ft-python-plugin filetype.txt /*ft-python-plugin* ft-python-syntax syntax.txt /*ft-python-syntax* +ft-qf-plugin filetype.txt /*ft-qf-plugin* ft-quake-syntax syntax.txt /*ft-quake-syntax* ft-r-indent indent.txt /*ft-r-indent* ft-r-syntax syntax.txt /*ft-r-syntax* @@ -8282,6 +8285,7 @@ ppwiz.vim syntax.txt /*ppwiz.vim* press-enter message.txt /*press-enter* press-return message.txt /*press-return* prevcount-variable eval.txt /*prevcount-variable* +preview-popup windows.txt /*preview-popup* preview-window windows.txt /*preview-window* prevnonblank() eval.txt /*prevnonblank()* print-intro print.txt /*print-intro* @@ -8387,6 +8391,7 @@ q repeat.txt /*q* q/ cmdline.txt /*q\/* q: cmdline.txt /*q:* q? cmdline.txt /*q?* +qf.vim filetype.txt /*qf.vim* qnx os_qnx.txt /*qnx* qnx-compiling os_qnx.txt /*qnx-compiling* qnx-general os_qnx.txt /*qnx-general* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.1. Last change: 2019 Jul 13 +*todo.txt* For Vim version 8.1. Last change: 2019 Jul 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -43,15 +43,20 @@ 20) Also put :argadd commands at the start for all buffers, so that their order remains equal? Then %argdel to clean it up. Do try this with 'hidden' set. -Shorten the command used in test Makefile. (Daniel Hahler, #4643) - Refactor: Move common things out of evalfunc.c, it's too big. Move function specs out of eval.txt, it's too big. +Convert comments in option.h + +Patch to convert encoding of strftime(). (Ken Takata, #4685, fixes #4681) + +Patch to Move viminfo related functions to a separate file: #4686 + Popup windows: -- Default popup_menu padding: only left&right. -- Add 'previewpopup': open preview in a popupwindow. - Values: dict options as a string? "line:20,maxwidth:60,maxheight:20" +- avoid preview popup going outside of the screen +- add popup_getpreview() - get ID of preview window +- bug: double click in scrollbar starts selection +- Allow resizing from the bottom-right corner - Implement flip option - Have a way to scroll to the bottom, e.g. set 'firstline' to -1? (#4577) - Why does 'nrformats' leak from the popup window buffer??? @@ -148,6 +153,9 @@ E278, E279, E281, E290, E291, E292, E361 E453, E454, E460, E489, E491, E56, E57, E565, E569, E578, E610, E611, E653, E654, E693, E706, E856, E857, E860, E861, E863, E889, E900, E959 +Problem with German spell file. Hint for solution by Klaus-Peter Schreiner in +#4314, solves the Rasenmäher problem. + Sound: support on Mac? Or does libcanberra work there? Patch to use forward slash for completion even when 'shellslash' is set. @@ -169,18 +177,24 @@ Ready to include now? Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. (#4087) +Patch to support 'cursorlineopt' - only highlight the line number of the +cursor line: #4693 + Patch for Template string: #4491 Not ready yet. New pull: #4634 ":bnext" in a help buffer is supposed to go to the next help buffer, but it goes to any buffer, and then :bnext skips help buffers, since they are unlisted. (#4478) -Problem with German spell file. Hint for solution by Klaus-Peter Schreiner in -#4314, solves the Rasenmäher problem. - Problem showing a line if the number column width changes when using "o". (Mateusz Morusiewicz, #4245) +When using :packadd for a replacement language plugin, it is loaded after the +default one. #4698 + +When using :packadd files under "later" are not used, which is inconsistent +with packages under "start". (xtal8, #1994) + Visual highlight not removed when 'dipslay' is "lastline" and line doesn't fit. (Kevin Lawler, #4457) @@ -249,6 +263,14 @@ Include solarized color scheme?, it does Bug: "vipgw" does not put cursor back where it belongs. (Jason Franklin, 2019 Mar 5) +Many users don't like 'thesaurus' to match so many words. (#4667, #1611) +- when the match with the first word is partial, don't add other words on that + line. +- support other file formats, such as comma separated. Indicate by a prefix + to the file in the 'thesaurus' option. +- 'threglookexp' option: only match with first word in thesaurus file. + (Jakson A. Aquino, 2006 Jun 14) + Some composing characters actually add a cell width to the character they are on top off, making the whole thing two characters wide. (#4526) @@ -602,9 +624,6 @@ With 'foldmethod' "indent" and appending included in the existing fold. Deleting the empty line and undo fixes it. (Oleg Koshovetc, 2018 Jul 15, #3214) -When using :packadd files under "later" are not used, which is inconsistent -with packages under "start". (xtal8, #1994) - Patch to support "xxd -ps". (Erik Auerswald, 2018 May 1) Lacks a test. @@ -3016,8 +3035,6 @@ More patches: - Add 'cscopeignorecase' option. (Liang Wenzhi, 2006 Sept 3) - Extra argument to strtrans() to translate special keys to their name (Eric Arnold, 2006 May 22) -- 'threglookexp' option: only match with first word in thesaurus file. - (Jakson A. Aquino, 2006 Jun 14) - Mac: indicate whether a buffer was modified. (Nicolas Weber, 2006 Jun 30) - Allow negative 'nrwidth' for left aligning. (Nathan Laredo, 2006 Aug 16) - ml_append_string(): efficiently append to an existing line. (Brad diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -1,4 +1,4 @@ -*usr_27.txt* For Vim version 8.1. Last change: 2018 Jan 26 +*usr_27.txt* For Vim version 8.1. Last change: 2019 Jul 14 VIM USER MANUAL - by Bram Moolenaar @@ -474,19 +474,19 @@ the line break happens, because all item break. To check for a line break in a specific place, use the "\n" item: > - /the\nword + /one\ntwo -This will match at a line that ends in "the" and the next line starts with -"word". To match "the word" as well, you need to match a space or a line +This will match at a line that ends in "one" and the next line starts with +"two". To match "one two" as well, you need to match a space or a line break. The item to use for it is "\_s": > - /the\_sword + /one\_stwo To allow any amount of white space: > - /the\_s\+word + /one\_s\+two -This also matches when "the " is at the end of a line and " word" at the +This also matches when "one " is at the end of a line and " two" at the start of the next one. "\s" matches white space, "\_s" matches white space or a line break. diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -7625,8 +7625,8 @@ Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi) Files: src/ex_eval.c, src/ex_getln.c, src/farsi.c, src/fileio.c, src/fold.c, src/getchar.c, src/gui.c, src/gui_at_fs.c, - gui_at_sb.c, src/gui_athena.c, src/gui_beval.c, src/gui_motif.c, - src/gui_w32.c, src/gui_w48.c + src/gui_at_sb.c, src/gui_athena.c, src/gui_beval.c, + src/gui_motif.c, src/gui_w32.c, src/gui_w48.c Patch 7.4.1198 Problem: Still using __ARGS. @@ -8045,7 +8045,7 @@ Patch 7.4.1264 Problem: Crash when receiving an empty array. Solution: Check for array with wrong number of arguments. (Damien) Files: src/channel.c, src/eval.c, src/testdir/test_channel.py, - src/testdir.test_channel.vim + src/testdir/test_channel.vim Patch 7.4.1265 Problem: Not all channel commands are tested. @@ -8454,8 +8454,8 @@ Files: src/os_win32.c Patch 7.4.1336 Problem: Channel NL mode is not supported yet. Solution: Add NL mode support to channels. -Files: src/channel.c, src/netbeans.c, src/structs.h, src/os_unix.d, - src/os_win32.c, src/proto/channel.pro, src/proto/os_unix.pro, +Files: src/channel.c, src/netbeans.c, src/structs.h, src/os_win32.c, + src/proto/channel.pro, src/proto/os_unix.pro, src/proto/os_win32.pro, src/testdir/test_channel.vim, src/testdir/test_channel_pipe.py @@ -13904,7 +13904,7 @@ Problem: Using 'hlsearch' highlightin search match. Solution: Pass NULL as last item to next_search_hl() when searching for 'hlsearch' match. (Shane Harper, closes #1013) -Files: src/screen.c, src/testdir/test_match.vim. +Files: src/screen.c, src/testdir/test_match.vim Patch 7.4.2270 Problem: Insufficient testing for NUL bytes on a raw channel. @@ -18306,13 +18306,13 @@ Patch 8.0.0610 Problem: The screen is redrawn when t_BG is set and used to detect the value for 'background'. Solution: Don't redraw when the value of 'background' didn't change. -Files: src/term.c. +Files: src/term.c Patch 8.0.0611 Problem: When t_u7 is sent a few characters in the second screen line are overwritten and not redrawn later. (Rastislav Barlik) Solution: Move redrawing the screen to after overwriting the characters. -Files: src/main.c, src/term.c. +Files: src/main.c, src/term.c Patch 8.0.0612 Problem: Package directories are added to 'runtimepath' only after loading @@ -27638,7 +27638,7 @@ Files: src/terminal.c, src/testdir/d Patch 8.1.0327 Problem: The "g CTRL-G" command isn't tested much. Solution: Add more tests. (Dominique Pelle, closes #3369) -Files: src/testdir/test_normal.c +Files: src/testdir/test_normal.vim Patch 8.1.0328 Problem: inputlist() doesn't work with a timer. (Dominique Pelle) @@ -29424,7 +29424,7 @@ Patch 8.1.0629 Problem: "gn" selects the wrong text with a multi-line match. Solution: Get the end position from searchit() directly. (closes #3695) Files: src/testdir/test_gn.vim, src/search.c, src/proto/search.pro, - src/edit.c, src/evalfunc.c, src/ex_docmd.c, ex_getln.c, + src/edit.c, src/evalfunc.c, src/ex_docmd.c, src/ex_getln.c, src/normal.c Patch 8.1.0630 @@ -30859,7 +30859,7 @@ Patch 8.1.0849 Problem: Cursorline highlight is not always updated. Solution: Set w_last_cursorline when redrawing. Fix resetting cursor flags when using the popup menu. -Files: src/screen.c, src/popupmenu.c, src/testdir/test_highlight.vim, +Files: src/screen.c, src/popupmnu.c, src/testdir/test_highlight.vim, src/testdir/dumps/Test_cursorline_yank_01.dump Patch 8.1.0850 @@ -33447,7 +33447,7 @@ Patch 8.1.1276 Problem: Cannot combine text properties with syntax highlighting. Solution: Add the "combine" field to prop_type_add(). (closes #4343) Files: runtime/doc/eval.txt, runtime/doc/textprop.txt, src/screen.c, - src/testprop.c, src/structs.h, src/testdir/test_textprop.vim + src/structs.h, src/testdir/test_textprop.vim Patch 8.1.1277 (after 8.1.1276) Problem: Missing screenshot update. diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.1. Last change: 2019 Jun 02 +*windows.txt* For Vim version 8.1. Last change: 2019 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -869,7 +869,7 @@ Alternatively, a popup window can be use option. When set, it overrules the 'previewwindow' and 'previewheight' settings. The option is a comma separated list of values: height maximum height of the popup - width maximu width of the popup + width maximum width of the popup Example: > :set previewpopup=height:10,width:60 < diff --git a/runtime/ftplugin/qf.vim b/runtime/ftplugin/qf.vim --- a/runtime/ftplugin/qf.vim +++ b/runtime/ftplugin/qf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Vim's quickfix window " Maintainer: Lech Lorens -" Last Changed: 30 Apr 2012 +" Last Change: 2019 Jul 15 if exists("b:did_ftplugin") finish @@ -10,7 +10,9 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -let b:undo_ftplugin = "set stl<" +if !get(g:, 'qf_disable_statusline') + let b:undo_ftplugin = "set stl<" -" Display the command that produced the list in the quickfix window: -setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}\ %=%-15(%l,%c%V%)\ %P + " Display the command that produced the list in the quickfix window: + setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}\ %=%-15(%l,%c%V%)\ %P +endif diff --git a/runtime/lang/menu_sr_rs.utf-8.vim b/runtime/lang/menu_sr_rs.utf-8.vim --- a/runtime/lang/menu_sr_rs.utf-8.vim +++ b/runtime/lang/menu_sr_rs.utf-8.vim @@ -27,11 +27,11 @@ menutrans &Version &Верзија menutrans &About &О\ програму " File menu -menutrans &File &Датотека +menutrans &File &Фајл menutrans &Open\.\.\.:e &Отвори\.\.\.:e menutrans Sp&lit-Open\.\.\.:sp &Подели-отвори\.\.\.:sp menutrans Open\ Tab\.\.\.:tabnew Отвори\ картицу\.\.\.:tabnew -menutrans &New:enew &Нова:enew +menutrans &New:enew &Нов:enew menutrans &Close:close &Затвори:close menutrans &Save:w &Сачувај:w menutrans Save\ &As\.\.\.:sav Сачувај\ &као\.\.\.:sav @@ -43,14 +43,14 @@ menutrans E&xit:qa К&рај:qa " Edit menu menutrans &Edit &Уређивање -menutrans &Undou &Вратиu -menutrans &Redo^R &Поврати^R +menutrans &Undou &Поништиu +menutrans &Redo^R &Врати\ измену^R menutrans Rep&eat\. П&онови\. menutrans Cu&t"+x Исе&ци"+x menutrans &Copy"+y &Копирај"+y menutrans &Paste"+gP &Убаци"+gP -menutrans &Paste"+P &Убаци"+gP -menutrans Put\ &Before[p Стави\ пре&д[p +menutrans &Paste"+P &Убаци"+P +menutrans Put\ &Before[p Стави\ испре&д[p menutrans Put\ &After]p Стави\ &иза]p menutrans &Deletex Из&бришиx menutrans &Select\ allggVG Изабери\ св&еggVG @@ -59,11 +59,11 @@ menutrans Find\ and\ Rep&lace\.\.\. Нађи\ и\ &замени\.\.\. menutrans Settings\ &Window П&розор\ подешавања menutrans Startup\ &Settings По&дешавања\ при\ покретању menutrans &Global\ Settings Оп&шта\ подешавања -menutrans F&ile\ Settings Подешавања\ за\ да&тотеке -menutrans &Shiftwidth &Померај +menutrans F&ile\ Settings Подешавања\ за\ фај&лове +menutrans &Shiftwidth &Корак\ увлачења menutrans Soft\ &Tabstop &Мека\ табулација menutrans Te&xt\ Width\.\.\. &Ширина\ текста\.\.\. -menutrans &File\ Format\.\.\. &Врста\ датотеке\.\.\. +menutrans &File\ Format\.\.\. &Врста\ фајла\.\.\. menutrans Show\ C&olor\ Schemes\ in\ Menu Прикажи\ шеме\ бо&ја\ у\ менију menutrans C&olor\ Scheme \Шеме\ бо&ја menutrans Show\ &Keymaps\ in\ Menu Прикажи\ прес&ликавања\ тастатуре\ у\ менију @@ -71,15 +71,15 @@ menutrans &Keymap Прес&ликавања\ тастатуре menutrans Select\ Fo&nt\.\.\. Избор\ &фонта\.\.\. " Edit/Global Settings -menutrans Toggle\ Pattern\ &Highlight:set\ hls! Нагласи\ &образце\ (да/не):set\ hls! +menutrans Toggle\ Pattern\ &Highlight:set\ hls! Истицање\ &шаблона\ (да/не):set\ hls! menutrans Toggle\ &Ignoring\ Case:set\ ic! Занемари\ величину\ &слова\ (да/не):set\ ic! -menutrans Toggle\ &Showing\ Matched\ Pairs:set\ sm! Провери\ пратећу\ &заграду\ (да/не):set\ sm! +menutrans Toggle\ &Showing\ Matched\ Pairs:set\ sm! Прикажи\ упарену\ &заграду\ (да/не):set\ sm! menutrans &Context\ lines Видљиви\ &редови menutrans &Virtual\ Edit Виртуелно\ &уређивање -menutrans Toggle\ Insert\ &Mode:set\ im! Режим\ у&носа\ (да/не):set\ im! +menutrans Toggle\ Insert\ &Mode:set\ im! Режим\ У&метање\ (да/не):set\ im! menutrans Toggle\ Vi\ C&ompatibility:set\ cp! '&Vi'\ сагласно\ (да/не):set\ cp! menutrans Search\ &Path\.\.\. Путања\ &претраге\.\.\. -menutrans Ta&g\ Files\.\.\. &Датотеке\ ознака\.\.\. +menutrans Ta&g\ Files\.\.\. &Фајлови\ ознака\.\.\. menutrans Toggle\ &Toolbar Линија\ са\ &алаткама\ (да/не) menutrans Toggle\ &Bottom\ Scrollbar Доња\ л&инија\ клизања\ (да/не) menutrans Toggle\ &Left\ Scrollbar &Лева\ линија\ клизања\ (да/не) @@ -88,8 +88,8 @@ menutrans Toggle\ &Right\ Scrollbar &Десна\ линија\ клизања\ (да/не) " Edit/Global Settings/Virtual Edit menutrans Never Никад menutrans Block\ Selection Избор\ блока -menutrans Insert\ mode Режим\ уноса -menutrans Block\ and\ Insert Блок\ и\ унос +menutrans Insert\ mode Режим\ Уметање +menutrans Block\ and\ Insert Блок\ и\ Уметање menutrans Always Увек " Edit/File Settings @@ -109,13 +109,13 @@ menutrans None Без\ пресликавања menutrans &Tools &Алатке menutrans &Jump\ to\ this\ tagg^] Скочи\ на\ &ову\ ознакуg^] menutrans Jump\ &back^T Скочи\ &натраг^T -menutrans Build\ &Tags\ File Изгради\ &датотеку\ ознака +menutrans Build\ &Tags\ File Изгради\ &фајл\ ознака menutrans &Spelling Пра&вопис menutrans &Folding &Подвијање -menutrans Create\ &Foldzf С&твори\ подвијутакzf -menutrans &Delete\ Foldzd О&бриши\ подвијутакzd -menutrans Delete\ &All\ FoldszD Обриши\ све\ по&двијуткеzD -menutrans Fold\ column\ &width Ширина\ &реда\ подвијутка +menutrans Create\ &Foldzf С&твори\ свијутакzf +menutrans &Delete\ Foldzd О&бриши\ свијутакzd +menutrans Delete\ &All\ FoldszD Обриши\ све\ св&ијуткеzD +menutrans Fold\ column\ &width Ширина\ &реда\ цвијутка "menutrans &Diff &Упоређивање menutrans &Make:make 'mak&е':make menutrans &List\ Errors:cl Списак\ &грешака:cl @@ -146,15 +146,15 @@ menutrans Set\ Language\ to\ "en_us" Постави\ језик\ на\ "en_us" menutrans &Find\ More\ Languages Пронађи\ још\ језика " Tools/Folding -menutrans &Enable/Disable\ foldszi &Омогући/прекини\ подвијањеzi +menutrans &Enable/Disable\ foldszi &Омогући/прекини\ свијањеzi menutrans &View\ Cursor\ Linezv &Покажи\ ред\ са\ курсоромzv menutrans Vie&w\ Cursor\ Line\ onlyzMzx Покажи\ &само\ ред\ са\ курсоромzMzx -menutrans C&lose\ more\ foldszm &Затвори\ више\ подвијутакаzm -menutrans &Close\ all\ foldszM Затвори\ с&ве\ подвијуткеzM -menutrans O&pen\ more\ foldszr Отвори\ виш&е\ подвијутакаzr -menutrans &Open\ all\ foldszR О&твори\ све\ подвијуткеzR +menutrans C&lose\ more\ foldszm &Затвори\ више\ свијутакаzm +menutrans &Close\ all\ foldszM Затвори\ с&ве\ свијуткеzM +menutrans O&pen\ more\ foldszr Отвори\ виш&е\ свијутакаzr +menutrans &Open\ all\ foldszR О&твори\ све\ свијуткеzR menutrans Fold\ Met&hod &Начин\ подвијања -menutrans Fold\ Col&umn\ Width Ширина\ колоне\ испред\ подвијутака +menutrans Fold\ Col&umn\ Width Ширина\ колоне\ испред\ свијутака " Tools/Folding/Fold Method menutrans M&anual &Ручно @@ -181,7 +181,7 @@ menutrans Delete &Обриши menutrans &Alternate А&лтернативни menutrans &Next &Следећи menutrans &Previous &Претходни -menutrans [No\ File] [Нема\ датотеке] +menutrans [No\ File] [Нема\ фајла] " Window menu menutrans &Window &Прозор @@ -189,7 +189,7 @@ menutrans &New^Wn &Нови^Wn menutrans S&plit^Ws &Подели^Ws menutrans Sp&lit\ To\ #^W^^ Подели\ са\ &алтернативним^W^^ menutrans Split\ &Vertically^Wv Подели\ &усправно^Wv -menutrans Split\ File\ E&xplorer Подели\ за\ преглед\ &датотека +menutrans Split\ File\ E&xplorer Подели\ за\ преглед\ &фајлова menutrans &Close^Wc &Затвори^Wc menutrans Close\ &Other(s)^Wo Затвори\ &остале^Wo "menutrans Ne&xt^Ww &Следећи^Ww @@ -210,7 +210,7 @@ menutrans &Left\ side^WH У&лево^WH menutrans &Right\ side^WL У&десно^WL " The popup menu -menutrans &Undo &Врати +menutrans &Undo &Поништи menutrans Cu&t &Исеци menutrans &Copy &Копирај menutrans &Paste &Убаци @@ -218,7 +218,7 @@ menutrans &Delete И&збриши menutrans Select\ Blockwise Бирај\ б&локовски menutrans Select\ &Word Изабери\ &реч menutrans Select\ &Sentence Изабери\ р&еченицу -menutrans Select\ Pa&ragraph Изабери\ &параграф +menutrans Select\ Pa&ragraph Изабери\ &пасус menutrans Select\ &Line Изабери\ р&ед menutrans Select\ &Block Изабери\ &блок menutrans Select\ &All Изабери\ &све @@ -264,13 +264,13 @@ endif " Syntax menu menutrans &Syntax &Синтакса -menutrans &Show\ File\ Types\ in\ Menu Прикажи\ типове\ датотека\ у\ &менију +menutrans &Show\ File\ Types\ in\ Menu Прикажи\ типове\ фајлова\ у\ &менију menutrans Set\ '&syntax'\ only Поде&си\ само\ 'syntax' menutrans Set\ '&filetype'\ too Подеси\ &такође\ и\ 'filetype' menutrans &Off &Искључено menutrans &Manual &Ручно menutrans A&utomatic &Аутоматски -menutrans on/off\ for\ &This\ file Да/не\ за\ ову\ &датотеку +menutrans on/off\ for\ &This\ file Да/не\ за\ овај\ &фајл menutrans Co&lor\ test Провера\ &боја menutrans &Highlight\ test Провера\ исти&цања menutrans &Convert\ to\ HTML Претвори\ &у\ HTML @@ -278,17 +278,17 @@ menutrans &Convert\ to\ HTML Претвори\ &у\ HTML " dialog texts let menutrans_help_dialog = "Унесите наредбу или реч чије појашњење тражите:\n\nДодајте i_ за наредбе уноса (нпр. i_CTRL-X)\nДодајте c_ за наредбе командног режима (нпр. с_)\nДодајте ' за имена опција (нпр. 'shiftwidth')" -let g:menutrans_path_dialog = "Унесите пут претраге за датотеке\nРаздвојите зарезима имена директоријума." +let g:menutrans_path_dialog = "Унесите путању претраге за фајлове\nРаздвојите зарезима имена директоријума." -let g:menutrans_tags_dialog = "Унесите имена датотека са ознакама\nРаздвојите зарезима имена." +let g:menutrans_tags_dialog = "Унесите имена фајлова са ознакама\nРаздвојите зарезима имена." let g:menutrans_textwidth_dialog = "Унесите нову ширину текста (0 спречава прелом)" -let g:menutrans_fileformat_dialog = "Изаберите формат записа датотеке" +let g:menutrans_fileformat_dialog = "Изаберите формат записа фајла" let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Откажи" -let menutrans_no_file = "[Нема датотеке]" +let menutrans_no_file = "[Нема фајла]" let &cpo = s:keepcpo unlet s:keepcpo diff --git a/runtime/optwin.vim b/runtime/optwin.vim --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2019 May 25 +" Last Change: 2019 Jul 18 " If there already is an option window, jump to that one. let buf = bufnr('option-window') @@ -479,6 +479,8 @@ call append("$", " \tset wmw=" . &wmw) call append("$", "helpheight\tinitial height of the help window") call append("$", " \tset hh=" . &hh) if has("quickfix") + call append("$", "previewpopup\tuse a popup window for preview") + call append("$", " \tset pvp=" . &pvp) call append("$", "previewheight\tdefault height for the preview window") call append("$", " \tset pvh=" . &pvh) call append("$", "previewwindow\tidentifies the preview window") diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v156" +let g:loaded_netrwPlugin = "v165" let s:keepcpo = &cpo set cpo&vim "DechoRemOn @@ -42,8 +42,8 @@ augroup END " Network Browsing Reading Writing: {{{2 augroup Network au! - au BufReadCmd file://* call netrw#FileUrlRead(expand("")) - au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "sil doau BufReadPost ".fnameescape(expand("")) + au BufReadCmd file://* call netrw#FileUrlEdit(expand("")) + au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand(""))|call netrw#Nread(2,expand(""))|exe "sil doau BufReadPost ".fnameescape(expand("")) au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand(""))|call netrw#Nread(1,expand(""))|exe "sil doau FileReadPost ".fnameescape(expand("")) au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "sil doau BufWritePost ".fnameescape(expand("")) au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "sil doau FileWritePost ".fnameescape(expand("")) @@ -59,7 +59,7 @@ com! -count=1 -nargs=* Nread let s:svpo com! -range=% -nargs=* Nwrite let s:svpos= winsaveview(),call netrw#NetWrite()call winrestview(s:svpos) com! -nargs=* NetUserPass call NetUserPass() com! -nargs=* Nsource let s:svpos= winsaveview()call netrw#NetSource()call winrestview(s:svpos) -com! -nargs=? Ntree call netrw#SetTreetop() +com! -nargs=? Ntree call netrw#SetTreetop(1,) " Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2 com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(,0,0+0,) @@ -81,7 +81,7 @@ if !exists("g:netrw_nogx") if !hasmapto('NetrwBrowseX') nmap gx NetrwBrowseX endif - nno NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '')),netrw#CheckIfRemote()) + nno NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX())) endif if maparg('gx','v') == "" if !hasmapto('NetrwBrowseXVis') @@ -129,19 +129,15 @@ fun! s:LocalBrowse(dirname) elseif isdirectory(a:dirname) " call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") " call Dredir("LocalBrowse ft last set: ","verbose set ft") -" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) sil! call netrw#LocalBrowseCheck(a:dirname) -" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt exe w:netrw_bannercnt -" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) endif else " not a directory, ignore it " call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") endif -" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) " call Dret("s:LocalBrowse") endfun diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Lisp " Maintainer: Charles E. Campbell -" Last Change: Mar 26, 2019 -" Version: 28 +" Last Change: Jul 11, 2019 +" Version: 29 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec @@ -54,7 +54,7 @@ if exists("g:lisp_rainbow") && g:lisp_ra syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0 else - syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster + syn region lispList matchgroup=lispParen start="(" skip="|.\{-}|" matchgroup=lispParen end=")" contains=@lispListCluster syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster endif @@ -608,6 +608,8 @@ if !exists("skip_lisp_syntax_inits") hi def hlLevel8 ctermfg=blue guifg=darkslateblue hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet endif + else + hi def link lispParen Delimiter endif endif diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 8.0 script " Maintainer: Charles E. Campbell -" Last Change: Jun 16, 2019 -" Version: 8.0-22 +" Last Change: July 18, 2019 +" Version: 8.0-23 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -19,38 +19,38 @@ syn keyword vimTodo contained COMBAK FIX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa l[ist] lat lcl[ose] lex[pr] lgete[xpr] lla[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo pyxdo r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags ter[minal] tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop -syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgr[ep] lli[st] lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] pyxfile rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] tf[irst] tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme -syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgrepa[dd] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] th[row] tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu -syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do pythonx qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo -syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lhi[story] lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] pyx quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tl[ast] tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank] -syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove] lgetb[uffer] ll lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] +syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletl dep diffpu[t] dl dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tch[dir] tf[irst] tlmenu tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore] +syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] cle[arjumps] cnor comp[iler] cpf[ile] cun delc[ommand] deletp di[splay] diffs[plit] dli[st] ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs tcld[o] th[row] tln tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme +syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] inor ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tclf[ile] tj[ump] tlnoremenu tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu +syn keyword vimCommand contained abo[veleft] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delep dell diffg[et] dig[raphs] doau e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] te[aroff] tl[ast] tlu tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo +syn keyword vimCommand contained addd arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cn[ext] colo[rscheme] cons[t] cs d[elete] deletel delm[arks] diffo[ff] dir doaut ea el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcd ter[minal] tlm tlunmenu tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank] +syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] com cope[n] cscope debug deletep delp diffp[atch] dj[ump] dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir syn match vimCommand contained "\" -syn keyword vimStdPlugin contained Arguments Break Clear Continue DiffOrig Evaluate Finish Gdb Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns +syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns " vimOptions are caught only when contained in a vimSet {{{2 -syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef ml modeline mousefocus mousetime mzschemegcdll odev osfiletype patchexpr pexpr pmbfn printencoding prompt pythondll quoteescape remap rightleftcmd rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding textmode timeout tm ts ttybuiltin twk ul ur ve vif vts wd wic wildmode winheight wm wrapscan -syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc cul define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousehide mp nf oft pa patchmode pfn popt printexpr pt pythonhome rdt renderoptions rl ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs termguicolors textwidth timeoutlen to tsl ttyfast tws undodir ut verbose viminfo wa weirdinvert wig wildoptions winminheight wmh write -syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cursorbind delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousem mps nrformats ofu packpath path ph pp printfont pumheight pythonthreedll re report rlc rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc termwinkey tf title toolbar tsr ttym twsl undofile varsofttabstop verbosefile viminfofile wak wfh wildchar wim winminwidth wmnu writeany -syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorcolumn dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mousemodel msm nu omnifunc para pdev pheader preserveindent printheader pumwidth pythonthreehome readonly restorescreen rnu ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tal tcldll termwinscroll tgc titlelen toolbariconsize ttimeout ttymouse tx undolevels vartabstop vfile virtualedit warn wfw wildcharm winaltkeys winptydll wmw writebackup -syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorline dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouses mzq number opendevice paragraphs penc pi previewheight printmbcharset pvh pyx redrawtime revins ro ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc termwinsize tgst titleold top ttimeoutlen ttyscroll uc undoreload vb vi visualbell wb wh wildignore window winwidth wop writedelay -syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouseshape mzquantum numberwidth operatorfunc paste perldll pm previewwindow printmbfont pvw pyxversion regexpengine ri rop rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term terse thesaurus titlestring tpm ttm ttytype udf updatecount vbs viewdir vop wc whichwrap wildignorecase winfixheight wiv wrap ws -syn keyword vimOption contained altkeymap arabicshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mouset mzschemedll nuw opfunc pastetoggle pex pmbcs printdevice printoptions pw qe relativenumber rightleft rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi textauto tildeop tl tr tty tw udir updatetime vdir viewoptions vsts wcm wi wildmenu winfixwidth wiw wrapmargin ww -syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco +syn keyword vimOption contained acd ambw arshape background ballooneval bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbcs printdevice printoptions pw qe relativenumber rightleft rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta tagfunc tbi term termwintype tgc titlelen toolbariconsize ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan +syn keyword vimOption contained ai anti autochdir backspace balloonevalterm bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc cul define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr pmbfn printencoding prompt pythondll quoteescape remap rightleftcmd rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline taglength tbidi termbidi terse tgst titleold top ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write +syn keyword vimOption contained akm antialias autoindent backup balloonexpr bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cursorbind delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn popt printexpr pt pythonhome rdt renderoptions rl ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tagrelative tbis termencoding textauto thesaurus titlestring tpm ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany +syn keyword vimOption contained al ar autoread backupcopy bdir bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorcolumn dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph pp printfont pumheight pythonthreedll re report rlc rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tags tbs termguicolors textmode tildeop tl tr tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup +syn keyword vimOption contained aleph arab autowrite backupdir bdlay bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorline dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader preserveindent printheader pumwidth pythonthreehome readonly restorescreen rnu ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tagstack tc termwinkey textwidth timeout tm ts ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay +syn keyword vimOption contained allowrevins arabic autowriteall backupext belloff binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewheight printmbcharset pvh pyx redrawtime revins ro ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tal tcldll termwinscroll tf timeoutlen to tsl ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws +syn keyword vimOption contained altkeymap arabicshape aw backupskip beval bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printmbfont pvw pyxversion regexpengine ri rop rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tb tenc termwinsize tfu title toolbar tsr ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww +syn keyword vimOption contained ambiwidth ari awa balloondelay bevalterm bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll " vimOptions: These are the turn-off setting variants {{{2 -syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolist noloadplugins nolrm noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup -syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp nolnr nolpl nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows -syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr +syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm noma nomagic noml nomod nomodelineexpr nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup +syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomacatsui nomh nomle nomodeline nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows +syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl " vimOptions: These are the invertible variants {{{2 -syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlist invloadplugins invlrm invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup -syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invlnr invlpl invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws -syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr +syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invma invmagic invml invmod invmodelineexpr invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup +syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmacatsui invmh invmle invmodeline invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws +syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl " termcap codes (which can also be set) {{{2 -syn keyword vimOption contained t_8b t_AB t_al t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_RI t_RS t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_so t_sr t_SR t_te t_Te t_ti t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR -syn keyword vimOption contained t_8f t_AF t_AL t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 +syn keyword vimOption contained t_8b t_AB t_al t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_ti t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR +syn keyword vimOption contained t_8f t_AF t_AL t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB syn match vimOption contained "t_%1" syn match vimOption contained "t_#2" syn match vimOption contained "t_#4" @@ -66,7 +66,8 @@ syn keyword vimErrSetting contained bios " AutoCmd Events {{{2 syn case ignore -syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineChanged CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI DirChanged EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew +syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineChanged CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme ColorSchemePre CompleteChanged CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew +syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre " Highlight commonly used Groupnames {{{2 syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo @@ -77,10 +78,11 @@ syn match vimHLGroup contained "Conceal" syn case match " Function Names {{{2 -syn keyword vimFuncName contained abs append arglistid assert_equal assert_false assert_notmatch atan2 browsedir bufname byte2line ceil ch_close ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor deletebufline empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getchar getcmdpos getcurpos getfsize getline getpos gettabinfo getwinpos glob has_key histdel hlID index inputrestore invert items job_start js_decode keys line log maparg matchaddpos matchlist min nextnonblank perleval prompt_addtext pumvisible range reltime remote_foreground remote_startserver resolve screenchar searchdecl server2client setcharsearch setloclist setreg sha256 sin spellbadword str2float strdisplaywidth string strtrans synconcealed synstack tabpagenr tan term_dumpload term_getattr term_getscrolled term_gettty term_setansicolors term_start test_feedinput test_null_dict test_null_string timer_pause tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview wordcount -syn keyword vimFuncName contained acos appendbufline argv assert_equalfile assert_inrange assert_report balloon_show bufexists bufnr byteidx changenr ch_close_in ch_getjob ch_open ch_sendraw clearmatches complete_check cosh debugbreak did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharmod getcmdtype getcwd getftime getloclist getqflist gettabvar getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode len line2byte log10 mapcheck matcharg matchstr mkdir nr2char pow prompt_setcallback py3eval readfile reltimefloat remote_peek remove reverse screencol searchpair serverlist setcmdpos setmatches settabvar shellescape sinh spellsuggest str2nr strftime strlen strwidth synID system tabpagewinnr tanh term_dumpwrite term_getcursor term_getsize term_list term_setkill term_wait test_garbagecollect_now test_null_job test_override timer_start toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd win_screenpos writefile -syn keyword vimFuncName contained add argc asin assert_exception assert_match assert_true balloon_split buflisted bufwinid byteidxcomp char2nr ch_evalexpr ch_info ch_read ch_setoptions col confirm count deepcopy diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcharsearch getcmdwintype getfontname getftype getmatches getreg gettabwinvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode libcall lispindent luaeval match matchdelete matchstrpos mode or prevnonblank prompt_setinterrupt pyeval reg_executing reltimestr remote_read rename round screenrow searchpairpos setbufline setfperm setpos settabwinvar shiftwidth sort split strcharpart strgetchar strpart submatch synIDattr systemlist tagfiles tempname term_getaltscreen term_getjob term_getstatus term_scrape term_setrestore test_alloc_fail test_ignore_error test_null_list test_settime timer_stop tr undofile values wildmenumode win_findbuf winheight winline winrestview winwidth xor -syn keyword vimFuncName contained and argidx assert_beeps assert_fails assert_notequal atan browse bufloaded bufwinnr call ch_canread ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection delete diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchangelist getcmdline getcompletion getfperm getjumplist getpid getregtype getwininfo getwinvar has histadd hlexists indent inputlist insert isnan job_setoptions join json_encode libcallnr localtime map matchadd matchend max mzeval pathshorten printf prompt_setprompt pyxeval reg_recording remote_expr remote_send repeat screenattr search searchpos setbufvar setline setqflist setwinvar simplify soundfold sqrt strchars stridx strridx substitute synIDtrans tabpagebuflist taglist term_dumpdiff term_getansicolors term_getline term_gettitle term_sendkeys term_setsize test_autochdir test_null_channel test_null_partial timer_info timer_stopall trim +syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eventhandler exp filereadable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getjumplist getpos gettabvar getwinposx globpath histadd hlID input inputsecret islocked job_setoptions js_decode len lispindent localtime maparg matcharg matchstrpos mzeval perleval popup_create popup_getpos popup_setoptions printf prop_clear prop_type_change py3eval readfile reltimestr remote_send resolve screenchar screenstring searchpos setcharsearch setloclist settabvar sha256 sign_getdefined sign_placelist simplify sound_clear sound_stop sqrt strcharpart strgetchar strpart submatch synconcealed synstack tabpagenr tan term_dumpload term_getattr term_getscrolled term_gettty term_setansicolors term_start test_feedinput test_ignore_error test_null_job test_option_not_set test_setmouse timer_start toupper type values winbufnr win_getid win_id2win winrestcmd winwidth +syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete empty executable expand filewritable floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getline getqflist gettabwinvar getwinposy has histdel hostname inputdialog insert isnan job_start js_encode libcall list2str log mapcheck matchdelete max nextnonblank popup_atcursor popup_dialog popup_hide popup_settext prompt_setcallback prop_find prop_type_delete pyeval reg_executing remote_expr remote_startserver reverse screenchars search server2client setcmdpos setmatches settabwinvar shellescape sign_getplaced sign_undefine sin soundfold spellbadword str2float strchars stridx strridx substitute synID system tabpagewinnr tanh term_dumpwrite term_getcursor term_getsize term_list term_setkill term_wait test_garbagecollect_now test_null_blob test_null_list test_override test_settime timer_stop tr undofile virtcol wincol win_gotoid winlayout winrestview wordcount +syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline environ execute expandcmd filter fmod foldlevel function getbufvar getcmdline getcurpos getfsize getloclist getreg gettagstack getwinvar has_key histget iconv inputlist invert items job_status json_decode libcallnr listener_add log10 match matchend min nr2char popup_beval popup_filter_menu popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyxeval reg_recording remote_foreground remove round screencol searchdecl serverlist setenv setpos settagstack shiftwidth sign_jump sign_unplace sinh sound_playevent spellsuggest str2list strdisplaywidth string strtrans swapinfo synIDattr systemlist tagfiles tempname term_getaltscreen term_getjob term_getstatus term_scrape term_setrestore test_alloc_fail test_garbagecollect_soon test_null_channel test_null_partial test_refcount timer_info timer_stopall trim undotree visualmode win_execute winheight winline winsaveview writefile +syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype escape exepath extend finddir fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getmatches getregtype getwininfo glob haslocaldir histnr indent inputrestore isdirectory job_getchannel job_stop json_encode line listener_flush luaeval matchadd matchlist mkdir or popup_clear popup_filter_yesno popup_move pow prompt_setprompt prop_remove prop_type_list range reltime remote_peek rename rubyeval screenpos searchpair setbufline setfperm setqflist setwinvar sign_define sign_place sign_unplacelist sort sound_playfile split str2nr strftime strlen strwidth swapname synIDtrans tabpagebuflist taglist term_dumpdiff term_getansicolors term_getline term_gettitle term_sendkeys term_setsize test_autochdir test_getvalue test_null_dict test_null_string test_scrollbar timer_pause tolower trunc uniq wildmenumode win_findbuf win_id2tabwin winnr win_screenpos xor +syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler eval exists feedkeys findfile fnamemodify foldtextresult get getchar getcmdtype getenv getftype getpid gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isinf job_info join keys line2byte listener_remove map matchaddpos matchstr mode pathshorten popup_close popup_getoptions popup_notification prevnonblank prop_add prop_type_add pumvisible readdir reltimefloat remote_read repeat screenattr screenrow searchpairpos setbufvar setline setreg "--- syntax here and above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 @@ -393,9 +395,9 @@ syn case match " Maps {{{2 " ==== syn match vimMap "\!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs -syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs +syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword vimMap mapc[lear] smapc[lear] -syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs +syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs diff --git a/runtime/tutor/README.txt b/runtime/tutor/README.txt --- a/runtime/tutor/README.txt +++ b/runtime/tutor/README.txt @@ -24,7 +24,7 @@ Translation ----------- The tutor.xx and tutor.xx.utf-8 files are translated files (where xx is the -langage code). The encoding of tutor.xx might be latin1 or other traditional +language code). The encoding of tutor.xx might be latin1 or other traditional encoding. If you don't need a translation with such traditional encoding, you just need to prepare the tutor.xx.utf-8 file. If you need another encoding, you can also prepare a file named tutor.xx.enc diff --git a/src/po/sr.po b/src/po/sr.po --- a/src/po/sr.po +++ b/src/po/sr.po @@ -121,7 +121,7 @@ msgstr "E37: Није било уписа од последње промене" msgid "W14: Warning: List of file names overflow" msgstr "" -"W14: Упозорење: Прекорачена је максимална величина листе имена датотека" +"W14: Упозорење: Прекорачена је максимална величина листе имена фајлова" #, c-format msgid "E92: Buffer %ld not found" @@ -149,7 +149,7 @@ msgid "[Not edited]" msgstr "[Није уређивано]" msgid "[New file]" -msgstr "[Нова датотека]" +msgstr "[Нов фајл]" msgid "[Read errors]" msgstr "[Грешке при читању]" @@ -263,7 +263,7 @@ msgid "E906: not an open channel" msgstr "E906: није отворен канал" msgid "E920: _io file requires _name to be set" -msgstr "E920: _io датотека захтева да _name буде постављено" +msgstr "E920: _io фајл захтева да _name буде постављено" msgid "E915: in_io buffer requires in_buf or in_name to be set" msgstr "E915: in_io бафер захтева да in_buf или in_name буде постављено" @@ -273,7 +273,7 @@ msgid "E918: buffer must be loaded: %s" msgstr "E918: бафер мора бити учитан: %s" msgid "E821: File is encrypted with unknown method" -msgstr "E821: Датотека је шифрована непознатом методом" +msgstr "E821: Фајл је шифрован непознатом методом" msgid "Warning: Using a weak encryption method; see :help 'cm'" msgstr "Упозорење: Користи се слаба метода шифрирања; погледајте :help 'cm'" @@ -318,13 +318,13 @@ msgid "E96: Cannot diff more than %ld bu msgstr "E96: Не може да се упоређује више од %ld бафера" msgid "E810: Cannot read or write temp files" -msgstr "E810: Није могуће читање или упис у привремене датотеке" +msgstr "E810: Није могуће читање или упис у привремене фајлове" msgid "E97: Cannot create diffs" msgstr "E97: Није могуће креирање diff-ова" msgid "Patch file" -msgstr "Patch датотека" +msgstr "Patch фајл" msgid "E816: Cannot read patch output" msgstr "E816: Није могуће читање patch излаза" @@ -359,10 +359,10 @@ msgid "E104: Escape not allowed in digra msgstr "E104: Escape није дозвољен у digraph" msgid "E544: Keymap file not found" -msgstr "E544: Keymap датотека није пронађена" +msgstr "E544: Keymap фајл није пронађен" msgid "E105: Using :loadkeymap not in a sourced file" -msgstr "E105: Коришћење :loadkeymap ван датотеке која се учитава као скрипта" +msgstr "E105: Коришћење :loadkeymap ван фајла који се учитава као скрипта" msgid "E791: Empty keymap entry" msgstr "E791: Празна keymap ставка" @@ -377,7 +377,7 @@ msgid " Whole line completion (^L^N^P)" msgstr " Довршавање целе линије (^L^N^P)" msgid " File name completion (^F^N^P)" -msgstr " Довршавање имена датотеке (^F^N^P)" +msgstr " Довршавање имена фајла (^F^N^P)" msgid " Tag completion (^]^N^P)" msgstr " Довршавање ознаке (^]^N^P)" @@ -410,7 +410,7 @@ msgid " Keyword Local completion (^N^P)" msgstr " Довршавање локалне кључне речи (^N^P)" msgid "Hit end of paragraph" -msgstr "Достигнут крај пасуса" +msgstr "Достигнут је крај пасуса" msgid "E839: Completion function changed window" msgstr "E839: Функција довршавања је променила прозор" @@ -442,7 +442,7 @@ msgid "Scanning tags." msgstr "Скенирање ознака." msgid "match in file" -msgstr "подударање у датотеци" +msgstr "подударање у фајлу" msgid " Adding" msgstr " Додавање" @@ -805,7 +805,7 @@ msgid "E935: invalid submatch number: %d msgstr "E935: неисправан број подпоклапања: %d" msgid "E677: Error writing temp file" -msgstr "E677: Грешка при упису temp датотеке" +msgstr "E677: Грешка при упису temp фајла" msgid "E921: Invalid callback argument" msgstr "E921: Неисправан callback аргумент" @@ -859,11 +859,11 @@ msgid "%sviminfo: %s in line: " msgstr "%sviminfo: %s у линији: " msgid "E136: viminfo: Too many errors, skipping rest of file" -msgstr "E136: viminfo: Превише грешака, остатак датотеке се прескаче" +msgstr "E136: viminfo: Превише грешака, остатак фајла се прескаче" #, c-format msgid "Reading viminfo file \"%s\"%s%s%s" -msgstr "Читање viminfo датотеке \"%s\"%s%s%s" +msgstr "Читање viminfo фајла \"%s\"%s%s%s" msgid " info" msgstr " инфо" @@ -872,44 +872,44 @@ msgid " marks" msgstr " маркера" msgid " oldfiles" -msgstr " старихдатотека" +msgstr " старихфајлова" msgid " FAILED" msgstr " НЕУСПЕЛО" #, c-format msgid "E137: Viminfo file is not writable: %s" -msgstr "E137: Viminfo датотека није уписива: %s" +msgstr "E137: Viminfo фајл није уписив: %s" #, c-format msgid "E929: Too many viminfo temp files, like %s!" -msgstr "E929: Превише viminfo temp датотека, као %s!" +msgstr "E929: Превише viminfo temp фајлова, као %s!" #, c-format msgid "E138: Can't write viminfo file %s!" -msgstr "E138: Viminfo датотека %s не може да се упише!" +msgstr "E138: Viminfo фајл %s не може да се упише!" #, c-format msgid "Writing viminfo file \"%s\"" -msgstr "Уписивање viminfo датотеке \"%s\"" +msgstr "Уписивање viminfo фајла \"%s\"" #, c-format msgid "E886: Can't rename viminfo file to %s!" -msgstr "E886: Viminfo датотека не може да се преименује у %s!" +msgstr "E886: Viminfo фајл не може да се преименује у %s!" #, c-format msgid "# This viminfo file was generated by Vim %s.\n" -msgstr "# Ову viminfo датотеку је генерисао Vim %s.\n" +msgstr "# Овај viminfo фајл је генерисао Vim %s.\n" msgid "" "# You may edit it if you're careful!\n" "\n" msgstr "" -"# Можете да је уређујете ако сте опрезни!\n" +"# Можете да га уређујете ако сте опрезни!\n" "\n" msgid "# Value of 'encoding' when this file was written\n" -msgstr "# Вредност опције 'encoding' када је ова датотека написана\n" +msgstr "# Вредност опције 'encoding' када је овај фајл записан\n" msgid "Illegal starting char" msgstr "Неисправан почетни карактер" @@ -925,29 +925,29 @@ msgid "Save As" msgstr "Сачувај као" msgid "Write partial file?" -msgstr "Да упишем парцијалну датотеку?" +msgstr "Да упишем парцијални фајл?" msgid "E140: Use ! to write partial buffer" msgstr "E140: Користите ! да бисте уписали парцијални бафер" #, c-format msgid "Overwrite existing file \"%s\"?" -msgstr "Да препишем постојећи датотеку \"%s\"?" +msgstr "Да препишем постојећи фајл \"%s\"?" #, c-format msgid "Swap file \"%s\" exists, overwrite anyway?" -msgstr "Swap датотека \"%s\" постоји, да је препишем у сваком случају?" +msgstr "Swap фајл \"%s\" постоји, да га препишем у сваком случају?" #, c-format msgid "E768: Swap file exists: %s (:silent! overrides)" -msgstr "E768: Swap датотека постоји: %s (:silent! премошћава)" +msgstr "E768: Swap фајл постоји: %s (:silent! премошћава)" #, c-format msgid "E141: No file name for buffer %ld" -msgstr "E141: Нема имена датотеке за бафер %ld" +msgstr "E141: Нема имена фајла за бафер %ld" msgid "E142: File not written: Writing is disabled by 'write' option" -msgstr "E142: Датотека није уписана: Уписивање је онемогућено опцијом 'write'" +msgstr "E142: Фајл није уписан: Уписивање је онемогућено опцијом 'write'" #, c-format msgid "" @@ -963,7 +963,7 @@ msgid "" "It may still be possible to write it.\n" "Do you wish to try?" msgstr "" -"Дозволе датотеке \"%s\" омогућавају само читање.\n" +"Дозволе за фајл \"%s\" омогућавају само читање.\n" "Можда је ипак могуће да се упише.\n" "Да ли желите да покушате?" @@ -972,7 +972,7 @@ msgid "E505: \"%s\" is read-only (add ! msgstr "E505: \"%s\" је само за читање (додајте ! за премошћавање)" msgid "Edit File" -msgstr "Уреди датотеку" +msgstr "Уреди фајл" #, c-format msgid "E143: Autocommands unexpectedly deleted new buffer %s" @@ -1023,7 +1023,7 @@ msgstr "E148: У global недостаје регуларни израз" #, c-format msgid "Pattern found in every line: %s" -msgstr "Шаблон је пронаћен у свакој линији: %s" +msgstr "Шаблон је пронађен у свакој линији: %s" #, c-format msgid "Pattern not found: %s" @@ -1051,7 +1051,7 @@ msgstr "E149: Жао нам је, нема помоћи за %s" #, c-format msgid "Sorry, help file \"%s\" not found" -msgstr "Жао нам је, датотека помоћи \"%s\" није пронађена" +msgstr "Жао нам је, фајл помоћи \"%s\" није пронађен" #, c-format msgid "E151: No match: %s" @@ -1071,7 +1071,7 @@ msgstr "E670: Помешано је више кодирања фајлова помоћи за језик: %s" #, c-format msgid "E154: Duplicate tag \"%s\" in file %s/%s" -msgstr "E154: Дуплирана ознака \"%s\" у датотеци %s/%s" +msgstr "E154: Дуплирана ознака \"%s\" у фајлу %s/%s" #, c-format msgid "E150: Not a directory: %s" @@ -1103,7 +1103,7 @@ msgid "E158: Invalid buffer name: %s" msgstr "E158: Неисправно име бафера: %s" msgid "E934: Cannot jump to a buffer that does not have a name" -msgstr "E934: Не може да се скочи на бафер који нема име`" +msgstr "E934: Не може да се скочи на бафер који нема име" #, c-format msgid "E157: Invalid sign ID: %ld" @@ -1123,7 +1123,7 @@ msgid "[Deleted]" msgstr "[Обрисано]" msgid "No old files" -msgstr "Нема старих датотека" +msgstr "Нема старих фајлова" msgid "Entering Debug mode. Type \"cont\" to continue." msgstr "Улазак у Debug режим. Откуцајте \"cont\" за наставак." @@ -1134,7 +1134,7 @@ msgstr "Старавред = \"%s\"" #, c-format msgid "Newval = \"%s\"" -msgstr "Новаавред = \"%s\"" +msgstr "Новавред = \"%s\"" #, c-format msgid "line %ld: %s" @@ -1189,13 +1189,13 @@ msgid "Warning: Entered other buffer une msgstr "Упозорење: Неочекивано се прешло у други бафер (проверите аутокоманде)" msgid "E163: There is only one file to edit" -msgstr "E163: Постоји само једна датотека за уређивање" +msgstr "E163: Постоји само један фајл за уређивање" msgid "E164: Cannot go before first file" -msgstr "E164: Не може да се иде испред прве датотеке" +msgstr "E164: Не може да се иде испред првог фајла" msgid "E165: Cannot go beyond last file" -msgstr "E165: Не може да се иде испред прве датотеке" +msgstr "E165: Не може да се иде иза последњег фајла" #, c-format msgid "E666: compiler not supported: %s" @@ -1216,12 +1216,12 @@ msgstr "није пронађено у '%s': \"%s\"" #, c-format msgid "W20: Required python version 2.x not supported, ignoring file: %s" msgstr "" -"W20: Захтевани python version 2.x није подржан, датотека: %s се игнорише" +"W20: Захтевани python верзије 2.x није подржан, фајл: %s се игнорише" #, c-format msgid "W21: Required python version 3.x not supported, ignoring file: %s" msgstr "" -"W21: Захтевани python version 3.x није подржан, датотека: %s се игнорише" +"W21: Захтевани python верзије 3.x није подржан, фајл: %s се игнорише" msgid "Source Vim script" msgstr "Изворна Vim скрипта" @@ -1232,11 +1232,11 @@ msgstr "Директоријум не може да буде извор: \"%s\"" #, c-format msgid "could not source \"%s\"" -msgstr "не може бити извор \"%s\"" +msgstr "не може да се прибави \"%s\"" #, c-format msgid "line %ld: could not source \"%s\"" -msgstr "линија %ld: не може бити извор \"%s\"" +msgstr "линија %ld: не може да се прибави \"%s\"" #, c-format msgid "sourcing \"%s\"" @@ -1273,10 +1273,10 @@ msgid "W15: Warning: Wrong line separato msgstr "W15: Упозорење: Погрешан сепаратор линије, можда недостаје ^M" msgid "E167: :scriptencoding used outside of a sourced file" -msgstr "E167: :scriptencoding се користи ван изворишне датотеке" +msgstr "E167: :scriptencoding се користи ван изворишног фајла" msgid "E168: :finish used outside of a sourced file" -msgstr "E168: :finish се користи ван изворишне датотеке" +msgstr "E168: :finish се користи ван изворишног фајла" #, c-format msgid "Current %slanguage: \"%s\"" @@ -1291,7 +1291,7 @@ msgstr "" "Улазак у Ex режим. Откуцајте \"visual\" да бисте прешли у Нормални режим." msgid "E501: At end-of-file" -msgstr "E501: На крају-датотеке" +msgstr "E501: На крају-фајла" msgid "E169: Command too recursive" msgstr "E169: Команда је сувише рекурзивна" @@ -1301,7 +1301,7 @@ msgid "E605: Exception not caught: %s" msgstr "E605: Изузетак није ухваћен: %s" msgid "End of sourced file" -msgstr "Крај изворишне датотеке" +msgstr "Крај изворишног фајла" msgid "End of function" msgstr "Крај функције" @@ -1328,18 +1328,18 @@ msgid "E319: Sorry, the command is not a msgstr "E319: Жао нам је, та команда није доступна у овој верзији" msgid "1 more file to edit. Quit anyway?" -msgstr "Још 1 датотека за уређивање. Ипак желите да напустите програм?" +msgstr "Још 1 фајл за уређивање. Ипак желите да напустите програм?" #, c-format msgid "%d more files to edit. Quit anyway?" -msgstr "Још %d датотека за уређивање. Ипак желите да напустите програм?" +msgstr "Још %d фајлова за уређивање. Ипак желите да напустите програм?" msgid "E173: 1 more file to edit" -msgstr "E173: Још 1 датотека за уређивање" +msgstr "E173: Још 1 фајл за уређивање" #, c-format msgid "E173: %ld more files to edit" -msgstr "E173: Још %ld датотека за уређивање" +msgstr "E173: Још %ld фајлова за уређивање" msgid "E174: Command already exists: add ! to replace it" msgstr "E174: Команда већ постоји: додајте ! да је замените" @@ -1421,17 +1421,17 @@ msgid "Already only one tab page" msgstr "Већ сте на само једној картици" msgid "Edit File in new window" -msgstr "Уређивање Датотеке у новом прозору" +msgstr "Уређивање Фајла у новом прозору" #, c-format msgid "Tab page %d" msgstr "Картица %d" msgid "No swap file" -msgstr "Нема swap датотеке" +msgstr "Нема swap фајла" msgid "Append File" -msgstr "Додавање на крај Датотеке" +msgstr "Додавање на крај Фајла" msgid "E747: Cannot change directory, buffer is modified (add ! to override)" msgstr "" @@ -1497,7 +1497,7 @@ msgid "E194: No alternate file name to s msgstr "E194: Нема алтернативног имена које би заменило '#'" msgid "E495: no autocommand file name to substitute for \"\"" -msgstr "E495: нема имена датотеке за аутокоманде које би заменило \"\"" +msgstr "E495: нема имена фајла за аутокоманде које би заменило \"\"" msgid "E496: no autocommand buffer number to substitute for \"\"" msgstr "E496: нема броја бафера за аутокоманду који би заменио \"\"" @@ -1506,20 +1506,20 @@ msgid "E497: no autocommand match name t msgstr "E497: нема имена подударања аутокоманде које би заменило \"\"" msgid "E498: no :source file name to substitute for \"\"" -msgstr "E498: нема имена :source датотеке које би заменило \"\"" +msgstr "E498: нема имена :source фајла које би заменило \"\"" msgid "E842: no line number to use for \"\"" msgstr "E842: нема броја линије који би се користио за \"\"" #, no-c-format msgid "E499: Empty file name for '%' or '#', only works with \":p:h\"" -msgstr "E499: Празно име датотеке за'%' or '#', функционише само са \":p:h\"" +msgstr "E499: Празно име фајла за'%' или '#', функционише само са \":p:h\"" msgid "E500: Evaluates to an empty string" msgstr "E500: Резултат израчунавања је празан стринг" msgid "E195: Cannot open viminfo file for reading" -msgstr "E195: viminfo датотека не може да се отвори за читање" +msgstr "E195: viminfo фајл не може да се отвори за читање" msgid "Untitled" msgstr "Без наслова" @@ -1638,7 +1638,7 @@ msgid "tagname" msgstr "ознака" msgid " kind file\n" -msgstr " врста датотеке\n" +msgstr " врста фајла\n" msgid "'history' option is zero" msgstr "опција 'history' је нула" @@ -1676,31 +1676,31 @@ msgid "E812: Autocommands changed buffer msgstr "E812: Аутокоманде су промениле багер или име бафера" msgid "Illegal file name" -msgstr "Недозвољено име датотеке" +msgstr "Недозвољено име фајла" msgid "is a directory" msgstr "је директоријум" msgid "is not a file" -msgstr "није датотека" +msgstr "није фајл" msgid "is a device (disabled with 'opendevice' option)" msgstr "је уређај (онемогућен опцијом 'opendevice')" msgid "[New File]" -msgstr "[Нова датотека]" +msgstr "[Нов фајл]" msgid "[New DIRECTORY]" msgstr "[Нов ДИРЕКТОРИЈУМ]" msgid "[File too big]" -msgstr "[Датотека је сувише велика]" +msgstr "[Фајл је сувише велики]" msgid "[Permission Denied]" msgstr "[Дозвола одбијена]" msgid "E200: *ReadPre autocommands made the file unreadable" -msgstr "E200: *ReadPre аутокоманде су учиниле датотеку нечитљивом" +msgstr "E200: *ReadPre аутокоманде су учиниле фајл нечитљивим" msgid "E201: *ReadPre autocommands must not change current buffer" msgstr "E201: *ReadPre аутокоманде не смеју да измене текући бафер" @@ -1712,7 +1712,7 @@ msgid "Reading from stdin..." msgstr "Читање са stdin..." msgid "E202: Conversion made file unreadable!" -msgstr "E202: Конверзија је учинила датотеку нечитљивом!" +msgstr "E202: Конверзија је учинила фајл нечитљивим!" msgid "[fifo/socket]" msgstr "[fifo/утичница]" @@ -1750,7 +1750,7 @@ msgid "[READ ERRORS]" msgstr "[ГРЕШКЕ ПРИ ЧИТАЊУ]" msgid "Can't find temp file for conversion" -msgstr "Привремена датотека за конверзију не може да се пронађе" +msgstr "Привремени фајл за конверзију не може да се пронађе" msgid "Conversion with 'charconvert' failed" msgstr "Конверзија са 'charconvert' није успела" @@ -1776,7 +1776,7 @@ msgid "Partial writes disallowed for Net msgstr "Парцијални уписи нису дозвољени за NetBeans бафере" msgid "is not a file or writable device" -msgstr "није датотека или уређај на који може да се уписује" +msgstr "није фајл или уређај на који може да се уписује" msgid "writing to device disabled with 'opendevice' option" msgstr "упис на уређај је онемогућен опцијом 'opendevice'" @@ -1786,38 +1786,38 @@ msgstr "је само за читање (додајте ! за премошћавање)" msgid "E506: Can't write to backup file (add ! to override)" msgstr "" -"E506: Не може да се упише у резервну датотеку (додајте ! за премошћавање)" +"E506: Не може да се упише у резервни фајл (додајте ! за премошћавање)" msgid "E507: Close error for backup file (add ! to override)" msgstr "" -"E507: Грешка код затварања за резервну датотеку (додајте ! за премошћавање)" +"E507: Грешка код затварања за резервни фајл (додајте ! за премошћавање)" msgid "E508: Can't read file for backup (add ! to override)" msgstr "" -"E508: Резервна датотека не може да се прочита (додајте ! за премошћавање)" +"E508: Резервни фајл не може да се прочита (додајте ! за премошћавање)" msgid "E509: Cannot create backup file (add ! to override)" msgstr "" -"E509: Резервна датотека не може да се креира (додајте ! за премошћавање)" +"E509: Резервни фајл не може да се креира (додајте ! за премошћавање)" msgid "E510: Can't make backup file (add ! to override)" msgstr "" -"E510: Резервна датотека не може да се направи (додајте ! за премошћавање)" +"E510: Резервни фајл не може да се направи (додајте ! за премошћавање)" msgid "E214: Can't find temp file for writing" -msgstr "E214: Привремена датотека за упис не може да се пронађе" +msgstr "E214: Привремени фајл за упис не може да се пронађе" msgid "E213: Cannot convert (add ! to write without conversion)" msgstr "E213: Конверзија није могућа (додајте ! за упис без конверзије)" msgid "E166: Can't open linked file for writing" -msgstr "E166: Повезана датотека не може да се отвори за упис" +msgstr "E166: Повезани фајл не може да се отвори за упис" msgid "E212: Can't open file for writing" -msgstr "E212: Датотека не може да се отвори за упис" +msgstr "E212: фајл не може да се отвори за упис" msgid "E949: File changed while writing" -msgstr "E949: Датотека је промењена током уписа" +msgstr "E949: фајл је промењен током уписа" msgid "E512: Close failed" msgstr "E512: Затварање није успело" @@ -1836,7 +1836,7 @@ msgstr "" "празно да премостите)" msgid "E514: write error (file system full?)" -msgstr "E514: грешка при упису (систем датотека је пун?)" +msgstr "E514: грешка при упису (систем фајллова је пун?)" msgid " CONVERSION ERROR" msgstr " ГРЕШКА КОНВЕРЗИЈЕ" @@ -1864,23 +1864,23 @@ msgid " written" msgstr " уписано" msgid "E205: Patchmode: can't save original file" -msgstr "E205: Patch режим: оригинална датотека не може да се сачува" +msgstr "E205: Patch режим: оригинални фајл не може да се сачува" msgid "E206: patchmode: can't touch empty original file" -msgstr "E206: Patch режим: не може да се креира празна оригинална датотека" +msgstr "E206: Patch режим: не може да се креира празан оригинални фајл" msgid "E207: Can't delete backup file" -msgstr "E207: Резервна датотека не може да се обрише" +msgstr "E207: Резервни фајл не може да се обрише" msgid "" "\n" "WARNING: Original file may be lost or damaged\n" msgstr "" "\n" -"УПОЗОРЕЊЕ: Оригинална датотека је можда изгубљена или оштећена\n" +"УПОЗОРЕЊЕ: Оригинални фајл је можда изгубљен или оштећен\n" msgid "don't quit the editor until the file is successfully written!" -msgstr "не напуштајте едитор док се датотека успешно не упише!" +msgstr "не напуштајте едитор док се фајл успешно не упише!" msgid "[dos]" msgstr "[dos]" @@ -1921,10 +1921,10 @@ msgid "[Incomplete last line]" msgstr "[Последња линија није комплетна]" msgid "WARNING: The file has been changed since reading it!!!" -msgstr "УПОЗОРЕЊЕ: Ова датотека је промењена од кад је прочитана!!!" +msgstr "УПОЗОРЕЊЕ: Овај фајл је промењен од кад је прочитан!!!" msgid "Do you really want to write to it" -msgstr "Да ли заиста желите да пишете у њу" +msgstr "Да ли заиста желите да пишете у њега" #, c-format msgid "E208: Error writing to \"%s\"" @@ -1943,14 +1943,14 @@ msgstr "E246: FileChangedShell аутокоманда је обрисала бафер" #, c-format msgid "E211: File \"%s\" no longer available" -msgstr "E211: Датотека \"%s\" више није доступна" +msgstr "E211: Фајл \"%s\" више није доступан" #, c-format msgid "" "W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as " "well" msgstr "" -"W12: Упозорење: Датотека \"%s\" је измењена и бафер у програму Vim је такође " +"W12: Упозорење: Фајл \"%s\" је измењен и бафер у програму Vim је такође " "измењен" msgid "See \":help W12\" for more info." @@ -1959,7 +1959,7 @@ msgstr "Погледајте \":help W12\" за више информација." #, c-format msgid "W11: Warning: File \"%s\" has changed since editing started" msgstr "" -"W11: Упозорење: Датотека \"%s\" је измењена откад је започето уређивање" +"W11: Упозорење: Фајл \"%s\" је измењен откад је започето уређивање" msgid "See \":help W11\" for more info." msgstr "Погледајте \":help W11\" за више информација." @@ -1967,14 +1967,14 @@ msgstr "Погледајте \":help W11\" за више информација." #, c-format msgid "W16: Warning: Mode of file \"%s\" has changed since editing started" msgstr "" -"W16: Упозорење: Режим датотеке \"%s\" је измењен откад је започето уређивање" +"W16: Упозорење: Режим фајла \"%s\" је измењен откад је започето уређивање" msgid "See \":help W16\" for more info." msgstr "Погледајте \":help W16\" за више информација." #, c-format msgid "W13: Warning: File \"%s\" has been created after editing started" -msgstr "W13: Упозорење: Датотека \"%s\" је креирана након почетка уређивања" +msgstr "W13: Упозорење: Фајл \"%s\" је креиран након почетка уређивања" msgid "Warning" msgstr "Упозорење" @@ -1984,7 +1984,7 @@ msgid "" "&Load File" msgstr "" "&OK\n" -"&Учитај датотеку" +"&Учитај фајл" #, c-format msgid "E462: Could not prepare for reloading \"%s\"" @@ -2108,20 +2108,20 @@ msgid "E228: makemap: Illegal mode" msgstr "E228: makemap: Недозвољен режим" msgid "E851: Failed to create a new process for the GUI" -msgstr "E851: Креирање новог процеса за GUI није успело" +msgstr "E851: Креирање новог процеса за ГКИ није успело" msgid "E852: The child process failed to start the GUI" -msgstr "E852: Процес потомак није успео да покрене GUI" +msgstr "E852: Процес потомак није успео да покрене ГКИ" msgid "E229: Cannot start the GUI" -msgstr "E229: GUI не може да се покрене" +msgstr "E229: ГКИ не може да се покрене" #, c-format msgid "E230: Cannot read from \"%s\"" msgstr "E230: Из \"%s\" не може да се чита" msgid "E665: Cannot start GUI, no valid font found" -msgstr "E665: GUI не може да се покрене, није пронађен валидан фонт" +msgstr "E665: ГКИ не може да се покрене, није пронађен валидан фонт" msgid "E231: 'guifontwide' invalid" msgstr "E231: 'guifontwide' неисправан" @@ -2199,7 +2199,7 @@ msgid "Input _Methods" msgstr "_Методе уноса" msgid "VIM - Search and Replace..." -msgstr "VIM - Претрага and Замена..." +msgstr "VIM - Претрага и Замена..." msgid "VIM - Search..." msgstr "VIM - Претрага..." @@ -2268,7 +2268,7 @@ msgid "&Help" msgstr "&Помоћ" msgid "Files" -msgstr "Датотеке" +msgstr "Фајлови" msgid "&OK" msgstr "&ОК" @@ -2419,27 +2419,27 @@ msgid "Printing aborted" msgstr "Штампање прекинуто" msgid "E455: Error writing to PostScript output file" -msgstr "E455: Грешка приликом уписа у PostScript излазну датотеку" +msgstr "E455: Грешка приликом уписа у PostScript излазни фајл" #, c-format msgid "E624: Can't open file \"%s\"" -msgstr "E624: Датотека \"%s\" не може да се отвори" +msgstr "E624: Фајл \"%s\" не може да се отвори" #, c-format msgid "E457: Can't read PostScript resource file \"%s\"" -msgstr "E457: PostScript resource датотека \"%s\" не може да се чита" +msgstr "E457: PostScript resource фајл \"%s\" не може да се чита" #, c-format msgid "E618: file \"%s\" is not a PostScript resource file" -msgstr "E618: датотека \"%s\" није PostScript resource датотека" +msgstr "E618: фајл \"%s\" није PostScript resource фајл" #, c-format msgid "E619: file \"%s\" is not a supported PostScript resource file" -msgstr "E619: датотека \"%s\" није подржана PostScript resource датотека" +msgstr "E619: фајл \"%s\" није подржан PostScript resource фајл" #, c-format msgid "E621: \"%s\" resource file has wrong version" -msgstr "E621: \"%s\" resource датотека је погрешне верзије" +msgstr "E621: \"%s\" resource фајл је погрешне верзије" msgid "E673: Incompatible multi-byte encoding and character set." msgstr "E673: Вишебајтно кодирање и скуп карактера нису компатибилни." @@ -2451,22 +2451,22 @@ msgid "E675: No default font specified f msgstr "E675: Није наведен подразумевани фонт за вишебајтно штампање." msgid "E324: Can't open PostScript output file" -msgstr "E324: PostScript излазна датотека не може да се отвори" +msgstr "E324: PostScript излазни фајл не може да се отвори" #, c-format msgid "E456: Can't open file \"%s\"" -msgstr "E456: Датотека \"%s\" не може да се отвори" +msgstr "E456: Фајл \"%s\" не може да се отвори" msgid "E456: Can't find PostScript resource file \"prolog.ps\"" -msgstr "E456: PostScript resource датотека \"prolog.ps\" не може да се пронађе" +msgstr "E456: PostScript resource фајл \"prolog.ps\" не може да се пронађе" msgid "E456: Can't find PostScript resource file \"cidfont.ps\"" msgstr "" -"E456: PostScript resource датотека \"cidfont.ps\" не може да се пронађе" +"E456: PostScript resource фајл \"cidfont.ps\" не може да се пронађе" #, c-format msgid "E456: Can't find PostScript resource file \"%s.ps\"" -msgstr "E456: PostScript resource датотека \"%s.ps\" не може да се пронађе" +msgstr "E456: PostScript resource фајл \"%s.ps\" не може да се пронађе" #, c-format msgid "E620: Unable to convert to print encoding \"%s\"" @@ -2476,7 +2476,7 @@ msgid "Sending to printer..." msgstr "Слање штампачу..." msgid "E365: Failed to print PostScript file" -msgstr "E365: PostScript датотека није успела да се одштампа" +msgstr "E365: PostScript фајл није успео да се одштампа" msgid "Print job sent." msgstr "Задатак штампе је послат" @@ -2590,9 +2590,9 @@ msgstr "" " c: Пронађи функције које позивају ову функцију\n" " d: Пронађи функције које зове ова функција\n" " e: Пронађи овај egrep шаблон\n" -" f: Пронађи ову датотеку\n" +" f: Пронађи овај фајл\n" " g: Пронађи ову дефиницију\n" -" i: Пронађи датотеке које #includе ову датотеку\n" +" i: Пронађи фајлове који #includе овај фајл\n" " s: Пронађи овај C симбол\n" " t: Пронађи овај текст стринг\n" @@ -2629,7 +2629,7 @@ msgstr "" " # линија" msgid "filename / context / line\n" -msgstr "датотека / контекст / линија\n" +msgstr "фајл / контекст / линија\n" #, c-format msgid "E609: Cscope error: %s" @@ -2897,10 +2897,10 @@ msgstr "Неисправан аргумент for" #, c-format msgid "%d files to edit\n" -msgstr "%d датотека за уређивање\n" +msgstr "%d фајлова за уређивање\n" msgid "netbeans is not supported with this GUI\n" -msgstr "NetBeans није подржан са овим GUI\n" +msgstr "NetBeans није подржан са овим ГКИ\n" msgid "'-nb' cannot be used: not enabled at compile time\n" msgstr "'-nb' не може да се користи: није омогућено у време компилације\n" @@ -2909,7 +2909,7 @@ msgid "This Vim was not compiled with th msgstr "Овај Vim није компајлиран са diff могућношћу." msgid "Attempt to open script file again: \"" -msgstr "Покушај да се поново отвори скрипт датотека: \"" +msgstr "Покушај да се поново отвори скрипт фајл: \"" msgid "Cannot open for reading: \"" msgstr "Не може да се отвори за читање: \"" @@ -2945,16 +2945,16 @@ msgstr "" "Више инфо са: \"vim -h\"\n" msgid "[file ..] edit specified file(s)" -msgstr "[датотека ..] уређуј наведену(е) датотеку(е)" +msgstr "[фајл ..] уређуј наведени(е) фајл(ове)" msgid "- read text from stdin" msgstr "- читај текст са stdin" msgid "-t tag edit file where tag is defined" -msgstr "-t tag уређуј датотеку где је дефинисана ознака" +msgstr "-t tag уређуј фајл где је дефинисана ознака" msgid "-q [errorfile] edit file with first error" -msgstr "-q [дат.грешке] уређуј датотеку са првом грешком" +msgstr "-q [фајлгрешке] уређуј фајл са првом грешком" msgid "" "\n" @@ -2993,7 +2993,7 @@ msgstr "" "Аргументи:\n" msgid "--\t\t\tOnly file names after this" -msgstr "--\t\t\tСамо имена датотека након овога" +msgstr "--\t\t\tСамо имена фајлова након овога" msgid "--literal\t\tDon't expand wildcards" msgstr "--literal\t\tНе развијај џокере" @@ -3005,10 +3005,10 @@ msgid "-unregister\t\tUnregister gvim fo msgstr "-unregister\t\tУклони регистрацију gvim за OLE" msgid "-g\t\t\tRun using GUI (like \"gvim\")" -msgstr "-g\t\t\tПокрени користећи GUI (као \"gvim\")" +msgstr "-g\t\t\tПокрени користећи ГКИ (као \"gvim\")" msgid "-f or --nofork\tForeground: Don't fork when starting GUI" -msgstr "-f или --nofork\tУ предњем плану: немој да рачваш кад се покреће GUI" +msgstr "-f или --nofork\tУ предњем плану: немој да рачваш кад се покреће ГКИ" msgid "-v\t\t\tVi mode (like \"vi\")" msgstr "-v\t\t\tVi режим (као \"vi\")" @@ -3035,7 +3035,7 @@ msgid "-Z\t\t\tRestricted mode (like \"r msgstr "-Z\t\t\tRestricted режим (као \"rvim\")" msgid "-m\t\t\tModifications (writing files) not allowed" -msgstr "-m\t\t\tИзмене (уписивање датотека) нису дозвољене" +msgstr "-m\t\t\tИзмене (уписивање фајлова) нису дозвољене" msgid "-M\t\t\tModifications in text not allowed" msgstr "-M\t\t\tИзмене у тексту нису дозвољене" @@ -3059,13 +3059,13 @@ msgid "-D\t\t\tDebugging mode" msgstr "-D\t\t\tDebugging режим" msgid "-n\t\t\tNo swap file, use memory only" -msgstr "-n\t\t\tБез swap датотеке, користи само меморију" +msgstr "-n\t\t\tБез swap фајла, користи само меморију" msgid "-r\t\t\tList swap files and exit" -msgstr "-r\t\t\tИзлистај swap датотеке и изађи" +msgstr "-r\t\t\tИзлистај swap фајлове и изађи" msgid "-r (with file name)\tRecover crashed session" -msgstr "-r (са именом датотеке)\tОбнови срушену сесију" +msgstr "-r (са именом фајла)\tОбнови срушену сесију" msgid "-L\t\t\tSame as -r" msgstr "-L\t\t\tИсто као -r" @@ -3104,46 +3104,44 @@ msgid "--noplugin\t\tDon't load plugin s msgstr "--noplugin\t\tНе учитавај скрипте додатака" msgid "-p[N]\t\tOpen N tab pages (default: one for each file)" -msgstr "-p[N]\t\tОтвори N картица (подразумевано: по једну за сваку датотеку)" +msgstr "-p[N]\t\tОтвори N картица (подразумевано: по једну за сваки фајл)" msgid "-o[N]\t\tOpen N windows (default: one for each file)" -msgstr "-o[N]\t\tОтвори N прозора (подразумевано: по један за сваку датотеку)" +msgstr "-o[N]\t\tОтвори N прозора (подразумевано: по један за сваки фајл)" msgid "-O[N]\t\tLike -o but split vertically" msgstr "-O[N]\t\tКао -o али подели по вертикали" msgid "+\t\t\tStart at end of file" -msgstr "+\t\t\tПочни на крају датотеке" +msgstr "+\t\t\tПочни на крају фајла" msgid "+\t\tStart at line " msgstr "+<бројл>\t\tПочни на линији <бројл>" msgid "--cmd \tExecute before loading any vimrc file" msgstr "" -"--cmd <команда>\tИзврши <команда> пре учитавања било које vimrc датотеке" +"--cmd <команда>\tИзврши <команда> пре учитавања било ког vimrc фајла" msgid "-c \t\tExecute after loading the first file" -msgstr "-c <команда>\t\tИзврши <команда> након учитавања прве датотеке" +msgstr "-c <команда>\t\tИзврши <команда> након учитавања првог фајла" msgid "-S \t\tSource file after loading the first file" -msgstr "" -"-S <сесија>\t\tИзворна датотека <сесија> након учитавања прве " -"датотеке" +msgstr "-S <сесија>\t\tИзврши фајл <сесија> након учитавања првог фајла" msgid "-s \tRead Normal mode commands from file " msgstr "" -"-s <скриптулаз>\tЧитај команде Нормалног режима из датотеке <скриптулаз>" +"-s <скриптулаз>\tЧитај команде Нормалног режима из фајла <скриптулаз>" msgid "-w \tAppend all typed commands to file " msgstr "" -"-w <скриптизлаз>\tНадовежи све откуцане команде на крај датотеке " +"-w <скриптизлаз>\tНадовежи све откуцане команде на крај фајла " "<скриптизлаз>" msgid "-W \tWrite all typed commands to file " -msgstr "-W <скриптизлаз>\tУписуј све откуцане команде у датотеку <скриптизлаз>" +msgstr "-W <скриптизлаз>\tУписуј све откуцане команде у фајл <скриптизлаз>" msgid "-x\t\t\tEdit encrypted files" -msgstr "-x\t\t\tУређуј шифроване датотеке" +msgstr "-x\t\t\tУређуј шифроване фајлове" msgid "-display \tConnect vim to this particular X-server" msgstr "-display <дисплеј>\tПовежи vim на овај X-сервер" @@ -3152,25 +3150,25 @@ msgid "-X\t\t\tDo not connect to X serve msgstr "-X\t\t\tНе повезуј се на X сервер" msgid "--remote \tEdit in a Vim server if possible" -msgstr "--remote <датотеке>\tУређуј <датотеке> у Vim серверу ако је могуће" +msgstr "--remote <фајлови>\tУређуј <фајлови> у Vim серверу ако је могуће" msgid "--remote-silent Same, don't complain if there is no server" -msgstr "--remote-silent <датотеке> Исто, не буни се ако нема сервера" +msgstr "--remote-silent <фајлови> Исто, не буни се ако нема сервера" msgid "" "--remote-wait As --remote but wait for files to have been edited" msgstr "" -"--remote-wait <датотеке> Као --remote али чекај да датотеке буду уређене" +"--remote-wait <фајлови> Као --remote али чекај да фајлови буду уређени" msgid "" "--remote-wait-silent Same, don't complain if there is no server" -msgstr "--remote-wait-silent <датотеке> Исто, не буни се ако нема сервера" +msgstr "--remote-wait-silent <фајлови> Исто, не буни се ако нема сервера" msgid "" "--remote-tab[-wait][-silent] As --remote but use tab page per file" msgstr "" -"--remote-tab[-wait][-silent] <датотеке> Као --remote али користи једну " -"картицу по датотеци" +"--remote-tab[-wait][-silent] <фајлови> Као --remote али користи једну " +"картицу по фајлу" msgid "--remote-send \tSend to a Vim server and exit" msgstr "--remote-send <тастери>\tПошаљи <тастери> Vim серверу и изађи" @@ -3186,7 +3184,7 @@ msgid "--servername \tSend to/beco msgstr "--servername <име>\tПошаљи/постани Vim сервер <име>" msgid "--startuptime \tWrite startup timing messages to " -msgstr "--startuptime <датотека>\tУпиши поруке о дужини покретања у <датотеку>" +msgstr "--startuptime <фајл>\tУпиши поруке о дужини покретања у <фајл>" msgid "-i \t\tUse instead of .viminfo" msgstr "-i \t\tКористи уместо .viminfo" @@ -3326,14 +3324,14 @@ msgid "" "mark line col file/text" msgstr "" "\n" -"линија маркера кол датотека/текст" +"линија маркера кол фајл/текст" msgid "" "\n" " jump line col file/text" msgstr "" "\n" -" линија скока кол датотека/текст" +" линија скока кол фајл/текст" msgid "" "\n" @@ -3347,7 +3345,7 @@ msgid "" "# File marks:\n" msgstr "" "\n" -"# Маркери датотеке:\n" +"# Маркери фајла:\n" msgid "" "\n" @@ -3361,7 +3359,7 @@ msgid "" "# History of marks within files (newest to oldest):\n" msgstr "" "\n" -"# Историја маркера унутар датотека (ок најновијег до најстаријег):\n" +"# Историја маркера унутар фајлова (од најновијег до најстаријег):\n" msgid "Missing '>'" msgstr "Недостаје '>'" @@ -3392,19 +3390,19 @@ msgid "E293: block was not locked" msgstr "E293: блок није закључан" msgid "E294: Seek error in swap file read" -msgstr "E294: Грешка код постављања показивача за читање swap датотеке" +msgstr "E294: Грешка код постављања показивача за читање swap фајла" msgid "E295: Read error in swap file" -msgstr "E295: Грешка при читању swap датотеке" +msgstr "E295: Грешка при читању swap фајла" msgid "E296: Seek error in swap file write" -msgstr "E296: Грешка код постављања показивача за упис swap датотеке" +msgstr "E296: Грешка код постављања показивача за упис swap фајла" msgid "E297: Write error in swap file" -msgstr "E297: Грешка при упису swap датотеке" +msgstr "E297: Грешка при упису swap фајла" msgid "E300: Swap file already exists (symlink attack?)" -msgstr "E300: Swap датотека већ постоји (symlink напад?)" +msgstr "E300: Swap фајл већ постоји (symlink напад?)" msgid "E298: Didn't get block nr 0?" msgstr "E298: Блок бр 0 није добављен?" @@ -3416,28 +3414,28 @@ msgid "E298: Didn't get block nr 2?" msgstr "E298: Блок бр 2 није добављен?" msgid "E843: Error while updating swap file crypt" -msgstr "E843: Грешка приликом осважавања криптовања swap датотеке" +msgstr "E843: Грешка приликом освежавања криптовања swap фајла" msgid "E301: Oops, lost the swap file!!!" -msgstr "E301: Уупс, swap датотека је изгубљена!!!" +msgstr "E301: Уупс, swap фајл је изгубљен!!!" msgid "E302: Could not rename swap file" -msgstr "E302: Промена имена swap датотеке није успела" +msgstr "E302: Промена имена swap фајла није успела" #, c-format msgid "E303: Unable to open swap file for \"%s\", recovery impossible" msgstr "" -"E303: Отварање swap датотеке за \"%s\" није успело, опоравак је немогућ" +"E303: Отварање swap фајла за \"%s\" није успело, опоравак је немогућ" msgid "E304: ml_upd_block0(): Didn't get block 0??" msgstr "E304: ml_upd_block0(): Блок бр 0 није добављен??" #, c-format msgid "E305: No swap file found for %s" -msgstr "E305: За %s није пронађена swap датотека" +msgstr "E305: За %s није пронађен swap фајл" msgid "Enter number of swap file to use (0 to quit): " -msgstr "Унесите број swap датотеке која ће да се користи (0 за отказивање): " +msgstr "Унесите број swap фајла који ће да се користи (0 за отказивање): " #, c-format msgid "E306: Cannot open %s" @@ -3451,7 +3449,7 @@ msgid "" "Maybe no changes were made or Vim did not update the swap file." msgstr "" "\n" -"Можда нису направљене никакве измене или Vim није освежио swap датотеку." +"Можда нису направљене никакве измене или Vim није освежио swap фајл." msgid " cannot be used with this version of Vim.\n" msgstr " не може да се користи са овом верзијом Vim-а.\n" @@ -3461,20 +3459,20 @@ msgstr "Користите Vim верзијe 3.0.\n" #, c-format msgid "E307: %s does not look like a Vim swap file" -msgstr "E307: %s не изгледа као Vim swap датотека" +msgstr "E307: %s не изгледа као Vim swap фајл" msgid " cannot be used on this computer.\n" msgstr " не може да се користи на овом компјутеру.\n" msgid "The file was created on " -msgstr "Ова датотека је креирана са " +msgstr "Овај фајл је креиран са " msgid "" ",\n" "or the file has been damaged." msgstr "" ",\n" -"или је датотека оштећена." +"или је фајл оштећен." #, c-format msgid "" @@ -3486,25 +3484,25 @@ msgstr " је оштећена (величина странице је маља од минималне вредности).\n" #, c-format msgid "Using swap file \"%s\"" -msgstr "Користи се swap датотека \"%s\"" +msgstr "Користи се swap фајл \"%s\"" #, c-format msgid "Original file \"%s\"" -msgstr "Оригинална датотека \"%s\"" +msgstr "Оригинални фајл \"%s\"" msgid "E308: Warning: Original file may have been changed" -msgstr "E308: Упозорење: Можда је промењена оригинална датотека" +msgstr "E308: Упозорење: Можда је промењен оригинални фајл" #, c-format msgid "Swap file is encrypted: \"%s\"" -msgstr "Swap датотека је шифрована: \"%s\"" +msgstr "Swap фајл је шифрован: \"%s\"" msgid "" "\n" "If you entered a new crypt key but did not write the text file," msgstr "" "\n" -"Ако сте унели нов кључ за шифрирање али нисте уписали текст датотеку," +"Ако сте унели нов кључ за шифрирање али нисте уписали текст фајл," msgid "" "\n" @@ -3518,7 +3516,7 @@ msgid "" "If you wrote the text file after changing the crypt key press enter" msgstr "" "\n" -"Ако сте уписали текст датотеку на диск након промене кључа за шифрирање " +"Ако сте уписали текст фајл на диск након промене кључа за шифрирање " "притисните ентер" msgid "" @@ -3526,7 +3524,7 @@ msgid "" "to use the same key for text file and swap file" msgstr "" "\n" -"да бисте користили исти кључ за текст датотеку и swap датотеку" +"да бисте користили исти кључ за текст фајл и swap фајл" #, c-format msgid "E309: Unable to read block 1 from %s" @@ -3546,7 +3544,7 @@ msgstr "???НЕДОСТАЈУ ЛИНИЈЕ" #, c-format msgid "E310: Block 1 ID wrong (%s not a .swp file?)" -msgstr "E310: ID блока 1 је погрешан (%s није .swp датотека?)" +msgstr "E310: ID блока 1 је погрешан (%s није .swp фајл?)" msgid "???BLOCK MISSING" msgstr "???НЕДОСТАЈЕ БЛОК" @@ -3580,13 +3578,13 @@ msgid "" "(You might want to write out this file under another name\n" msgstr "" "\n" -"(Можда бисте хтели да запишете ову датотеку под другим именом\n" +"(Можда бисте хтели да запишете овај фајл под другим именом\n" msgid "and run diff with the original file to check for changes)" -msgstr "и покренете diff са оригиналном датотеком да провелите има ли измена)" +msgstr "и покренете diff са оригиналним фајлом да проверите има ли измена)" msgid "Recovery completed. Buffer contents equals file contents." -msgstr "Опоравак је завршен. Садржај бафера је истоветан садржају датотеке." +msgstr "Опоравак је завршен. Садржај бафера је истоветан садржају фајла." msgid "" "\n" @@ -3594,14 +3592,14 @@ msgid "" "\n" msgstr "" "\n" -"Сада можда желите да обришете .swp датотеку.\n" +"Сада можда желите да обришете .swp фајл.\n" "\n" msgid "Using crypt key from swap file for the text file.\n" -msgstr "За текст датотеку се користи кључ за шифрирање из swap датотеке.\n" +msgstr "За текст фајл се користи кључ за шифрирање из swap фајла.\n" msgid "Swap files found:" -msgstr "Пронађене су swap датотеке:" +msgstr "Пронађени су swap фајлови:" msgid " In current directory:\n" msgstr " У текућем директоријуму:\n" @@ -3613,32 +3611,32 @@ msgid " In directory " msgstr " У директоријуму " msgid " -- none --\n" -msgstr " -- ниједна --\n" +msgstr " -- ниједан --\n" msgid " owned by: " -msgstr " које поседује: " +msgstr " који поседује: " msgid " dated: " -msgstr " датиране: " +msgstr " датиран: " msgid " dated: " -msgstr " датиране: " +msgstr " датиран: " msgid " [from Vim version 3.0]" msgstr " [од Vim верзије 3.0]" msgid " [does not look like a Vim swap file]" -msgstr " [не изгледа као Vim swap датотека]" +msgstr " [не изгледа као Vim swap фајл]" msgid " file name: " -msgstr " име датотеке: " +msgstr " име фајла: " msgid "" "\n" " modified: " msgstr "" "\n" -" измењено: " +" измењен: " msgid "YES" msgstr "ДА" @@ -3678,14 +3676,14 @@ msgid "" " [not usable with this version of Vim]" msgstr "" "\n" -" [није употребљива са овом верзијом Vim-а]" +" [није употребљив са овом верзијом Vim-а]" msgid "" "\n" " [not usable on this computer]" msgstr "" "\n" -" [није употребљива на овом компјутеру]" +" [није употребљив на овом компјутеру]" msgid " [cannot be read]" msgstr " [не може да се прочита]" @@ -3694,10 +3692,10 @@ msgid " [cannot be opened]" msgstr " [не може да се отвори]" msgid "E313: Cannot preserve, there is no swap file" -msgstr "E313: Не може да се презервира, нема swap датотеке" +msgstr "E313: Не може да се презервира, нема swap фајла" msgid "File preserved" -msgstr "Датотека је презервирана" +msgstr "Фајл је презервиран" msgid "E314: Preserve failed" msgstr "E314: Презервација није успела" @@ -3761,13 +3759,13 @@ msgid "" "Found a swap file by the name \"" msgstr "" "\n" -"Пронађена је swap датотека под именом \"" +"Пронађен је swap фајл под именом \"" msgid "While opening file \"" -msgstr "Док се отварала датотекa \"" +msgstr "Док се отварао фајл \"" msgid " NEWER than swap file!\n" -msgstr " НОВИЈА од swap датотеке!\n" +msgstr " НОВИЈИ од swap фајла!\n" msgid "" "\n" @@ -3776,12 +3774,12 @@ msgid "" " file when making changes. Quit, or continue with caution.\n" msgstr "" "\n" -"(1) Можда други програм уређује исту датотеку. Ако је ово случај,\n" +"(1) Можда други програм уређује исти фајл. Ако је ово случај,\n" " кад правите измене, пазите да не завршите са две различите\n" -" инстанце исте датотеке. Изађите, или опрезно наставите.\n" +" инстанце истог фајла. Изађите, или опрезно наставите.\n" msgid "(2) An edit session for this file crashed.\n" -msgstr "(2) Сесија уређивања ове датотеке се срушила.\n" +msgstr "(2) Сесија уређивања овог фајла се срушила.\n" msgid " If this is the case, use \":recover\" or \"vim -r " msgstr " Ако је ово случај, користите \":recover\" или \"vim -r " @@ -3794,7 +3792,7 @@ msgstr "" " да опоравите измене (погледајте \":help recovery\").\n" msgid " If you did this already, delete the swap file \"" -msgstr " Ако сте ово већ учинили, обришите swap датотеку \"" +msgstr " Ако сте ово већ учинили, обришите swap фајл \"" msgid "" "\"\n" @@ -3804,7 +3802,7 @@ msgstr "" " како би избегли ову поруку.\n" msgid "Swap file \"" -msgstr "Swap датотека \"" +msgstr "Swap фајл \"" msgid "\" already exists!" msgstr "\" већ постоји!" @@ -3813,7 +3811,7 @@ msgid "VIM - ATTENTION" msgstr "VIM - ПАЖЊА" msgid "Swap file already exists!" -msgstr "Swap датотека већ постоји!" +msgstr "Swap фајл већ постоји!" msgid "" "&Open Read-Only\n" @@ -3839,11 +3837,12 @@ msgstr "" "Отвори &Само за читање\n" "Ипак &Уређуј\n" "&Опорави\n" +"Обриши &Га\n" "&Изађи\n" "&Прекини" msgid "E326: Too many swap files found" -msgstr "E326: Пронађено је превише swap датотека" +msgstr "E326: Пронађено је превише swap фајлова" msgid "E327: Part of menu-item path is not sub-menu" msgstr "E327: Део путање ставке менија није подмени" @@ -3952,13 +3951,13 @@ msgid "Select Directory dialog" msgstr "Дијалог избора директоријума" msgid "Save File dialog" -msgstr "Дијалог чувања датотеке" +msgstr "Дијалог чувања фајла" msgid "Open File dialog" -msgstr "Дијалог отварања датотеке" +msgstr "Дијалог отварања фајла" msgid "E338: Sorry, no file browser in console mode" -msgstr "E338: Жао нам је, нема претраживача датотека у конзолном режиму" +msgstr "E338: Жао нам је, нема претраживача фајлова у конзолном режиму" msgid "E766: Insufficient arguments for printf()" msgstr "E766: Недовољно аргумената за printf()" @@ -3970,13 +3969,13 @@ msgid "E767: Too many arguments to print msgstr "E767: Сувише аргумената за printf()" msgid "W10: Warning: Changing a readonly file" -msgstr "W10: Упозорење: Мења се датотека која може само да се чита" +msgstr "W10: Упозорење: Мења се фајл која може само да се чита" msgid "Type number and or click with mouse (empty cancels): " -msgstr "Унесите број и или кликните мишем (ништа за отказ): " +msgstr "Унесите број и <Ентер> или кликните мишем (ништа за отказ): " msgid "Type number and (empty cancels): " -msgstr "Унесите број и (ништа за отказ): " +msgstr "Унесите број и <Ентер> (ништа за отказ): " msgid "1 more line" msgstr "1 линија више" @@ -4064,7 +4063,7 @@ msgstr "E344: Директоријум \"%s\" не може да се пронађе у cdpath" #, c-format msgid "E345: Can't find file \"%s\" in path" -msgstr "E345: Датотека \"%s\" не може да се пронађе у path" +msgstr "E345: Фајл \"%s\" не може да се пронађе у path" #, c-format msgid "E346: No more directory \"%s\" found in cdpath" @@ -4072,18 +4071,18 @@ msgstr "E346: Директоријум \"%s\" више не може да се пронађе у cdpath" #, c-format msgid "E347: No more file \"%s\" found in path" -msgstr "E347: Датотека \"%s\" више не може да се пронађе у path" +msgstr "E347: Фајл \"%s\" више не може да се пронађе у path" #, c-format msgid "E668: Wrong access mode for NetBeans connection info file: \"%s\"" -msgstr "E668: Погрешан режим приступа за инфо датотеку NetBeans везе: \"%s\"" +msgstr "E668: Погрешан режим приступа за инфо фајл NetBeans везе: \"%s\"" #, c-format msgid "E658: NetBeans connection lost for buffer %ld" msgstr "E658: NetBeans веза је изгубљена за бафер %ld" msgid "E838: netbeans is not supported with this GUI" -msgstr "E838: netbeans није подржан са овим GUI" +msgstr "E838: netbeans није подржан са овим ГКИ" msgid "E511: netbeans already connected" msgstr "E511: netbeans је већ повезан" @@ -4284,10 +4283,10 @@ msgid "E529: Cannot set 'term' to empty msgstr "E529: 'term' не може да се постави на празан стринг" msgid "E530: Cannot change term in GUI" -msgstr "E530: term не може да се промени из GUI" +msgstr "E530: term не може да се промени из ГКИ" msgid "E531: Use \":gui\" to start the GUI" -msgstr "E531: Користите \":gui\" да покренете GUI" +msgstr "E531: Користите \":gui\" да покренете ГКИ" msgid "E589: 'backupext' and 'patchmode' are equal" msgstr "E589: 'backupext' и 'patchmode' су истоветни" @@ -4299,7 +4298,7 @@ msgid "E835: Conflicts with value of 'fi msgstr "E835: У конфликту са вредношћу 'fillchars'" msgid "E617: Cannot be changed in the GTK+ 2 GUI" -msgstr "E617: Не може да се промени у GTK+ 2 GUI" +msgstr "E617: Не може да се промени у GTK+ 2 ГКИ" #, c-format msgid "E950: Cannot convert between %s and %s" @@ -4721,14 +4720,14 @@ msgid "No entries" msgstr "Нема уноса" msgid "Error file" -msgstr "Датотека грешака" +msgstr "Фајл грешака" msgid "E683: File name missing or invalid pattern" -msgstr "E683: Недостаје име датотеке или неважећи шаблон" +msgstr "E683: Недостаје име фајла или неважећи шаблон" #, c-format msgid "Cannot open file \"%s\"" -msgstr "Датотека \"%s\" не може да се отвори" +msgstr "Фајл \"%s\" не може да се отвори" msgid "E681: Buffer is not loaded" msgstr "E681: Бафер није учитан" @@ -4911,7 +4910,7 @@ msgstr "E878: (NFA) Није могла да се алоцира меморија за обилазак грана!" msgid "" "Could not open temporary log file for writing, displaying on stderr... " msgstr "" -"Привремена лог датотека није могла да се отвори за упис, приказује се на " +"Привремени лог фајл није могао да се отвори за упис, приказује се на " "stderr... " #, c-format @@ -4919,7 +4918,7 @@ msgid "(NFA) COULD NOT OPEN %s !" msgstr "(NFA) %s НЕ МОЖЕ ДА СЕ ОТВОРИ !" msgid "Could not open temporary log file for writing " -msgstr "Привремена лог датотека није могла да се отвори за упис " +msgstr "Привремени лог фајл није могао да се отвори за упис " msgid " VREPLACE" msgstr "ВЗАМЕНА" @@ -4991,10 +4990,10 @@ msgid " (includes previously listed matc msgstr " (укључује претходно наведена подударања)" msgid "--- Included files " -msgstr "--- Прикључене датотеке " +msgstr "--- Прикључени фајлови " msgid "not found " -msgstr "нису пронађене " +msgstr "нису пронађени " msgid "in path ---\n" msgstr "у путањи ---\n" @@ -5007,20 +5006,20 @@ msgstr " НИЈЕ ПРОНАЂЕНО" #, c-format msgid "Scanning included file: %s" -msgstr "Прегледање уметнуте датотеке: %s" +msgstr "Прегледање прикљученог фајла: %s" #, c-format msgid "Searching included file %s" -msgstr "Претраживање уметнуте датотеке %s" +msgstr "Претраживање прикљученог фајла %s" msgid "E387: Match is on current line" msgstr "E387: Подударање је у текућој линији" msgid "All included files were found" -msgstr "Све уметнуте датотеке су пронађене" +msgstr "Пронађени су сви прикључени фајлови" msgid "No included files" -msgstr "Нема уметнутих датотека" +msgstr "Нема прикључених фајлова" msgid "E388: Couldn't find definition" msgstr "E388: Дефиниција не може да се пронађе" @@ -5086,18 +5085,18 @@ msgid "E753: Not found: %s" msgstr "E753: Није пронађено: %s" msgid "E758: Truncated spell file" -msgstr "E758: Правописна датотека је прекраћена" +msgstr "E758: Правописни фајл је прекраћен" #, c-format msgid "Trailing text in %s line %d: %s" -msgstr "Текст вишак у %s линија %d: %s" +msgstr "Вишак текста у %s линија %d: %s" #, c-format msgid "Affix name too long in %s line %d: %s" msgstr "Име наставка је предугачко у %s линија %d: %s" msgid "E761: Format error in affix file FOL, LOW or UPP" -msgstr "E761: Грешка формата у датотеци наставака FOL, LOW или UPP" +msgstr "E761: Грешка формата у фајлу наставака FOL, LOW или UPP" msgid "E762: Character in FOL, LOW or UPP is out of range" msgstr "E762: Карактер у FOL, LOW или UPP је ван опсега" @@ -5107,43 +5106,43 @@ msgstr "Стабло речи се компресује..." #, c-format msgid "Reading spell file \"%s\"" -msgstr "Читање правописне датотеке \"%s\"" +msgstr "Читање правописног фајла \"%s\"" msgid "E757: This does not look like a spell file" -msgstr "E757: Ово не изгледа као правописна датотека" +msgstr "E757: Ово не изгледа као правописни фајл" msgid "E771: Old spell file, needs to be updated" -msgstr "E771: Стара правописна датотека, потребно је да се освежи" +msgstr "E771: Стари правописни фајл, потребно је да се освежи" msgid "E772: Spell file is for newer version of Vim" -msgstr "E772: Правописна датотека је за новију верзију Vim-а" +msgstr "E772: Правописни фајл је за новију верзију Vim-а" msgid "E770: Unsupported section in spell file" -msgstr "E770: Неподржана секција у правописној датотеци" +msgstr "E770: Неподржана секција у правописном фајлу" #, c-format msgid "E778: This does not look like a .sug file: %s" -msgstr "E778: Ово не изгледа као .sug датотека: %s" +msgstr "E778: Ово не изгледа као .sug фајл: %s" #, c-format msgid "E779: Old .sug file, needs to be updated: %s" -msgstr "E779: Стара .sug датотека, потребно је да се освежи: %s" +msgstr "E779: Стари .sug фајл, потребно је да се освежи: %s" #, c-format msgid "E780: .sug file is for newer version of Vim: %s" -msgstr "E780: .sug датотека је за новију верзију Vim-а: %s" +msgstr "E780: .sug фајл је за новију верзију Vim-а: %s" #, c-format msgid "E781: .sug file doesn't match .spl file: %s" -msgstr "E781: .sug датотека не одговара .spl датотеци: %s" +msgstr "E781: .sug фајл не одговара .spl фајлу: %s" #, c-format msgid "E782: error while reading .sug file: %s" -msgstr "E782: грешка приликом читања .sug датотеке: %s" +msgstr "E782: грешка приликом читања .sug фајла: %s" #, c-format msgid "Reading affix file %s..." -msgstr "Читање датотеке наставака %s..." +msgstr "Читање фајла наставака %s..." #, c-format msgid "Conversion failure for word in %s line %d: %s" @@ -5278,11 +5277,11 @@ msgstr "Неважећи индикатор у %s линија %d: %s" #, c-format msgid "%s value differs from what is used in another .aff file" msgstr "" -"%s вредност се разликује од онога што је коришћено у другој .aff датотеци" +"%s вредност се разликује од онога што је коришћено у другом .aff фајлу" #, c-format msgid "Reading dictionary file %s..." -msgstr "Читање датотеке речника %s..." +msgstr "Читање фајла речника %s..." #, c-format msgid "E760: No word count in %s" @@ -5310,7 +5309,7 @@ msgstr "Игнорисана/о %d реч(и) са не-ASCII карактерима у %s" #, c-format msgid "Reading word file %s..." -msgstr "Читање датотеке речи %s..." +msgstr "Читање фајла речи %s..." #, c-format msgid "Duplicate /encoding= line ignored in %s line %d: %s" @@ -5352,7 +5351,7 @@ msgid "Compressed %d of %d nodes; %d (%d msgstr "Компресовано је %d од %d чворова; преостало је још %d (%d%%)" msgid "Reading back spell file..." -msgstr "Читање правописне датотеке..." +msgstr "Читање правописног фајла..." msgid "Performing soundfolding..." msgstr "Извођење склапања по звучности..." @@ -5367,14 +5366,14 @@ msgstr "Укупан број речи: %d" #, c-format msgid "Writing suggestion file %s..." -msgstr "Уписивање датотеке предлога %s..." +msgstr "Уписивање фајла предлога %s..." #, c-format msgid "Estimated runtime memory use: %d bytes" msgstr "Процењена потребна величина меморије у време извршавања: %d бајтова" msgid "E751: Output file name must not have region name" -msgstr "E751: Име излазне датотеке не сме да има име региона" +msgstr "E751: Име излазног фајла не сме да има име региона" #, c-format msgid "E754: Only up to %ld regions supported" @@ -5389,7 +5388,7 @@ msgstr "Упозорење: наведени су и слагање и NOBREAK" #, c-format msgid "Writing spell file %s..." -msgstr "Уписивање правописне датотеке %s..." +msgstr "Уписивање правописног фајла %s..." msgid "Done!" msgstr "Завршено!" @@ -5407,13 +5406,13 @@ msgid "Word '%.*s' added to %s" msgstr "Реч '%.*s' је додата у %s" msgid "E763: Word characters differ between spell files" -msgstr "E763: Карактери у речи се разликују између правописних датотека" +msgstr "E763: Карактери у речи се разликују између правописних фајлова" msgid "E783: duplicate char in MAP entry" msgstr "E783: карактер дупликат у MAP ставци" msgid "No Syntax items defined for this buffer" -msgstr "За оба јбафер нису дефинисане синтаксне ставке" +msgstr "Синтаксне ставке нису дефинисане за овај бафер" msgid "syntax conceal on" msgstr "скривање синтаксе укључено" @@ -5510,7 +5509,7 @@ msgid "E394: Didn't find region item for msgstr "E394: Ставка региона није пронађена за %s" msgid "E397: Filename required" -msgstr "E397: Потребно име датотеке" +msgstr "E397: Потребно је име фајла" msgid "E847: Too many syntax includes" msgstr "E847: Превише синтаксних уметања" @@ -5659,10 +5658,10 @@ msgid "E426: tag not found: %s" msgstr "E426: ознака није пронађена: %s" msgid " # pri kind tag" -msgstr " # ознака pri врсте" +msgstr " # pri ознака врста" msgid "file\n" -msgstr "датотека\n" +msgstr "фајл\n" msgid "E427: There is only one matching tag" msgstr "E427: Постоји само једна подударајућа ознака" @@ -5672,7 +5671,7 @@ msgstr "E428: Не може да се иде иза последње подударајуће ознаке" #, c-format msgid "File \"%s\" does not exist" -msgstr "Датотека \"%s\" не постоји" +msgstr "Фајл \"%s\" не постоји" #, c-format msgid "tag %d of %d%s" @@ -5686,29 +5685,29 @@ msgstr " Користи се ознака за другом врстом слова (мала/велика)!" #, c-format msgid "E429: File \"%s\" does not exist" -msgstr "E429: Датотека \"%s\" не постоји" +msgstr "E429: Фајл \"%s\" не постоји" msgid "" "\n" " # TO tag FROM line in file/text" msgstr "" "\n" -" # НА ознака ОД линије у датот/текст" +" # НА ознаку ИЗ линије у фајлу/тексту" #, c-format msgid "Searching tags file %s" -msgstr "Претраживање датотеке ознака %s" +msgstr "Претраживање фајла ознака %s" #, c-format msgid "E430: Tag file path truncated for %s\n" -msgstr "E430: Путања датотеке ознака је прекинута за %s\n" +msgstr "E430: Путања фајла ознака је прекинута за %s\n" msgid "Ignoring long line in tags file" -msgstr "Дугачка линија у датотеци ознака се игнорише" +msgstr "Дугачка линија у фајлу ознака се игнорише" #, c-format msgid "E431: Format error in tags file \"%s\"" -msgstr "E431: Грешка формата у датотеци ознака \"%s\"" +msgstr "E431: Грешка формата у фајлу ознака \"%s\"" #, c-format msgid "Before byte %ld" @@ -5716,10 +5715,10 @@ msgstr "Пре бајта %ld" #, c-format msgid "E432: Tags file not sorted: %s" -msgstr "E432: Датотека ознака није сортирана: %s" +msgstr "E432: Фајл ознака није сортиран: %s" msgid "E433: No tags file" -msgstr "E433: Нема датотеке ознака" +msgstr "E433: Нема фајла ознака" msgid "E434: Can't find tag pattern" msgstr "E434: Не може да се пронађе шаблон ознаке" @@ -5738,7 +5737,7 @@ msgid "defaulting to '" msgstr "подразумева се '" msgid "E557: Cannot open termcap file" -msgstr "E557: termcap датотека не може да се отвори" +msgstr "E557: termcap фајл не може да се отвори" msgid "E558: Terminal entry not found in terminfo" msgstr "E558: У terminfo није пронађена ставка за терминал" @@ -5784,7 +5783,7 @@ msgstr "завршен" #, c-format msgid "E953: File exists: %s" -msgstr "E953: Датотека већ постоји: %s" +msgstr "E953: Фајл већ постоји: %s" msgid "E955: Not a terminal buffer" msgstr "E955: Није терминалски бафер" @@ -5806,76 +5805,76 @@ msgstr "Није могућ опозив; ипак настави" #, c-format msgid "E828: Cannot open undo file for writing: %s" -msgstr "E828: Датотека опозива не може да се отвори за упис: %s" +msgstr "E828: Фајл опозива не може да се отвори за упис: %s" #, c-format msgid "E825: Corrupted undo file (%s): %s" -msgstr "E825: Искварена датотека за опозив (%s): %s" +msgstr "E825: Искварен фајл за опозив (%s): %s" msgid "Cannot write undo file in any directory in 'undodir'" msgstr "" -"Датотека за опозив не може да се упише ни у један директоријум из 'undodir'" +"Фајл за опозив не може да се упише ни у један директоријум из 'undodir'" #, c-format msgid "Will not overwrite with undo file, cannot read: %s" msgstr "" -"Неће се вршити преписивање са датотеком опозива, читање није могуће: %s" +"Неће се вршити преписивање са фајлом опозива, читање није могуће: %s" #, c-format msgid "Will not overwrite, this is not an undo file: %s" -msgstr "Неће се цршити преписивање, ово није датотека за опозив: %s" +msgstr "Неће се вршити преписивање, ово није фајл за опозив: %s" msgid "Skipping undo file write, nothing to undo" -msgstr "Прескакање уписа у датотеку за опозив, нема шта да се опозове" +msgstr "Прескакање уписа у фајл за опозив, нема шта да се опозове" #, c-format msgid "Writing undo file: %s" -msgstr "Упис датотеке за опозив: %s" +msgstr "Упис фајла за опозив: %s" #, c-format msgid "E829: write error in undo file: %s" -msgstr "E829: грешка код уписа у датотеку за опозив: %s" +msgstr "E829: грешка код уписа у фајл за опозив: %s" #, c-format msgid "Not reading undo file, owner differs: %s" -msgstr "Датотека за опозив се не чита, власник се разликује: %s" +msgstr "Фајл за опозив се не чита, власник се разликује: %s" #, c-format msgid "Reading undo file: %s" -msgstr "Читање датотеке за опозив: %s" +msgstr "Читање фајла за опозив: %s" #, c-format msgid "E822: Cannot open undo file for reading: %s" -msgstr "E822: Датотека за опозив не може да се отвори за читање: %s" +msgstr "E822: Фајл за опозив не може да се отвори за читање: %s" #, c-format msgid "E823: Not an undo file: %s" -msgstr "E823: Није датотека за опозив: %s" +msgstr "E823: Није фајл за опозив: %s" #, c-format msgid "E832: Non-encrypted file has encrypted undo file: %s" msgstr "" -"E832: Датотека која није шифрована има шифровану датотеку за опозив: %s" +"E832: Фајл који није шифрован има шифрован фајл за опозив: %s" #, c-format msgid "E826: Undo file decryption failed: %s" -msgstr "E826: Дешифровање датотеке за опозив није успело: %s" +msgstr "E826: Дешифровање фајла за опозив није успело: %s" #, c-format msgid "E827: Undo file is encrypted: %s" -msgstr "E827: Датотека за опозив је шифрована: %s" +msgstr "E827: Фајл за опозив је шифрован: %s" #, c-format msgid "E824: Incompatible undo file: %s" -msgstr "E824: Некомпатибилна датотека за опозив: %s" +msgstr "E824: Некомпатибилан фајл за опозив: %s" msgid "File contents changed, cannot use undo info" msgstr "" -"Садржај датотеке је промењен, информације за опозив не могу да се користе" +"Садржај фајла је промењен, информације за опозив не могу да се користе" #, c-format msgid "Finished reading undo file %s" -msgstr "Тавршено је читање датотеке за опозив %s" +msgstr "Завршено је читање фајла за опозив %s" msgid "Already at oldest change" msgstr "Већ сте на најстаријој измени" @@ -6052,7 +6051,7 @@ msgstr "E127: Функција %s не може да се редефинише: Тренутно се користи" #, c-format msgid "E746: Function name does not match script file name: %s" -msgstr "E746: Име функције се не поклапа са именом скрипт датотеке: %s" +msgstr "E746: Име функције се не поклапа са именом скрипт фајла: %s" #, c-format msgid "E131: Cannot delete function %s: It is in use" @@ -6070,14 +6069,14 @@ msgid "" "MS-Windows 64-bit GUI version" msgstr "" "\n" -"MS-Windows 64-битна GUI верзија" +"MS-Windows 64-битна ГКИ верзија" msgid "" "\n" "MS-Windows 32-bit GUI version" msgstr "" "\n" -"MS-Windows 32-битна GUI верзија" +"MS-Windows 32-битна ГКИ верзија" msgid " with OLE support" msgstr " са OLE подршком" @@ -6180,76 +6179,76 @@ msgstr "" "Сићушна верзија " msgid "without GUI." -msgstr "без GUI." +msgstr "без ГКИ." msgid "with GTK3 GUI." -msgstr "са GTK3 GUI." +msgstr "са GTK3 ГКИ." msgid "with GTK2-GNOME GUI." -msgstr "са GTK2-GNOME GUI." +msgstr "са GTK2-GNOME ГКИ." msgid "with GTK2 GUI." -msgstr "са GTK2 GUI." +msgstr "са GTK2 ГКИ." msgid "with X11-Motif GUI." -msgstr "са X11-Motif GUI." +msgstr "са X11-Motif ГКИ." msgid "with X11-neXtaw GUI." -msgstr "са X11-neXtaw GUI." +msgstr "са X11-neXtaw ГКИ." msgid "with X11-Athena GUI." -msgstr "са X11-Athena GUI." +msgstr "са X11-Athena ГКИ." msgid "with Photon GUI." -msgstr "са Photon GUI." +msgstr "са Photon ГКИ." msgid "with GUI." -msgstr "са GUI." +msgstr "са ГКИ." msgid "with Carbon GUI." -msgstr "са Carbon GUI." +msgstr "са Carbon ГКИ." msgid "with Cocoa GUI." -msgstr "са Cocoa GUI." +msgstr "са Cocoa ГКИ." msgid " Features included (+) or not (-):\n" msgstr " Могућности укључене (+) или не (-):\n" msgid " system vimrc file: \"" -msgstr " системскa vimrc датотека: \"" +msgstr " системски vimrc фајл: \"" msgid " user vimrc file: \"" -msgstr " корисничка vimrc датотека: \"" +msgstr " кориснички vimrc фајл: \"" msgid " 2nd user vimrc file: \"" -msgstr " 2га корисничка vimrc датотека: \"" +msgstr " 2ги кориснички vimrc фајл: \"" msgid " 3rd user vimrc file: \"" -msgstr " 3ћа корисничка vimrc датотека: \"" +msgstr " 3ћи кориснички vimrc фајл: \"" msgid " user exrc file: \"" -msgstr " корисничка exrc датотека: \"" +msgstr " кориснички exrc фајл: \"" msgid " 2nd user exrc file: \"" -msgstr " 2га корисничка exrc датотека: \"" +msgstr " 2ги кориснички exrc фајл: \"" msgid " system gvimrc file: \"" -msgstr " системска gvimrc датотека: \"" +msgstr " системски gvimrc фајл: \"" msgid " user gvimrc file: \"" -msgstr " корисничка gvimrc датотека: \"" +msgstr " кориснички gvimrc фајл: \"" msgid "2nd user gvimrc file: \"" -msgstr "2га корисничка gvimrc датотека: \"" +msgstr "2ги кориснички gvimrc фајл: \"" msgid "3rd user gvimrc file: \"" -msgstr "3ћа корисничка gvimrc датотека: \"" +msgstr "3ћи кориснички gvimrc фајл: \"" msgid " defaults file: \"" -msgstr " датотека са подраз. опцијама: \"" +msgstr " фајл са подраз. опцијама: \"" msgid " system menu file: \"" -msgstr " системска датотека менија: \"" +msgstr " системски фајл менија: \"" msgid " fall-back for $VIM: \"" msgstr " резервна вредност за $VIM: \"" @@ -6285,25 +6284,25 @@ msgid "Help poor children in Uganda!" msgstr "Помозите сиромашној деци у Уганди!" msgid "type :help iccf for information " -msgstr "откуцајте :help iccf за информације " +msgstr "откуцајте :help iccf<Ентер> за информације " msgid "type :q to exit " -msgstr "откуцајте :q за излаз " +msgstr "откуцајте :q<Ентер> за излаз " msgid "type :help or for on-line help" -msgstr "откуцајте :help или за on-line помоћ " +msgstr "откуцајте :help<Ентер> или за on-line помоћ " msgid "type :help version8 for version info" -msgstr "откуцајте :help version8 за инфо о верзији" +msgstr "откуцајте :help version8<Ентер> за инфо о верзији" msgid "Running in Vi compatible mode" msgstr "Рад у Vi компатибилном режиму" msgid "type :set nocp for Vim defaults" -msgstr "откуцајте :set nocp за Vim подразумевано" +msgstr "откуцајте :set nocp<Ентер> за Vim подразумевано" msgid "type :help cp-default for info on this" -msgstr "откуцајте :help cp-default за инфо о овоме" +msgstr "откуцајте :help cp-default<Ентер> за инфо о овоме" msgid "menu Help->Orphans for information " msgstr "мени Помоћ->Сирочићи за информације " @@ -6330,10 +6329,10 @@ msgid "Become a registered Vim user!" msgstr "Постаните регистровани Vim корисник!" msgid "type :help sponsor for information " -msgstr "откуцајте :help sponsor за информације " +msgstr "откуцајте :help sponsor<Ентер> за информације " msgid "type :help register for information " -msgstr "откуцајте :help register за информације " +msgstr "откуцајте :help register<Ентер> за информације " msgid "menu Help->Sponsor/Register for information " msgstr "мени Помоћ->Спонзор/Региструј се за информације " @@ -6363,11 +6362,11 @@ msgid "E445: Other window contains chang msgstr "E445: Други прозори садрже измене" msgid "E446: No file name under cursor" -msgstr "E446: Под курсором се не налази име датотеке" +msgstr "E446: Под курсором се не налази име фајла" #, c-format msgid "E447: Can't find file \"%s\" in path" -msgstr "E447: Датотека \"%s\" не може да се пронађе у путањи" +msgstr "E447: Фајл \"%s\" не може да се пронађе у путањи" #, c-format msgid "E799: Invalid ID: %ld (must be greater than or equal to 1)" @@ -6404,7 +6403,7 @@ msgid "Edit with existing Vim - " msgstr "Уређуј са постојећим Vim - " msgid "Edits the selected file(s) with Vim" -msgstr "Уређује селектовауе датотеку(е) са Vim-ом" +msgstr "Уређује селектовани фајл(е) са Vim-ом" msgid "Error creating process: Check if gvim is in your path!" msgstr "" @@ -6456,7 +6455,7 @@ msgid "E588: :endfor without :for" msgstr "E588: :endfor без :for" msgid "E13: File exists (add ! to override)" -msgstr "E13: Датотека постоји (додајте ! за премошћавање)" +msgstr "E13: Фајл постоји (додајте ! за премошћавање)" msgid "E472: Command failed" msgstr "E472: Команда није успела" @@ -6539,7 +6538,7 @@ msgid "E22: Scripts nested too deep" msgstr "E22: Скрипте су предубоко угњеждене" msgid "E23: No alternate file" -msgstr "E23: Нема алтернативне датотеке" +msgstr "E23: Нема алтернативног фајла" msgid "E24: No such abbreviation" msgstr "E24: Таква скраћеница не постоји" @@ -6548,7 +6547,7 @@ msgid "E477: No ! allowed" msgstr "E477: ! није дозвољен" msgid "E25: GUI cannot be used: Not enabled at compile time" -msgstr "E25: GUI не може да се користи: Није омогућен у време компилације" +msgstr "E25: ГКИ не може да се користи: Није омогућен у време компилације" msgid "E26: Hebrew cannot be used: Not enabled at compile time\n" msgstr "" @@ -6582,7 +6581,7 @@ msgid "E480: No match: %s" msgstr "E480: Нема подударања: %s" msgid "E32: No file name" -msgstr "E32: Нема имена датотеке" +msgstr "E32: Нема имена фајла" msgid "E33: No previous substitute regular expression" msgstr "E33: Нема претходног регуларног израза за замену" @@ -6605,18 +6604,18 @@ msgstr "E247: нема регистованог сервера под именом \"%s\"" #, c-format msgid "E482: Can't create file %s" -msgstr "E482: Датотека %s не може да се креира" +msgstr "E482: Фајл %s не може да се креира" msgid "E483: Can't get temp file name" -msgstr "E483: Име привремене датотке не може да се добије" +msgstr "E483: Име привременог фајла не може да се добије" #, c-format msgid "E484: Can't open file %s" -msgstr "E484: Датотека %s не може да се отвори" +msgstr "E484: Фајл %s не може да се отвори" #, c-format msgid "E485: Can't read file %s" -msgstr "E485: Датотека %s не може да се прочита" +msgstr "E485: Фајл %s не може да се прочита" msgid "E38: Null argument" msgstr "E38: Празан аргумент" @@ -6626,10 +6625,10 @@ msgstr "E39: Очекује се број" #, c-format msgid "E40: Can't open errorfile %s" -msgstr "E40: Датотека грешке %s не може да се отвори" +msgstr "E40: Фајл грешке %s не може да се отвори" msgid "E233: cannot open display" -msgstr "E233: проказ не може да се отвори" +msgstr "E233: приказ не може да се отвори" msgid "E41: Out of memory!" msgstr "E41: Нема више меморије!" @@ -6696,7 +6695,7 @@ msgid "E712: Argument of %s must be a Li msgstr "E712: Аргумент за %s мора бити Листа или Речник" msgid "E47: Error while reading errorfile" -msgstr "E47: Грешка приликом читаља датотеке грешке" +msgstr "E47: Грешка приликом читања фајла грешке" msgid "E48: Not allowed in sandbox" msgstr "E48: Није дозвољено у sandbox-у" @@ -6717,7 +6716,7 @@ msgid "E255: Couldn't read in sign data! msgstr "E255: Подаци за знак нису могли да се прочитају!" msgid "E72: Close error on swap file" -msgstr "E72: Грешка код затвањара swap датотеке" +msgstr "E72: Грешка код затвањара swap фајла" msgid "E73: tag stack empty" msgstr "E73: стек ознака је празан" @@ -6732,7 +6731,7 @@ msgid "E76: Too many [" msgstr "E76: Превише [" msgid "E77: Too many file names" -msgstr "E77: Превише имена датотека" +msgstr "E77: Превише имена фајлова" msgid "E488: Trailing characters" msgstr "E488: Карактери вишка на крају" @@ -6766,7 +6765,7 @@ msgstr "E463: Регион је чуван, измена није могућа" msgid "E744: NetBeans does not allow changes in read-only files" msgstr "" -"E744: NetBeans не дозвољава измене датотека које смеју само да се читају" +"E744: NetBeans не дозвољава измене на фајловима који смеју само да се читају" msgid "E363: pattern uses more memory than 'maxmempattern'" msgstr "E363: шаблон користи више меморије од 'maxmempattern'" @@ -6782,7 +6781,7 @@ msgid "E682: Invalid search pattern or d msgstr "E682: Неважећи шаблон претраге или раздвојни карактер" msgid "E139: File is loaded in another buffer" -msgstr "E139: Датотека је учитана у други бафер" +msgstr "E139: Фајл је учитан у други бафер" #, c-format msgid "E764: Option '%s' is not set" @@ -7074,11 +7073,11 @@ msgid "" "Vim macro files (*.vim)\t*.vim\n" "All Files (*.*)\t*.*\n" msgstr "" -"Vim макро датотеке (*.vim)\t*.vim\n" -"Све датотеке (*.*)\t*.*\n" +"Vim макро фајлови (*.vim)\t*.vim\n" +"Сви фајлови (*.*)\t*.*\n" msgid "All Files (*.*)\t*.*\n" -msgstr "Све датотеке (*.*)\t*.*\n" +msgstr "Сви фајлови (*.*)\t*.*\n" msgid "" "All Files (*.*)\t*.*\n" @@ -7087,21 +7086,21 @@ msgid "" "VB code (*.bas, *.frm)\t*.bas;*.frm\n" "Vim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n" msgstr "" -"Све датотеке (*.*)\t*.*\n" +"Сви фајлови (*.*)\t*.*\n" "C изворни код (*.c, *.h)\t*.c;*.h\n" "C++ изворни код (*.cpp, *.hpp)\t*.cpp;*.hpp\n" "VB код (*.bas, *.frm)\t*.bas;*.frm\n" -"Vim датотеке (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n" +"Vim фајлови (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n" msgid "" "Vim macro files (*.vim)\t*.vim\n" "All Files (*)\t*\n" msgstr "" -"Vim макро датотеке (*.vim)\t*.vim\n" -"Све датотеке (*)\t*\n" +"Vim макро фајлови (*.vim)\t*.vim\n" +"Сви фајлови (*)\t*\n" msgid "All Files (*)\t*\n" -msgstr "Све датотеке (*)\t*\n" +msgstr "Сви фајлови (*)\t*\n" msgid "" "All Files (*)\t*\n" @@ -7109,7 +7108,7 @@ msgid "" "C++ source (*.cpp, *.hpp)\t*.cpp;*.hpp\n" "Vim files (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n" msgstr "" -"Све датотеке (*)\t*\n" +"Сви фајлови (*)\t*\n" "C изворни код (*.c, *.h)\t*.c;*.h\n" "C++ изворни код (*.cpp, *.hpp)\t*.cpp;*.hpp\n" -"Vim датотеке (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n" +"Vim фајлови (*.vim, _vimrc, _gvimrc)\t*.vim;_vimrc;_gvimrc\n"