update netrw

git-svn-id: https://vimsuite.svn.sourceforge.net/svnroot/vimsuite/trunk@196 eb2d0018-73a3-4aeb-bfe9-1def61c9ec69
This commit is contained in:
alterdepp 2011-05-26 11:53:05 +00:00
parent 8bc36a154b
commit c0b4288fb8
6 changed files with 1691 additions and 1075 deletions

View File

@ -9,7 +9,7 @@ ScriptID SourceID Filename
51 171 cscope_macros.vim
102 13435 DirDiff.vim
1189 8687 matrix.vim
1173 13972 tcomment
1173 15731 tcomment
948 2878 Scons Compiler plugin
1709 6421 Scons Syntax file
1772 7248 DAMOS.zip DAMOS tools (von Stefan)
@ -23,13 +23,13 @@ ScriptID SourceID Filename
2048 7817 BlockDiff
39 8196 matchit.vim
2092 8095 reloaded.vim (matrix colorscheme)
848 8203 SrchRplcHiGrp.vim (Search/Replace on Syntax Group)
848 14668 SrchRplcHiGrp.vim (Search/Replace on Syntax Group)
294 10110 Align.vim
479 9276 MultipleSearch.vba
1066 7618 cecutil.vim
1173 13972 tComment.vim
1173 15731 tComment.vim
2701 13194 editsrec
3280 14068 Tabbi
3280 14334 Tabbi
642 8136 :AutoInstall: getscript.vim
1075 11979 :AutoInstall: netrw.vim
1502 11981 :AutoInstall: vimball.vim
1075 15352 :AutoInstall: netrw.vim
1502 15362 :AutoInstall: vimball.vim

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 7.2. Last change: 2009 Dec 28
*pi_netrw.txt* For Vim version 7.3. Last change: 2011 Apr 01
-----------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
@ -6,7 +6,7 @@
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 2009 Charles E Campbell, Jr *netrw-copyright*
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,
@ -19,9 +19,9 @@ Copyright: Copyright (C) 2009 Charles E Campbell, Jr *netrw-copyright*
use of this software.
*dav* *ftp* *netrw-file* *Nread* *rcp* *scp*
*davs* *http* *netrw.vim* *Nsource* *rsync* *sftp*
*fetch* *netrw* *network* *Nwrite*
*dav* *ftp* *netrw-file* *rcp* *scp*
*davs* *http* *netrw.vim* *rsync* *sftp*
*fetch* *netrw* *network*
==============================================================================
1. Contents *netrw-contents* {{{1
@ -41,7 +41,7 @@ Copyright: Copyright (C) 2009 Charles E Campbell, Jr *netrw-copyright*
NETRC..............................................|netrw-netrc|
PASSWORD...........................................|netrw-passwd|
5. Activation...........................................|netrw-activate|
6. Transparent File Editing.............................|netrw-transparent|
6. Transparent Remote File Editing......................|netrw-transparent|
7. Ex Commands..........................................|netrw-ex|
8. Variables and Options................................|netrw-var|
9. Browsing.............................................|netrw-browse|
@ -65,6 +65,7 @@ Copyright: Copyright (C) 2009 Charles E Campbell, Jr *netrw-copyright*
Displaying Information About File..................|netrw-qf|
Edit File Or Directory Hiding List.................|netrw-ctrl-h|
Editing The Sorting Sequence.......................|netrw-S|
Forcing treatment as a file or directory...........|netrw-gd| |netrw-gf|
Going Up...........................................|netrw--|
Hiding Files Or Directories........................|netrw-a|
Improving Browsing.................................|netrw-ssh-hack|
@ -158,7 +159,7 @@ There are more protocols supported by netrw than just scp and ftp, too: see the
next section, |netrw-externapp|, on how to use these external applications with
netrw and vim.
PREVENTING LOADING
PREVENTING LOADING *netrw-noload*
If you want to use plugins, but for some reason don't wish to use netrw, then
you need to avoid loading both the plugin and the autoload portions of netrw.
@ -318,15 +319,24 @@ settings are described below, in |netrw-browser-options|, and in
*b:netrw_lastfile* last file Network-read/written retained on a
per-buffer basis (supports plain :Nw )
*g:netrw_bufsettings* the settings that netrw buffers have
(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
*g:Netrw_funcref* specifies a function to be called when netrw edits
a file. The file is first edited, and then the
function reference (|Funcref|) is called.
*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
>
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)
@ -491,7 +501,23 @@ that file. Your ftp must be able to use the <.netrc> file on its own, however.
>
vim ftp://[user@]machine[[:#]portnumber]/path
<
However, ftp will often need to query the user for the userid and password.
Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
an option, -s:filename (filename can and probably should be a full path)
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
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
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'
vim ftp://myhost.somewhere.net/
will use a file >
C:\Users\Myself\myhost.ftp
<
Often, ftp will need to query the user for the userid and password.
The latter will be done "silently"; ie. asterisks will show up instead of
the actually-typed-in password. Netrw will retain the userid and password
for subsequent read/writes from the most recent transfer so subsequent
@ -589,7 +615,7 @@ password.
PASSWORD *netrw-passwd*
The script attempts to get passwords for ftp invisibly using |inputsecret()|,
a built-in Vim function. See |netrw-uidpass| for how to change the password
a built-in Vim function. See |netrw-userpass| for how to change the password
after one has set it.
Unfortunately there doesn't appear to be a way for netrw to feed a password to
@ -615,7 +641,7 @@ your <.vimrc> customization file: >
<
==============================================================================
6. Transparent File Editing *netrw-transparent* {{{1
6. Transparent Remote File Editing *netrw-transparent* {{{1
Transparent file transfers occur whenever a regular file read or write
(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
@ -642,18 +668,22 @@ Nread as shown in |netrw-transparent| (ie. simply use >
instead, as appropriate) -- see |netrw-urls|. In the explanations
below, a {netfile} is an url to a remote file.
*:Nwrite* *:Nw*
:[range]Nw[rite] Write the specified lines to the current
file as specified in b:netrw_lastfile.
(related: |netrw-nwrite|)
:[range]Nw[rite] {netfile} [{netfile}]...
Write the specified lines to the {netfile}.
*:Nread* *:Nr*
:Nr[ead] Read the lines from the file specified in b:netrw_lastfile
into the current buffer.
into the current buffer. (related: |netrw-nread|)
:Nr[ead] {netfile} {netfile}...
Read the {netfile} after the current line.
*:Nsource* *:Ns*
:Ns[ource] {netfile}
Source the {netfile}.
To start up vim using a remote .vimrc, one may use
@ -661,20 +691,24 @@ below, a {netfile} is an url to a remote file.
vim -u NORC -N
--cmd "runtime plugin/netrwPlugin.vim"
--cmd "source scp://HOSTNAME/.vimrc"
< *netrw-uidpass*
:call NetUserPass()
< (related: |netrw-source|)
:call NetUserPass() *NetUserPass()*
If g:netrw_uid and s:netrw_passwd don't exist,
this function will query the user for them.
(related: |netrw-userpass|)
:call NetUserPass("userid")
This call will set the g:netrw_uid and, if
the password doesn't exist, will query the user for it.
(related: |netrw-userpass|)
:call NetUserPass("userid","passwd")
This call will set both the g:netrw_uid and s:netrw_passwd.
The user-id and password are used by ftp transfers. One may
effectively remove the user-id and password by using empty
strings (ie. "").
(related: |netrw-userpass|)
:NetrwSettings This command is described in |netrw-settings| -- used to
display netrw settings and change netrw behavior.
@ -688,9 +722,7 @@ below, a {netfile} is an url to a remote file.
The <netrw.vim> script provides several variables which act as options to
affect <netrw.vim>'s file transfer behavior. These variables typically may be
set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
>
-------------
Netrw Options
-------------
@ -772,8 +804,10 @@ variables listed below, and may be modified by the user.
The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
specify the external program to use handle the ftp protocol. They may
include command line options (such as -p for passive mode).
include command line options (such as -p for passive mode). Example: >
let g:netrw_ftp_cmd= "ftp -p"
<
Browsing is supported by using the |g:netrw_list_cmd|; the substring
"HOSTNAME" will be changed via substitution with whatever the current request
is for a hostname.
@ -792,12 +826,12 @@ temporary file:
open machine [port] open machine [port]
user userid password userid password
[g:netrw_ftpmode] password
[g:netrw_extracmd] [g:netrw_ftpmode]
[g:netrw_ftpextracmd] [g:netrw_ftpmode]
get filename tempfile [g:netrw_extracmd]
get filename tempfile >
---------------------------------------------------------------------
<
The |g:netrw_ftpmode| and |g:netrw_extracmd| are optional.
The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
Netrw then executes the lines above by use of a filter:
>
@ -1025,6 +1059,8 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
to the netrw browser window. See |g:netrw_retmap|.
<s-leftmouse> (gvim only) like mf, will mark files
(to disable mouse buttons while browsing: |g:netrw_mousemaps|)
*netrw-quickcom* *netrw-quickcoms*
QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:NetrwClean[!] ...........................................|netrw-clean|
@ -1206,7 +1242,7 @@ CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Every time you change to a new directory (new for the current session),
netrw will save the directory in a recently-visited directory history
list (unless g:netrw_dirhistmax is zero; by default, it's ten). With the
list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
"u" map, one can change to an earlier directory (predecessor). To do
the opposite, see |netrw-U|.
@ -1508,6 +1544,19 @@ Related topics: |netrw-s| |netrw-S|
Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
Remote symbolic links (ie. those listed via ssh or ftp) are problematic
in that it is difficult to tell whether they link to a file or to a
directory.
To force treatment as a file: use >
gd
<
To force treatment as a directory: use >
gf
<
GOING UP *netrw--* {{{2
To go up a directory, press "-" or press the <cr> when atop the ../ directory
@ -1721,6 +1770,16 @@ the cursor atop a marked file and press "mf". This process also works
with <s-leftmouse> using gvim. One may unmark all files by pressing
"mu" (see |netrw-mu|).
Marked files are highlighted using the "netrwMarkFile" highlighting group,
which by default is linked to "Identifier" (see Identifier under
|group-name|). You may change the highlighting group by putting something
like >
highlight clear netrwMarkFile
hi link netrwMarkFile ..whatever..
<
into $HOME/.vim/after/syntax/netrw.vim .
*markfilelist* *global_markfilelist* *local_markfilelist*
All marked files are entered onto the global marked file list; there is only
one such list. In addition, every netrw buffer also has its own local marked
@ -1770,7 +1829,8 @@ MARKED FILES: COPYING *netrw-mc* {{{2
(Uses the global marked file list)
Select a target directory with mt (|netrw-mt|). Then change directory,
select file(s) (see |netrw-mf|), and press "mc".
select file(s) (see |netrw-mf|), and press "mc". The copy is done
from the current window (where one does the mf) to the target.
Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
@ -1822,7 +1882,8 @@ MARKED FILES: MOVING *netrw-mm* {{{2
Use at your own risk!
Select a target directory with mt (|netrw-mt|). Then change directory,
select file(s) (see |netrw-mf|), and press "mm".
select file(s) (see |netrw-mf|), and press "mm". The move is done
from the current window (where one does the mf) to the target.
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
@ -1947,15 +2008,23 @@ your browsing preferences. (see also: |netrw-settings|)
*g:netrw_ctags* ="ctags"
The default external program used to create tags
*g:netrw_cursorline* = 1 (default)
will use the |'cursorline'| local setting when
|g:netrw_liststyle| ==0 (thin listing) or
|g:netrw_liststyle| ==1 (long listing) or
|g:netrw_liststyle| ==3 (tree listing)
(ie. doesn't affect the wide listing)
=0: off
=2: like ==1, but the wide listing gets both
cursorline and |'cursorcolumn'|locally set
*g:netrw_cursor* = 2 (default)
This option controls the use of the
|'cursorline'| (cul) and |'cursorcolumn'|
(cuc) settings by netrw:
Value Thin-Long-Tree Wide
=0 u-cul u-cuc u-cul u-cuc
=1 u-cul u-cuc cul u-cuc
=2 cul u-cuc cul u-cuc
=3 cul u-cuc cul cuc
=4 cul cuc cul cuc
Where
u-cul : user's |'cursorline'| setting used
u-cuc : user's |'cursorcolumn'| setting used
cul : |'cursorline'| locally set
cuc : |'cursorcolumn'| locally set
*g:netrw_decompress* = { ".gz" : "gunzip" ,
".bz2" : "bunzip2" ,
@ -1964,6 +2033,11 @@ your browsing preferences. (see also: |netrw-settings|)
A dictionary mapping suffices to
decompression programs.
*g:netrw_dirhistmax* =10: controls maximum quantity of past
history. May be zero to supppress
history.
(related: |netrw-qb| |netrw-u| |netrw-U|)
*g:netrw_fastbrowse* =0: slow speed directory browsing;
never re-uses directory listings,
always obtains directory listings.
@ -2022,7 +2096,8 @@ your browsing preferences. (see also: |netrw-settings|)
unix or g:netrw_cygwin set: : "ls -tlF"
otherwise "dir"
*g:netrw_glob_escape* ='[]*?`{~$'
*g:netrw_glob_escape* ='[]*?`{~$' (unix)
='[]*?`{$' (windows
These characters in directory names are
escaped before applying glob()
@ -2234,7 +2309,7 @@ file you edit; this apparently also applies to directories. In other words,
autochdir sets the current directory to that containing the "file" (even if
that "file" is itself a directory).
NETRW SETTINGS *netrw-settings* {{{2
NETRW BROWSER SETTINGS *netrw-settings* {{{2
With the NetrwSettings.vim plugin, >
:NetrwSettings
@ -2278,6 +2353,7 @@ Related topics:
directory, see |g:netrw_keepdir|.
*netrw-createfile*
OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
To open a file in netrw's current directory, press "%". This map will
@ -2293,6 +2369,18 @@ the browser (where the cursor will remain) and the file (see |:pedit|).
By default, the split will be taken horizontally; one may use vertical
splitting if one has set |g:netrw_preview| first.
An interesting set of netrw settings is: >
let g:netrw_preview = 1
let g:netrw_liststyle = 3
let g:netrw_winsize = 30
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.
PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
@ -2523,13 +2611,13 @@ Associated setting variables: |g:netrw_chgwin|
(Vit Gottwald) How to generate public/private key and save
public key it on server: >
http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready
8.3 Getting ready for public key authentication
http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
(8.3 Getting ready for public key authentication)
<
How to use a private key with 'pscp': >
http://www.tartarus.org/~simon/puttydoc/Chapter5.html
5.2.4 Using public key authentication with PSCP
http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
(5.2.4 Using public key authentication with PSCP)
<
(Ben Schmidt) I find the ssh included with cwRsync is
brilliant, and install cwRsync or cwRsyncServer on most
@ -2597,16 +2685,39 @@ Associated setting variables: |g:netrw_chgwin|
Multibyte encodings use two (or more) bytes per character.
You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
*netrw-p13*
P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
the directories are missing trailing "/"s so netrw treats them
as file transfers instead of as attempts to browse
subdirectories. How may I fix this?
(mikeyao) If you want to use vim via ssh and putty under Windows,
try combining the use of pscp/psftp with plink. pscp/psftp will
be used to connect and plink will be used to execute commands on
the server, for example: list files and directory using 'ls'.
These are the settings I use to do this:
>
" list files, it's the key setting, if you haven't set,
" you will get a blank buffer
let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
" if you haven't add putty directory in system path, you should
" specify scp/sftp command. For examples:
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
<
==============================================================================
11. Debugging Netrw Itself *netrw-debug* {{{1
The <netrw.vim> script is typically available as:
The <netrw.vim> script is typically available as something like:
>
/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
/usr/local/share/vim/vim6x/autoload/netrw.vim
< -or- >
/usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
/usr/local/share/vim/vim7x/autoload/netrw.vim
< -or- >
/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
/usr/local/share/vim/vim6x/autoload/netrw.vim
<
which is loaded automatically at startup (assuming :set nocp).
@ -2651,6 +2762,65 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
12. History *netrw-history* {{{1
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

View File

@ -21,6 +21,12 @@
:MkVimball pi_vimball.txt /*:MkVimball*
:NetrwClean pi_netrw.txt /*:NetrwClean*
:Nexplore pi_netrw.txt /*:Nexplore*
:Nr pi_netrw.txt /*:Nr*
:Nread pi_netrw.txt /*:Nread*
:Ns pi_netrw.txt /*:Ns*
:Nsource pi_netrw.txt /*:Nsource*
:Nw pi_netrw.txt /*:Nw*
:Nwrite pi_netrw.txt /*:Nwrite*
:Pexplore pi_netrw.txt /*:Pexplore*
:RI visincr.txt /*:RI*
:RID visincr.txt /*:RID*
@ -63,9 +69,7 @@ MultipleSearch-commands MultipleSearch.txt /*MultipleSearch-commands*
MultipleSearch-mappings MultipleSearch.txt /*MultipleSearch-mappings*
MultipleSearch-settings MultipleSearch.txt /*MultipleSearch-settings*
MultipleSearch.txt MultipleSearch.txt /*MultipleSearch.txt*
Nread pi_netrw.txt /*Nread*
Nsource pi_netrw.txt /*Nsource*
Nwrite pi_netrw.txt /*Nwrite*
NetUserPass() pi_netrw.txt /*NetUserPass()*
SR SrchRplcHiGrp.txt /*SR*
SRChooseHiGrp SrchRplcHiGrp.txt /*SRChooseHiGrp*
SRDispHiGrp SrchRplcHiGrp.txt /*SRDispHiGrp*
@ -1441,14 +1445,16 @@ g:netrw_altv pi_netrw.txt /*g:netrw_altv*
g:netrw_banner pi_netrw.txt /*g:netrw_banner*
g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split*
g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer*
g:netrw_bufsettings pi_netrw.txt /*g:netrw_bufsettings*
g:netrw_chgperm pi_netrw.txt /*g:netrw_chgperm*
g:netrw_chgwin pi_netrw.txt /*g:netrw_chgwin*
g:netrw_compress pi_netrw.txt /*g:netrw_compress*
g:netrw_ctags pi_netrw.txt /*g:netrw_ctags*
g:netrw_cursorline pi_netrw.txt /*g:netrw_cursorline*
g:netrw_cursor pi_netrw.txt /*g:netrw_cursor*
g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
g:netrw_decompress pi_netrw.txt /*g:netrw_decompress*
g:netrw_dirhistmax pi_netrw.txt /*g:netrw_dirhistmax*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
@ -1610,6 +1616,7 @@ netrw-clean pi_netrw.txt /*netrw-clean*
netrw-contents pi_netrw.txt /*netrw-contents*
netrw-copyright pi_netrw.txt /*netrw-copyright*
netrw-cr pi_netrw.txt /*netrw-cr*
netrw-createfile pi_netrw.txt /*netrw-createfile*
netrw-credits pi_netrw.txt /*netrw-credits*
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
@ -1633,7 +1640,9 @@ netrw-fixup pi_netrw.txt /*netrw-fixup*
netrw-ftp pi_netrw.txt /*netrw-ftp*
netrw-ftype pi_netrw.txt /*netrw-ftype*
netrw-gb pi_netrw.txt /*netrw-gb*
netrw-gd pi_netrw.txt /*netrw-gd*
netrw-getftype pi_netrw.txt /*netrw-getftype*
netrw-gf pi_netrw.txt /*netrw-gf*
netrw-gh pi_netrw.txt /*netrw-gh*
netrw-gp pi_netrw.txt /*netrw-gp*
netrw-gx pi_netrw.txt /*netrw-gx*
@ -1675,6 +1684,7 @@ netrw-mx pi_netrw.txt /*netrw-mx*
netrw-mz pi_netrw.txt /*netrw-mz*
netrw-netrc pi_netrw.txt /*netrw-netrc*
netrw-nexplore pi_netrw.txt /*netrw-nexplore*
netrw-noload pi_netrw.txt /*netrw-noload*
netrw-nread pi_netrw.txt /*netrw-nread*
netrw-nwrite pi_netrw.txt /*netrw-nwrite*
netrw-o pi_netrw.txt /*netrw-o*
@ -1684,6 +1694,7 @@ netrw-p1 pi_netrw.txt /*netrw-p1*
netrw-p10 pi_netrw.txt /*netrw-p10*
netrw-p11 pi_netrw.txt /*netrw-p11*
netrw-p12 pi_netrw.txt /*netrw-p12*
netrw-p13 pi_netrw.txt /*netrw-p13*
netrw-p2 pi_netrw.txt /*netrw-p2*
netrw-p3 pi_netrw.txt /*netrw-p3*
netrw-p4 pi_netrw.txt /*netrw-p4*
@ -1734,7 +1745,6 @@ netrw-texplore pi_netrw.txt /*netrw-texplore*
netrw-todo pi_netrw.txt /*netrw-todo*
netrw-transparent pi_netrw.txt /*netrw-transparent*
netrw-u pi_netrw.txt /*netrw-u*
netrw-uidpass pi_netrw.txt /*netrw-uidpass*
netrw-updir pi_netrw.txt /*netrw-updir*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-userpass pi_netrw.txt /*netrw-userpass*

View File

@ -1,6 +1,6 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN SECTION
" Date: Aug 10, 2008
" Date: Feb 10, 2011
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v136"
let g:loaded_netrwPlugin = "v141"
if v:version < 702
echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
finish
@ -34,9 +34,13 @@ set cpo&vim
" Local Browsing: {{{2
augroup FileExplorer
au!
au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
" au BufReadCmd *[/\\] sil! call s:LocalBrowse(expand("<amatch>"))
" au BufEnter *[^/\\] sil! call s:LocalBrowse(expand("<amatch>"))
" au VimEnter *[^/\\] sil! call s:VimEnter(expand("<amatch>"))
au BufEnter * sil! call s:LocalBrowse(expand("<amatch>"))
au VimEnter * sil! call s:VimEnter(expand("<amatch>"))
if has("win32") || has("win95") || has("win64") || has("win16")
au BufEnter .* silent! call s:LocalBrowse(expand("<amatch>"))
au BufEnter .* sil! call s:LocalBrowse(expand("<amatch>"))
endif
augroup END
@ -44,10 +48,10 @@ augroup END
augroup Network
au!
if has("win32") || has("win95") || has("win64") || has("win16")
au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
else
au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',""))|exe "bwipe ".fnameescape(substitute(expand("<amatch>"),'file://\(\k\+@\)\=','',''))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
au BufReadCmd file://localhost/* call netrw#FileUrlRead(substitute(expand("<amatch>")),'file://localhost/','file:///','')
endif
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(expand("<amatch>"))
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "silent doau FileReadPost ".fnameescape(expand("<amatch>"))
@ -80,7 +84,7 @@ com! -nargs=0 NetrwSettings call netrwSettings#NetrwSettings()
com! -bang NetrwClean call netrw#NetrwClean(<bang>0)
" Maps:
if !exists("g:netrw_nogx") && maparg('g','n') == ""
if !exists("g:netrw_nogx") && maparg('gx','n') == ""
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
@ -99,15 +103,23 @@ fun! s:LocalBrowse(dirname)
" string is the current directory and not checking would break
" things such as the help command.
if a:dirname != '' && isdirectory(a:dirname)
silent! call netrw#LocalBrowseCheck(a:dirname)
sil! call netrw#LocalBrowseCheck(a:dirname)
endif
elseif isdirectory(a:dirname)
" echomsg "dirname<".dirname."> isdir"
silent! call netrw#LocalBrowseCheck(a:dirname)
sil! call netrw#LocalBrowseCheck(a:dirname)
endif
" not a directory, ignore it
endfun
" ---------------------------------------------------------------------
" s:VimEnter: {{{2
fun! s:VimEnter(dirname)
let curwin= winnr()
windo if a:dirname != expand("%")|call s:LocalBrowse(expand("%:p"))|endif
exe curwin."wincmd w"
endfun
" ---------------------------------------------------------------------
" NetrwStatusLine: {{{1
fun! NetrwStatusLine()

View File

@ -88,7 +88,7 @@ if !exists("did_drchip_netrwlist_syntax")
hi default link netrwTimeSep netrwDateSep
hi default link netrwComma netrwComment
hi default link netrwHide netrwComment
hi default link netrwMarkFile Identifier
hi default link netrwMarkFile DiffChange
" special syntax highlighting (see :he g:netrw_special_syntax)
hi default link netrwBak NonText