summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-04-05 17:33:26 +0200
committerBram Moolenaar <Bram@vim.org>2012-04-05 17:33:26 +0200
commit5b435d671e5287975398316b8aa8000c96e6ec92 (patch)
tree5f1797bf37028f5397eb406edff9168cbabfe97e
parent3675fa09a753bdf0b5eaac209ed8d6739a7e95d4 (diff)
downloadvim-git-5b435d671e5287975398316b8aa8000c96e6ec92.tar.gz
Updated runtime files.
-rw-r--r--runtime/autoload/netrw.vim795
-rw-r--r--runtime/autoload/netrwFileHandlers.vim11
-rw-r--r--runtime/doc/editing.txt4
-rw-r--r--runtime/doc/eval.txt9
-rw-r--r--runtime/doc/insert.txt9
-rw-r--r--runtime/doc/pi_netrw.txt1061
-rw-r--r--runtime/doc/syntax.txt14
-rw-r--r--runtime/doc/todo.txt23
-rw-r--r--runtime/filetype.vim5
-rw-r--r--runtime/plugin/netrwPlugin.vim2
10 files changed, 699 insertions, 1234 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 2c85bf8d4..316593345 100644
--- 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: Sep 26, 2011
-" Version: 143
+" Date: Apr 05, 2012
+" Version: 145
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2010 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
-let g:loaded_netrw = "v143"
+let g:loaded_netrw = "v145"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrw needs vim 7.2"
@@ -42,7 +42,7 @@ if v:version < 700
endif
let s:keepcpo= &cpo
-setlocal cpo&vim
+set cpo&vim
"DechoTabOn
"call Decho("doing autoload/netrw.vim version ".g:loaded_netrw)
@@ -51,6 +51,86 @@ setlocal cpo&vim
" ======================
" ---------------------------------------------------------------------
+" netrw#ErrorMsg: {{{2
+" 0=note = s:NOTE
+" 1=warning = s:WARNING
+" 2=error = s:ERROR
+" Apr 05, 2012 : max errnum currently is 88
+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)
+
+ if a:level < g:netrw_errorlvl
+ call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g;netrw_errorlvl=".g:netrw_errorlvl)
+ return
+ endif
+
+ if a:level == 1
+ let level= "**warning** (netrw) "
+ elseif a:level == 2
+ let level= "**error** (netrw) "
+ else
+ let level= "**note** (netrw) "
+ endif
+" call Decho("level=".level)
+
+ if g:netrw_use_errorwindow
+ " (default) netrw creates a one-line window to show error/warning
+ " messages (reliably displayed)
+
+ " record current window number for NetrwRestorePosn()'s benefit
+ let s:winBeforeErr= winnr()
+" call Decho("s:winBeforeErr=".s:winBeforeErr)
+
+ " getting messages out reliably is just plain difficult!
+ " This attempt splits the current window, creating a one line window.
+ if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
+" call Decho("write to NetrwMessage buffer")
+ exe bufwinnr("NetrwMessage")."wincmd w"
+" call Decho("setl ma noro")
+ setl ma noro
+ keepj call setline(line("$")+1,level.a:msg)
+ keepj $
+ else
+" call Decho("create a NetrwMessage buffer window")
+ bo 1split
+ sil! call s:NetrwEnew()
+ sil! keepj call s:NetrwSafeOptions()
+ setl bt=nofile
+ keepj file NetrwMessage
+" call Decho("setlocal ma noro")
+ setl ma noro
+ call setline(line("$"),level.a:msg)
+ endif
+" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr())
+ if &fo !~ '[ta]'
+ syn clear
+ syn match netrwMesgNote "^\*\*note\*\*"
+ syn match netrwMesgWarning "^\*\*warning\*\*"
+ syn match netrwMesgError "^\*\*error\*\*"
+ hi link netrwMesgWarning WarningMsg
+ hi link netrwMesgError Error
+ endif
+" call Decho("(ErrorMsg) setl noma ro bh=wipe")
+ setl noma ro bh=wipe
+
+ else
+ " (optional) netrw will show messages using echomsg. Even if the
+ " message doesn't appear, at least it'll be recallable via :messages
+" redraw!
+ if a:level == s:WARNING
+ echohl WarningMsg
+ elseif a:level == s:ERROR
+ echohl Error
+ endif
+ echomsg level.a:msg
+" call Decho("echomsg ***netrw*** ".a:msg)
+ echohl None
+ endif
+
+" call Dret("netrw#ErrorMsg")
+endfun
+
+" ---------------------------------------------------------------------
" NetrwInit: initializes variables if they haven't been defined {{{2
" Loosely, varname = value.
fun s:NetrwInit(varname,value)
@@ -100,6 +180,9 @@ if !exists("g:netrw_ftp_cmd")
let g:netrw_ftp_cmd = "ftp"
endif
let s:netrw_ftp_cmd= g:netrw_ftp_cmd
+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"
@@ -171,6 +254,7 @@ let s:netrw_usercuc = &cursorcolumn
call s:NetrwInit("g:netrw_dirhist_cnt" , 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)
call s:NetrwInit("g:netrw_fastbrowse" , 1)
call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$')
if !exists("g:netrw_ftp_list_cmd")
@@ -212,6 +296,10 @@ if !exists("g:netrw_list_cmd")
endif
call s:NetrwInit("g:netrw_list_hide","")
" Default values - lh-lz ---------- {{{3
+if exists("g:netrw_local_copycmd")
+ let g:netrw_localcopycmd= g:netrw_local_copycmd"
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84)
+endif
if !exists("g:netrw_localcopycmd")
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
@@ -224,9 +312,24 @@ if !exists("g:netrw_localcopycmd")
else
let g:netrw_localcopycmd= ""
endif
+ if !executable(g:netrw_localcopycmd)
+ call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80)
+ endif
+endif
+if exists("g:netrw_local_mkdir")
+ let g:netrw_localmkdir= g:netrw_local_mkdir"
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87)
+endif
+call s:NetrwInit("g:netrw_localmkdir","mkdir")
+if !executable(g:netrw_localmkdir)
+ call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
+endif
endif
-call s:NetrwInit("g:netrw_local_mkdir","mkdir")
call s:NetrwInit("g:netrw_remote_mkdir","mkdir")
+if exists("g:netrw_local_movecmd")
+ let g:netrw_localmovecmd= g:netrw_local_movecmd"
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88)
+endif
if !exists("g:netrw_localmovecmd")
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
@@ -239,8 +342,18 @@ if !exists("g:netrw_localmovecmd")
else
let g:netrw_localmovecmd= ""
endif
+ if !executable(g:netrw_localmkdir)
+ call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",81)
+ endif
+endif
+call s:NetrwInit("g:netrw_localrmdir", "rmdir")
+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)
+endif
+if !executable(g:netrw_localrmdir)
+ call netrw#ErrorMsg(s:NOTE,"consider setting g:netrw_localrmdir<".g:netrw_localrmdir."> to something that works",82)
endif
-call s:NetrwInit("g:netrw_local_rmdir", "rmdir")
call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
" sanity checks
if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
@@ -293,6 +406,8 @@ call s:NetrwInit("g:netrw_xstrlen",0)
call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
call s:NetrwInit("g:netrw_win95ftp",1)
call s:NetrwInit("g:netrw_winsize",50)
+if g:netrw_winsize == 0|let g:netrw_winsize= -1|endif
+if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif
" ---------------------------------------------------------------------
" Default values for netrw's script variables: {{{2
call s:NetrwInit("g:netrw_fname_escape",' ?&;%')
@@ -315,10 +430,12 @@ call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"")
" ======================
if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
let s:initbeval = &beval
+" let s:initbexpr = &l:bexpr
let &l:bexpr = "netrw#NetrwBalloonHelp()"
set beval
au BufWinEnter,WinEnter * if &ft == "netrw"|set beval|else|let &beval= s:initbeval|endif
endif
+au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif
" ==============================
" Netrw Utility Functions: {{{1
@@ -360,8 +477,8 @@ endif
" 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("$"))
-
" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"))
+
if !exists("{a:vt}netrw_optionsave")
let {a:vt}netrw_optionsave= 1
else
@@ -371,6 +488,7 @@ fun! s:NetrwOptionSave(vt)
" call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff)
" Save current settings and current directory
+" call Decho("saving current settings and current directory")
let s:yykeep = @@
if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif
let {a:vt}netrw_aikeep = &l:ai
@@ -411,6 +529,7 @@ fun! s:NetrwOptionSave(vt)
endif
" save a few selected netrw-related variables
+" call Decho("saving a few selected netrw-related variables")
if g:netrw_keepdir
let {a:vt}netrw_dirkeep = getcwd()
endif
@@ -420,22 +539,24 @@ fun! s:NetrwOptionSave(vt)
if &go =~# 'a' | sil! let {a:vt}netrw_regstar = @* | endif
sil! let {a:vt}netrw_regslash= @/
-" call Dret("s:NetrwOptionSave : win#".winnr()." buf#".bufnr("%"))
+" call Dret("s:NetrwOptionSave : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
endfun
" ------------------------------------------------------------------------
" s:NetrwOptionRestore: restore options {{{2
fun! s:NetrwOptionRestore(vt)
-" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")." winnr($)=".winnr("$"))
+" call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"))
if !exists("{a:vt}netrw_optionsave")
if exists("s:nbcd_curpos_{bufnr('%')}")
-" call Decho("restoring previous position")
+" call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)")
keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')})
-" unlet s:nbcd_curpos_{bufnr('%')}
+" call Decho("(NetrwOptionRestore) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"))
+" call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%'))
+ unlet s:nbcd_curpos_{bufnr('%')}
else
-" call Decho("no previous position")
+" call Decho("(NetrwOptionRestore) no previous position")
endif
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist")
return
endif
@@ -443,7 +564,7 @@ fun! s:NetrwOptionRestore(vt)
if exists("&acd")
if exists("{a:vt}netrw_acdkeep")
-" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
+" call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
let curdir = getcwd()
let &l:acd = {a:vt}netrw_acdkeep
unlet {a:vt}netrw_acdkeep
@@ -515,18 +636,19 @@ fun! s:NetrwOptionRestore(vt)
if exists("{a:vt}netrw_regstar") |sil! let @*= {a:vt}netrw_regstar |unlet {a:vt}netrw_regstar |endif
if exists("{a:vt}netrw_regslash")|sil! let @/= {a:vt}netrw_regslash|unlet {a:vt}netrw_regslash|endif
if exists("s:nbcd_curpos_{bufnr('%')}")
-" call Decho("restoring previous position")
+" call Decho("(NetrwOptionRestore) restoring previous position (s:nbcd_curpos_".bufnr('%')." exists)")
keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')})
-" unlet s:nbcd_curpos_{bufnr('%')}
+" call Decho("(NetrwOptionRestore) unlet s:nbcd_curpos_".bufnr('%'))
+ unlet s:nbcd_curpos_{bufnr('%')}
else
" call Decho("no previous position")
endif
-" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
-" call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
-" call Decho("diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist"))
-" call Dret("s:NetrwOptionRestore : win#".winnr()." buf#".bufnr("%"))
+" call Decho("(NetrwOptionRestore) g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd)
+" call Decho("(NetrwOptionRestore) fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist"))
+" call Decho("(NetrwOptionRestore) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
+" call Decho("(NetrwOptionRestore) diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist"))
+" call Dret("s:NetrwOptionRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
endfun
" ---------------------------------------------------------------------
@@ -542,7 +664,8 @@ fun! s:NetrwSafeOptions()
setlocal nocin
setlocal cino=
setlocal com=
- setlocal cpo-=aA
+ setlocal cpo-=a
+ setlocal cpo-=A
setlocal fo=nroql2
setlocal nohid
setlocal noim
@@ -834,14 +957,18 @@ fun! netrw#NetRead(mode,...)
" call Decho("filter input: ".getline('.'))
endif
- if exists("g:netrw_ftp") && g:netrw_ftp == 1
- keepj put =g:netrw_uid
-" call Decho("filter input: ".getline('.'))
- keepj put ='\"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('.'))
- else
- keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('.'))
+ if exists("g:netrw_uid" && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ keepj put =g:netrw_uid
+" call Decho("filter input: ".getline('.'))
+ if exists("s:netrw_passwd")
+ keepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('.'))
+ elseif exists("s:netrw_passwd")
+ keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('.'))
+ endif
endif
if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
@@ -860,8 +987,8 @@ fun! netrw#NetRead(mode,...)
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
keepj norm! 1Gdd
-" call Decho("executing: %!".s:netrw_ftp_cmd." -i -n")
- exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i -n"
+" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
" call Decho("error<".getline(1).">")
@@ -925,7 +1052,8 @@ fun! netrw#NetRead(mode,...)
exe 'keepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
endif
let b:netrw_lastfile = choice
- setlocal ro
+" call Decho("(NetRead) setl ro")
+ setl ro
".........................................
" NetRead: (dav) NetRead Method #6 {{{3
@@ -950,7 +1078,9 @@ fun! netrw#NetRead(mode,...)
else
keepj put ='open '.g:netrw_machine
endif
- keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
+ if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
+ keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
+ endif
keepj put ='get '.netrw_fname.' '.tmpfile
keepj put ='quit'
@@ -982,6 +1112,7 @@ fun! netrw#NetRead(mode,...)
keepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
endif
" call Dret("NetRead")
+ return
endif
if exists("g:netrw_option") && g:netrw_option == ":https\="
let netrw_option= "http"
@@ -1000,7 +1131,8 @@ fun! netrw#NetRead(mode,...)
let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
let b:netrw_lastfile = choice
- setlocal ro
+" call Decho("(NetRead) setl ro")
+ setl ro
".........................................
" NetRead: (sftp) NetRead Method #9 {{{3
@@ -1241,14 +1373,18 @@ fun! netrw#NetWrite(...) range
keepj put ='open '.g:netrw_machine
" call Decho("filter input: ".getline('.'))
endif
- if exists("g:netrw_ftp") && g:netrw_ftp == 1
- keepj put =g:netrw_uid
-" call Decho("filter input: ".getline('.'))
- keepj put ='\"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('.'))
- else
- keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('.'))
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ keepj put =g:netrw_uid
+" call Decho("filter input: ".getline('.'))
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ keepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('.'))
+ elseif exists("s:netrw_passwd") && s:netrw_passwd != ""
+ keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('.'))
+ endif
endif
keepj put =g:netrw_ftpmode
" call Decho("filter input: ".getline('$'))
@@ -1266,8 +1402,8 @@ fun! netrw#NetWrite(...) range
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
keepj norm! 1Gdd
-" call Decho("executing: %!".s:netrw_ftp_cmd." -i -n")
- exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i -n"
+" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
if !exists("g:netrw_quiet")
@@ -1323,7 +1459,7 @@ fun! netrw#NetWrite(...) range
else
keepj put ='open '.g:netrw_machine
endif
- if exists("g:netrw_uid") && exists("s:netrw_passwd")
+ if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
keepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
endif
keepj put ='put '.tmpfile.' '.netrw_fname
@@ -1396,9 +1532,12 @@ fun! netrw#NetWrite(...) range
if a:firstline == 1 && a:lastline == line("$")
" restore modifiability; usually equivalent to set nomod
let &mod= mod
+" call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
elseif !exists("leavemod")
" indicate that the buffer has not been modified since last written
+" call Decho("(NetWrite) set nomod")
set nomod
+" call Decho("(NetWrite) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
endif
" call Dret("netrw#NetWrite")
@@ -1454,7 +1593,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" readcmd=='t': simply do nothing
if a:readcmd == 't'
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("NetrwGetFile : skip read of <".a:tfile.">")
return
endif
@@ -1508,7 +1647,15 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" rename buffer back to remote filename
" call Decho("exe sil! keepalt file ".fnameescape(rfile))
exe "sil! keepj keepalt file ".fnameescape(rfile)
+
+ " detect filetype of local version of remote file
+ " Note that isk must not include a "/" for scripts.vim
+ " to process this detection correctly.
+" call Decho("detect filetype of local version of remote file")
+ let iskkeep= &isk
+ set isk-=/
filetype detect
+ let &isk= iskkeep
" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!")
let line1 = 1
let line2 = line("$")
@@ -1525,7 +1672,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
else
" not readable
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Decho("tfile<".a:tfile."> not readable")
keepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
@@ -1550,7 +1697,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method)
" make sure file is being displayed
" redraw!
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwGetFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("NetrwGetFile")
endfun
@@ -1690,8 +1837,11 @@ fun! s:NetrwMethod(choice)
if userid != ""
let g:netrw_uid= userid
endif
+
if curmachine != g:netrw_machine
- if exists("s:netrw_passwd")
+ if exists("s:netwr_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
unlet s:netrw_passwd
endif
@@ -1699,10 +1849,15 @@ fun! s:NetrwMethod(choice)
unlet netrw_port
endif
endif
+
if exists("g:netrw_uid") && exists("s:netrw_passwd")
let b:netrw_method = 3
else
- if (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:'
+ let host= substitute(g:netrw_machine,'\..*$','','')
+ if exists("s:netrw_hup[host]")
+ call NetUserPass("ftp:".host)
+
+ elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~ '-[sS]:'
" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">")
" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">")
if g:netrw_ftp_cmd =~ '-[sS]:\S*MACHINE\>'
@@ -1742,6 +1897,7 @@ fun! s:NetrwMethod(choice)
let g:netrw_uid = substitute(a:choice,mipf,'\2',"")
let s:netrw_passwd = substitute(a:choice,mipf,'\3',"")
let b:netrw_fname = substitute(a:choice,mipf,'\4',"")
+ call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd)
" Method#3: Issue an ftp: "hostname [path/]filename" {{{3
elseif match(a:choice,mf) == 0
@@ -1844,33 +2000,89 @@ endif
" ---------------------------------------------------------------------
" NetUserPass: set username and password for subsequent ftp transfer {{{2
-" Usage: :call NetUserPass() -- will prompt for userid and password
-" :call NetUserPass("uid") -- will prompt for password
-" :call NetUserPass("uid","password") -- sets global userid and password
+" Usage: :call NetUserPass() -- will prompt for userid and password
+" :call NetUserPass("uid") -- will prompt for password
+" :call NetUserPass("uid","password") -- sets global userid and password
+" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary
+" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password
fun! NetUserPass(...)
- " get/set userid
+" call Dfunc("NetUserPass() a:0=".a:0)
+
+ if !exists('s:netrw_hup')
+ let s:netrw_hup= {}
+ endif
+
if a:0 == 0
-" call Dfunc("NetUserPass(a:0<".a:0.">)")
if !exists("g:netrw_uid") || g:netrw_uid == ""
- " via prompt
+ " get uid via prompt
let g:netrw_uid= input('Enter username: ')
endif
- else " from command line
-" call Dfunc("NetUserPass(a:1<".a:1.">)")
- let g:netrw_uid= a:1
- endif
-
- " get password
- if a:0 <= 1 " via prompt
-" call Decho("a:0=".a:0." case <=1:")
+ " get password via prompt
let s:netrw_passwd= inputsecret("Enter Password: ")
- else " from command line
-" call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
- let s:netrw_passwd=a:2
+
+ " set up hup database
+ let host = substitute(g:netrw_machine,'\..*$','','')
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = g:netrw_uid
+ let s:netrw_hup[host].passwd = s:netrw_passwd
+
+ elseif a:0 == 1
+
+ if a:1 =~ '^ftp:'
+ " access userid and password from hup (host-user-passwd) dictionary
+ let host = substitute(a:1,'^ftp:','','')
+ let host = substitute(host,'\..*','','')
+ if exists("s:netrw_hup[host]")
+ let g:netrw_uid = s:netrw_hup[host].uid
+ let s:netrw_passwd = s:netrw_hup[host].passwd
+" call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">")
+" call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
+ else
+ let g:netrw_uid = input("Enter UserId: ")
+ let s:netrw_passwd = inputsecret("Enter Password: ")
+ endif
+ else
+ " set userid, prompt for password
+" call Decho("set g:netrw_uid= <".a:1.">")
+ if exists("g:netrw_machine")
+ let host= substitute(g:netrw_machine,'\..*$','','')
+ endif
+ let g:netrw_uid = a:1
+ let s:netrw_passwd = inputsecret("Enter Password: ")
+ endif
+
+" call Decho("host<".host.">")
+ if exists("host")
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = g:netrw_uid
+ let s:netrw_hup[host].passwd = s:netrw_passwd
+ endif
+
+ elseif a:0 == 2
+ let g:netrw_uid = a:1
+ let s:netrw_passwd = a:2
+
+ elseif a:0 == 3
+ " enter hostname, user-id, and password into the hup dictionary
+ let host = substitute(a:1,'^\a\+:','','')
+ let host = substitute(host,'\..*$','','')
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = a:2
+ let s:netrw_hup[host].passwd = a:3
+ let g:netrw_uid = s:netrw_hup[host].uid
+ let s:netrw_passwd = s:netrw_hup[host].passwd
+" call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">")
+" call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">")
endif
-" call Dret("NetUserPass")
+" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">")
endfun
" ===========================================
@@ -1884,7 +2096,7 @@ fun! s:NetrwMaps(islocal)
" set up Rexplore and [ 2-leftmouse-click -or- c-leftmouse ]
" call Decho("set up Rexplore command")
- com! Rexplore call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")
+ com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"not a former netrw window",79)|endif
if g:netrw_mousemaps && g:netrw_retmap
" call Decho("set up Rexplore 2-leftmouse")
if !hasmapto("<Plug>NetrwReturn")
@@ -2309,11 +2521,12 @@ fun! s:NetrwBookHistHandler(chg,curdir)
if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
" call Decho("changedir u#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
- setlocal ma noro
-" call Decho("setlocal ma noro")
+ setl ma noro
+" call Decho("(NetrwBookHistHandler) setl ma noro")
sil! keepj %d
- setlocal nomod
-" call Decho("setlocal nomod")
+ setl nomod
+" call Decho("(NetrwBookHistHandler) setl nomod")
+" call Decho("(NetrwBookHistHandler) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
endif
" " call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
@@ -2334,12 +2547,13 @@ fun! s:NetrwBookHistHandler(chg,curdir)
if exists("g:netrw_dirhist_{g:netrw_dirhist_cnt}")
" call Decho("changedir U#".g:netrw_dirhist_cnt."<".g:netrw_dirhist_{g:netrw_dirhist_cnt}.">")
if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
- setlocal ma noro
-" call Decho("setlocal ma noro")
+" call Decho("(NetrwBookHistHandler) setl ma noro")
+ setl ma noro
sil! keepj %d
-" call Decho("removed all lines from buffer (%d)")
- setlocal nomod
-" call Decho("setlocal nomod")
+" call Decho("removed all lines from buffer (%d)")
+" call Decho("(NetrwBookHistHandler) setl nomod")
+ setl nomod
+" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
endif
" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt}))
exe "keepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhist_cnt})
@@ -2409,7 +2623,7 @@ fun! s:NetrwBookHistSave()
let savefile= s:NetrwHome()."/.netrwhist"
1split
call s:NetrwEnew()
- setlocal cino= com= cpo-=aA fo=nroql2 tw=0 report=10000 noswf
+ setlocal cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf
setlocal nocin noai noci magic nospell nohid wig= noaw
setlocal ma noro write
if exists("&acd") | setlocal noacd | endif
@@ -2463,7 +2677,7 @@ 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("tab#".tabpagenr()." win#".winnr())
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
" call Dredir("ls!")
if !exists("s:netrw_initbookhist")
keepj call s:NetrwBookHistRead()
@@ -2478,7 +2692,7 @@ fun! s:NetrwBrowse(islocal,dirname)
if exists("s:netrw_skipbrowse")
unlet s:netrw_skipbrowse
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse)
return
endif
@@ -2539,9 +2753,10 @@ fun! s:NetrwBrowse(islocal,dirname)
" save certain window-oriented variables into buffer-oriented variables {{{3
call s:SetBufWinVars()
call s:NetrwOptionRestore("w:")
- setlocal ma nomod
+" call Decho("setl ma nomod")
+ setl ma nomod
+" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : file<".s:fname.">")
return
endif
@@ -2570,8 +2785,9 @@ fun! s:NetrwBrowse(islocal,dirname)
endif
if reusing
call s:NetrwOptionRestore("w:")
- setlocal noma nomod nowrap
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwBrowse) setl noma nomod nowrap")
+ 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.">)")
" call Dret("s:NetrwBrowse : re-using buffer")
return
endif
@@ -2620,9 +2836,10 @@ fun! s:NetrwBrowse(islocal,dirname)
let b:netrw_curdir= w:netrw_prvdir
else
call s:NetrwOptionRestore("w:")
- setlocal noma nomod nowrap
+" call Decho("(NetrwBrowse) setl noma nomod nowrap")
+ setl noma nomod nowrap
+" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
let b:netrw_curdir= dirname
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
" call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
return
endif
@@ -2659,8 +2876,9 @@ fun! s:NetrwBrowse(islocal,dirname)
keepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
endif
keepj call s:NetrwOptionRestore("w:")
- setlocal noma nomod nowrap
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwBrowse) setl noma nomod nowrap")
+ setl noma nomod nowrap
+" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
return
endif
@@ -2688,7 +2906,7 @@ fun! s:NetrwBrowse(islocal,dirname)
" and skips the refresh and sets s:locbrowseshellcmd to zero. Oct 13, 2008
let s:locbrowseshellcmd= 1
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(NetrwBrowse) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">")
return
endfun
@@ -2909,7 +3127,7 @@ fun! s:NetrwGetBuffer(islocal,dirname)
" call Decho(" clear buffer<".expand("%")."> with :%d")
sil! keepalt keepj %d
-" call Dret("s:NetrwGetBuffer 0 : buf#".bufnr("%"))
+" call Dret("s:NetrwGetBuffer 0 : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
return 0
endfun
@@ -3105,10 +3323,12 @@ fun! s:NetrwListStyle(islocal)
" call Decho("clear buffer<".expand("%")."> with :%d")
sil! keepj %d
" following prevents tree listing buffer from being marked "modified"
- setlocal nomod
+" call Decho("(NetrwListStyle) setl nomod")
+ setl nomod
+" call Decho("(NetrwListStyle) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" refresh the listing
-" call Decho("refresh the listing")
+" call Decho("(NetrwListStyle) refresh the listing")
let svpos= netrw#NetrwSavePosn()
keepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
keepj call netrw#NetrwRestorePosn(svpos)
@@ -3224,7 +3444,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
" and the current window is the NetrwMessage window.
" call Decho("(NetrwBrowseChgDir) b:netrw_curdir doesn't exist!")
-" call Decho("getcwd<".getcwd().">")
+" call Decho("(NetrwBrowseChgDir) getcwd<".getcwd().">")
" call Dredir("ls!")
" call Dret("s:NetrwBrowseChgDir")
return
@@ -3234,6 +3454,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
keepj call s:NetrwSafeOptions()
let nbcd_curpos = netrw#NetrwSavePosn()
let s:nbcd_curpos_{bufnr('%')} = nbcd_curpos
+" call Decho("(NetrwBrowseChgDir) setting s:nbcd_curpos_".bufnr('%')." to SavePosn")
if (has("win32") || has("win95") || has("win64") || has("win16"))
let dirname = substitute(b:netrw_curdir,'\\','/','ge')
else
@@ -3248,7 +3469,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
let dirpat= '[\/]$'
endif
-" call Decho("dirname<".dirname."> dirpat<".dirpat.">")
+" call Decho("(NetrwBrowseChgDir) dirname<".dirname."> dirpat<".dirpat.">")
if dirname !~ dirpat
" apparently vim is "recognizing" that it is in a directory and
@@ -3261,7 +3482,12 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" ------------
" edit a file:
" ------------
-" call Decho('case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
+" call Decho('(NetrwBrowseChgDir) case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">")
+
+ " save position for benefit of Rexplore
+ let s:rexposn_{bufnr("%")}= netrw#NetrwSavePosn()
+
+" call Decho("(NetrwBrowseChgDir) setting s:rexposn_".bufnr("%")." to SavePosn")
if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
let dirname= s:NetrwTreeDir()
if dirname =~ '/$'
@@ -3269,17 +3495,17 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
let dirname= s:NetrwTreeDir()."/".newdir
endif
-" call Decho("dirname<".dirname.">")
-" call Decho("tree listing")
+" call Decho("(NetrwBrowseChgDir) dirname<".dirname.">")
+" call Decho("(NetrwBrowseChgDir) tree listing")
elseif newdir =~ '^\(/\|\a:\)'
let dirname= newdir
else
let dirname= s:ComposePath(dirname,newdir)
endif
-" call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")")
+" call Decho("(NetrwBrowseChgDir) handling a file: dirname<".dirname."> (a:0=".a:0.")")
" this lets NetrwBrowseX avoid the edit
if a:0 < 1
-" call Decho("set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
+" call Decho("(NetrwBrowseChgDir) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"))
keepj call s:NetrwOptionRestore("s:")
if !exists("s:didsplit")
if g:netrw_browse_split == 1
@@ -3301,7 +3527,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
endif
else
" handling a file, didn't split, so remove menu
-" call Decho("handling a file+didn't split, so remove menu")
+" call Decho("(NetrwBrowseChgDir) handling a file+didn't split, so remove menu")
call s:NetrwMenu(0)
" optional change to window
if g:netrw_chgwin >= 1
@@ -3313,10 +3539,10 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" the point where netrw actually edits the (local) file
" if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
if a:islocal
-" call Decho("edit local file: exe e! ".fnameescape(dirname))
+" call Decho("(NetrwBrowseChgDir) edit local file: exe e! ".fnameescape(dirname))
exe "e! ".fnameescape(dirname)
else
-" call Decho("remote file: NetrwBrowse will edit it")
+" call Decho("(NetrwBrowseChgDir) remote file: NetrwBrowse will edit it")
endif
let dolockout= 1
@@ -3325,12 +3551,12 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" or as a list of function references. It will ignore anything that's not
" a function reference. See :help Funcref for information about function references.
if exists("g:Netrw_funcref")
-" call Decho("handle optional Funcrefs")
+" call Decho("(NetrwBrowseChgDir) handle optional Funcrefs")
if type(g:Netrw_funcref) == 2
-" call Decho("handling a g:Netrw_funcref")
+" call Decho("(NetrwBrowseChgDir) handling a g:Netrw_funcref")
keepj call g:Netrw_funcref()
elseif type(g:Netrw_funcref) == 3
-" call Decho("handling a list of g:Netrw_funcrefs")
+" call Decho("(NetrwBrowseChgDir) handling a list of g:Netrw_funcrefs")
for Fncref in g:Netrw_funcref
if type(FncRef) == 2
keepj call FncRef()
@@ -3344,7 +3570,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" ---------------------------------
" just go to the new directory spec
" ---------------------------------
-" call Decho('case "just go to new directory spec": newdir<'.newdir.'>')
+" call Decho('(NetrwBrowseChgDir) case "just go to new directory spec": newdir<'.newdir.'>')
let dirname= newdir
keepj call s:SetRexDir(a:islocal,dirname)
keepj call s:NetrwOptionRestore("s:")
@@ -3353,37 +3579,37 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" --------------------------
" refresh the directory list
" --------------------------
-" call Decho('case "refresh directory listing": newdir == "./"')
+" call Decho('(NetrwBrowseChgDir) case "refresh directory listing": newdir == "./"')
keepj call s:SetRexDir(a:islocal,dirname)
elseif newdir == '../'
" -------------------
" go up one directory
" -------------------
-" call Decho('case "go up one directory": newdir == "../"')
+" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../"')
if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
" force a refresh
-" call Decho("clear buffer<".expand("%")."> with :%d")
- setlocal noro ma
-" call Decho("setlocal noro ma")
+" call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d")
+" call Decho("(NetrwBrowseChgDir) setl noro ma")
+ setl noro ma
keepj %d
endif
if has("amiga")
" amiga
-" call Decho('case "go up one directory": newdir == "../" and amiga')
+" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and amiga')
if a:islocal
let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
let dirname= substitute(dirname,'/$','','')
else
let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
endif
-" call Decho("amiga: dirname<".dirname."> (go up one dir)")
+" call Decho("(NetrwBrowseChgDir) amiga: dirname<".dirname."> (go up one dir)")
else
" unix or cygwin
-" call Decho('case "go up one directory": newdir == "../" and unix or cygwin')
+" call Decho('(NetrwBrowseChgDir) case "go up one directory": newdir == "../" and unix or cygwin')
if a:islocal
let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
if dirname == ""
@@ -3392,40 +3618,40 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
endif
-" call Decho("unix: dirname<".dirname."> (go up one dir)")
+" call Decho("(NetrwBrowseChgDir) unix: dirname<".dirname."> (go up one dir)")
endif
keepj call s:SetRexDir(a:islocal,dirname)
elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
-" call Decho('case liststyle is TREELIST and w:netrw_treedict exists')
+" call Decho('(NetrwBrowseChgDir) case liststyle is TREELIST and w:netrw_treedict exists')
" force a refresh (for TREELIST, wait for NetrwTreeDir() to force the refresh)
- setlocal noro ma
-" call Decho("setlocal noro ma")
+" call Decho("(NetrwBrowseChgDir) setl noro ma")
+ setl noro ma
if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
-" call Decho("clear buffer<".expand("%")."> with :%d")
+" call Decho("(NetrwBrowseChgDir) clear buffer<".expand("%")."> with :%d")
keepj %d
endif
let treedir = s:NetrwTreeDir()
let s:treecurpos = nbcd_curpos
let haskey= 0
-" call Decho("w:netrw_treedict<".string(w:netrw_treedict).">")
+" call Decho("(NetrwBrowseChgDir) w:netrw_treedict<".string(w:netrw_treedict).">")
" search treedict for tree dir as-is
if has_key(w:netrw_treedict,treedir)
-" call Decho('....searched for treedir<'.treedir.'> : found it!')
+" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : found it!')
let haskey= 1
else
-" call Decho('....searched for treedir<'.treedir.'> : not found')
+" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found')
endif
" search treedict for treedir with a / appended
if !haskey && treedir !~ '/$'
if has_key(w:netrw_treedict,treedir."/")
let treedir= treedir."/"
-" call Decho('....searched.for treedir<'.treedir.'> found it!')
+" call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!')
let haskey = 1
else
-" call Decho('....searched for treedir<'.treedir.'/> : not found')
+" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'/> : not found')
endif
endif
@@ -3433,24 +3659,24 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
if !haskey && treedir =~ '/$'
let treedir= substitute(treedir,'/$','','')
if has_key(w:netrw_treedict,treedir)
-" call Decho('....searched.for treedir<'.treedir.'> found it!')
+" call Decho('(NetrwBrowseChgDir) ....searched.for treedir<'.treedir.'> found it!')
let haskey = 1
else
-" call Decho('....searched for treedir<'.treedir.'> : not found')
+" call Decho('(NetrwBrowseChgDir) ....searched for treedir<'.treedir.'> : not found')
endif
endif
if haskey
" close tree listing for selected subdirectory
-" call Decho("closing selected subdirectory<".dirname.">")
+" call Decho("(NetrwBrowseChgDir) closing selected subdirectory<".dirname.">")
call remove(w:netrw_treedict,treedir)
-" call Decho("removed entry<".treedir."> from treedict")
-" call Decho("yielding treedict<".string(w:netrw_treedict).">")
+" call Decho("(NetrwBrowseChgDir) removed entry<".treedir."> from treedict")
+" call Decho("(NetrwBrowseChgDir) yielding treedict<".string(w:netrw_treedict).">")
let dirname= w:netrw_treetop
else
" go down one directory
let dirname= substitute(treedir,'/*$','/','')
-" call Decho("go down one dir: treedir<".treedir.">")
+" call Decho("(NetrwBrowseChgDir) go down one dir: treedir<".treedir.">")
endif
keepj call s:SetRexDir(a:islocal,dirname)
let s:treeforceredraw = 1
@@ -3458,21 +3684,24 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
" go down one directory
let dirname= s:ComposePath(dirname,newdir)
-" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">")
+" call Decho("(NetrwBrowseChgDir) go down one dir: dirname<".dirname."> newdir<".newdir.">")
keepj call s:SetRexDir(a:islocal,dirname)
endif
keepj call s:NetrwOptionRestore("s:")
if dolockout
-" call Decho("filewritable(dirname<".dirname.">)=".filewritable(dirname))
+" call Decho("(NetrwBrowseChgDir) filewritable(dirname<".dirname.">)=".filewritable(dirname))
if filewritable(dirname)
-" call Decho("doing modification lockout settings: ma nomod noro")
- setlocal ma nomod noro
+" call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod noro")
+" call Decho("(NetrwBrowseChgDir) setl ma nomod noro")
+ setl ma nomod noro
+" call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
else
-" call Decho("doing modification lockout settings: ma nomod ro")
- setlocal ma nomod ro
+" call Decho("(NetrwBrowseChgDir) doing modification lockout settings: ma nomod ro")
+" call Decho("(NetrwBrowseChgDir) setl ma nomod noro")
+ setl ma nomod ro
+" call Decho("(NetrwBrowseChgDir) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
endif
-" call Decho("setlocal ma nomod noro")
endif
" call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
@@ -3726,7 +3955,7 @@ endfun
" == 4: Vexplore style == 5: Vexplore!
" == 6: Texplore
fun! netrw#Explore(indx,dosplit,style,...)
-" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." a:0=".a:0)
+" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%"))
if !exists("b:netrw_curdir")
let b:netrw_curdir= getcwd()
" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)")
@@ -3890,6 +4119,7 @@ fun! netrw#Explore(indx,dosplit,style,...)
if dirname == ""|let dirname= getcwd()|endif
" call Decho("..calling LocalBrowseCheck(dirname<".dirname.">)")
call netrw#LocalBrowseCheck(dirname)
+" call Decho("win#".winnr()." buf#".bufnr("%")." modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
endif
" call Decho("curdir<".curdir.">")
@@ -4491,8 +4721,8 @@ fun! s:NetrwMakeDir(usrhost)
let netrw_origdir= s:NetrwGetcwd(1)
exe 'keepj lcd '.fnameescape(b:netrw_curdir)
" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">")
-" call Decho("exe sil! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1))
- exe "sil! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1)
+" call Decho("exe sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1))
+ exe "sil! !".g:netrw_localmkdir.' '.shellescape(newdirname,1)
if !g:netrw_keepdir
exe 'keepj lcd '.fnameescape(netrw_origdir)
" call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">")
@@ -4766,7 +4996,7 @@ fun! s:NetrwMarkFileCopy(islocal)
if exists("*mkdir")
call mkdir(tmpdir)
else
- exe "sil! !".g:netrw_local_mkdir.' '.shellescape(tmpdir,1)
+ exe "sil! !".g:netrw_localmkdir.' '.shellescape(tmpdir,1)
endif
if isdirectory(tmpdir)
exe "keepj lcd ".fnameescape(tmpdir)
@@ -4778,7 +5008,7 @@ fun! s:NetrwMarkFileCopy(islocal)
keepj call s:NetrwDelete(fname)
endfor
exe "keepj lcd ".fnameescape(curdir)
- exe "sil !".g:netrw_local_rmdir." ".shellescape(tmpdir,1)
+ exe "sil !".g:netrw_localrmdir." ".shellescape(tmpdir,1)
else
exe "keepj lcd ".fnameescape(curdir)
endif
@@ -5659,6 +5889,7 @@ fun! s:NetrwMenu(domenu)
endif
endif
" call Dret("NetrwMenu")
+ return
endif
endfun
@@ -5812,14 +6043,18 @@ fun! netrw#NetrwObtain(islocal,fname,...)
" call Decho("filter input: ".getline('$'))
endif
- if exists("g:netrw_ftp") && g:netrw_ftp == 1
- keepj put =g:netrw_uid
-" call Decho("filter input: ".getline('$'))
- keepj put ='\"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('$'))
- else
- keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('$'))
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ keepj put =g:netrw_uid
+" call Decho("filter input: ".getline('$'))
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ keepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('$'))
+ elseif exists("s:netrw_passwd")
+ keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('$'))
+ endif
endif
if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
@@ -5851,8 +6086,8 @@ fun! netrw#NetrwObtain(islocal,fname,...)
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
keepj norm! 1Gdd
-" call Decho("executing: %!".s:netrw_ftp_cmd." -i -n")
- exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i -n"
+" call Decho("executing: %!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
if getline(1) !~ "^$"
" call Decho("error<".getline(1).">")
@@ -5959,7 +6194,9 @@ fun! s:NetrwPrevWinOpen(islocal)
elseif choice == 2
" No -- don't worry about changed file, just browse anyway
- setlocal nomod
+" call Decho("(NetrwPrevWinOpen) setl nomod")
+ setl nomod
+" call Decho("(NetrwPrevWinOpen) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
keepj call netrw#ErrorMsg(s:WARNING,bufname." changes to ".bufname." abandoned",31)
wincmd p
@@ -6112,14 +6349,18 @@ fun! s:NetrwUpload(fname,tgt,...)
" call Decho("filter input: ".getline('$'))
endif
- if exists("g:netrw_ftp") && g:netrw_ftp == 1
- keepj put =g:netrw_uid
-" call Decho("filter input: ".getline('$'))
- keepj call setline(line("$")+1,'"'.s:netrw_passwd.'"')
-" call Decho("filter input: ".getline('$'))
- else
- keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
-" call Decho("filter input: ".getline('$'))
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ keepj put =g:netrw_uid
+" call Decho("filter input: ".getline('$'))
+ if exists("s:netrw_passwd")
+ keepj call setline(line("$")+1,'"'.s:netrw_passwd.'"')
+ endif
+" call Decho("filter input: ".getline('$'))
+ elseif exists("s:netrw_passwd")
+ keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('$'))
+ endif
endif
keepj call setline(line("$")+1,'lcd "'.fromdir.'"')
@@ -6145,8 +6386,8 @@ fun! s:NetrwUpload(fname,tgt,...)
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
keepj norm! 1Gdd
-" call Decho("executing: ".s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i -n")
- exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i -n"
+" call Decho("executing: ".s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ exe s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
" If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
sil keepj g/Local directory now/d
call histdel("/",-1)
@@ -6621,6 +6862,7 @@ fun! s:NetrwTreeListing(dirname)
keepj call s:NetrwTreeDisplay(w:netrw_treetop,"")
" call Dret("NetrwTreeListing : bufname<".expand("%").">")
+ return
endif
endfun
@@ -6677,8 +6919,11 @@ fun! s:NetrwWideListing()
sil! let @*= keepregstar
exe "sil! keepj ".w:netrw_bannercnt.',$s/\s\+$//e'
keepj call histdel("/",-1)
- setlocal noma nomod ro
+" call Decho("NetrwWideListing) setl noma nomod ro")
+ setl noma nomod ro
+" call Decho("(NetrwWideListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("NetrwWideListing")
+ return
endif
endfun
@@ -6804,6 +7049,9 @@ fun! s:PerformListing(islocal)
" call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)")
" manipulate the directory listing (hide, sort) {{{3
+ if !exists("w:netrw_bannercnt")
+ let w:netrw_bannercnt= 0
+ endif
if !g:netrw_banner || line("$") >= w:netrw_bannercnt
" call Decho("manipulate directory listing (hide)")
" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
@@ -7324,11 +7572,21 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd)
keepj put ='open '.g:netrw_machine
endif
- if exists("g:netrw_ftp") && g:netrw_ftp == 1
- keepj put =g:netrw_uid
- keepj put ='\"'.s:netrw_passwd.'\"'
- else
- keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+ " handle userid and password
+ let host= substitute(g:netrw_machine,'\..*$','','')
+" call Decho("host<".host.">")
+ if exists("s:netrw_hup") && exists("s:netrw_hup[host]")
+ call NetUserPass("ftp:".host)
+ endif
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ keepj put =g:netrw_uid
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ keepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+ elseif exists("s:netrw_passwd")
+ keepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+ endif
endif
if a:path != ""
@@ -7345,8 +7603,8 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd)
" -n unix : DON'T use <.netrc>, even though it exists
" -n win32: quit being obnoxious about password
" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))'
-" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i -n")
- exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i -n"
+" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ exe s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options
".........................................
else
@@ -7493,10 +7751,8 @@ endfun
" s:LocalListing: does the job of "ls" for local directories {{{2
fun! s:LocalListing()
" call Dfunc("s:LocalListing()")
-" call Decho("&ma=".&ma)
-" call Decho("&mod=".&mod)
-" call Decho("&ro=".&ro)
-" call Decho("bufname(%)<".bufname("%").">")
+" call Decho("(LocalListing) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
+" call Decho("(LocalListing) tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
" if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist") |endif
" if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif
@@ -7505,51 +7761,51 @@ fun! s:LocalListing()
let dirname = b:netrw_curdir
let dirnamelen = s:Strlen(b:netrw_curdir)
let filelist = glob(s:ComposePath(fnameescape(dirname),"*"))
-" call Decho("glob(dirname<".dirname."/*>)=".filelist)
+" call Decho("(LocalListing) glob(dirname<".dirname."/*>)=".filelist)
if filelist != ""
let filelist= filelist."\n"
endif
let filelist= filelist.glob(s:ComposePath(fnameescape(dirname),".*"))
-" call Decho("glob(dirname<".dirname."/.*>)=".filelist)
+" call Decho("(LocalListing) glob(dirname<".dirname."/.*>)=".filelist)
" Coding choice: either elide ./ if present
" or include ./ if not present
if filelist =~ '[\\/]\.[\\/]\=\(\n\|$\)'
" elide /path/. from glob() entries if present
-" call Decho("elide /path/. from glob entries if present")
+" call Decho("(LocalListing) elide /path/. from glob entries if present")
let filelist = substitute(filelist,'\n','\t','g')
let filelist = substitute(filelist,'^[^\t]\+[/\\]\.\t','','')
let filelist = substitute(filelist,'[^\t]\+[/\\]\.$','','')
let filelist = substitute(filelist,'\t\zs[^\t]\+[/\\]\.\t','','')
let filelist = substitute(filelist,'\t','\n','g')
endif
-" call Decho("filelist<".filelist.">")
+" call Decho("(LocalListing) filelist<".filelist.">")
if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)'
" include ../ in the glob() entry if its missing
-" call Decho("forcibly tacking on ..")
+" call Decho("(LocalListing) forcibly tacking on ..")
let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"../")
-" call Decho("filelist<".filelist.">")
+" call Decho("(LocalListing) filelist<".filelist.">")
endif
if b:netrw_curdir == '/'
" remove .. from filelist when current directory is root directory
-" call Decho("remove .. from filelist")
+" call Decho("(LocalListing) remove .. from filelist")
let filelist= substitute(filelist,'/\.\.\n','','')
endif
" remove multiple contiguous newlines
let filelist= substitute(filelist,'\n\{2,}','\n','ge')
if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
" change all \s to /s
-" call Decho('change all \s to /s')
+" call Decho('(LocalListing) change all \s to /s')
let filelist= substitute(filelist,'\','/','g')
else
" escape all \s to \\
-" call Decho('escape all \s to \\')
+" call Decho('(LocalListing) escape all \s to \\')
let filelist= substitute(filelist,'\','\\','g')
endif
-" call Decho("(before while) dirname<".dirname.">")
-" call Decho("(before while) dirnamelen<".dirnamelen.">")
-" call Decho("(before while) filelist<".filelist.">")
+" call Decho("(LocalListing) (before while) dirname<".dirname.">")
+" call Decho("(LocalListing) (before while) dirnamelen<".dirnamelen.">")
+" call Decho("(LocalListing) (before while) filelist<".filelist.">")
while filelist != ""
if filelist =~ '\n'
@@ -7560,34 +7816,34 @@ fun! s:LocalListing()
let filelist = ""
endif
" call Decho(" ")
-" call Decho("(while) filelist<".filelist.">")
-" call Decho("(while) filename<".filename.">")
+" call Decho("(LocalListing) (while) filelist<".filelist.">")
+" call Decho("(LocalListing) (while) filename<".filename.">")
if getftype(filename) == "link"
" indicate a symbolic link
-" call Decho("indicate <".filename."> is a symbolic link with trailing @")
+" call Decho("(LocalListing) indicate <".filename."> is a symbolic link with trailing @")
let pfile= filename."@"
elseif getftype(filename) == "socket"
" indicate a socket
-" call Decho("indicate <".filename."> is a socket with trailing =")
+" call Decho("(LocalListing) indicate <".filename."> is a socket with trailing =")
let pfile= filename."="
elseif getftype(filename) == "fifo"
" indicate a fifo
-" call Decho("indicate <".filename."> is a fifo with trailing |")
+" call Decho("(LocalListing) indicate <".filename."> is a fifo with trailing |")
let pfile= filename."|"
elseif isdirectory(filename)
" indicate a directory
-" call Decho("indicate <".filename."> is a directory with trailing /")
+" call Decho("(LocalListing) indicate <".filename."> is a directory with trailing /")
let pfile= filename."/"
elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(filename)
if (has("win32") || has("win95") || has("win64") || has("win16"))
if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$'
" indicate an executable
-" call Decho("indicate <".filename."> is executable with trailing *")
+" call Decho("(LocalListing) indicate <".filename."> is executable with trailing *")
let pfile= filename."*"
else
" normal file
@@ -7595,7 +7851,7 @@ fun! s:LocalListing()
endif
elseif executable(filename)
" indicate an executable
-" call Decho("indicate <".filename."> is executable with trailing *")
+" call Decho("(LocalListing) indicate <".filename."> is executable with trailing *")
let pfile= filename."*"
else
" normal file
@@ -7606,22 +7862,22 @@ fun! s:LocalListing()
" normal file
let pfile= filename
endif
-" call Decho("pfile<".pfile."> (after *@/ appending)")
+" call Decho("(LocalListing) pfile<".pfile."> (after *@/ appending)")
if pfile =~ '//$'
let pfile= substitute(pfile,'//$','/','e')
-" call Decho("change // to /: pfile<".pfile.">")
+" call Decho("(LocalListing) change // to /: pfile<".pfile.">")
endif
let pfile= strpart(pfile,dirnamelen)
let pfile= substitute(pfile,'^[/\\]','','e')
-" call Decho("filename<".filename.">")
-" call Decho("pfile <".pfile.">")
+" call Decho("(LocalListing) filename<".filename.">")
+" call Decho("(LocalListing) pfile <".pfile.">")
if w:netrw_liststyle == s:LONGLIST
let sz = getfsize(filename)
let fsz = strpart(" ",1,15-strlen(sz)).sz
let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
-" call Decho("sz=".sz." fsz=".fsz)
+" call Decho("(LocalListing) sz=".sz." fsz=".fsz)
endif
if g:netrw_sort_by =~ "^t"
@@ -7629,22 +7885,22 @@ fun! s:LocalListing()
" call Decho("getftime(".filename.")=".getftime(filename))
let t = getftime(filename)
let ft = strpart("000000000000000000",1,18-strlen(t)).t
-" call Decho("exe keepjumps put ='".ft.'/'.filename."'")
+" call Decho("(LocalListing) exe keepjumps put ='".ft.'/'.filename."'")
let ftpfile= ft.'/'.pfile
sil! keepj put=ftpfile
elseif g:netrw_sort_by =~ "^s"
" sort by size (handles file sizes up to 1 quintillion bytes, US)
-" call Decho("getfsize(".filename.")=".getfsize(filename))
+" call Decho("(LocalListing) getfsize(".filename.")=".getfsize(filename))
let sz = getfsize(filename)
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
-" call Decho("exe keepjumps put ='".fsz.'/'.filename."'")
+" call Decho("(LocalListing) exe keepj put ='".fsz.'/'.filename."'")
let fszpfile= fsz.'/'.pfile
sil! keepj put =fszpfile
else
" sort by name
-" call Decho("exe keepjumps put ='".pfile."'")
+" call Decho("(LocalListing) exe keepjumps put ='".pfile."'")
sil! keepj put=pfile
endif
endwhile
@@ -7654,7 +7910,7 @@ fun! s:LocalListing()
sil! keepj %s/\r$//e
call histdel("/",-1)
exe "setl ts=".g:netrw_maxfilenamelen
-" call Decho("setl ts=".g:netrw_maxfilenamelen)
+" call Decho("(LocalListing) setl ts=".g:netrw_maxfilenamelen)
" call Dret("s:LocalListing")
endfun
@@ -7836,8 +8092,8 @@ fun! s:NetrwLocalRmFile(path,fname,all)
let rmfile= substitute(rmfile,'[\/]$','','e')
if all || ok =~ 'y\%[es]' || ok == ""
-" call Decho("1st attempt: system(netrw#WinPath(".g:netrw_local_rmdir.') '.shellescape(rmfile).')')
- call system(netrw#WinPath(g:netrw_local_rmdir).' '.shellescape(rmfile))
+" call Decho("1st attempt: system(netrw#WinPath(".g:netrw_localrmdir.') '.shellescape(rmfile).')')
+ call system(netrw#WinPath(g:netrw_localrmdir).' '.shellescape(rmfile))
" call Decho("v:shell_error=".v:shell_error)
if v:shell_error != 0
@@ -8039,7 +8295,9 @@ fun! netrw#FileUrlRead(fname)
exe 'keepj r '.plainfname
exe 'file! '.plainfname
keepj 1d
+" call Decho("(FileUrlRead) setl nomod")
setl nomod
+" call Decho("(FileUrlRead) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("netrw#FileUrlRead")
exe "sil doau BufReadPost ".fname2396e
endfun
@@ -8048,80 +8306,6 @@ endfun
" Support Functions: {{{1
" ---------------------------------------------------------------------
-" netrw#ErrorMsg: {{{2
-" 0=note = s:NOTE
-" 1=warning = s:WARNING
-" 2=error = s:ERROR
-" Apr 18, 2011 : max errnum currently is 78
-fun! netrw#ErrorMsg(level,msg,errnum)
-" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
-
- if a:level == 1
- let level= "**warning** (netrw) "
- elseif a:level == 2
- let level= "**error** (netrw) "
- else
- let level= "**note** (netrw) "
- endif
-" call Decho("level=".level)
-
- if g:netrw_use_errorwindow
- " (default) netrw creates a one-line window to show error/warning
- " messages (reliably displayed)
-
- " record current window number for NetrwRestorePosn()'s benefit
- let s:winBeforeErr= winnr()
-" call Decho("s:winBeforeErr=".s:winBeforeErr)
-
- " getting messages out reliably is just plain difficult!
- " This attempt splits the current window, creating a one line window.
- if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
-" call Decho("write to NetrwMessage buffer")
- exe bufwinnr("NetrwMessage")."wincmd w"
-" call Decho("setl ma noro")
- setl ma noro
- keepj call setline(line("$")+1,level.a:msg)
- keepj $
- else
-" call Decho("create a NetrwMessage buffer window")
- bo 1split
- call s:NetrwEnew()
- keepj call s:NetrwSafeOptions()
- setl bt=nofile
- keepj file NetrwMessage
-" call Decho("setlocal ma noro")
- setl ma noro
- call setline(line("$"),level.a:msg)
- endif
-" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr())
- if &fo !~ '[ta]'
- syn clear
- syn match netrwMesgNote "^\*\*note\*\*"
- syn match netrwMesgWarning "^\*\*warning\*\*"
- syn match netrwMesgError "^\*\*error\*\*"
- hi link netrwMesgWarning WarningMsg
- hi link netrwMesgError Error
- endif
- setl noma ro bh=wipe
-
- else
- " (optional) netrw will show messages using echomsg. Even if the
- " message doesn't appear, at least it'll be recallable via :messages
-" redraw!
- if a:level == s:WARNING
- echohl WarningMsg
- elseif a:level == s:ERROR
- echohl Error
- endif
- echomsg level.a:msg
-" call Decho("echomsg ***netrw*** ".a:msg)
- echohl None
- endif
-
-" call Dret("netrw#ErrorMsg")
-endfun
-
-" ---------------------------------------------------------------------
" netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2
fun! netrw#NetrwRestorePosn(...)
" call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1))
@@ -8198,7 +8382,7 @@ endfun
fun! s:ComposePath(base,subdir)
" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)")
- if(has("amiga"))
+ if has("amiga")
" call Decho("amiga")
let ec = a:base[s:Strlen(a:base)-1]
if ec != '/' && ec != ':'
@@ -8283,7 +8467,7 @@ fun! s:GetTempfile(fname)
" sanity check -- does the temporary file's directory exist?
if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(GetTempfile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
keepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2)
" call Dret("s:GetTempfile getcwd<".getcwd().">")
return ""
@@ -8331,7 +8515,7 @@ fun! s:GetTempfile(fname)
endif
endif
-" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap)
+" call Decho("(GetTempFile) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)")
" call Dret("s:GetTempfile <".tmpfile.">")
return tmpfile
endfun
@@ -8553,6 +8737,34 @@ fun! s:NetrwEnew(...)
" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#").">")
endfun
+" ---------------------------------------------------------------------
+" s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2
+fun! s:NetrwInsureWinVars()
+" call Dfunc("s:NetrwInsureWinVars()")
+ if !exists("w:netrw_liststyle")
+ let curbuf = bufnr("%")
+ let curwin = winnr()
+ let iwin = 1
+ while iwin <= winnr("$")
+ exe iwin."wincmd w"
+ if winnr() != curwin && bufnr("%") == curbuf && exists("w:netrw_liststyle")
+ " looks like ctrl-w_s or ctrl-w_v was used to split a netrw buffer
+ let winvars= w:
+ break
+ endif
+ let iwin= iwin + 1
+ endwhile
+ exe curbuf."wincmd w"
+ if exists("winvars")
+" call Decho("copying w#".iwin." window variables to w#".curwin)
+ for k in keys(winvars)
+ let w:{k}= winvars[k]
+ endfor
+ endif
+ endif
+" call Dret("s:NetrwInsureWinVars")
+endfun
+
" ------------------------------------------------------------------------
" s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2
" changed sorting, etc. Also see s:NetrwRestoreWordPosn().
@@ -8672,7 +8884,7 @@ endfun
fun! s:NetrwRexplore(islocal,dirname)
" call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir.">")
if !exists("w:netrw_rexlocal")
- " call Dret("s:NetrwRexplore() w:netrw_rexlocal doesn't exist")
+" " call Dret("s:NetrwRexplore() w:netrw_rexlocal doesn't exist")
return
endif
if w:netrw_rexlocal
@@ -8683,9 +8895,12 @@ fun! s:NetrwRexplore(islocal,dirname)
if exists("s:initbeval")
set beval
endif
- if exists("s:nbcd_curpos_{bufnr('%')}")
- keepj call netrw#NetrwRestorePosn(s:nbcd_curpos_{bufnr('%')})
-" unlet s:nbcd_curpos_{bufnr('%')}
+ if exists("s:rexposn_".bufnr("%"))
+" call Decho("(NetrwRexplore) restore posn, then unlet s:rexposn_".bufnr('%'))
+ keepj call netrw#NetrwRestorePosn(s:rexposn_{bufnr('%')})
+ unlet s:rexposn_{bufnr('%')}
+ else
+" call Decho("(NetrwRexplore) s:rexposn_".bufnr('%')." doesn't exist")
endif
if exists("s:explore_match")
exe "2match netrwMarkFile /".s:explore_match."/"
diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim
index 1515b0098..b11e3cfbf 100644
--- a/runtime/autoload/netrwFileHandlers.vim
+++ b/runtime/autoload/netrwFileHandlers.vim
@@ -1,9 +1,9 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
-" Date: Sep 30, 2008
-" Version: 10
-" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
+" Date: Mar 14, 2012
+" Version: 11a
+" Copyright: Copyright (C) 1999-2012 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@@ -20,7 +20,7 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
-let g:loaded_netrwFileHandlers= "v10"
+let g:loaded_netrwFileHandlers= "v11a"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
@@ -64,7 +64,7 @@ fun! netrwFileHandlers#Invoke(exten,fname)
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
endif
-
+
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
@@ -356,6 +356,7 @@ fun! s:NFH_obj(obj)
endfun
let &cpo= s:keepcpo
+unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 977a94dce..828de1501 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.3. Last change: 2012 Mar 23
+*editing.txt* For Vim version 7.3. Last change: 2012 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1641,6 +1641,6 @@ There are three different types of searching:
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
currently work with 'path' items that contain a url or use the double star
- (/usr/**2) or upward search (;) notations. >
+ with depth limiter (/usr/**2) or upward search (;) notations.
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index cb0dbc01c..321995ec2 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.3. Last change: 2012 Mar 28
+*eval.txt* For Vim version 7.3. Last change: 2012 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3229,7 +3229,8 @@ getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
byte count. The first column is 1.
Only works when editing the command line, thus requires use of
- |c_CTRL-\_e| or |c_CTRL-R_=|. Returns 0 otherwise.
+ |c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
+ Returns 0 otherwise.
Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|.
getcmdtype() *getcmdtype()*
@@ -3242,8 +3243,8 @@ getcmdtype() *getcmdtype()*
@ |input()| command
- |:insert| or |:append| command
Only works when editing the command line, thus requires use of
- |c_CTRL-\_e| or |c_CTRL-R_=|. Returns an empty string
- otherwise.
+ |c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
+ Returns an empty string otherwise.
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
*getcwd()*
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 924e8a458..030f0de27 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.3. Last change: 2012 Jan 26
+*insert.txt* For Vim version 7.3. Last change: 2012 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -398,7 +398,12 @@ An example for using CTRL-G u: >
This redefines the backspace key to start a new undo sequence. You can now
undo the effect of the backspace key, without changing what you typed before
-that, with CTRL-O u.
+that, with CTRL-O u. Another example: >
+
+ :inoremap <CR> <C-]><C-G>u<CR>
+
+This breaks undo at each line break. It also expands abbreviations before
+this.
Using CTRL-O splits undo: the text typed before and after it is undone
separately. If you want to avoid this (e.g., in a mapping) you might be able
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 1d4a09f3d..142f08f16 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 7.3. Last change: 2012 Jan 26
+*pi_netrw.txt* For Vim version 7.3. Last change: 2012 Apr 05
-----------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -6,17 +6,16 @@
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
-Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright*
- Permission is hereby granted to use and distribute this code, with
- or without modifications, provided that this copyright notice is
- copied with it. Like anything else that's free, netrw.vim,
- netrwPlugin.vim, netrwFileHandlers.vim, netrwSettings.vim,
- syntax/netrw.vim, and pi_netrw.txt are provided *as is* and comes
- with no warranty of any kind, either expressed or implied. No
- guarantees of merchantability. No guarantees of suitability for
- any purpose. By using this plugin, you agree that in no event will
- the copyright holder be liable for any damages resulting from the
- use of this software.
+Copyright: Copyright (C) 1999-2012 Charles E Campbell, Jr *netrw-copyright*
+ The VIM LICENSE applies to the files in this package, including
+ netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
+ syntax/netrw.vim. Like anything else that's free, netrw.vim and its
+ associated files are provided *as is* and comes with no warranty of
+ any kind, either expressed or implied. No guarantees of
+ merchantability. No guarantees of suitability for any purpose. By
+ using this plugin, you agree that in no event will the copyright
+ holder be liable for any damages resulting from the use of this
+ software. Use at your own risk!
*dav* *ftp* *netrw-file* *rcp* *scp*
@@ -43,7 +42,7 @@ Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright*
5. Activation...........................................|netrw-activate|
6. Transparent Remote File Editing......................|netrw-transparent|
7. Ex Commands..........................................|netrw-ex|
-8. Variables and Options................................|netrw-settings|
+8. Variables and Options................................|netrw-variables|
9. Browsing.............................................|netrw-browse|
Introduction To Browsing...........................|netrw-intro-browse|
Quick Reference: Maps..............................|netrw-browse-maps|
@@ -141,6 +140,16 @@ and has lines resembling >
...
default login USERID password "PASSWORD"
<
+Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: >
+
+ let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
+<
+Netrw will substitute the host's machine name for MACHINE from the url it is
+attempting to open, and so one may specify >
+ userid
+ password
+for each site in a separate file in c:\Users\Myself\.
+
Now about browsing -- when you just want to look around before editing a
file. For browsing on your current host, just "edit" a directory: >
@@ -309,7 +318,12 @@ CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
:call NetUserPass("uid","password") -- sets global uid and password
NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
-(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings|)
+ (Also see:
+ |netrw-browser-var| : netrw browser option variables
+ |netrw-protocol| : file transfer protocol option variables
+ |netrw-settings| : additional file transfer options
+ |netrw-browser-options| : these options affect browsing directories
+ )
Netrw provides a lot of variables which allow you to customize netrw to your
preferences. One way to look at them is via the command :NetrwSettings (see
@@ -318,96 +332,102 @@ settings are described below, in |netrw-browser-options|, and in
|netrw-externapp|:
*b:netrw_lastfile* last file Network-read/written retained on a
- per-buffer basis (supports plain :Nw )
+ per-buffer basis (supports plain :Nw )
*g:netrw_bufsettings* the settings that netrw buffers have
- (default) noma nomod nonu nowrap ro nobl
+ (default) noma nomod nonu nowrap ro nobl
*g:netrw_chgwin* specifies a window number where file edits will take
- place. (also see |netrw-C|)
- (default) not defined
+ place. (also see |netrw-C|)
+ (default) not defined
*g:Netrw_funcref* specifies a function (or functions) to be called when
- netrw edits a file. The file is first edited, and
- then the function reference (|Funcref|) is called.
- This variable may also hold a |List| of Funcrefs.
- (default) not defined. (the capital in g:Netrw...
- is required by its holding a function reference)
+ netrw edits a file. The file is first edited, and
+ then the function reference (|Funcref|) is called.
+ This variable may also hold a |List| of Funcrefs.
+ (default) not defined. (the capital in g:Netrw...
+ is required by its holding a function reference)
>
Example: place in .vimrc; affects all file opening
fun! MyFuncRef()
endfun
let g:Netrw_funcref= function("MyFuncRef")
<
- *g:netrw_ftp* if it doesn't exist, use default ftp
- =0 use default ftp (uid password)
- =1 use alternate ftp method (user uid password)
- If you're having trouble with ftp, try changing the
- value of this variable to see if the alternate ftp
- method works for your setup.
+ *g:netrw_ftp* if it doesn't exist, use default ftp
+ =0 use default ftp (uid password)
+ =1 use alternate ftp method (user uid password)
+ If you're having trouble with ftp, try changing the
+ value of this variable to see if the alternate ftp
+ method works for your setup.
+
+ *g:netrw_ftp_options* Chosen by default, these options are supposed to turn
+ interactive prompting off and to restrain ftp from
+ attempting auto-login upon initial connection.
+ However, it appears that not all ftp implementations
+ support this (ex. ncftp).
+ ="-i -n"
*g:netrw_ftpextracmd* default: doesn't exist
- If this variable exists, then any string it contains
- will be placed into the commands set to your ftp
- client. As an example:
- ="passive"
+ If this variable exists, then any string it contains
+ will be placed into the commands set to your ftp
+ client. As an example:
+ ="passive"
*g:netrw_ftpmode* ="binary" (default)
- ="ascii"
+ ="ascii"
*g:netrw_ignorenetrc* =0 (default for linux, cygwin)
- =1 If you have a <.netrc> file but it doesn't work and
- you want it ignored, then set this variable as
- shown. (default for Windows + cmd.exe)
+ =1 If you have a <.netrc> file but it doesn't work and
+ you want it ignored, then set this variable as
+ shown. (default for Windows + cmd.exe)
*g:netrw_menu* =0 disable netrw's menu
- =1 (default) netrw's menu enabled
+ =1 (default) netrw's menu enabled
*g:netrw_nogx* if this variable exists, then the "gx" map will not
- be available (see |netrw-gx|)
+ be available (see |netrw-gx|)
*g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
- *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
+ *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
*g:netrw_preview* =0 (default) preview window shown in a horizontally
- split window
- =1 preview window shown in a vertically split window.
- Also affects the "previous window" (see |netrw-P|) in
- the same way.
+ split window
+ =1 preview window shown in a vertically split window.
+ Also affects the "previous window" (see |netrw-P|) in
+ the same way.
- *g:netrw_scpport* = "-P" : option to use to set port for scp
- *g:netrw_sshport* = "-p" : option to use to set port for ssh
+ *g:netrw_scpport* = "-P" : option to use to set port for scp
+ *g:netrw_sshport* = "-p" : option to use to set port for ssh
- *g:netrw_sepchr* =\0xff
- =\0x01 for enc == euc-jp (and perhaps it should be for
- others, too, please let me
- know)
- Separates priority codes from filenames internally.
- See |netrw-p12|.
+ *g:netrw_sepchr* =\0xff
+ =\0x01 for enc == euc-jp (and perhaps it should be for
+ others, too, please let me know)
+ Separates priority codes from filenames internally.
+ See |netrw-p12|.
*g:netrw_silent* =0 : transfers done normally
- =1 : transfers done silently
+ =1 : transfers done silently
*g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
- line window. This window provides reliable
+ line window. This window provides reliable
delivery of messages. (default)
=0 : messages from netrw will use echoerr ;
messages don't always seem to show up this
way, but one doesn't have to quit the window.
*g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
- lines that o/s's ftp "provides" on transfers
- =0 force normal ftp behavior (no trailing line removal)
+ lines that o/s's ftp "provides" on transfers
+ =0 force normal ftp behavior (no trailing line removal)
- *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
- permits network browsing to use ls with time and
- size sorting (default if windows)
- =0 assume Windows' scp accepts windows-style paths
- Network browsing uses dir instead of ls
- This option is ignored if you're using unix
+ *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
+ permits network browsing to use ls with time and
+ size sorting (default if windows)
+ =0 assume Windows' scp accepts windows-style paths
+ Network browsing uses dir instead of ls
+ This option is ignored if you're using unix
*g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
- =1 use WinNT's rcp in binary mode (default)
+ =1 use WinNT's rcp in binary mode (default)
PATHS *netrw-path* {{{2
@@ -512,12 +532,13 @@ which contains ftp commands which will be automatically run whenever ftp
starts. You may use this feature to enter a user and password for one site: >
userid
password
+< *netrw-windows-netrc* *netrw-windows-s*
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
-netrw will substitute the current machine name requested for ftp connection
+netrw will substitute the current machine name requested for ftp connections
for MACHINE. Hence one can have multiple machine.ftp files containing login
and password for ftp. Example: >
- g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
+ let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
vim ftp://myhost.somewhere.net/
will use a file >
C:\Users\Myself\myhost.ftp
@@ -616,6 +637,9 @@ password.
readable for others. Don't forget that the system administrator can
still read the file! Ie. for Linux/Unix: chmod 600 .netrc
+Even though Windows' ftp clients typically do not support .netrc, netrw has
+a work-around: see |netrw-windows-s|.
+
PASSWORD *netrw-passwd*
@@ -720,11 +744,10 @@ below, a {netfile} is an url to a remote file.
==============================================================================
-8. Variables and Options *netrw-settings* {{{1
+8. Variables and Options *netrw-var* *netrw-settings* {{{1
(also see: |netrw-options| |netrw-variables| |netrw-protocol|
- |netrw-browser-settings| |netrw-browser-options|
- |netrw-browser-var| )
+ |netrw-browser-settings| |netrw-browser-options| )
The <netrw.vim> script provides several variables which act as options to
affect <netrw.vim>'s file transfer behavior. These variables typically may be
@@ -1222,6 +1245,18 @@ As an example, by putting the following line in your .vimrc, >
let g:netrw_liststyle= 4
the tree style will become your default listing style.
+One typical way to use the netrw tree display is to: >
+
+ vim .
+ (use i until a tree display shows)
+ navigate to a file
+ v (edit as desired in vertically split window)
+ ctrl-w h (to return to the netrw listing)
+ P (edit newly selected file in the previous window)
+ ctrl-w h (to return to the netrw listing)
+ P (edit newly selected file in the previous window)
+ ...etc...
+<
Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
|g:netrw_timefmt| |g:netrw_list_cmd|
@@ -1395,7 +1430,7 @@ to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
g:netrw_rmf_cmd: ssh HOSTNAME rm -f
Related topics: |netrw-d|
-Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
+Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
|g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
@@ -1727,13 +1762,13 @@ MAKING A NEW DIRECTORY *netrw-d* {{{2
With the "d" map one may make a new directory either remotely (which depends
on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
-global variable g:netrw_local_mkdir). Netrw will issue a request for the new
+global variable g:netrw_localmkdir). Netrw will issue a request for the new
directory's name. A bare <CR> at that point will abort the making of the
directory. Attempts to make a local directory that already exists (as either
a file or a directory) will be detected, reported on, and ignored.
Related topics: |netrw-D|
-Associated setting variables: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
+Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd|
|g:netrw_remote_mkdir|
@@ -2058,6 +2093,12 @@ your browsing preferences. (see also: |netrw-settings|)
history.
(related: |netrw-qb| |netrw-u| |netrw-U|)
+ *g:netrw_errorlvl* =0: error levels greater than or equal to
+ this are permitted to be displayed
+ 0: notes
+ 1: warnings
+ 2: errors
+
*g:netrw_fastbrowse* =0: slow speed directory browsing;
never re-uses directory listings,
always obtains directory listings.
@@ -2116,7 +2157,7 @@ your browsing preferences. (see also: |netrw-settings|)
unix or g:netrw_cygwin set: : "ls -tlF"
otherwise "dir"
- *g:netrw_glob_escape* ='[]*?`{~$' (unix)
+ *g:netrw_glob_escape* ='[]*?`{~$' (unix)
='[]*?`{$' (windows
These characters in directory names are
escaped before applying glob()
@@ -2162,10 +2203,10 @@ your browsing preferences. (see also: |netrw-settings|)
Moves marked files (|netrw-mf|) to target
directory (|netrw-mt|, |netrw-mm|)
- *g:netrw_local_mkdir* command for making a local directory
+ *g:netrw_localmkdir* command for making a local directory
default: "mkdir"
- *g:netrw_local_rmdir* remove directory command (rmdir)
+ *g:netrw_localrmdir* remove directory command (rmdir)
default: "rmdir"
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
@@ -2246,7 +2287,7 @@ your browsing preferences. (see also: |netrw-settings|)
\.info$,\.swp$,\.obj$'
*g:netrw_special_syntax* If true, then certain files will be shown
- in special syntax in the browser:
+ using special syntax in the browser:
netrwBak : *.bak
netrwCompress: *.gz *.bz2 *.Z *.zip
@@ -2354,7 +2395,7 @@ settings. You may change any of their values; when you save the file, the
settings therein will be used. One may also press "?" on any of the lines for
help on what each of the variables do.
-(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-variables|)
+(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
==============================================================================
@@ -2414,8 +2455,8 @@ These will:
1. Make vertical splitting the default for previewing files
2. Make the default listing style "tree"
3. When a vertical preview window is opened, the directory listing
- will use only 30 columns; the rest of the window is used for the
- preview window.
+ will use only 30% of the columns available; the rest of the window
+ is used for the preview window.
PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
@@ -2841,6 +2882,28 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
12. History *netrw-history* {{{1
+ v145: Apr 05, 2012 * moved some command from a g:netrw_local_...
+ format to g:netwr_local... format
+ * included some NOTE level messages about
+ commands that aren't executable
+ * |g:netrw_errorlvl| (default: NOTE=0)
+ option introduced
+ v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used,
+ or their wincmd equivalents, on a netrw
+ buffer, the netrw's w: variables were
+ not copied over. Fixed.
+ Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented
+ out, and was mistakenly used during
+ RestorePosn. Unfortunately, I'm not
+ sure why it was commented out, so this
+ "fix" may re-introduce an earlier problem.
+ Mar 21, 2012 * included s:rexposn internally to make
+ :Rex return the cursor to the same pos'n
+ upon restoration of netrw buffer
+ Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove
+ "/" from the netrw buffer's usual |'isk'|
+ in order to allow "filetype detect" to work
+ properly for scripts.
v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative
number; the absolute value of it will then
be used to specify lines/columns instead of
@@ -2865,843 +2928,11 @@ which is loaded automatically at startup (assuming :set nocp).
now permits the "@" to be part of the
user id (if there's an @ that appears
to the right).
- v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use
- shellescape(fnameescape(s:path),1) for
- the benefit of those using scp://.../
- with subdirectories having spaces.
- Problem reported by: Gilles Charron
- Apr 18, 2011 * s:NetrwMethod() attempts to issue an
- error message when given a malformed url
- Apr 29, 2011 * converted most mousemaps to use <Plug>s
- * |g:netrw_winsize|'s meaning changed
- v141: Aug 28, 2010 * added -s:... support for Windows ftp
- * restored 2-leftmouse for :Rex-like return
- * added balloon help for banner
- Oct 26, 2010 * :Texplore changed to start from netrw's idea
- of the current directory, not pwd's
- Feb 10, 2011 * netrwPlugin modified to use BufReadCmd
- when the "filename" ends with a "/" or a "\"
- Avoids "... is a directory" message, works
- inside a try-catch-endtry clause.
- Feb 22, 2011 * for menus, &go =~# used to insure correct case
- Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor
- In addition, there's more supported settings for
- it.
- v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window
- v139: May 14, 2010 * when viewing remote directory listings and
- changing listing style, going to tree listing
- mode was issuing two rather useless messages
- about the buffer name. They have now been
- silenced.
- * (Jean Johner) with "behave mswin", clicking
- on a filename in wide mode opened a new file
- with a missing first letter
- * (Britton Kerin) wanted netrw listings to be
- buflisted; the |g:netrw_bufsettings| option
- permits that.
- Jun 18, 2010 * (Jan Steffens) added support for xz compression
- Jun 23, 2010 * vimdiff dir1 dir2 now works
- Jul 27, 2010 * (John Orr) pointed out that the intended maparg
- test for gx was actually testing for g rather
- than gx. Fixed.
- v138: May 01, 2010 * added the bomb setting to the Save-Set-Restore
- option handling (for Tony M)
- May 14, 2010 * (Bram Moolenaar) netrw optionally sets cursorline
- (and sometimes cursorcolumn) for its display.
- This option setting was leaking through with
- remote file handling.
- v137: Dec 28, 2009 * modified the preview window handling for
- vertically split windows. The preview
- window will take up all but g:netrw_winsize
- columns of the original window; those
- g:netrw_winsize columns will be used for
- the netrw listing.
- * (Simon Dambe) removed "~" from
- |g:netrw_glob_escape| under Windows
- * (Bram Moolenaar) modified test for status bar
- click with leftmouse. Moved code to
- s:NetrwLeftmouse().
- Feb 24, 2010 * (for Jean Johner) added insert-mode maps; one
- can get into insert mode with netrw via
- ctrl-o :e .
- Mar 15, 2010 * (Dominique Pellé) Directory with backslashes such
- as foo\bar were not being entered/left properly
- Mar 15, 2010 * Using :Explore .. and causing two FocusGained
- events caused the directory to change. Fixed.
- Mar 22, 2010 * Last fix caused problems for *//pat and */filepat
- searches.
- Mar 30, 2010 * With :set hidden and changing listing styles 8
- times, the tree listing buffer was being marked
- as modified upon exit. Fixed.
- v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
- of function references
- Jan 14, 2009 * (reported by Marvin Renich) with spell check
- enabled, some filenamess will still being
- displayed as spelling errors.
- Apr 13, 2009 * (Björn Winckler) writing a file using
- remote scp caused syntax highlighting problem.
- Solution: avoid syntax/syntax.vim's
- au Filetype * syntax setting autocommand by
- checking that the current buffer has the
- netrw filetype before attempting a doau
- in s:NetrwSafeOptions().
- Apr 14, 2009 * (asgeo1) suggested the "T" map (|netrw-T|)
- Apr 14, 2009 * marking wasn't working on executable and
- other special filenames
- Apr 20, 2009 * (Dennis Benzinger) files opened via http have
- their syntax filetype auto-detected
- Jun 19, 2009 * (Yukihiro Nakadaira) help document improvements
- Jul 22, 2009 * g:netrw_browse_split will honor the
- |'equalalways'| setting.
- Jul 29, 2009 * implemented "I" mapping to toggle banner
- (this is experimental and still being debugged)
- Sep 19, 2009 * (Mike McEwan) writes via ftp now send both
- g:netrw_ftpmode and g:netrw_ftpextracmd (if the
- latter exists)
- Dec 02, 2009 * netrw uses vimgrep several places; it now uses
- "noautocmd vimgrep" (should be speedier).
- Dec 03, 2009 * changed back to using -source instead of -dump
- for elinks-using commands. (requested by James
- Vega and Karsten Hopp)
- v135: Oct 29, 2008 * using |simplify()| on directory names
- (supporting handling ".."s in directory names)
- Oct 31, 2008 * added special file highlighting for core dumps
- under Unix/Linux. The default sorting sequence
- now also gives core dumps priority.
- Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
- to avoid having to use fnameescape()
- * fixed a tree redrawing problem (open directory,
- open subdir, close subdir, close dir)
- Nov 19, 2008 * sprinkled some histdel("/",-1)s through the code
- in an attempt to prevent netrw from changing
- the search history.
- Jan 02, 2009 * |g:Netrw_funcref| included
- Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
- variables
- Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
- to remove cygdrive from non-cygwin Windows
- paths. Improved the determination as to
- whether or not to do so.
- Jan 13, 2009 * included contains=@NoSpell in every syntax
- group for syntax/netrw.vim .
- v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
- the use of the |netrw-t| command with a remote
- directory.
- Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
- Oct 03, 2008 * bookmarks now go on a list and are stored to
- the first directory on the |'runtimepath'| in
- the hopes of making their retention reliable.
- History now also goes to that directory.
- Oct 07, 2008 * Included check that vim 7.0 or later is in use.
- Oct 07, 2008 * Improved |g:netrw_retmap| handling.
- Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
- cadaver isn't available then netrw will try to
- use curl for the dav://... protocol.
- Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
- This lets mf (|netrw-mf|) mark directories, links
- and executables.
- Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
- g:netrw_fastbrowse is <= 1 (slow, medium speed)
- Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
- independently of |g:netrw_http_cmd|.
- Oct 23, 2008 * [N] added to the various Explore commands to
- let users specify the width/height of new
- explorer windows, overriding |g:netrw_winsize|.
- v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
- Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
- wasn't being used, resulting in "b:netrw_fname
- undefined" errors
- Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
- changed to hi default link in the netrw syntax
- files.
- Aug 12, 2008 * using s:NetrwUnmarkList() more often. Filenames
- were being left on the global list when removed
- from the buffer-local lists.
- Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
- the rcp-handling portion of NetRead().
- Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
- and tree displays.
- v132: Aug 06, 2008 * Fixed marked file-based obtain
- Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
- buffer (or any buffer with |'nobl'|) left an
- empty no-name buffer in its wake. Fixed.
- v130: Jul 31, 2008 * trying out elinks/links for http://host/
- requests. One problem: in-page links
- (such as with ...#LABEL) are not supported
- * verified that Bram's modified netrwPlugin works
- Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the
- "filter window" was left behind.
- v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some
- local maps
- v128: Jul 30, 2008 * much work done in using shellescape() and
- fnameescape()
- v126: Jun 30, 2008 * after having gone to a remote directory,
- <f1> was no longer taking one to the correct
- entry in the help (|netrw-quickhelp|). Fixed.
- Jul 01, 2008 * extracting the last filename from a wide listing
- missed the last letter when |'virtualedit'| not
- enabled.
- Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
- where bar was also a directory
- Jul 01, 2008 * numerous additional changes were made to netrw
- to use fnameescape() and shellescape() instead
- of escape(). Not all changes have been tested
- as yet...
- Jul 01, 2008 * (James Vega reported) some problems with
- :NetrwSettings (due to no longer used setting
- variables).
- Jul 07, 2008 * Additional numerous changes to support security;
- shellescape(arg,1), etc.
- v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
- noted that gx was failing since its call to
- netrw#NetBrowseX() wasn't updated to
- netrw#NetrwBrowseX().
- * (Stanis Trendelenburg) ST provides a patch to
- supports davs: (dav + ssl)
- * (Rick Choi) noted that directory names comprised
- of three digits were not being displayed by
- the internal browser. Fixed.
- * (Erik Falor) provided a patch to handle problems
- with changing directory and |'acd'| option.
- * (James Vega, Teemu Likonen) noted that netrw
- wasn't handling multi-byte filenames/directories
- correctly. Fixed.
- * (Rick) found problem with g:netrw_maxfilenamelen
- being overridden.
- * (James Vega) pointed out that netrw was
- misidentifying all files in a symbolically linked
- directory as being symbolically linked
- themselves. This particular problem was fixed;
- however, there are now situations where
- symbolically linked files will not be detected.
- Really need an internal vim function to do this
- identification.
- Apr 17, 2008 * When g:netrw_keepdir==0, current directory
- doesn't necessarily equal b:netrw_curdir
- initially. Problem is due to the patch directly
- above.
- * Fixed qf to handle case where b:netrw_curdir
- isn't the same as the current directory under
- linux/macosx.
- * New: |netrw-mg| (apply vimgrep to marked files)
- May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
- interfering with g:netrw_maxfilenamelen
- May 05, 2008 * (James Vega) a file inside a linked directory
- was showing up as a symbolic link itself.
- May 22, 2008 * symbolic links, fifos, and sockets are now
- indicated by a trailing @, |, or =, respectively.
- Jun 06, 2008 * Removed numerous bugs from the marked file
- move and copy. Tested these changes under
- Unix only thus far.
- * :Rexplore returns to the screen position in the
- netrw listing from whence the file was edited
- v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
- "x" action for mac to use g:netrw_shq
- v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
- list. The global marked file list is used to
- support tag processing and vimdiff'ing
- (|netrw-md| |netrw-mt|)
- * Been insuring that mm and mc works with various
- combinations of local and remote directories
- * (Stefan Bittner) http://.../ should always have
- filetype "html" -- fixed.
- * (Stefan Bittner) a "?" in a http://.../ request
- wasn't being handled correctly. Fixed by
- removing ? from default |g:netrw_tmpfile_escape|.
- * (Nico Weber) % codes in http://.../ requests
- weren't being handled correctly. Fixed by
- including % in default |g:netrw_fname_escape|.
- * (Stefan Bittner) attempts to update Buffers.Refresh
- were failing because locale use changed the menu
- names. I implemented a workaround.
- v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
- priority
- Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
- sequencing priority of anything following '*'
- * toggling a marked file was showing incorrect list
- (list was correct, but displayed matches weren't)
- * |g:netrw_special_syntax| implemented
- v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
- retain the alternate file. Fixed -- I hope!
- * bugfix -- apparently v120 broke an explicit
- :Explore dirname
- v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
- based on whether or not word under cursor is a
- directory or file, or if cursor is in banner
- area.
- * |netrw-mh| included (hiding by marked-file suffix)
- * functions moved about a bit (improved
- categorization)
- * executable files now displayed with trailing (*)
- * symbolically linked files now displayed with
- trailing (@)
- * Somewhen, s:NetrwMarkFileMove() got damaged. It
- * is now restored (missing an endif, for example).
- * |netrw-mu| implemented (unmarking marked files)
- * many bugs have been removed from the marked file
- system (tnx to Mark S. for feedback)
- * |netrw-ms| implemented (sourcing marked files)
- * fixed use of P with tree listing style
- * multiple tree listing now supported
- * ./ suppressed
- * changed q -> qb (query bookmarks)
- * implemented |netrw-qf|
- * Explore now has four special list-generation
- modes: */filepat **/filepat
- *//pattern **//pattern
- * gh (|netrw-gh|) is a shortcut for toggling the
- hiding of files and directories beginning with a
- dot
- v119: Jan 10, 2008 * When g:netrw_keepdir is false,
- NetrwOptionsRestore() had a problem
- (Bill McCarthy)
- Jan 11, 2008 * Netrw now shows symbolic links with a trailing
- "@" and special highlighting.
- Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
- Changed: disabled by default at Bram's
- preference.
- v118: Jan 02, 2008 * Fixed a problem with Windows;
- :Explore c:/path/ would not work,
- but :Explore c:/path would.
- * Fixed a bug in s:NetrwOptionRestore() - lcd's
- argument wasn't being properly escaped so it
- wouldn't handle spaces in directory names.
- (Gary Johnson)
- v117: Jan 02, 2008 * Fixed a problem with P; had to include
- a b:netrw_curdir bypass (Bram Moolenaar)
- v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
- check to prevent doing a directory listing
- (was getting unexpected directory refreshes
- in the middle of some function calls)
- * NetrwOptionRestore moved after e! filename
- in order to retain user options for editing
- in s:NetrwBrowseChgDir()
- Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
- user options when editing files under the aegis
- of the browser
- v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
- shellslash in s:GetTempfile() was incorrect
- Oct 11, 2007 * Tracked down and eliminated a bug with editing
- remote *.tar.gz and *.tar.bz2 files
- Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
- properly, and g:netrw_localcopycmd was being
- overwritten.
- Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
- in a new support function (s:SetRexDir()).
- Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
- based selection will use previous window
- Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
- Oct 24, 2007 * Explore handles path/**/filename
- Oct 27, 2007 * sourcing remote files often didn't work with ftp,
- turns out that b:netrw_method was undefined, so
- s:SaveBufVars and s:RestoreBufVars() fixed it.
- v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
- to support use of remote tags files.
- Oct 02, 2007 * changed Netrw menu to use more submenus
- v113: Sep 07, 2007 * worked out why the cursor position wasn't being
- saved and restored as intended after doing such
- things as deleting and renaming files.
- Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
- <c-h> maps
- Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
- the end of the s:NetrwBrowseChgDir() function;
- they're now at the end of every if..elseif..else
- block. The edit-a-file one is not quite at the end
- of its block; instead, it's just before the edit.
- Restores user options, then this new placement
- allows ftplugins, autocmds, etc to change settings
- (ex. ftplugin/cpp.vim sets cindent).
- Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
- function which handles utf-8 wide characters
- correctly.
- Sep 20, 2007 * (Nico Weber) the "x" command has been extended
- to Mac's OS/X (macunix); it now uses open to
- handle |netrw-x| browsing with special files.
- Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
- request.
- * Included path to NetrwRemoteRmFile()
- v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
- commands on marked files
- Aug 22, 2007 * more option save/restore work for
- s:NetrwBrowseChgDir(); s:NetrwOptionSave()
- and s:NetrwOptionRestore() now take a parameter
- specifying the type of variables to be used for
- saving and restoring (either "w:" or "s:")
- Sep 04, 2007 * added the :NetrwClean[!] command
- v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
- "file bufname" where the bufname uses /s
- instead of \s; Vim "fixes" it by changing the
- bufname to use \s anyway. This meant that
- NetrwGetBuffer() didn't find the appropriately
- named buffer, and so would generate a new
- buffer listing; hence the cursor would appear
- to have been moved when doing a preview.
- * added <2-leftmouse> map to return to netrw's
- browser display
- Aug 16, 2007 * added the mark-file system, including
- maps for mf mp mt mz and mu. Modifications
- made to maps for a D O and R to support
- marked files.
- v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
- May 25, 2007 * |g:netrw_preview| included
- May 29, 2007 * modified netrw#NetBrowseX to consistently use
- g:netrw_shq instead of hardcoded quotes,
- and modified the snippet that sets up redir
- so Windows machines use "nul" instead of
- "/dev/null".
- Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
- recognizing a buffer name match when it should,
- thus resulting in [Scratch] buffers.
- Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
- when the directory is to be made current but
- the name contains spaces.
- v109: Mar 26, 2007 * if a directory name includes a "$" character,
- Explore() will use expand() in an attempt to
- decipher the name.
- May 07, 2007 * g:netrw_use_errorwindow now allows one to
- have error messages go to a reliable window
- or to use a less reliable but recallable
- echoerr method
- May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
- use of -P and -p, respectively, to set port
- for scp/ssh.
- v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
- remote browsing
- * netrw can now source remote files
- Jan 26, 2007 * Colton Jamieson noted that remote directory
- browsing did not support alternate port
- selection. This feature has now been extended
- to apply to all remote browsing commands via ssh.
- (list, remove/delete, rename)
- Jan 31, 2007 * Luis Florit reported that @* was an invalid
- register. The @* register is now only saved and
- restored if |'guioptions'| contains "a".
- Feb 02, 2007 * Fixed a bug that cropped up when writing files
- via scp using cygwin
- Feb 08, 2007 * tree listing mode managed to stop working again;
- fixed again!
- Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
- handle browsing well with M$ ftp servers. He even
- set up a temporary account for me to test with
- (thanks!). Netrw now can browse M$ ftp servers.
- v107: Oct 12, 2006 * bypassed the autowrite option
- Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
- files
- Nov 03, 2006 * Explore will highlight matching files when
- **/pattern is used (and if the |'hls'| option
- is set)
- Nov 09, 2006 * a debugging line, when enabled, was inadvertently
- bringing up help instead of simply reporting on
- list contents
- Nov 21, 2006 * tree listing improved (cursor remains put)
- Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
- pressed.
- Dec 15, 2006 * considerable qty of changes, mostly to share more
- code between local and remote browsing. Includes
- support for tree-style listing for both remote
- and local browsing.
- Dec 15, 2006 * Included Peter Bengtsson's modifications to
- support the Amiga.
- v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
- requires vim 7.0
- * worked around a bug where register * was
- overwritten during local browsing
- v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
- variants will position the cursor on the file
- just having been edited
- * changed default |g:netrw_sort_sequence| order
- * changed b, Nb to simply mb (see |netrw-mb|)
- * changed B, NB to simply gb (see |netrw-gb|)
- * tree listing style (see |g:netrw_liststyle|)
- * attempts to retain the alternate file
- v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
- error message display
- * wide listings didn't handle files with backslashes
- in their names properly. A symptom was an
- inability to open files.
- Aug 09, 2006 * included "t" mapping for opening tabbed windows,
- both for remote and local browsing
- * changed netrw_longlist to netrw_liststyle
- Aug 15, 2006 * fixed one of the NB maps
- Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
- of -nargs=?. Allows both -complete=dir _and_ the
- starstar arguments to work (-nargs=? seems to
- require one or the other).
- Aug 23, 2006 * copied all w:.. variables across splits to
- new windows
- Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
- (see |g:netrw_browsex_viewer|) it wasn't causing
- netrwFileHandlers#Invoke() to be called as it
- was expected to. (tnx Steve Dugaro)
- Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
- instead of "set ... noswf" (tnx Benji Fisher)
- Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
- v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
- * bugfix: g:netrw_keepdir==0 had stopped working
- Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
- the unnamed register (|registers|)
- Jul 07, 2006 * |g:netrw_menu| support included
- Jul 13, 2006 * :Texplore command implemented
- Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
- splitting windows. This affected o, v, and
- g:netrw_browse_split.
- Jul 20, 2006 * works around wildignore setting (was causing
- netrw's local browser not to list wildignore'd
- files)
- Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
- <rightmouse> acts as a <del> for deleting a file
- v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
- default for g:netrw_ignorenetrc is now 1
- * bugfix: unwanted ^Ms now removed
- (affected shell==cmd.exe - Windows)
- * added Bookmarks and History to the menu
- * an error message about non-existing
- w:netrw_longlist was appearing during attempts to
- Explore (fixed)
- * g:netrw_shq now available to make netrw use
- specified style of quotes for commands
- May 29, 2006 * user NFH_*() functions were inadvertently being
- ignored
- * fixed a Windows non-cygwin ftp handling problem.
- * hiding pattern candidate separators included some
- characters it shouldn't have (tnx to Osei Poku)
- Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
- instead of "ls -lF" when using
- ftp+non-cygwin+windows. Fixed.
- * an inadvertently left-in-place debugging statement
- was preventing use of the "x" key with browsing.
- Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
- map (see |g:netrw_nogx|)
- * bugfix, Explore wouldn't change directory
- properly (vim ., :Explore subdirname)
- Jun 06, 2006 * moved history to 2nd line in Netrw menu
- * fixed delete for unix-based systems
- Jun 07, 2006 * x key now works for windows-noncygwin-ftp
- Jun 08, 2006 * Explore */pat and **//pat now wraps
- v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
- tabs implemented.
- May 12, 2006 * deletes temporary file at end of NetRead()
- * visual mode based Obtain implemented
- * added -complete=dir to the various Explore
- commands
- v98: May 02, 2006 * the "p" key didn't work properly when the browsing
- directory name had spaces in it.
- v97: May 01, 2006 * exists("&acd") now used to determine if
- the 'acd' option exists
- * "obtain" now works again under Windows
- v96: * bugfix - the |'acd'| option is not always defined
- but is now bypassed only when it is
- v95: * bugfix - Hiding mode worked correctly (don't show
- any file matching any of the g:netrw_hide
- patterns), but showing mode was showing only those
- files that didn't match any of the g:netrw_hide
- patterns. Instead, it now shows all files that
- match any of the g:netrw_hide patterns (the
- difference between a logical and and logical or).
- v94: * bugfix - a Decho() had a missing quote; only
- affects things when debugging was enabled.
- v93: * bugfix - removed FocusGained event from causing a
- slow-browser refresh for Windows
- v92: * :Explore **//pattern implemented
- (**/filepattern was already taken)
- v91: * :Explore */pattern implemented
- * |'acd'| option bypassed
- v90: * mark ', as suggested by Yegappan Lakshmanan, used
- to help guarantee entry into the jump list when
- appropriate.
- * <s-down> and <s-up> are no longer defined until a
- :Explore **/pattern is used (if the user already
- has a map for them). They will be defined for new
- browser windows from that point forward.
- v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
- without having first done an :Explore **/pattern
- (see |netrw-starstar|) caused
- a lot of unhelpful error messages to appear
- v88: * moved DrChip.Netrw menu to Netrw. Now has
- priority 80 by default.
- g:NetrwTopLvlMenu == "Netrw" and can be changed
- by the user to suit. The priority is given by
- g:NetrwMenuPriority.
- * Changed filetype for browser displays from
- netrwlist to netrw.
- v87: * bug fix -- menus were partially disappearing
- v85: * bug fix -- missing an endif
- * bug fix -- handles spaces in names and directories
- when using ftp-based browsing
- v83: * disabled stop-acd handling; the change in directory
- handling may allow acd to be used again.
- * D was refusing to delete remote files/directories
- in wide listing mode.
- v81: * FocusGained also used to refresh/wipe local browser
- directory buffers
- * (bugfix) netrw was leaving [Scratch] buffers behind
- when the user had the "hidden" option set. The
- 'hidden' option is now bypassed.
- v80: * ShellCmdPost event used in conjunction with
- g:netrw_fastbrowse to refresh/wipe local browser
- directory buffers.
- v79: * directories are now displayed with nowrap
- * (bugfix) if the column width was smaller than the
- largest file's name, then netrw would hang when
- using wide-listing mode - fixed
- * g:netrw_fastbrowse introduced
- v78: * progress has been made on allowing spaces inside
- directory names for remote work (reading, writing,
- browsing). (scp)
- v77: * Mikolaj Machowski fixed a bug in a substitute cmd
- * g:netrw_browsex_viewer implemented
- * Mikolaj Machowski pointed out that gnome-open is
- often executable under KDE systems, although it is
- effectively not functional. NetBrowseX now looks
- for "kicker" as a running process to determine if
- KDE is actually running.
- * Explorer's O functionality was inadvertently left
- out. Netrw now does the same thing, but with the
- "P" key.
- * added g:netrw_browse_split option
- * fixed a bug where the directory contained a "." but
- the file didn't (was treating the dirname from "."
- onwards as a suffix)
- v76: * "directory is missing" error message now restores
- echo highlighting
- v75: * file://... now conforms to RFC2396 (thanks to
- S. Zacchiroli)
- * if the binary option is set, then NetWrite() will
- only write the whole file (line numbers don't make
- sense with this). Supports writing of tar and zip
- files.
- v74: * bugfix (vim, then :Explore) now works
- * ctrl-L keeps cursor at same screen location (both
- local and remote browsing)
- * netrw now can read remote zip and tar files
- * Obtain now uses WinXP ftp+.netrc successfully
- v73: * bugfix -- scp://host/path/file was getting named
- incorrectly
- * netrw detects use of earlier-than-7.0 version of
- vim and issues a pertinent error message.
- * netrwSettings.vim is now uses autoloading. Only
- <netrwPlugin.vim> is needed as a pure plugin
- (ie. always loaded).
- v72: * bugfix -- formerly, one could prevent the loading
- of netrw by "let g:loaded_netrw=1"; when
- autoloading became supported, this feature was
- lost. It is now restored.
- v71: * bugfix -- made some "set nomodifiable"s into
- setlocal variants (allows :e somenewfile to be
- modifiable as usual)
- * NetrwSettings calls a netrw function, thereby
- assuring that netrw has loaded. However, if netrw
- does not load for whatever reason, then
- NetrwSettings will now issue a warning message.
- * For what reason I don't recall, when wget and fetch
- are both not present, and an attempt to read a
- http://... url is made, netrw exited. It now only
- returns.
- * When ch=1, on the second and subsequent uses of
- browsing Netrw would issue a blank line to clear
- the echo'd messages. This caused an annoying
- "Hit-Enter" prompt; now a blank line message
- is echo'd only if &ch>1.
- v70: * when using |netrw-O|, the "Obtaining filename"
- message is now shown using |hl-User9|. If User9
- has not been defined, netrw itself will define it.
- v69: * Bugfix: win95/98 machines were experiencing a
- "E121: Undefined variable: g:netrw_win95ftp"
- message
- v68: * double-click-leftmouse selects word under mouse
- v67: * Passwords which contain blanks will now be
- surrounded by double-quotes automatically (Yongwei)
- v66: * Netrw now seems to work with a few more Windows
- situations
- * O now obtains a file: remote browsing
- file -> local copy, locally browsing
- file -> current directory (see :pwd)
- * i now cycles between thin, long, and wide listing
- styles
- * NB and Nb are maps that are always available;
- corresponding B and b maps are only available when
- not using wide listing in order to allow them to
- be used for motions
- v65: * Browser functions now use NetOptionSave/Restore; in
- particular, netrw now works around the report
- setting
- v64: * Bugfix - browsing a "/" directory (Unix) yielded
- buffers named "[Scratch]" instead of "/"
- * Bugfix - remote browsing with ftp was omitting
- the ./ and ../
- v63: * netrw now takes advantage of autoload (needs 7.0)
- * Bugfix - using r (to reverse sort) working again
- v62: * Bugfix - spaces allowed again in directory names
- with g:netrw_keepdir=0. In fact, I've tested netrw
- with most ANSI punctuation marks for directory
- names.
- * Bugfix - NetrwSettings gave errors when
- g:netrw_silent had not be set.
- v61: * Document upgrade -- netrw variable-based settings
- all should have tags. Supports NetrwSettings cmd.
- * Several important variables are window-oriented.
- Netrw has to transfer these across a window split.
- See s:BufWinVars() and s:UseBufWinVars().
- v60: * When using the i map to switch between long and
- short listings, netrw will now keep cursor on same
- line
- * "Match # of #" now uses status line
- * :Explore **/*.c will now work from a
- non-netrw-browser window
- * :Explore **/patterns can now be run in separate
- browser windows
- * active banner (hit <cr> will cause various things
- to happen)
- v59: * bugfix -- another keepalt work-around installed
- (for vim6.3)
- * "Match # of #" for Explore **/pattern matches
- v58: * Explore and relatives can now handle
- **/somefilepattern (v7)
- * Nexplore and Pexplore introduced (v7). shift-down
- and shift-up cursor keys will invoke Nexplore and
- Pexplore, respectively.
- * bug fixed with o and v
- * autochdir only worked around for vim when it has
- been compiled with either
- |+netbeans_intg| or |+sun_workshop|
- * Under Windows, all directories and files were
- being preceded with a "/" when local browsing.
- Fixed.
- * When: syntax highlighting is off, laststatus=2, and
- remote browsing is used, sometimes the laststatus
- highlighting bleeds into the entire display. Work
- around - do an extra redraw in that case.
- * Bugfix: when g:netrw_keepdir=0, due to re-use of
- buffers, netrw didn't change the directory when it
- should've
- * Bugfix: D and R commands work again
- v57: * Explore and relatives can now handle RO files
- * reverse sort restored with vim7's sort command
- * g:netrw_keepdir now being used to keep the current
- directory unchanged as intended (sense change)
- * vim 6.3 still supported
- v56: * LocalBrowse now saves autochdir setting, unsets it,
- and restores it before returning.
- * using vim's rename() instead of system +
- local_rename variable
- * avoids changing directory when g:netrw_keepdir is
- false
- v55: * -bar used with :Explore :Sexplore etc to allow
- multiple commands to be separated by |s
- * browser listings now use the "nowrap" option
- * browser: some unuseful error messages now
- suppressed
- v54: * For backwards compatibility, Explore and Sexplore
- have been implemented. In addition, Hexplore and
- Vexplore commands are available, too.
- * <amatch> used instead of <afile> in the
- transparency support (BufReadCmd, FileReadCmd,
- FileWriteCmd)
- * ***netrw*** prepended to various error messages
- netrw may emit
- * g:netrw_port used instead of b:netrw_port for scp
- * any leading [:#] is removed from port numbers
- v53: * backslashes as well as slashes placed in various
- patterns (ex. g:netrw_sort_sequence) to better
- support Windows
- v52: * nonumber'ing now set for browsing buffers
- * when the hiding list hid all files, error messages
- ensued. Fixed
- * when browsing, swf is set, but directory is not
- set, when netrw was attempting to restore options,
- vim wanted to save a swapfile to a local directory
- using an url-style path. Fixed
- v51: * cygwin detection now automated
- (using windows and &shell is bash)
- * customizable browser "file" rejection patterns
- * directory history
- * :[range]w url now supported (ie. netrw uses a
- FileWriteCmd event)
- * error messages have a "Press <cr> to continue" to
- allow them to be seen
- * directory browser displays no longer bother the
- swapfile
- * u/U commands to go up and down the history stack
- * history stack may be saved with viminfo with it's
- "!" option
- * bugfixes associated with unwanted [No Files]
- entries
- v50: * directories now displayed using buftype=nofile;
- should keep the directory names as-is
- * attempts to remove empty "[No File]" buffers
- leftover from :file ..name.. commands
- * bugfix: a "caps-lock" editing difficulty left in
- v49 was fixed
- * syntax highlighting for "Showing:" the hiding list
- included
- * bookmarks can now be retained if "!" is in the
- viminfo option
- v49: * will use ftp for http://.../ browsing
- v48: * One may use ftp to do remote host file browsing
- * (windows and !cygwin) remote browsing with ftp can
- now use the "dir" command internally to provide
- listings
- * g:netrw_keepdir now allows one to keep the initial
- current directory as the current directory
- (normally the local file browser makes the
- currently viewed directory the current directory)
- * g:netrw_alto and g:netrw_altv now support
- alternate placement of windows started with o or v
- * Nread ? and Nwrite ? now uses echomsg (instead of
- echo) so :messages can repeat showing the help
- * bugfix: avoids problems with partial matches of
- directory names to prior buffers with longer names
- * one can suppress error messages with g:netrw_quiet
- ctrl-h used
- * instead of <Leader>h for editing hiding list one
- may edit the sorting sequence with the S map, which
- now allows confirmation of deletion with
- [y(es) n(o) a(ll) q(uit)]
- * the "x" map now handles special file viewing with:
- (windows) rundll32 url.dll (gnome) gnome-open (kde)
- kfmclient If none of these are on the executable
- path, then netrwFileHandlers.vim is used.
- * directory bookmarking during both local and remote
- browsing implemented
- * one may view all, use the hiding list to suppress,
- or use the hiding list to show-only remote and
- local file/directory listings
- * improved unusual file and directory name handling
- preview window support
- v47: * now handles local browsing.
- v46: * now handles remote browsing
- * g:netrw_silent (if 1) will cause all transfers to
- be silent
- v45: * made the [user@]hostname:path form a bit more
- restrictive to better handle errors in using
- protocols (e.g. scp:usr@host:file was being
- recognized as an rcp request)
- v44: * changed from "rsync -a" to just "rsync"
- * somehow an editing error messed up the test to
- recognize use of the fetch method for NetRead.
- * more debugging statements included
- v43: * moved "Explanation" comments to <pi_netrw.txt> help
- file as "Network Reference" (|netrw-ref|)
- * <netrw.vim> now uses Dfunc() Decho() and Dret() for
- debugging
- * removed superfluous NetRestorePosn() calls
- v42: * now does BufReadPre and BufReadPost events on
- file:///* and file://localhost/*
- v41: * installed file:///* and file://localhost/* handling
- v40: * prevents redraw when a protocol error occurs so
- that the user may see it
- v39: * sftp support
- v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
- commands
- * Temporary files now removed via bwipe! instead of
- bwipe (thanks to Dave Roberts)
- v37: * Claar's modifications which test if ftp is
- successful, otherwise give an error message
- * After a read, the alternate file was pointing to
- the temp file. The temp file buffer is now wiped
- out.
- * removed silent from transfer methods so user can
- see what's happening
+ Nov 21, 2011 * New option: |g:netrw_ftp_options|
+ Dec 07, 2011 * (James Sinclair) provided a fix handling
+ attempts to use a uid and password when
+ they weren't defined. This affected
+ NetWrite (NetRead already had that fix).
==============================================================================
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 4bd181aca..5a8326091 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.3. Last change: 2012 Mar 28
+*syntax.txt* For Vim version 7.3. Last change: 2012 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2836,6 +2836,18 @@ following sets of characters: >
By leaving one or more of these out, the associated conceal-character
substitution will not be made.
+ *g:tex_isk*
+ Tex: Controlling What's In A Keyword~
+
+(La)Tex keywords normally use the characters 0-9,a-z,A-Z,192-255 only
+but the "_" is the only one that causes problems. So, by default,
+syntax/tex.vim overrides the usual |'iskeyword'| setting (using |setlocal|)
+with one that works for LaTeX.
+
+However, one may override this iskeyword re-setting by setting the
+variable, g:tex_isk, in one's .vimrc to whatever one wishes and
+it will be used instead.
+
TF *tf.vim* *ft-tf-syntax*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 0ddf7cc70..1e4e57db5 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.3. Last change: 2012 Mar 28
+*todo.txt* For Vim version 7.3. Last change: 2012 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,6 +43,8 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
Stack trace of crash: http://vpaste.net/GBt9S
(Alexandre Provencio)
+":help!" gives error, should use current language. (thinkca, 2012 Apr 1)
+
Once syntax and other runtime files have been fixed: add "set cp" to
check.vim. Use a function to run both with 'cp' and 'nocp'.
@@ -78,17 +80,6 @@ When exiting with unsaved changes, selecting an existing file in the file
dialog, there is no dialog to ask whether the existing file should be
overwritten. (Felipe G. Nievinski, 2011 Dec 22)
-Using Ctrl-] in a mapping does not expand abbreviations. Patch by Christian
-Brabandt, 2012 Mar 2.
-
-Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8)
-Update Jan 9.
-Carvalho merged the patch: New version 2012 Jan 19.
-
-Patch for option in 'cino' to specify more indent for continued conditions.
-(Lech Lorens, 2011 Nov 27)
-Isn't this already possible? Update 2012 Feb 15.
-
Docs fix for v:register. (Ingo Karkat, 2011 Sep 26, 27)
v:register doesn't work exactly as expected. (David Fishburn, 2011 Sep 20)
@@ -112,7 +103,7 @@ Matsumoto, 2012 Jan 30)
Patch to add completion for :history command. (Dominique Pelle, 2012 Feb 26)
Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope,
-2012 Mar 21)
+2012 Mar 21, update Mar 31)
Use a count before "v" and "V" to select that many characters or lines?
(Kikyous)
@@ -166,6 +157,12 @@ Needs more work. Pinged 2012 Jan 4.
Patch 7.3.116 was the wrong solution.
Christian Brabandt has another incomplete patch. (2011 Jul 13)
+'cursorline' is drawn incorrectly in diff mode. Patch by Christian Brabandt,
+2012 Apr 2.
+
+'cursorline' works on a text line only. Add 'cursorscreenline' for
+highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
+
With concealed text mouse click doesn't put the cursor in the right position.
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 83d07bc10..2a2c0b76c 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2012 Mar 28
+" Last Change: 2012 Apr 05
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -2142,6 +2142,9 @@ au BufNewFile,BufReadPost *.tssop setf tssop
" TSS - Command Line (temporary)
au BufNewFile,BufReadPost *.tsscl setf tsscl
+" TWIG files
+au BufNewFile,BufReadPost *.twig setf twig
+
" Motif UIT/UIL files
au BufNewFile,BufRead *.uit,*.uil setf uil
diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim
index 07da60863..8a66c840d 100644
--- 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 = "v143"
+let g:loaded_netrwPlugin = "v145"
if v:version < 702
echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
finish