代码拉取完成,页面将自动刷新
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>pi_netrw - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>
<body>
<header>
<div class="header">
<a href="http://vim-jp.org/">vim-jp</a>
/ <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
/ pi_netrw<br />
<a name="top"></a><h1>pi_netrw - Vim Documentation</h1>
<a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
</div>
</header>
<nav>
<dl>
<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>
<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>
<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>
<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>
<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>
<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>
<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>
<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>
<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>
<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>
<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>
<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>
<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>
<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>
<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>
<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>
<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>
</dl>
</nav>
<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="pi_netrw.html" name="pi_netrw.txt">pi_netrw.txt</a> For <span class="Identifier">Vim version 8.0.</span> Last change: 2016 Apr 20<br>
<br>
------------------------------------------------<br>
NETRW REFERENCE MANUAL by Charles E. Campbell<br>
------------------------------------------------<br>
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM><br>
(remove NOSPAM from Campbell's email first)<br>
<br>
Copyright: Copyright (C) 2016 Charles E Campbell <a class="Constant" href="pi_netrw.html#netrw-copyright" name="netrw-copyright">netrw-copyright</a><br>
The VIM LICENSE applies to the files in this package, including<br>
netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and<br>
syntax/netrw.vim. Like anything else that's free, netrw.vim and its<br>
associated files are provided *as is* and comes with no warranty of<br>
any kind, either expressed or implied. No guarantees of<br>
merchantability. No guarantees of suitability for any purpose. By<br>
using this plugin, you agree that in no event will the copyright<br>
holder be liable for any damages resulting from the use of this<br>
software. Use at your own risk!<br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw" name="netrw">netrw</a><br>
<a class="Constant" href="pi_netrw.html#dav" name="dav">dav</a> <a class="Constant" href="pi_netrw.html#ftp" name="ftp">ftp</a> <a class="Constant" href="pi_netrw.html#netrw-file" name="netrw-file">netrw-file</a> <a class="Constant" href="pi_netrw.html#rcp" name="rcp">rcp</a> <a class="Constant" href="pi_netrw.html#scp" name="scp">scp</a><br>
<a class="Constant" href="pi_netrw.html#davs" name="davs">davs</a> <a class="Constant" href="pi_netrw.html#http" name="http">http</a> <a class="Constant" href="pi_netrw.html#netrw.vim" name="netrw.vim">netrw.vim</a> <a class="Constant" href="pi_netrw.html#rsync" name="rsync">rsync</a> <a class="Constant" href="pi_netrw.html#sftp" name="sftp">sftp</a><br>
<a class="Constant" href="pi_netrw.html#fetch" name="fetch">fetch</a> <a class="Constant" href="pi_netrw.html#network" name="network">network</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. Contents <a class="Constant" href="pi_netrw.html#netrw-contents" name="netrw-contents">netrw-contents</a> {{ "{{{" }}1<br>
<br>
1. Contents..............................................<a class="Identifier" href="pi_netrw.html#netrw-contents">netrw-contents</a><br>
2. Starting With Netrw...................................<a class="Identifier" href="pi_netrw.html#netrw-start">netrw-start</a><br>
3. Netrw Reference.......................................<a class="Identifier" href="pi_netrw.html#netrw-ref">netrw-ref</a><br>
EXTERNAL APPLICATIONS AND PROTOCOLS.................<a class="Identifier" href="pi_netrw.html#netrw-externapp">netrw-externapp</a><br>
READING.............................................<a class="Identifier" href="pi_netrw.html#netrw-read">netrw-read</a><br>
WRITING.............................................<a class="Identifier" href="pi_netrw.html#netrw-write">netrw-write</a><br>
SOURCING............................................<a class="Identifier" href="pi_netrw.html#netrw-source">netrw-source</a><br>
DIRECTORY LISTING...................................<a class="Identifier" href="pi_netrw.html#netrw-dirlist">netrw-dirlist</a><br>
CHANGING THE USERID AND PASSWORD....................<a class="Identifier" href="pi_netrw.html#netrw-chgup">netrw-chgup</a><br>
VARIABLES AND SETTINGS..............................<a class="Identifier" href="pi_netrw.html#netrw-variables">netrw-variables</a><br>
PATHS...............................................<a class="Identifier" href="pi_netrw.html#netrw-path">netrw-path</a><br>
4. Network-Oriented File Transfer........................<a class="Identifier" href="pi_netrw.html#netrw-xfer">netrw-xfer</a><br>
NETRC...............................................<a class="Identifier" href="pi_netrw.html#netrw-netrc">netrw-netrc</a><br>
PASSWORD............................................<a class="Identifier" href="pi_netrw.html#netrw-passwd">netrw-passwd</a><br>
5. Activation............................................<a class="Identifier" href="pi_netrw.html#netrw-activate">netrw-activate</a><br>
6. Transparent Remote File Editing.......................<a class="Identifier" href="pi_netrw.html#netrw-transparent">netrw-transparent</a><br>
7. Ex Commands...........................................<a class="Identifier" href="pi_netrw.html#netrw-ex">netrw-ex</a><br>
8. Variables and Options.................................<a class="Identifier" href="pi_netrw.html#netrw-variables">netrw-variables</a><br>
9. Browsing..............................................<a class="Identifier" href="pi_netrw.html#netrw-browse">netrw-browse</a><br>
Introduction To Browsing............................<a class="Identifier" href="pi_netrw.html#netrw-intro-browse">netrw-intro-browse</a><br>
Quick Reference: Maps...............................<a class="Identifier" href="pi_netrw.html#netrw-browse-maps">netrw-browse-maps</a><br>
Quick Reference: Commands...........................<a class="Identifier" href="pi_netrw.html#netrw-browse-cmds">netrw-browse-cmds</a><br>
Banner Display......................................<a class="Identifier" href="pi_netrw.html#netrw-I">netrw-I</a><br>
Bookmarking A Directory.............................<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a><br>
Browsing............................................<a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a><br>
Squeezing the Current Tree-Listing Directory........<a class="Identifier" href="pi_netrw.html#netrw-s-cr">netrw-s-cr</a><br>
Browsing With A Horizontally Split Window...........<a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a><br>
Browsing With A New Tab.............................<a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a><br>
Browsing With A Vertically Split Window.............<a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Change Listing Style.(thin wide long tree)..........<a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a><br>
Changing To A Bookmarked Directory..................<a class="Identifier" href="pi_netrw.html#netrw-gb">netrw-gb</a><br>
Changing To A Predecessor Directory.................<a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a><br>
Changing To A Successor Directory...................<a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a><br>
Customizing Browsing With A Special Handler.........<a class="Identifier" href="pi_netrw.html#netrw-x">netrw-x</a><br>
Deleting Bookmarks..................................<a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a><br>
Deleting Files Or Directories.......................<a class="Identifier" href="pi_netrw.html#netrw-D">netrw-D</a><br>
Directory Exploring Commands........................<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
Exploring With Stars and Patterns...................<a class="Identifier" href="pi_netrw.html#netrw-star">netrw-star</a><br>
Displaying Information About File...................<a class="Identifier" href="pi_netrw.html#netrw-qf">netrw-qf</a><br>
Edit File Or Directory Hiding List..................<a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a><br>
Editing The Sorting Sequence........................<a class="Identifier" href="pi_netrw.html#netrw-S">netrw-S</a><br>
Forcing treatment as a file or directory............<a class="Identifier" href="pi_netrw.html#netrw-gd">netrw-gd</a> <a class="Identifier" href="pi_netrw.html#netrw-gf">netrw-gf</a><br>
Going Up............................................<a class="Identifier" href="pi_netrw.html#netrw--">netrw--</a><br>
Hiding Files Or Directories.........................<a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a><br>
Improving Browsing..................................<a class="Identifier" href="pi_netrw.html#netrw-ssh-hack">netrw-ssh-hack</a><br>
Listing Bookmarks And History.......................<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a><br>
Making A New Directory..............................<a class="Identifier" href="pi_netrw.html#netrw-d">netrw-d</a><br>
Making The Browsing Directory The Current Directory.<a class="Identifier" href="pi_netrw.html#netrw-c">netrw-c</a><br>
Marking Files.......................................<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a><br>
Unmarking Files.....................................<a class="Identifier" href="pi_netrw.html#netrw-mF">netrw-mF</a><br>
Marking Files By Location List......................<a class="Identifier" href="pi_netrw.html#netrw-qL">netrw-qL</a><br>
Marking Files By QuickFix List......................<a class="Identifier" href="pi_netrw.html#netrw-qF">netrw-qF</a><br>
Marking Files By Regular Expression.................<a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a><br>
Marked Files: Arbitrary Shell Command...............<a class="Identifier" href="pi_netrw.html#netrw-mx">netrw-mx</a><br>
Marked Files: Arbitrary Shell Command, En Bloc......<a class="Identifier" href="pi_netrw.html#netrw-mX">netrw-mX</a><br>
Marked Files: Arbitrary Vim Command.................<a class="Identifier" href="pi_netrw.html#netrw-mv">netrw-mv</a><br>
Marked Files: Argument List.........................<a class="Identifier" href="pi_netrw.html#netrw-ma">netrw-ma</a> <a class="Identifier" href="pi_netrw.html#netrw-mA">netrw-mA</a><br>
Marked Files: Compression And Decompression.........<a class="Identifier" href="pi_netrw.html#netrw-mz">netrw-mz</a><br>
Marked Files: Copying...............................<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a><br>
Marked Files: Diff..................................<a class="Identifier" href="pi_netrw.html#netrw-md">netrw-md</a><br>
Marked Files: Editing...............................<a class="Identifier" href="pi_netrw.html#netrw-me">netrw-me</a><br>
Marked Files: Grep..................................<a class="Identifier" href="pi_netrw.html#netrw-mg">netrw-mg</a><br>
Marked Files: Hiding and Unhiding by Suffix.........<a class="Identifier" href="pi_netrw.html#netrw-mh">netrw-mh</a><br>
Marked Files: Moving................................<a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a><br>
Marked Files: Printing..............................<a class="Identifier" href="pi_netrw.html#netrw-mp">netrw-mp</a><br>
Marked Files: Sourcing..............................<a class="Identifier" href="pi_netrw.html#netrw-ms">netrw-ms</a><br>
Marked Files: Setting the Target Directory..........<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a><br>
Marked Files: Tagging...............................<a class="Identifier" href="pi_netrw.html#netrw-mT">netrw-mT</a><br>
Marked Files: Target Directory Using Bookmarks......<a class="Identifier" href="pi_netrw.html#netrw-Tb">netrw-Tb</a><br>
Marked Files: Target Directory Using History........<a class="Identifier" href="pi_netrw.html#netrw-Th">netrw-Th</a><br>
Marked Files: Unmarking.............................<a class="Identifier" href="pi_netrw.html#netrw-mu">netrw-mu</a><br>
Netrw Browser Variables.............................<a class="Identifier" href="pi_netrw.html#netrw-browser-var">netrw-browser-var</a><br>
Netrw Browsing And Option Incompatibilities.........<a class="Identifier" href="pi_netrw.html#netrw-incompatible">netrw-incompatible</a><br>
Netrw Settings Window...............................<a class="Identifier" href="pi_netrw.html#netrw-settings-window">netrw-settings-window</a><br>
Obtaining A File....................................<a class="Identifier" href="pi_netrw.html#netrw-O">netrw-O</a><br>
Preview Window......................................<a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
Previous Window.....................................<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a><br>
Refreshing The Listing..............................<a class="Identifier" href="pi_netrw.html#netrw-ctrl-l">netrw-ctrl-l</a><br>
Reversing Sorting Order.............................<a class="Identifier" href="pi_netrw.html#netrw-r">netrw-r</a><br>
Renaming Files Or Directories.......................<a class="Identifier" href="pi_netrw.html#netrw-R">netrw-R</a><br>
Selecting Sorting Style.............................<a class="Identifier" href="pi_netrw.html#netrw-s">netrw-s</a><br>
Setting Editing Window..............................<a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a><br>
10. Problems and Fixes....................................<a class="Identifier" href="pi_netrw.html#netrw-problems">netrw-problems</a><br>
11. Debugging Netrw Itself................................<a class="Identifier" href="pi_netrw.html#netrw-debug">netrw-debug</a><br>
12. History...............................................<a class="Identifier" href="pi_netrw.html#netrw-history">netrw-history</a><br>
13. Todo..................................................<a class="Identifier" href="pi_netrw.html#netrw-todo">netrw-todo</a><br>
14. Credits...............................................<a class="Identifier" href="pi_netrw.html#netrw-credits">netrw-credits</a><br>
<br>
<span class="Special">{Vi does not have any of this}</span><br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. Starting With Netrw <a class="Constant" href="pi_netrw.html#netrw-start" name="netrw-start">netrw-start</a> {{ "{{{" }}1<br>
<br>
Netrw makes reading files, writing files, browsing over a network, and<br>
local browsing easy! First, make sure that you have plugins enabled, so<br>
you'll need to have at least the following in your <.vimrc>:<br>
(or see <a class="Identifier" href="pi_netrw.html#netrw-activate">netrw-activate</a>)<br>
<br>
<div class="helpExample"> set nocp " 'compatible' is not set<br>
filetype plugin on " plugins are enabled</div>
<br>
(see <a class="Identifier" href="options.html#'cp'">'cp'</a> and <a class="Identifier" href="filetype.html#:filetype-plugin-on">:filetype-plugin-on</a>)<br>
<br>
Netrw supports "transparent" editing of files on other machines using urls<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-transparent">netrw-transparent</a>). As an example of this, let's assume you have an<br>
account on some other machine; if you can use scp, try:<br>
<br>
<div class="helpExample"> vim scp://hostname/path/to/file</div>
<br>
Want to make ssh/scp easier to use? Check out <a class="Identifier" href="pi_netrw.html#netrw-ssh-hack">netrw-ssh-hack</a>!<br>
<br>
So, what if you have ftp, not ssh/scp? That's easy, too; try<br>
<br>
<div class="helpExample"> vim ftp://hostname/path/to/file</div>
<br>
Want to make ftp simpler to use? See if your ftp supports a file called<br>
<.netrc> -- typically it goes in your home directory, has read/write<br>
permissions for only the user to read (ie. not group, world, other, etc),<br>
and has lines resembling<br>
<br>
<div class="helpExample"> machine HOSTNAME login USERID password "PASSWORD"<br>
machine HOSTNAME login USERID password "PASSWORD"<br>
...<br>
default login USERID password "PASSWORD"</div>
<br>
Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: <br>
<br>
<div class="helpExample"> let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE'</div>
<br>
Netrw will substitute the host's machine name for "MACHINE" from the url it is<br>
attempting to open, and so one may specify<br>
<div class="helpExample"> userid<br>
password</div>
for each site in a separate file: c:\Users\MyUserName\MachineName.<br>
<br>
Now about browsing -- when you just want to look around before editing a<br>
file. For browsing on your current host, just "edit" a directory:<br>
<br>
<div class="helpExample"> vim .<br>
vim /home/userid/path</div>
<br>
For browsing on a remote host, "edit" a directory (but make sure that<br>
the directory name is followed by a "/"):<br>
<br>
<div class="helpExample"> vim scp://hostname/<br>
vim ftp://hostname/path/to/dir/</div>
<br>
See <a class="Identifier" href="pi_netrw.html#netrw-browse">netrw-browse</a> for more!<br>
<br>
There are more protocols supported by netrw than just scp and ftp, too: see the<br>
next section, <a class="Identifier" href="pi_netrw.html#netrw-externapp">netrw-externapp</a>, on how to use these external applications with<br>
netrw and vim.<br>
<br>
<span class="Statement">PREVENTING LOADING </span><a class="Constant" href="pi_netrw.html#netrw-noload" name="netrw-noload">netrw-noload</a><br>
<br>
If you want to use plugins, but for some reason don't wish to use netrw, then<br>
you need to avoid loading both the plugin and the autoload portions of netrw.<br>
You may do so by placing the following two lines in your <.vimrc>:<br>
<br>
<div class="helpExample"> :let g:loaded_netrw = 1<br>
:let g:loaded_netrwPlugin = 1</div>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
3. Netrw Reference <a class="Constant" href="pi_netrw.html#netrw-ref" name="netrw-ref">netrw-ref</a> {{ "{{{" }}1<br>
<br>
Netrw supports several protocols in addition to scp and ftp as mentioned<br>
in <a class="Identifier" href="pi_netrw.html#netrw-start">netrw-start</a>. These include dav, fetch, http,... well, just look<br>
at the list in <a class="Identifier" href="pi_netrw.html#netrw-externapp">netrw-externapp</a>. Each protocol is associated with a<br>
variable which holds the default command supporting that protocol.<br>
<br>
<span class="Statement">EXTERNAL APPLICATIONS AND PROTOCOLS </span><a class="Constant" href="pi_netrw.html#netrw-externapp" name="netrw-externapp">netrw-externapp</a> {{ "{{{" }}2<br>
<br>
Protocol Variable Default Value<br>
-------- ---------------- -------------<br>
dav: <a class="Constant" href="pi_netrw.html#g:netrw_dav_cmd" name="g:netrw_dav_cmd">g:netrw_dav_cmd</a> = "cadaver" if cadaver is executable<br>
dav: g:netrw_dav_cmd = "curl -o" elseif curl is available<br>
fetch: <a class="Constant" href="pi_netrw.html#g:netrw_fetch_cmd" name="g:netrw_fetch_cmd">g:netrw_fetch_cmd</a> = "fetch -o" if fetch is available<br>
ftp: <a class="Constant" href="pi_netrw.html#g:netrw_ftp_cmd" name="g:netrw_ftp_cmd">g:netrw_ftp_cmd</a> = "ftp"<br>
http: <a class="Constant" href="pi_netrw.html#g:netrw_http_cmd" name="g:netrw_http_cmd">g:netrw_http_cmd</a> = "elinks" if elinks is available<br>
http: g:netrw_http_cmd = "links" elseif links is available<br>
http: g:netrw_http_cmd = "curl" elseif curl is available<br>
http: g:netrw_http_cmd = "wget" elseif wget is available<br>
http: g:netrw_http_cmd = "fetch" elseif fetch is available<br>
http: <a class="Constant" href="pi_netrw.html#g:netrw_http_put_cmd" name="g:netrw_http_put_cmd">g:netrw_http_put_cmd</a> = "curl -T"<br>
rcp: <a class="Constant" href="pi_netrw.html#g:netrw_rcp_cmd" name="g:netrw_rcp_cmd">g:netrw_rcp_cmd</a> = "rcp"<br>
rsync: <a class="Constant" href="pi_netrw.html#g:netrw_rsync_cmd" name="g:netrw_rsync_cmd">g:netrw_rsync_cmd</a> = "rsync -a"<br>
scp: <a class="Constant" href="pi_netrw.html#g:netrw_scp_cmd" name="g:netrw_scp_cmd">g:netrw_scp_cmd</a> = "scp -q"<br>
sftp: <a class="Constant" href="pi_netrw.html#g:netrw_sftp_cmd" name="g:netrw_sftp_cmd">g:netrw_sftp_cmd</a> = "sftp"<br>
file: <a class="Constant" href="pi_netrw.html#g:netrw_file_cmd" name="g:netrw_file_cmd">g:netrw_file_cmd</a> = "elinks" or "links"<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_http_xcmd" name="g:netrw_http_xcmd">g:netrw_http_xcmd</a> : the option string for <a href="http://..">http://..</a>. protocols are<br>
specified via this variable and may be independently overridden. By<br>
default, the option arguments for the http-handling commands are:<br>
<br>
<div class="helpExample"> elinks : "-source >"<br>
links : "-dump >"<br>
curl : "-o"<br>
wget : "-q -O"<br>
fetch : "-o"</div>
<br>
For example, if your system has elinks, and you'd rather see the<br>
page using an attempt at rendering the text, you may wish to have<br>
<div class="helpExample"> let g:netrw_http_xcmd= "-dump >"</div>
in your .vimrc.<br>
<br>
g:netrw_http_put_cmd: this option specifies both the executable and<br>
any needed options. This command does a PUT operation to the url.<br>
<br>
<br>
<span class="Statement">READING </span><a class="Constant" href="pi_netrw.html#netrw-read" name="netrw-read">netrw-read</a> <a class="Constant" href="pi_netrw.html#netrw-nread" name="netrw-nread">netrw-nread</a> {{ "{{{" }}2<br>
<br>
Generally, one may just use the url notation with a normal editing<br>
command, such as<br>
<br>
<div class="helpExample"> :e ftp://[user@]machine/path</div>
<br>
Netrw also provides the Nread command:<br>
<br>
:Nread ? give help<br>
:Nread "machine:path" uses rcp<br>
:Nread "machine path" uses ftp w/ <.netrc><br>
:Nread "machine id password path" uses ftp<br>
:Nread "dav://machine[:port]/path" uses cadaver<br>
:Nread "fetch://[user@]machine/path" uses fetch<br>
:Nread "<span class="Constant">ftp://[user@]machine[[:#]port]/path</span>" uses ftp w/ <.netrc><br>
:Nread "<span class="Constant"><a href="http://[user@]machine/path">http://[user@]machine/path</a></span>" uses http uses wget<br>
:Nread "rcp://[user@]machine/path" uses rcp<br>
:Nread "rsync://[user@]machine[:port]/path" uses rsync<br>
:Nread "scp://[user@]machine[[:#]port]/path" uses scp<br>
:Nread "sftp://[user@]machine/path" uses sftp<br>
<br>
<span class="Statement">WRITING </span><a class="Constant" href="pi_netrw.html#netrw-write" name="netrw-write">netrw-write</a> <a class="Constant" href="pi_netrw.html#netrw-nwrite" name="netrw-nwrite">netrw-nwrite</a> {{ "{{{" }}2<br>
<br>
One may just use the url notation with a normal file writing<br>
command, such as<br>
<br>
<div class="helpExample"> :w ftp://[user@]machine/path</div>
<br>
Netrw also provides the Nwrite command:<br>
<br>
:Nwrite ? give help<br>
:Nwrite "machine:path" uses rcp<br>
:Nwrite "machine path" uses ftp w/ <.netrc><br>
:Nwrite "machine id password path" uses ftp<br>
:Nwrite "dav://machine[:port]/path" uses cadaver<br>
:Nwrite "<span class="Constant">ftp://[user@]machine[[:#]port]/path</span>" uses ftp w/ <.netrc><br>
:Nwrite "rcp://[user@]machine/path" uses rcp<br>
:Nwrite "rsync://[user@]machine[:port]/path" uses rsync<br>
:Nwrite "scp://[user@]machine[[:#]port]/path" uses scp<br>
:Nwrite "sftp://[user@]machine/path" uses sftp<br>
http: not supported!<br>
<br>
<span class="Statement">SOURCING </span><a class="Constant" href="pi_netrw.html#netrw-source" name="netrw-source">netrw-source</a> {{ "{{{" }}2<br>
<br>
One may just use the url notation with the normal file sourcing<br>
command, such as<br>
<br>
<div class="helpExample"> :so ftp://[user@]machine/path</div>
<br>
Netrw also provides the Nsource command:<br>
<br>
:Nsource ? give help<br>
:Nsource "dav://machine[:port]/path" uses cadaver<br>
:Nsource "fetch://[user@]machine/path" uses fetch<br>
:Nsource "<span class="Constant">ftp://[user@]machine[[:#]port]/path</span>" uses ftp w/ <.netrc><br>
:Nsource "<span class="Constant"><a href="http://[user@]machine/path">http://[user@]machine/path</a></span>" uses http uses wget<br>
:Nsource "rcp://[user@]machine/path" uses rcp<br>
:Nsource "rsync://[user@]machine[:port]/path" uses rsync<br>
:Nsource "scp://[user@]machine[[:#]port]/path" uses scp<br>
:Nsource "sftp://[user@]machine/path" uses sftp<br>
<br>
<span class="Statement">DIRECTORY LISTING </span><a class="Constant" href="pi_netrw.html#netrw-trailingslash" name="netrw-trailingslash">netrw-trailingslash</a> <a class="Constant" href="pi_netrw.html#netrw-dirlist" name="netrw-dirlist">netrw-dirlist</a> {{ "{{{" }}2<br>
<br>
One may browse a directory to get a listing by simply attempting to<br>
edit the directory:<br>
<br>
<div class="helpExample"> :e scp://[user]@hostname/path/<br>
:e ftp://[user]@hostname/path/</div>
<br>
For remote directory listings (ie. those using scp or ftp), that<br>
trailing "/" is necessary (the slash tells netrw to treat the argument<br>
as a directory to browse instead of as a file to download).<br>
<br>
The Nread command may also be used to accomplish this (again, that<br>
trailing slash is necessary):<br>
<br>
<div class="helpExample"> :Nread [protocol]://[user]@hostname/path/</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-login" name="netrw-login">netrw-login</a> <a class="Constant" href="pi_netrw.html#netrw-password" name="netrw-password">netrw-password</a><br>
<span class="Statement">CHANGING USERID AND PASSWORD </span><a class="Constant" href="pi_netrw.html#netrw-chgup" name="netrw-chgup">netrw-chgup</a> <a class="Constant" href="pi_netrw.html#netrw-userpass" name="netrw-userpass">netrw-userpass</a> {{ "{{{" }}2<br>
<br>
Attempts to use ftp will prompt you for a user-id and a password.<br>
These will be saved in global variables <a class="Identifier" href="pi_netrw.html#g:netrw_uid">g:netrw_uid</a> and<br>
<a class="Identifier" href="pi_netrw.html#s:netrw_passwd">s:netrw_passwd</a>; subsequent use of ftp will re-use those two strings,<br>
thereby simplifying use of ftp. However, if you need to use a<br>
different user id and/or password, you'll want to call <a class="Identifier" href="pi_netrw.html#NetUserPass()">NetUserPass()</a><br>
first. To work around the need to enter passwords, check if your ftp<br>
supports a <.netrc> file in your home directory. Also see<br>
<a class="Identifier" href="pi_netrw.html#netrw-passwd">netrw-passwd</a> (and if you're using ssh/scp hoping to figure out how<br>
to not need to use passwords for scp, look at <a class="Identifier" href="pi_netrw.html#netrw-ssh-hack">netrw-ssh-hack</a>).<br>
<br>
:NetUserPass [uid <span class="Special">[password]</span>] -- prompts as needed<br>
:call NetUserPass() -- prompts for uid and password<br>
:call NetUserPass("uid") -- prompts for password<br>
:call NetUserPass("uid","password") -- sets global uid and password<br>
<br>
(Related topics: <a class="Identifier" href="pi_netrw.html#ftp">ftp</a> <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a> <a class="Identifier" href="pi_netrw.html#netrw-start">netrw-start</a>)<br>
<br>
<span class="Statement">NETRW VARIABLES AND SETTINGS </span><a class="Constant" href="pi_netrw.html#netrw-variables" name="netrw-variables">netrw-variables</a> {{ "{{{" }}2<br>
(Also see:<br>
<a class="Identifier" href="pi_netrw.html#netrw-browser-var">netrw-browser-var</a> : netrw browser option variables<br>
<a class="Identifier" href="pi_netrw.html#netrw-protocol">netrw-protocol</a> : file transfer protocol option variables<br>
<a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a> : additional file transfer options<br>
<a class="Identifier" href="pi_netrw.html#netrw-browser-options">netrw-browser-options</a> : these options affect browsing directories<br>
)<br>
<br>
Netrw provides a lot of variables which allow you to customize netrw to your<br>
preferences. One way to look at them is via the command :NetrwSettings (see<br>
<a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a>) which will display your current netrw settings. Most such<br>
settings are described below, in <a class="Identifier" href="pi_netrw.html#netrw-browser-options">netrw-browser-options</a>, and in<br>
<a class="Identifier" href="pi_netrw.html#netrw-externapp">netrw-externapp</a>:<br>
<br>
<a class="Constant" href="pi_netrw.html#b:netrw_lastfile" name="b:netrw_lastfile">b:netrw_lastfile</a> last file Network-read/written retained on a<br>
per-buffer basis (supports plain :Nw )<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_bufsettings" name="g:netrw_bufsettings">g:netrw_bufsettings</a> the settings that netrw buffers have<br>
(default) noma nomod nonu nowrap ro nobl<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_chgwin" name="g:netrw_chgwin">g:netrw_chgwin</a> specifies a window number where subsequent file edits<br>
will take place. (also see <a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a>)<br>
(default) -1<br>
<br>
<a class="Constant" href="pi_netrw.html#g:Netrw_funcref" name="g:Netrw_funcref">g:Netrw_funcref</a> specifies a function (or functions) to be called when<br>
netrw edits a file. The file is first edited, and<br>
then the function reference (<a class="Identifier" href="eval.html#Funcref">Funcref</a>) is called.<br>
This variable may also hold a <a class="Identifier" href="eval.html#List">List</a> of Funcrefs.<br>
(default) not defined. (the capital in g:Netrw...<br>
is required by its holding a function reference)<br>
<br>
<div class="helpExample"> Example: place in .vimrc; affects all file opening<br>
fun! MyFuncRef()<br>
endfun<br>
let g:Netrw_funcref= function("MyFuncRef")</div>
<br>
<br>
<a class="Constant" href="pi_netrw.html#g:Netrw_UserMaps" name="g:Netrw_UserMaps">g:Netrw_UserMaps</a> specifies a function or <a class="Identifier" href="eval.html#List">List</a> of functions which can<br>
be used to set up user-specified maps and functionality.<br>
See <a class="Identifier" href="pi_netrw.html#netrw-usermaps">netrw-usermaps</a><br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_ftp" name="g:netrw_ftp">g:netrw_ftp</a> if it doesn't exist, use default ftp<br>
=0 use default ftp (uid password)<br>
=1 use alternate ftp method (user uid password)<br>
If you're having trouble with ftp, try changing the<br>
value of this variable to see if the alternate ftp<br>
method works for your setup.<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_ftp_options" name="g:netrw_ftp_options">g:netrw_ftp_options</a> Chosen by default, these options are supposed to<br>
turn interactive prompting off and to restrain ftp<br>
from attempting auto-login upon initial connection.<br>
However, it appears that not all ftp implementations<br>
support this (ex. ncftp).<br>
="-i -n"<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_ftpextracmd" name="g:netrw_ftpextracmd">g:netrw_ftpextracmd</a> default: doesn't exist<br>
If this variable exists, then any string it contains<br>
will be placed into the commands set to your ftp<br>
client. As an example:<br>
="passive"<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_ftpmode" name="g:netrw_ftpmode">g:netrw_ftpmode</a> ="binary" (default)<br>
="ascii"<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_ignorenetrc" name="g:netrw_ignorenetrc">g:netrw_ignorenetrc</a> =0 (default for linux, cygwin)<br>
=1 If you have a <.netrc> file but it doesn't work and<br>
you want it ignored, then set this variable as<br>
shown. (default for Windows + cmd.exe)<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_menu" name="g:netrw_menu">g:netrw_menu</a> =0 disable netrw's menu<br>
=1 (default) netrw's menu enabled<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_nogx" name="g:netrw_nogx">g:netrw_nogx</a> if this variable exists, then the "gx" map will not<br>
be available (see <a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_uid" name="g:netrw_uid">g:netrw_uid</a> (ftp) user-id, retained on a per-vim-session basis<br>
<a class="Constant" href="pi_netrw.html#s:netrw_passwd" name="s:netrw_passwd">s:netrw_passwd</a> (ftp) password, retained on a per-vim-session basis<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_preview" name="g:netrw_preview">g:netrw_preview</a> =0 (default) preview window shown in a horizontally<br>
split window<br>
=1 preview window shown in a vertically split window.<br>
Also affects the "previous window" (see <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a>)<br>
in the same way.<br>
The <a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> variable may be used to provide<br>
additional splitting control:<br>
g:netrw_preview g:netrw_alto result<br>
0 0 <a class="Identifier" href="windows.html#:aboveleft">:aboveleft</a><br>
0 1 <a class="Identifier" href="windows.html#:belowright">:belowright</a><br>
1 0 <a class="Identifier" href="windows.html#:topleft">:topleft</a><br>
1 1 <a class="Identifier" href="windows.html#:botright">:botright</a><br>
To control sizing, see <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a><br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_scpport" name="g:netrw_scpport">g:netrw_scpport</a> = "-P" : option to use to set port for scp<br>
<a class="Constant" href="pi_netrw.html#g:netrw_sshport" name="g:netrw_sshport">g:netrw_sshport</a> = "-p" : option to use to set port for ssh<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_sepchr" name="g:netrw_sepchr">g:netrw_sepchr</a> =\0xff<br>
=\0x01 for enc == euc-jp (and perhaps it should be for<br>
others, too, please let me know)<br>
Separates priority codes from filenames internally.<br>
See <a class="Identifier" href="pi_netrw.html#netrw-p12">netrw-p12</a>.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_silent" name="g:netrw_silent">g:netrw_silent</a> =0 : transfers done normally<br>
=1 : transfers done silently<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_use_errorwindow" name="g:netrw_use_errorwindow">g:netrw_use_errorwindow</a> =1 : messages from netrw will use a separate one<br>
line window. This window provides reliable<br>
delivery of messages. (default)<br>
=0 : messages from netrw will use echoerr ;<br>
messages don't always seem to show up this<br>
way, but one doesn't have to quit the window.<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_win95ftp" name="g:netrw_win95ftp">g:netrw_win95ftp</a> =1 if using Win95, will remove four trailing blank<br>
lines that o/s's ftp "provides" on transfers<br>
=0 force normal ftp behavior (no trailing line removal)<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_cygwin" name="g:netrw_cygwin">g:netrw_cygwin</a> =1 assume scp under windows is from cygwin. Also<br>
permits network browsing to use ls with time and<br>
size sorting (default if windows)<br>
=0 assume Windows' scp accepts windows-style paths<br>
Network browsing uses dir instead of ls<br>
This option is ignored if you're using unix<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_use_nt_rcp" name="g:netrw_use_nt_rcp">g:netrw_use_nt_rcp</a> =0 don't use the rcp of WinNT, Win2000 and WinXP<br>
=1 use WinNT's rcp in binary mode (default)<br>
<br>
<span class="Statement">PATHS </span><a class="Constant" href="pi_netrw.html#netrw-path" name="netrw-path">netrw-path</a> {{ "{{{" }}2<br>
<br>
Paths to files are generally user-directory relative for most protocols.<br>
It is possible that some protocol will make paths relative to some<br>
associated directory, however.<br>
<br>
<div class="helpExample"> example: vim scp://user@host/somefile<br>
example: vim scp://user@host/subdir1/subdir2/somefile</div>
<br>
where "somefile" is in the "user"'s home directory. If you wish to get a<br>
file using root-relative paths, use the full path:<br>
<br>
<div class="helpExample"> example: vim scp://user@host//somefile<br>
example: vim scp://user@host//subdir1/subdir2/somefile</div>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. Network-Oriented File Transfer <a class="Constant" href="pi_netrw.html#netrw-xfer" name="netrw-xfer">netrw-xfer</a> {{ "{{{" }}1<br>
<br>
Network-oriented file transfer under Vim is implemented by a VimL-based script<br>
(<netrw.vim>) using plugin techniques. It currently supports both reading and<br>
writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,<br>
dav/cadaver, rsync, or sftp.<br>
<br>
http is currently supported read-only via use of wget or fetch.<br>
<br>
<netrw.vim> is a standard plugin which acts as glue between Vim and the<br>
various file transfer programs. It uses autocommand events (BufReadCmd,<br>
FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames.<br>
<br>
<div class="helpExample"> ex. vim ftp://hostname/path/to/file</div>
<br>
The characters preceding the colon specify the protocol to use; in the<br>
example, it's ftp. The <netrw.vim> script then formulates a command or a<br>
series of commands (typically ftp) which it issues to an external program<br>
(ftp, scp, etc) which does the actual file transfer/protocol. Files are read<br>
from/written to a temporary file (under Unix/Linux, /tmp/...) which the<br>
<netrw.vim> script will clean up.<br>
<br>
Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,<br>
ftp is not a secure protocol. User names and passwords are transmitted "in<br>
the clear" over the internet; any snooper tool can pick these up; this is not<br>
a netrw thing, this is a ftp thing. If you're concerned about this, please<br>
try to use scp or sftp instead.<br>
<br>
Netrw re-uses the user id and password during the same vim session and so long<br>
as the remote hostname remains the same.<br>
<br>
Jan seems to be a bit confused about how netrw handles ftp; normally multiple<br>
commands are performed in a "ftp session", and he seems to feel that the<br>
uid/password should only be retained over one ftp session. However, netrw<br>
does every ftp operation in a separate "ftp session"; so remembering the<br>
uid/password for just one "ftp session" would be the same as not remembering<br>
the uid/password at all. IMHO this would rapidly grow tiresome as one<br>
browsed remote directories, for example.<br>
<br>
On the other hand, thanks go to Jan M. for pointing out the many<br>
vulnerabilities that netrw (and vim itself) had had in handling "crafted"<br>
filenames. The <a class="Identifier" href="eval.html#shellescape()">shellescape()</a> and <a class="Identifier" href="eval.html#fnameescape()">fnameescape()</a> functions were written in<br>
response by Bram Moolenaar to handle these sort of problems, and netrw has<br>
been modified to use them. Still, my advice is, if the "filename" looks like<br>
a vim command that you aren't comfortable with having executed, don't open it.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-putty" name="netrw-putty">netrw-putty</a> <a class="Constant" href="pi_netrw.html#netrw-pscp" name="netrw-pscp">netrw-pscp</a> <a class="Constant" href="pi_netrw.html#netrw-psftp" name="netrw-psftp">netrw-psftp</a><br>
One may modify any protocol's implementing external application by setting a<br>
variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to<br>
"scp -q"). As an example, consider using PuTTY:<br>
<br>
<div class="helpExample"> let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'<br>
let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'</div>
<br>
(<span class="Todo">note</span>: it has been reported that windows 7 with putty v0.6's "-batch" option<br>
doesn't work, so it's best to leave it off for that system)<br>
<br>
See <a class="Identifier" href="pi_netrw.html#netrw-p8">netrw-p8</a> for more about putty, pscp, psftp, etc.<br>
<br>
Ftp, an old protocol, seems to be blessed by numerous implementations.<br>
Unfortunately, some implementations are noisy (ie., add junk to the end of the<br>
file). Thus, concerned users may decide to write a NetReadFixup() function<br>
that will clean up after reading with their ftp. Some Unix systems (ie.,<br>
FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is<br>
not noisy and more convenient, actually, for <netrw.vim> to use.<br>
Consequently, if "fetch" is available (ie. executable), it may be preferable<br>
to use it for ftp://... based transfers.<br>
<br>
For rcp, scp, sftp, and http, one may use network-oriented file transfers<br>
transparently; ie.<br>
<br>
<div class="helpExample"> vim rcp://[user@]machine/path<br>
vim scp://[user@]machine/path</div>
<br>
If your ftp supports <.netrc>, then it too can be transparently used<br>
if the needed triad of machine name, user id, and password are present in<br>
that file. Your ftp must be able to use the <.netrc> file on its own, however.<br>
<br>
<div class="helpExample"> vim ftp://[user@]machine[[:#]portnumber]/path</div>
<br>
Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses<br>
an option, -s:filename (filename can and probably should be a full path)<br>
which contains ftp commands which will be automatically run whenever ftp<br>
starts. You may use this feature to enter a user and password for one site:<br>
<div class="helpExample"> userid<br>
password</div>
<a class="Constant" href="pi_netrw.html#netrw-windows-netrc" name="netrw-windows-netrc">netrw-windows-netrc</a> <a class="Constant" href="pi_netrw.html#netrw-windows-s" name="netrw-windows-s">netrw-windows-s</a><br>
If <a class="Identifier" href="pi_netrw.html#g:netrw_ftp_cmd">g:netrw_ftp_cmd</a> contains -s:[path/]MACHINE, then (on Windows machines<br>
only) netrw will substitute the current machine name requested for ftp<br>
connections for MACHINE. Hence one can have multiple machine.ftp files<br>
containing login and password for ftp. Example:<br>
<br>
<div class="helpExample"> let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'<br>
vim ftp://myhost.somewhere.net/</div>
<br>
will use a file<br>
<br>
<div class="helpExample"> C:\Users\Myself\myhost.ftp</div>
<br>
Often, ftp will need to query the user for the userid and password.<br>
The latter will be done "silently"; ie. asterisks will show up instead of<br>
the actually-typed-in password. Netrw will retain the userid and password<br>
for subsequent read/writes from the most recent transfer so subsequent<br>
transfers (read/write) to or from that machine will take place without<br>
additional prompting.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-urls" name="netrw-urls">netrw-urls</a><br>
+=================================+============================+============+<br>
| Reading | Writing | Uses |<br>
+=================================+============================+============+<br>
| DAV: | | |<br>
| dav://host/path | | cadaver |<br>
| :Nread dav://host/path | :Nwrite dav://host/path | cadaver |<br>
+---------------------------------+----------------------------+------------+<br>
| DAV + SSL: | | |<br>
| davs://host/path | | cadaver |<br>
| :Nread davs://host/path | :Nwrite davs://host/path | cadaver |<br>
+---------------------------------+----------------------------+------------+<br>
| FETCH: | | |<br>
| fetch://[user@]host/path | | |<br>
| fetch://[user@]host:http/path | Not Available | fetch |<br>
| :Nread fetch://[user@]host/path| | |<br>
+---------------------------------+----------------------------+------------+<br>
| FILE: | | |<br>
| <span class="Constant">file:///</span>* | <span class="Constant">file:///</span>* | |<br>
| <span class="Constant">file://localhost/</span>* | <span class="Constant">file://localhost/</span>* | |<br>
+---------------------------------+----------------------------+------------+<br>
| FTP: (*3) | (*3) | |<br>
| <span class="Constant">ftp://[user@]host/path</span> | <span class="Constant">ftp://[user@]host/path</span> | ftp (*2) |<br>
| :Nread <span class="Constant">ftp://host/path</span> | :Nwrite <span class="Constant">ftp://host/path</span> | ftp+.netrc |<br>
| :Nread host path | :Nwrite host path | ftp+.netrc |<br>
| :Nread host uid pass path | :Nwrite host uid pass path | ftp |<br>
+---------------------------------+----------------------------+------------+<br>
| HTTP: wget is executable: (*4) | | |<br>
| <span class="Constant"><a href="http://[user@]host/path">http://[user@]host/path</a></span> | Not Available | wget |<br>
+---------------------------------+----------------------------+------------+<br>
| HTTP: fetch is executable (*4) | | |<br>
| <span class="Constant"><a href="http://[user@]host/path">http://[user@]host/path</a></span> | Not Available | fetch |<br>
+---------------------------------+----------------------------+------------+<br>
| RCP: | | |<br>
| rcp://[user@]host/path | rcp://[user@]host/path | rcp |<br>
+---------------------------------+----------------------------+------------+<br>
| RSYNC: | | |<br>
| rsync://[user@]host/path | rsync://[user@]host/path | rsync |<br>
| :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |<br>
| :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |<br>
+---------------------------------+----------------------------+------------+<br>
| SCP: | | |<br>
| scp://[user@]host/path | scp://[user@]host/path | scp |<br>
| :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |<br>
+---------------------------------+----------------------------+------------+<br>
| SFTP: | | |<br>
| sftp://[user@]host/path | sftp://[user@]host/path | sftp |<br>
| :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |<br>
+=================================+============================+============+<br>
<br>
(*1) For an absolute path use scp://machine//path.<br>
<br>
(*2) if <.netrc> is present, it is assumed that it will<br>
work with your ftp client. Otherwise the script will<br>
prompt for user-id and password.<br>
<br>
(*3) for ftp, "machine" may be machine#port or machine:port<br>
if a different port is needed than the standard ftp port<br>
<br>
(*4) for http:..., if wget is available it will be used. Otherwise,<br>
if fetch is available it will be used.<br>
<br>
Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.<br>
<br>
<br>
<span class="Statement">NETRC </span><a class="Constant" href="pi_netrw.html#netrw-netrc" name="netrw-netrc">netrw-netrc</a><br>
<br>
The <.netrc> file, typically located in your home directory, contains lines<br>
therein which map a hostname (machine name) to the user id and password you<br>
prefer to use with it.<br>
<br>
The typical syntax for lines in a <.netrc> file is given as shown below.<br>
Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.<br>
<br>
<div class="helpExample"> machine {full machine name} login {user-id} password "{password}"<br>
default login {user-id} password "{password}"</div>
<br>
Your ftp client must handle the use of <.netrc> on its own, but if the<br>
<.netrc> file exists, an ftp transfer will not ask for the user-id or<br>
password.<br>
<br>
<span class="Todo">Note</span>:<br>
Since this file contains passwords, make very sure nobody else can<br>
read this file! Most programs will refuse to use a .netrc that is<br>
readable for others. Don't forget that the system administrator can<br>
still read the file! Ie. for Linux/Unix: chmod 600 .netrc<br>
<br>
Even though Windows' ftp clients typically do not support .netrc, netrw has<br>
a work-around: see <a class="Identifier" href="pi_netrw.html#netrw-windows-s">netrw-windows-s</a>.<br>
<br>
<br>
<span class="Statement">PASSWORD </span><a class="Constant" href="pi_netrw.html#netrw-passwd" name="netrw-passwd">netrw-passwd</a><br>
<br>
The script attempts to get passwords for ftp invisibly using <a class="Identifier" href="eval.html#inputsecret()">inputsecret()</a>,<br>
a built-in Vim function. See <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a> for how to change the password<br>
after one has set it.<br>
<br>
Unfortunately there doesn't appear to be a way for netrw to feed a password to<br>
scp. Thus every transfer via scp will require re-entry of the password.<br>
However, <a class="Identifier" href="pi_netrw.html#netrw-ssh-hack">netrw-ssh-hack</a> can help with this problem.<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
5. Activation <a class="Constant" href="pi_netrw.html#netrw-activate" name="netrw-activate">netrw-activate</a> {{ "{{{" }}1<br>
<br>
Network-oriented file transfers are available by default whenever Vim's<br>
<a class="Identifier" href="options.html#'nocompatible'">'nocompatible'</a> mode is enabled. Netrw's script files reside in your<br>
system's plugin, autoload, and syntax directories; just the<br>
plugin/netrwPlugin.vim script is sourced automatically whenever you bring up<br>
vim. The main script in autoload/netrw.vim is only loaded when you actually<br>
use netrw. I suggest that, at a minimum, you have at least the following in<br>
your <.vimrc> customization file:<br>
<br>
<div class="helpExample"> set nocp<br>
if version >= 600<br>
filetype plugin indent on<br>
endif</div>
<br>
By also including the following lines in your .vimrc, one may have netrw<br>
immediately activate when using [g]vim without any filenames, showing the<br>
current directory:<br>
<br>
<div class="helpExample"> " Augroup VimStartup:<br>
augroup VimStartup<br>
au!<br>
au VimEnter * if expand("%") == "" | e . | endif<br>
augroup END</div>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. Transparent Remote File Editing <a class="Constant" href="pi_netrw.html#netrw-transparent" name="netrw-transparent">netrw-transparent</a> {{ "{{{" }}1<br>
<br>
Transparent file transfers occur whenever a regular file read or write<br>
(invoked via an <a class="Identifier" href="autocmd.html#:autocmd">:autocmd</a> for <a class="Identifier" href="autocmd.html#BufReadCmd">BufReadCmd</a>, <a class="Identifier" href="autocmd.html#BufWriteCmd">BufWriteCmd</a>, or <a class="Identifier" href="autocmd.html#SourceCmd">SourceCmd</a><br>
events) is made. Thus one may read, write, or source files across networks<br>
just as easily as if they were local files!<br>
<br>
<div class="helpExample"> vim ftp://[user@]machine/path<br>
...<br>
:wq</div>
<br>
See <a class="Identifier" href="pi_netrw.html#netrw-activate">netrw-activate</a> for more on how to encourage your vim to use plugins<br>
such as netrw.<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. Ex Commands <a class="Constant" href="pi_netrw.html#netrw-ex" name="netrw-ex">netrw-ex</a> {{ "{{{" }}1<br>
<br>
The usual read/write commands are supported. There are also a few<br>
additional commands available. Often you won't need to use Nwrite or<br>
Nread as shown in <a class="Identifier" href="pi_netrw.html#netrw-transparent">netrw-transparent</a> (ie. simply use<br>
<div class="helpExample"> :e url<br>
:r url<br>
:w url</div>
instead, as appropriate) -- see <a class="Identifier" href="pi_netrw.html#netrw-urls">netrw-urls</a>. In the explanations<br>
below, a <span class="Special">{netfile}</span> is an url to a remote file.<br>
<br>
<a class="Constant" href="pi_netrw.html#:Nwrite" name=":Nwrite">:Nwrite</a> <a class="Constant" href="pi_netrw.html#:Nw" name=":Nw">:Nw</a><br>
:<span class="Special">[range]</span>Nw[rite] Write the specified lines to the current<br>
file as specified in b:netrw_lastfile.<br>
(related: <a class="Identifier" href="pi_netrw.html#netrw-nwrite">netrw-nwrite</a>)<br>
<br>
:<span class="Special">[range]</span>Nw[rite] <span class="Special">{netfile}</span> [<span class="Special">{netfile}</span>]...<br>
Write the specified lines to the <span class="Special">{netfile}</span>.<br>
<br>
<a class="Constant" href="pi_netrw.html#:Nread" name=":Nread">:Nread</a> <a class="Constant" href="pi_netrw.html#:Nr" name=":Nr">:Nr</a><br>
:Nr[ead] Read the lines from the file specified in b:netrw_lastfile<br>
into the current buffer. (related: <a class="Identifier" href="pi_netrw.html#netrw-nread">netrw-nread</a>)<br>
<br>
:Nr[ead] <span class="Special">{netfile}</span> <span class="Special">{netfile}</span>...<br>
Read the <span class="Special">{netfile}</span> after the current line.<br>
<br>
<a class="Constant" href="pi_netrw.html#:Nsource" name=":Nsource">:Nsource</a> <a class="Constant" href="pi_netrw.html#:Ns" name=":Ns">:Ns</a><br>
:Ns[ource] <span class="Special">{netfile}</span><br>
Source the <span class="Special">{netfile}</span>.<br>
To start up vim using a remote .vimrc, one may use<br>
the following (all on one line) (tnx to Antoine Mechelynck)<br>
<div class="helpExample"> vim -u NORC -N<br>
--cmd "runtime plugin/netrwPlugin.vim"<br>
--cmd "source scp://HOSTNAME/.vimrc"</div>
(related: <a class="Identifier" href="pi_netrw.html#netrw-source">netrw-source</a>)<br>
<br>
:call NetUserPass() <a class="Constant" href="pi_netrw.html#NetUserPass()" name="NetUserPass()">NetUserPass()</a><br>
If g:netrw_uid and s:netrw_passwd don't exist,<br>
this function will query the user for them.<br>
(related: <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a>)<br>
<br>
:call NetUserPass("userid")<br>
This call will set the g:netrw_uid and, if<br>
the password doesn't exist, will query the user for it.<br>
(related: <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a>)<br>
<br>
:call NetUserPass("userid","passwd")<br>
This call will set both the g:netrw_uid and s:netrw_passwd.<br>
The user-id and password are used by ftp transfers. One may<br>
effectively remove the user-id and password by using empty<br>
strings (ie. "").<br>
(related: <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a>)<br>
<br>
:NetrwSettings This command is described in <a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a> -- used to<br>
display netrw settings and change netrw behavior.<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
8. Variables and Options <a class="Constant" href="pi_netrw.html#netrw-var" name="netrw-var">netrw-var</a> <a class="Constant" href="pi_netrw.html#netrw-settings" name="netrw-settings">netrw-settings</a> {{ "{{{" }}1<br>
<br>
(also see: <a class="Identifier" href="pi_netrw.html#netrw-options">netrw-options</a> <a class="Identifier" href="pi_netrw.html#netrw-variables">netrw-variables</a> <a class="Identifier" href="pi_netrw.html#netrw-protocol">netrw-protocol</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-browser-settings">netrw-browser-settings</a> <a class="Identifier" href="pi_netrw.html#netrw-browser-options">netrw-browser-options</a> )<br>
<br>
The <netrw.vim> script provides several variables which act as options to<br>
affect <netrw.vim>'s file transfer behavior. These variables typically may be<br>
set in the user's <.vimrc> file: (see also <a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a> <a class="Identifier" href="pi_netrw.html#netrw-protocol">netrw-protocol</a>)<br>
<a class="Constant" href="pi_netrw.html#netrw-options" name="netrw-options">netrw-options</a><br>
<br>
<div class="helpExample"> -------------<br>
Netrw Options<br>
-------------<br>
Option Meaning<br>
-------------- -----------------------------------------------</div>
<br>
b:netrw_col Holds current cursor position (during NetWrite)<br>
g:netrw_cygwin =1 assume scp under windows is from cygwin<br>
(default/windows)<br>
=0 assume scp under windows accepts windows<br>
style paths (default/else)<br>
g:netrw_ftp =0 use default ftp (uid password)<br>
g:netrw_ftpmode ="binary" (default)<br>
="ascii" (your choice)<br>
g:netrw_ignorenetrc =1 (default)<br>
if you have a <.netrc> file but you don't<br>
want it used, then set this variable. Its<br>
mere existence is enough to cause <.netrc><br>
to be ignored.<br>
b:netrw_lastfile Holds latest method/machine/path.<br>
b:netrw_line Holds current line number (during NetWrite)<br>
g:netrw_silent =0 transfers done normally<br>
=1 transfers done silently<br>
g:netrw_uid Holds current user-id for ftp.<br>
g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)<br>
=1 use WinNT/2K/XP's rcp, binary mode<br>
g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc<br>
=1 use default method to do ftp<br>
<div class="helpExample"> -----------------------------------------------------------------------</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-internal-variables" name="netrw-internal-variables">netrw-internal-variables</a><br>
The script will also make use of the following variables internally, albeit<br>
temporarily.<br>
<br>
<div class="helpExample"> -------------------<br>
Temporary Variables<br>
-------------------<br>
Variable Meaning<br>
-------- ------------------------------------</div>
<br>
b:netrw_method Index indicating rcp/ftp+.netrc/ftp<br>
w:netrw_method (same as b:netrw_method)<br>
g:netrw_machine Holds machine name parsed from input<br>
b:netrw_fname Holds filename being accessed<br>
<div class="helpExample"> ------------------------------------------------------------</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-protocol" name="netrw-protocol">netrw-protocol</a><br>
<br>
Netrw supports a number of protocols. These protocols are invoked using the<br>
variables listed below, and may be modified by the user.<br>
<br>
<div class="helpExample"> ------------------------<br>
Protocol Control Options<br>
------------------------<br>
Option Type Setting Meaning<br>
--------- -------- -------------- ---------------------------</div>
netrw_ftp variable =doesn't exist userid set by "user userid"<br>
=0 userid set by "user userid"<br>
=1 userid set by "userid"<br>
NetReadFixup function =doesn't exist no change<br>
=exists Allows user to have files<br>
read via ftp automatically<br>
transformed however they wish<br>
by NetReadFixup()<br>
g:netrw_dav_cmd var ="cadaver" if cadaver is executable<br>
g:netrw_dav_cmd var ="curl -o" elseif curl is executable<br>
g:netrw_fetch_cmd var ="fetch -o" if fetch is available<br>
g:netrw_ftp_cmd var ="ftp"<br>
g:netrw_http_cmd var ="fetch -o" if fetch is available<br>
g:netrw_http_cmd var ="wget -O" else if wget is available<br>
g:netrw_http_put_cmd var ="curl -T"<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a> var ="ssh USEPORT HOSTNAME ls -Fa"<br>
g:netrw_rcp_cmd var ="rcp"<br>
g:netrw_rsync_cmd var ="rsync -a"<br>
g:netrw_scp_cmd var ="scp -q"<br>
g:netrw_sftp_cmd var ="sftp"<br>
<div class="helpExample"> -------------------------------------------------------------------------</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-ftp" name="netrw-ftp">netrw-ftp</a><br>
<br>
The g:netrw_..._cmd options (<a class="Identifier" href="pi_netrw.html#g:netrw_ftp_cmd">g:netrw_ftp_cmd</a> and <a class="Identifier" href="pi_netrw.html#g:netrw_sftp_cmd">g:netrw_sftp_cmd</a>)<br>
specify the external program to use handle the ftp protocol. They may<br>
include command line options (such as -p for passive mode). Example:<br>
<br>
<div class="helpExample"> let g:netrw_ftp_cmd= "ftp -p"</div>
<br>
Browsing is supported by using the <a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a>; the substring<br>
"HOSTNAME" will be changed via substitution with whatever the current request<br>
is for a hostname.<br>
<br>
Two options (<a class="Identifier" href="pi_netrw.html#g:netrw_ftp">g:netrw_ftp</a> and <a class="Identifier" href="pi_netrw.html#netrw-fixup">netrw-fixup</a>) both help with certain ftp's<br>
that give trouble . In order to best understand how to use these options if<br>
ftp is giving you troubles, a bit of discussion is provided on how netrw does<br>
ftp reads.<br>
<br>
For ftp, netrw typically builds up lines of one of the following formats in a<br>
temporary file:<br>
<br>
<div class="helpExample"> IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1<br>
---------------------------------- ------------------------------</div>
<br>
open machine <span class="Special">[port]</span> open machine <span class="Special">[port]</span><br>
user userid password userid password<br>
[g:netrw_ftpmode] password<br>
[g:netrw_ftpextracmd] [g:netrw_ftpmode]<br>
get filename tempfile [g:netrw_extracmd]<br>
get filename tempfile<br>
<div class="helpExample"> ---------------------------------------------------------------------</div>
<br>
The <a class="Identifier" href="pi_netrw.html#g:netrw_ftpmode">g:netrw_ftpmode</a> and <a class="Identifier" href="pi_netrw.html#g:netrw_ftpextracmd">g:netrw_ftpextracmd</a> are optional.<br>
<br>
Netrw then executes the lines above by use of a filter:<br>
<br>
<div class="helpExample"> :%! {g:netrw_ftp_cmd} -i [-n]</div>
<br>
where<br>
g:netrw_ftp_cmd is usually "ftp",<br>
-i tells ftp not to be interactive<br>
-n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)<br>
<br>
If <.netrc> exists it will be used to avoid having to query the user for<br>
userid and password. The transferred file is put into a temporary file.<br>
The temporary file is then read into the main editing session window that<br>
requested it and the temporary file deleted.<br>
<br>
If your ftp doesn't accept the "user" command and immediately just demands a<br>
userid, then try putting "let netrw_ftp=1" in your <.vimrc>.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-cadaver" name="netrw-cadaver">netrw-cadaver</a><br>
To handle the SSL certificate dialog for untrusted servers, one may pull<br>
down the certificate and place it into /usr/ssl/cert.pem. This operation<br>
renders the server treatment as "trusted".<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-fixup" name="netrw-fixup">netrw-fixup</a> <a class="Constant" href="pi_netrw.html#netreadfixup" name="netreadfixup">netreadfixup</a><br>
If your ftp for whatever reason generates unwanted lines (such as AUTH<br>
messages) you may write a NetReadFixup() function:<br>
<br>
<div class="helpExample"> function! NetReadFixup(method,line1,line2)<br>
" a:line1: first new line in current file<br>
" a:line2: last new line in current file<br>
if a:method == 1 "rcp<br>
elseif a:method == 2 "ftp + <.netrc><br>
elseif a:method == 3 "ftp + machine,uid,password,filename<br>
elseif a:method == 4 "scp<br>
elseif a:method == 5 "http/wget<br>
elseif a:method == 6 "dav/cadaver<br>
elseif a:method == 7 "rsync<br>
elseif a:method == 8 "fetch<br>
elseif a:method == 9 "sftp<br>
else " complain<br>
endif<br>
endfunction</div>
<br>
The NetReadFixup() function will be called if it exists and thus allows you to<br>
customize your reading process. As a further example, <netrw.vim> contains<br>
just such a function to handle Windows 95 ftp. For whatever reason, Windows<br>
95's ftp dumps four blank lines at the end of a transfer, and so it is<br>
desirable to automate their removal. Here's some code taken from <netrw.vim><br>
itself:<br>
<br>
<div class="helpExample"> if has("win95") && g:netrw_win95ftp<br>
fun! NetReadFixup(method, line1, line2)<br>
if method == 3 " ftp (no <.netrc>)<br>
let fourblanklines= line2 - 3<br>
silent fourblanklines.",".line2."g/^\s*/d"<br>
endif<br>
endfunction<br>
endif</div>
<br>
(Related topics: <a class="Identifier" href="pi_netrw.html#ftp">ftp</a> <a class="Identifier" href="pi_netrw.html#netrw-userpass">netrw-userpass</a> <a class="Identifier" href="pi_netrw.html#netrw-start">netrw-start</a>)<br>
<br>
<span class="PreProc">==============================================================================</span><br>
9. Browsing <a class="Constant" href="pi_netrw.html#netrw-browsing" name="netrw-browsing">netrw-browsing</a> <a class="Constant" href="pi_netrw.html#netrw-browse" name="netrw-browse">netrw-browse</a> <a class="Constant" href="pi_netrw.html#netrw-help" name="netrw-help">netrw-help</a> {{ "{{{" }}1<br>
<a class="Constant" href="pi_netrw.html#netrw-browser" name="netrw-browser">netrw-browser</a> <a class="Constant" href="pi_netrw.html#netrw-dir" name="netrw-dir">netrw-dir</a> <a class="Constant" href="pi_netrw.html#netrw-list" name="netrw-list">netrw-list</a><br>
<br>
<span class="Statement">INTRODUCTION TO BROWSING </span><a class="Constant" href="pi_netrw.html#netrw-intro-browse" name="netrw-intro-browse">netrw-intro-browse</a> {{ "{{{" }}2<br>
(Quick References: <a class="Identifier" href="pi_netrw.html#netrw-quickmaps">netrw-quickmaps</a> <a class="Identifier" href="pi_netrw.html#netrw-quickcoms">netrw-quickcoms</a>)<br>
<br>
Netrw supports the browsing of directories on your local system and on remote<br>
hosts; browsing includes listing files and directories, entering directories,<br>
editing files therein, deleting files/directories, making new directories,<br>
moving (renaming) files and directories, copying files and directories, etc.<br>
One may mark files and execute any system command on them! The Netrw browser<br>
generally implements the previous explorer's maps and commands for remote<br>
directories, although details (such as pertinent global variable names)<br>
necessarily differ. To browse a directory, simply "edit" it!<br>
<br>
<div class="helpExample"> vim /your/directory/<br>
vim .<br>
vim c:\your\directory\</div>
<br>
(Related topics: <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a> <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> <a class="Identifier" href="pi_netrw.html#netrw-mx">netrw-mx</a> <a class="Identifier" href="pi_netrw.html#netrw-D">netrw-D</a> <a class="Identifier" href="pi_netrw.html#netrw-R">netrw-R</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a> )<br>
<br>
The Netrw remote file and directory browser handles two protocols: ssh and<br>
ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp<br>
in its remote browsing. Specifying any other protocol will cause it to be<br>
used for file transfers; but the ssh protocol will be used to do remote<br>
browsing.<br>
<br>
To use Netrw's remote directory browser, simply attempt to read a "file" with<br>
a trailing slash and it will be interpreted as a request to list a directory:<br>
<br>
<div class="helpExample"> vim [protocol]://[user@]hostname/path/</div>
<br>
where <span class="Special">[protocol]</span> is typically scp or ftp. As an example, try:<br>
<br>
<div class="helpExample"> vim ftp://ftp.home.vim.org/pub/vim/</div>
<br>
For local directories, the trailing slash is not required. Again, because it's<br>
easy to miss: to browse remote directories, the url must terminate with a<br>
slash!<br>
<br>
If you'd like to avoid entering the password repeatedly for remote directory<br>
listings with ssh or scp, see <a class="Identifier" href="pi_netrw.html#netrw-ssh-hack">netrw-ssh-hack</a>. To avoid password entry with<br>
ftp, see <a class="Identifier" href="pi_netrw.html#netrw-netrc">netrw-netrc</a> (if your ftp supports it).<br>
<br>
There are several things you can do to affect the browser's display of files:<br>
<br>
* To change the listing style, press the "i" key (<a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a>).<br>
Currently there are four styles: thin, long, wide, and tree.<br>
To make that change "permanent", see <a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a>.<br>
<br>
* To hide files (don't want to see those xyz~ files anymore?) see<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a>.<br>
<br>
* Press s to sort files by name, time, or size.<br>
<br>
See <a class="Identifier" href="pi_netrw.html#netrw-browse-cmds">netrw-browse-cmds</a> for all the things you can do with netrw!<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-getftype" name="netrw-getftype">netrw-getftype</a> <a class="Constant" href="pi_netrw.html#netrw-filigree" name="netrw-filigree">netrw-filigree</a> <a class="Constant" href="pi_netrw.html#netrw-ftype" name="netrw-ftype">netrw-ftype</a><br>
The <a class="Identifier" href="eval.html#getftype()">getftype()</a> function is used to append a bit of filigree to indicate<br>
filetype to locally listed files:<br>
<br>
directory : /<br>
executable : *<br>
fifo : |<br>
links : @<br>
sockets : =<br>
<br>
The filigree also affects the <a class="Identifier" href="pi_netrw.html#g:netrw_sort_sequence">g:netrw_sort_sequence</a>.<br>
<br>
<br>
<span class="Statement">QUICK HELP </span><a class="Constant" href="pi_netrw.html#netrw-quickhelp" name="netrw-quickhelp">netrw-quickhelp</a> {{ "{{{" }}2<br>
<span class="PreProc">(Use ctrl-] to select a topic)</span><br>
Intro to Browsing...............................<a class="Identifier" href="pi_netrw.html#netrw-intro-browse">netrw-intro-browse</a><br>
Quick Reference: Maps.........................<a class="Identifier" href="pi_netrw.html#netrw-quickmap">netrw-quickmap</a><br>
Quick Reference: Commands.....................<a class="Identifier" href="pi_netrw.html#netrw-browse-cmds">netrw-browse-cmds</a><br>
Hiding<br>
Edit hiding list..............................<a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a><br>
Hiding Files or Directories...................<a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a><br>
Hiding/Unhiding by suffix.....................<a class="Identifier" href="pi_netrw.html#netrw-mh">netrw-mh</a><br>
Hiding dot-files.............................<a class="Identifier" href="pi_netrw.html#netrw-gh">netrw-gh</a><br>
Listing Style<br>
Select listing style (thin/long/wide/tree)....<a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a><br>
Associated setting variable...................<a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a><br>
Shell command used to perform listing.........<a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a><br>
Quick file info...............................<a class="Identifier" href="pi_netrw.html#netrw-qf">netrw-qf</a><br>
Sorted by<br>
Select sorting style (name/time/size).........<a class="Identifier" href="pi_netrw.html#netrw-s">netrw-s</a><br>
Editing the sorting sequence..................<a class="Identifier" href="pi_netrw.html#netrw-S">netrw-S</a><br>
Sorting options...............................<a class="Identifier" href="pi_netrw.html#g:netrw_sort_options">g:netrw_sort_options</a><br>
Associated setting variable...................<a class="Identifier" href="pi_netrw.html#g:netrw_sort_sequence">g:netrw_sort_sequence</a><br>
Reverse sorting order.........................<a class="Identifier" href="pi_netrw.html#netrw-r">netrw-r</a><br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-quickmap" name="netrw-quickmap">netrw-quickmap</a> <a class="Constant" href="pi_netrw.html#netrw-quickmaps" name="netrw-quickmaps">netrw-quickmaps</a><br>
QUICK REFERENCE: MAPS <a class="Constant" href="pi_netrw.html#netrw-browse-maps" name="netrw-browse-maps">netrw-browse-maps</a> {{ "{{{" }}2<br>
<br>
<div class="helpExample"> --- ----------------- ----<br>
Map Quick Explanation Link<br>
--- ----------------- ----</div>
<span class="Special"><F1></span> Causes Netrw to issue help<br>
<span class="Special"><cr></span> Netrw will enter the directory or read the file <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a><br>
<span class="Special"><del></span> Netrw will attempt to remove the file/directory <a class="Identifier" href="pi_netrw.html#netrw-del">netrw-del</a><br>
<span class="Special"><c-h></span> Edit file hiding list <a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a><br>
<span class="Special"><c-l></span> Causes Netrw to refresh the directory listing <a class="Identifier" href="pi_netrw.html#netrw-ctrl-l">netrw-ctrl-l</a><br>
<span class="Special"><c-r></span> Browse using a gvim server <a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a><br>
<span class="Special"><c-tab></span> Shrink/expand a netrw/explore window <a class="Identifier" href="pi_netrw.html#netrw-c-tab">netrw-c-tab</a><br>
- Makes Netrw go up one directory <a class="Identifier" href="pi_netrw.html#netrw--">netrw--</a><br>
a Toggles between normal display, <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a><br>
hiding (suppress display of files matching g:netrw_list_hide)<br>
showing (display only files which match g:netrw_list_hide)<br>
c Make browsing directory the current directory <a class="Identifier" href="pi_netrw.html#netrw-c">netrw-c</a><br>
C Setting the editing window <a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a><br>
d Make a directory <a class="Identifier" href="pi_netrw.html#netrw-d">netrw-d</a><br>
D Attempt to remove the file(s)/directory(ies) <a class="Identifier" href="pi_netrw.html#netrw-D">netrw-D</a><br>
gb Go to previous bookmarked directory <a class="Identifier" href="pi_netrw.html#netrw-gb">netrw-gb</a><br>
gd Force treatment as directory <a class="Identifier" href="pi_netrw.html#netrw-gd">netrw-gd</a><br>
gf Force treatment as file <a class="Identifier" href="pi_netrw.html#netrw-gf">netrw-gf</a><br>
gh Quick hide/unhide of dot-files <a class="Identifier" href="pi_netrw.html#netrw-gh">netrw-gh</a><br>
gn Make top of tree the directory below the cursor <a class="Identifier" href="pi_netrw.html#netrw-gn">netrw-gn</a><br>
i Cycle between thin, long, wide, and tree listings <a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a><br>
mb Bookmark current directory <a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a><br>
mc Copy marked files to marked-file target directory <a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a><br>
md Apply diff to marked files (up to 3) <a class="Identifier" href="pi_netrw.html#netrw-md">netrw-md</a><br>
me Place marked files on arg list and edit them <a class="Identifier" href="pi_netrw.html#netrw-me">netrw-me</a><br>
mf Mark a file <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a><br>
mF Unmark files <a class="Identifier" href="pi_netrw.html#netrw-mF">netrw-mF</a><br>
mg Apply vimgrep to marked files <a class="Identifier" href="pi_netrw.html#netrw-mg">netrw-mg</a><br>
mh Toggle marked file suffices' presence on hiding list <a class="Identifier" href="pi_netrw.html#netrw-mh">netrw-mh</a><br>
mm Move marked files to marked-file target directory <a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a><br>
mp Print marked files <a class="Identifier" href="pi_netrw.html#netrw-mp">netrw-mp</a><br>
mr Mark files using a shell-style <a class="Identifier" href="pattern.html#regexp">regexp</a> <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a><br>
mt Current browsing directory becomes markfile target <a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a><br>
mT Apply ctags to marked files <a class="Identifier" href="pi_netrw.html#netrw-mT">netrw-mT</a><br>
mu Unmark all marked files <a class="Identifier" href="pi_netrw.html#netrw-mu">netrw-mu</a><br>
mv Apply arbitrary vim command to marked files <a class="Identifier" href="pi_netrw.html#netrw-mv">netrw-mv</a><br>
mx Apply arbitrary shell command to marked files <a class="Identifier" href="pi_netrw.html#netrw-mx">netrw-mx</a><br>
mX Apply arbitrary shell command to marked files en bloc<a class="Identifier" href="pi_netrw.html#netrw-mX">netrw-mX</a><br>
mz Compress/decompress marked files <a class="Identifier" href="pi_netrw.html#netrw-mz">netrw-mz</a><br>
o Enter the file/directory under the cursor in a new <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a><br>
browser window. A horizontal split is used.<br>
O Obtain a file specified by cursor <a class="Identifier" href="pi_netrw.html#netrw-O">netrw-O</a><br>
p Preview the file <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
P Browse in the previously used window <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a><br>
qb List bookmarked directories and history <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a><br>
qf Display information on file <a class="Identifier" href="pi_netrw.html#netrw-qf">netrw-qf</a><br>
qF Mark files using a quickfix list <a class="Identifier" href="pi_netrw.html#netrw-qF">netrw-qF</a><br>
qL Mark files using a <a class="Identifier" href="quickfix.html#location-list">location-list</a> <a class="Identifier" href="pi_netrw.html#netrw-qL">netrw-qL</a><br>
r Reverse sorting order <a class="Identifier" href="pi_netrw.html#netrw-r">netrw-r</a><br>
R Rename the designated file(s)/directory(ies) <a class="Identifier" href="pi_netrw.html#netrw-R">netrw-R</a><br>
s Select sorting style: by name, time, or file size <a class="Identifier" href="pi_netrw.html#netrw-s">netrw-s</a><br>
S Specify suffix priority for name-sorting <a class="Identifier" href="pi_netrw.html#netrw-S">netrw-S</a><br>
t Enter the file/directory under the cursor in a new tab<a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a><br>
u Change to recently-visited directory <a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a><br>
U Change to subsequently-visited directory <a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a><br>
v Enter the file/directory under the cursor in a new <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
browser window. A vertical split is used.<br>
x View file with an associated program <a class="Identifier" href="pi_netrw.html#netrw-x">netrw-x</a><br>
X Execute filename under cursor via <a class="Identifier" href="eval.html#system()">system()</a> <a class="Identifier" href="pi_netrw.html#netrw-X">netrw-X</a><br>
<br>
% Open a new file in netrw's current directory <a class="Identifier" href="pi_netrw.html#netrw-%">netrw-%</a><br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-mouse" name="netrw-mouse">netrw-mouse</a> <a class="Constant" href="pi_netrw.html#netrw-leftmouse" name="netrw-leftmouse">netrw-leftmouse</a> <a class="Constant" href="pi_netrw.html#netrw-middlemouse" name="netrw-middlemouse">netrw-middlemouse</a> <a class="Constant" href="pi_netrw.html#netrw-rightmouse" name="netrw-rightmouse">netrw-rightmouse</a><br>
<span class="Special"><leftmouse></span> (gvim only) selects word under mouse as if a <span class="Special"><cr></span><br>
had been pressed (ie. edit file, change directory)<br>
<span class="Special"><middlemouse></span> (gvim only) same as P selecting word under mouse;<br>
see <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a><br>
<span class="Special"><rightmouse></span> (gvim only) delete file/directory using word under<br>
mouse<br>
<span class="Special"><2-leftmouse></span> (gvim only) when:<br>
* in a netrw-selected file, AND<br>
* <a class="Identifier" href="pi_netrw.html#g:netrw_retmap">g:netrw_retmap</a> == 1 AND<br>
* the user doesn't already have a <span class="Special"><2-leftmouse></span><br>
mapping defined before netrw is autoloaded,<br>
then a double clicked leftmouse button will return<br>
to the netrw browser window. See <a class="Identifier" href="pi_netrw.html#g:netrw_retmap">g:netrw_retmap</a>.<br>
<span class="Special"><s-leftmouse></span> (gvim only) like mf, will mark files. Dragging<br>
the shifted leftmouse will mark multiple files.<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
(to disable mouse buttons while browsing: <a class="Identifier" href="pi_netrw.html#g:netrw_mousemaps">g:netrw_mousemaps</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-quickcom" name="netrw-quickcom">netrw-quickcom</a> <a class="Constant" href="pi_netrw.html#netrw-quickcoms" name="netrw-quickcoms">netrw-quickcoms</a><br>
QUICK REFERENCE: COMMANDS <a class="Constant" href="pi_netrw.html#netrw-explore-cmds" name="netrw-explore-cmds">netrw-explore-cmds</a> <a class="Constant" href="pi_netrw.html#netrw-browse-cmds" name="netrw-browse-cmds">netrw-browse-cmds</a> {{ "{{{" }}2<br>
:NetrwClean[!]............................................<a class="Identifier" href="pi_netrw.html#netrw-clean">netrw-clean</a><br>
:NetrwSettings............................................<a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a><br>
:Ntree....................................................<a class="Identifier" href="pi_netrw.html#netrw-ntree">netrw-ntree</a><br>
:Explore[!] <span class="Special">[dir]</span> Explore directory of current file......<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Hexplore[!] <span class="Special">[dir]</span> Horizontal Split & Explore.............<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Lexplore[!] <span class="Special">[dir]</span> Left Explorer Toggle...................<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Nexplore[!] <span class="Special">[dir]</span> Vertical Split & Explore...............<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Pexplore[!] <span class="Special">[dir]</span> Vertical Split & Explore...............<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Rexplore Return to Explorer.....................<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Sexplore[!] <span class="Special">[dir]</span> Split & Explore directory .............<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Texplore[!] <span class="Special">[dir]</span> Tab & Explore..........................<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
:Vexplore[!] <span class="Special">[dir]</span> Vertical Split & Explore...............<a class="Identifier" href="pi_netrw.html#netrw-explore">netrw-explore</a><br>
<br>
<br>
<span class="Statement">BANNER DISPLAY </span><a class="Constant" href="pi_netrw.html#netrw-I" name="netrw-I">netrw-I</a><br>
<br>
One may toggle the banner display on and off by pressing "I".<br>
<br>
Also See: <a class="Identifier" href="pi_netrw.html#g:netrw_banner">g:netrw_banner</a><br>
<br>
<br>
<span class="Statement">BOOKMARKING A DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-mb" name="netrw-mb">netrw-mb</a> <a class="Constant" href="pi_netrw.html#netrw-bookmark" name="netrw-bookmark">netrw-bookmark</a> <a class="Constant" href="pi_netrw.html#netrw-bookmarks" name="netrw-bookmarks">netrw-bookmarks</a> {{ "{{{" }}2<br>
<br>
One may easily "bookmark" the currently browsed directory by using<br>
<br>
<div class="helpExample"> mb</div>
<br>
<a class="Constant" href="pi_netrw.html#.netrwbook" name=".netrwbook">.netrwbook</a><br>
Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are<br>
kept in sorted order.<br>
<br>
If there are marked files and/or directories, mb will add them to the bookmark<br>
list.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:NetrwMB" name="netrw-:NetrwMB">netrw-:NetrwMB</a><br>
Addtionally, one may use :NetrwMB to bookmark files or directories.<br>
<br>
<div class="helpExample"> :NetrwMB[!] [files/directories]</div>
<br>
No bang: enters files/directories into Netrw's bookmark system<br>
<br>
No argument and in netrw buffer:<br>
if there are marked files : bookmark marked files<br>
otherwise : bookmark file/directory under cursor<br>
No argument and not in netrw buffer: bookmarks current open file<br>
Has arguments : <a class="Identifier" href="eval.html#glob()">glob()</a>s each arg and bookmarks them<br>
<br>
With bang: deletes files/directories from Netrw's bookmark system<br>
<br>
The :NetrwMB command is available outside of netrw buffers (once netrw has been<br>
invoked in the session).<br>
<br>
The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By<br>
default, it's stored on the first directory on the user's <a class="Identifier" href="options.html#'runtimepath'">'runtimepath'</a>.<br>
<br>
Related Topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-gb">netrw-gb</a> how to return (go) to a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a> how to delete bookmarks<br>
<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> how to list bookmarks<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_home">g:netrw_home</a> controls where .netrwbook is kept<br>
<br>
<br>
<span class="Statement">BROWSING </span><a class="Constant" href="pi_netrw.html#netrw-enter" name="netrw-enter">netrw-enter</a> <a class="Constant" href="pi_netrw.html#netrw-cr" name="netrw-cr">netrw-cr</a> {{ "{{{" }}2<br>
<br>
Browsing is simple: move the cursor onto a file or directory of interest.<br>
Hitting the <span class="Special"><cr></span> (the return key) will select the file or directory.<br>
Directories will themselves be listed, and files will be opened using the<br>
protocol given in the original read request.<br>
<br>
CAVEAT: There are four forms of listing (see <a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a>). Netrw assumes that<br>
two or more spaces delimit filenames and directory names for the long and<br>
wide listing formats. Thus, if your filename or directory name has two or<br>
more sequential spaces embedded in it, or any trailing spaces, then you'll<br>
need to use the "thin" format to select it.<br>
<br>
The <a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a> option, which is zero by default, may be used to<br>
cause the opening of files to be done in a new window or tab instead of the<br>
default. When the option is one or two, the splitting will be taken<br>
horizontally or vertically, respectively. When the option is set to three, a<br>
<span class="Special"><cr></span> will cause the file to appear in a new tab.<br>
<br>
<br>
When using the gui (gvim), one may select a file by pressing the <span class="Special"><leftmouse></span><br>
button. In addition, if<br>
<br>
* <a class="Identifier" href="pi_netrw.html#g:netrw_retmap">g:netrw_retmap</a> == 1 AND (its default value is 0)<br>
* in a netrw-selected file, AND<br>
* the user doesn't already have a <span class="Special"><2-leftmouse></span> mapping defined before<br>
netrw is loaded<br>
<br>
then a doubly-clicked leftmouse button will return to the netrw browser<br>
window.<br>
<br>
Netrw attempts to speed up browsing, especially for remote browsing where one<br>
may have to enter passwords, by keeping and re-using previously obtained<br>
directory listing buffers. The <a class="Identifier" href="pi_netrw.html#g:netrw_fastbrowse">g:netrw_fastbrowse</a> variable is used to<br>
control this behavior; one may have slow browsing (no buffer re-use), medium<br>
speed browsing (re-use directory buffer listings only for remote directories),<br>
and fast browsing (re-use directory buffer listings as often as possible).<br>
The price for such re-use is that when changes are made (such as new files<br>
are introduced into a directory), the listing may become out-of-date. One may<br>
always refresh directory listing buffers by pressing ctrl-L (see<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-l">netrw-ctrl-l</a>).<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-s-cr" name="netrw-s-cr">netrw-s-cr</a><br>
<span class="PreProc">Squeezing the Current Tree-Listing Directory</span><br>
<br>
When the tree listing style is enabled (see <a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a>) and one is using<br>
gvim, then the <span class="Special"><s-cr></span> mapping may be used to squeeze (close) the<br>
directory currently containing the cursor.<br>
<br>
Otherwise, one may remap a key combination of one's own choice to get<br>
this effect:<br>
<br>
<div class="helpExample"> nmap <buffer> <silent> <nowait> YOURKEYCOMBO <Plug>NetrwTreeSqueeze</div>
<br>
Put this line in $HOME/ftplugin/netrw/netrw.vim; it needs to be generated<br>
for netrw buffers only.<br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a> <a class="Identifier" href="pi_netrw.html#g:netrw_fastbrowse">g:netrw_fastbrowse</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ftp_list_cmd">g:netrw_ftp_list_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ftp_sizelist_cmd">g:netrw_ftp_sizelist_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ftp_timelist_cmd">g:netrw_ftp_timelist_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ssh_browse_reject">g:netrw_ssh_browse_reject</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_use_noswf">g:netrw_use_noswf</a><br>
<br>
<br>
<span class="Statement">BROWSING WITH A HORIZONTALLY SPLIT WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-o" name="netrw-o">netrw-o</a> <a class="Constant" href="pi_netrw.html#netrw-horiz" name="netrw-horiz">netrw-horiz</a> {{ "{{{" }}2<br>
<br>
Normally one enters a file or directory using the <span class="Special"><cr></span>. However, the "o" map<br>
allows one to open a new window to hold the new directory listing or file. A<br>
horizontal split is used. (for vertical splitting, see <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a>)<br>
<br>
Normally, the o key splits the window horizontally with the new window and<br>
cursor at the top.<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a><br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> control above/below splitting<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> control initial sizing<br>
<br>
<span class="Statement">BROWSING WITH A NEW TAB </span><a class="Constant" href="pi_netrw.html#netrw-t" name="netrw-t">netrw-t</a> {{ "{{{" }}2<br>
<br>
Normally one enters a file or directory using the <span class="Special"><cr></span>. The "t" map<br>
allows one to open a new window holding the new directory listing or file in<br>
a new tab.<br>
<br>
If you'd like to have the new listing in a background tab, use <a class="Identifier" href="tabpage.html#gT">gT</a>.<br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> control initial sizing<br>
<br>
<span class="Statement">BROWSING WITH A VERTICALLY SPLIT WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-v" name="netrw-v">netrw-v</a> {{ "{{{" }}2<br>
<br>
Normally one enters a file or directory using the <span class="Special"><cr></span>. However, the "v" map<br>
allows one to open a new window to hold the new directory listing or file. A<br>
vertical split is used. (for horizontal splitting, see <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a>)<br>
<br>
Normally, the v key splits the window vertically with the new window and<br>
cursor at the left.<br>
<br>
There is only one tree listing buffer; using "v" on a displayed subdirectory<br>
will split the screen, but the same buffer will be shown twice.<br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_altv">g:netrw_altv</a> control right/left splitting<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> control initial sizing<br>
<br>
<br>
<span class="Statement">BROWSING USING A GVIM SERVER </span><a class="Constant" href="pi_netrw.html#netrw-ctrl-r" name="netrw-ctrl-r">netrw-ctrl-r</a> {{ "{{{" }}2<br>
<br>
One may keep a browsing gvim separate from the gvim being used to edit.<br>
Use the <span class="Special"><c-r></span> map on a file (not a directory) in the netrw browser, and it<br>
will use a gvim server (see <a class="Identifier" href="pi_netrw.html#g:netrw_servername">g:netrw_servername</a>). Subsequent use of <span class="Special"><cr></span><br>
(see <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a>) will re-use that server for editing files.<br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_servername">g:netrw_servername</a> : sets name of server<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a> : controls how <span class="Special"><cr></span> will open files<br>
<br>
<br>
<span class="Statement">CHANGE LISTING STYLE (THIN LONG WIDE TREE) </span><a class="Constant" href="pi_netrw.html#netrw-i" name="netrw-i">netrw-i</a> {{ "{{{" }}2<br>
<br>
The "i" map cycles between the thin, long, wide, and tree listing formats.<br>
<br>
The thin listing format gives just the files' and directories' names.<br>
<br>
The long listing is either based on the "ls" command via ssh for remote<br>
directories or displays the filename, file size (in bytes), and the time and<br>
date of last modification for local directories. With the long listing<br>
format, netrw is not able to recognize filenames which have trailing spaces.<br>
Use the thin listing format for such files.<br>
<br>
The wide listing format uses two or more contiguous spaces to delineate<br>
filenames; when using that format, netrw won't be able to recognize or use<br>
filenames which have two or more contiguous spaces embedded in the name or any<br>
trailing spaces. The thin listing format will, however, work with such files.<br>
The wide listing format is the most compact.<br>
<br>
The tree listing format has a top directory followed by files and directories<br>
preceded by one or more "|"s, which indicate the directory depth. One may<br>
open and close directories by pressing the <span class="Special"><cr></span> key while atop the directory<br>
name.<br>
<br>
One may make a preferred listing style your default; see <a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a>.<br>
As an example, by putting the following line in your .vimrc,<br>
<div class="helpExample"> let g:netrw_liststyle= 3</div>
the tree style will become your default listing style.<br>
<br>
One typical way to use the netrw tree display is to:<br>
<br>
<div class="helpExample"> vim .<br>
(use i until a tree display shows)<br>
navigate to a file<br>
v (edit as desired in vertically split window)<br>
ctrl-w h (to return to the netrw listing)<br>
P (edit newly selected file in the previous window)<br>
ctrl-w h (to return to the netrw listing)<br>
P (edit newly selected file in the previous window)<br>
...etc...</div>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a> <a class="Identifier" href="pi_netrw.html#g:netrw_maxfilenamelen">g:netrw_maxfilenamelen</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_timefmt">g:netrw_timefmt</a> <a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a><br>
<br>
<span class="Statement">CHANGE FILE PERMISSION </span><a class="Constant" href="pi_netrw.html#netrw-gp" name="netrw-gp">netrw-gp</a> {{ "{{{" }}2<br>
<br>
"gp" will ask you for a new permission for the file named under the cursor.<br>
Currently, this only works for local files.<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_chgperm">g:netrw_chgperm</a><br>
<br>
<br>
<span class="Statement">CHANGING TO A BOOKMARKED DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-gb" name="netrw-gb">netrw-gb</a> {{ "{{{" }}2<br>
<br>
To change directory back to a bookmarked directory, use<br>
<br>
<span class="Special">{cnt}</span>gb<br>
<br>
Any count may be used to reference any of the bookmarks.<br>
<span class="Todo">Note</span> that <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> shows both bookmarks and history; to go<br>
to a location stored in the history see <a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a> and <a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a>.<br>
<br>
Related Topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a> how to delete bookmarks<br>
<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a> how to make a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> how to list bookmarks<br>
<br>
<br>
<span class="Statement">CHANGING TO A PREDECESSOR DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-u" name="netrw-u">netrw-u</a> <a class="Constant" href="pi_netrw.html#netrw-updir" name="netrw-updir">netrw-updir</a> {{ "{{{" }}2<br>
<br>
Every time you change to a new directory (new for the current session),<br>
netrw will save the directory in a recently-visited directory history<br>
list (unless <a class="Identifier" href="pi_netrw.html#g:netrw_dirhistmax">g:netrw_dirhistmax</a> is zero; by default, it's ten). With the<br>
"u" map, one can change to an earlier directory (predecessor). To do<br>
the opposite, see <a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a>.<br>
<br>
The "u" map also accepts counts to go back in the history several slots.<br>
For your convenience, qb (see <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a>) lists the history number which may<br>
be used in that count.<br>
<br>
<a class="Constant" href="pi_netrw.html#.netrwhist" name=".netrwhist">.netrwhist</a><br>
See <a class="Identifier" href="pi_netrw.html#g:netrw_dirhistmax">g:netrw_dirhistmax</a> for how to control the quantity of history stack<br>
slots. The file ".netrwhist" holds history when netrw (and vim) is not<br>
active. By default, it's stored on the first directory on the user's<br>
<a class="Identifier" href="options.html#'runtimepath'">'runtimepath'</a>.<br>
<br>
Related Topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a> changing to a successor directory<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_home">g:netrw_home</a> controls where .netrwhist is kept<br>
<br>
<br>
<span class="Statement">CHANGING TO A SUCCESSOR DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-U" name="netrw-U">netrw-U</a> <a class="Constant" href="pi_netrw.html#netrw-downdir" name="netrw-downdir">netrw-downdir</a> {{ "{{{" }}2<br>
<br>
With the "U" map, one can change to a later directory (successor).<br>
This map is the opposite of the "u" map. (see <a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a>) Use the<br>
qb map to list both the bookmarks and history. (see <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a>)<br>
<br>
The "U" map also accepts counts to go forward in the history several slots.<br>
<br>
See <a class="Identifier" href="pi_netrw.html#g:netrw_dirhistmax">g:netrw_dirhistmax</a> for how to control the quantity of history stack<br>
slots.<br>
<br>
<br>
<span class="Statement">CHANGING TREE TOP </span><a class="Constant" href="pi_netrw.html#netrw-ntree" name="netrw-ntree">netrw-ntree</a> <a class="Constant" href="pi_netrw.html#:Ntree" name=":Ntree">:Ntree</a> <a class="Constant" href="pi_netrw.html#netrw-gn" name="netrw-gn">netrw-gn</a> {{ "{{{" }}2<br>
<br>
One may specify a new tree top for tree listings using<br>
<br>
<div class="helpExample"> :Ntree [dirname]</div>
<br>
Without a "dirname", the current line is used (and any leading depth<br>
information is elided).<br>
With a "dirname", the specified directory name is used.<br>
<br>
The "gn" map will take the word below the cursor and use that for<br>
changing the top of the tree listing.<br>
<br>
<br>
<span class="Statement">NETRW CLEAN </span><a class="Constant" href="pi_netrw.html#netrw-clean" name="netrw-clean">netrw-clean</a> <a class="Constant" href="pi_netrw.html#:NetrwClean" name=":NetrwClean">:NetrwClean</a> {{ "{{{" }}2<br>
<br>
With NetrwClean one may easily remove netrw from one's home directory;<br>
more precisely, from the first directory on your <a class="Identifier" href="options.html#'runtimepath'">'runtimepath'</a>.<br>
<br>
With NetrwClean!, netrw will attempt to remove netrw from all directories on<br>
your <a class="Identifier" href="options.html#'runtimepath'">'runtimepath'</a>. Of course, you have to have write/delete permissions<br>
correct to do this.<br>
<br>
With either form of the command, netrw will first ask for confirmation<br>
that the removal is in fact what you want to do. If netrw doesn't have<br>
permission to remove a file, it will issue an error message.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-gx" name="netrw-gx">netrw-gx</a><br>
<span class="Statement">CUSTOMIZING BROWSING WITH A SPECIAL HANDLER </span><a class="Constant" href="pi_netrw.html#netrw-x" name="netrw-x">netrw-x</a> <a class="Constant" href="pi_netrw.html#netrw-handler" name="netrw-handler">netrw-handler</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw_filehandler">netrw_filehandler</a>)<br>
<br>
Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are<br>
best seen with a special handler (ie. a tool provided with your computer's<br>
operating system). Netrw allows one to invoke such special handlers by:<br>
<br>
<div class="helpExample"> * when Exploring, hit the "x" key<br>
* when editing, hit gx with the cursor atop the special filename</div>
(latter not available if the <a class="Identifier" href="pi_netrw.html#g:netrw_nogx">g:netrw_nogx</a> variable exists)<br>
<br>
Netrw determines which special handler by the following method:<br>
<br>
<span class="Statement"> </span>* if <a class="Identifier" href="pi_netrw.html#g:netrw_browsex_viewer">g:netrw_browsex_viewer</a> exists, then it will be used to attempt to<br>
view files. Examples of useful settings (place into your <.vimrc>):<br>
<br>
<div class="helpExample"> :let g:netrw_browsex_viewer= "kfmclient exec"</div>
or<br>
<div class="helpExample"> :let g:netrw_browsex_viewer= "xdg-open"</div>
<br>
If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be<br>
used instead (see <a class="Identifier" href="pi_netrw.html#netrw_filehandler">netrw_filehandler</a>).<br>
<br>
<span class="Statement"> </span>* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.<br>
<span class="Statement"> </span>* for Gnome (with gnome-open): gnome-open is used.<br>
<span class="Statement"> </span>* for KDE (with kfmclient) : kfmclient is used<br>
<span class="Statement"> </span>* for Mac OS X : open is used.<br>
<span class="Statement"> </span>* otherwise the netrwFileHandler plugin is used.<br>
<br>
The file's suffix is used by these various approaches to determine an<br>
appropriate application to use to "handle" these files. Such things as<br>
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,<br>
*.eps) can be handled.<br>
<br>
The gx mapping extends to all buffers; apply "gx" while atop a word and netrw<br>
will apply a special handler to it (like "x" works when in a netrw buffer).<br>
One may also use visual mode (see <a class="Identifier" href="visual.html#visual-start">visual-start</a>) to select the text that the<br>
special handler will use. Normally gx uses expand("<span class="Special"><cfile></span>") to pick up the<br>
text under the cursor; one may change what <a class="Identifier" href="eval.html#expand()">expand()</a> uses via the<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_gx">g:netrw_gx</a> variable. Alternatively, one may select the text to be used by<br>
gx via first making a visual selection (see <a class="Identifier" href="visual.html#visual-block">visual-block</a>) or by changing<br>
the <a class="Identifier" href="options.html#'isfname'">'isfname'</a> option (which is global, so netrw doesn't modify it).<br>
<br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_gx">g:netrw_gx</a> control how gx picks up the text under the cursor<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_nogx">g:netrw_nogx</a> prevent gx map while editing<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_suppress_gx_mesg">g:netrw_suppress_gx_mesg</a> controls gx's suppression of browser messages<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw_filehandler" name="netrw_filehandler">netrw_filehandler</a><br>
<br>
When <a class="Identifier" href="pi_netrw.html#g:netrw_browsex_viewer">g:netrw_browsex_viewer</a> exists and is "-", then netrw will attempt to<br>
handle the special file with a vim function. The "x" map applies a function<br>
to a file, based on its extension. Of course, the handler function must exist<br>
for it to be called!<br>
<br>
<div class="helpExample"> Ex. mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html")</div>
<br>
Users may write their own netrw File Handler functions to<br>
support more suffixes with special handling. See<br>
<autoload/netrwFileHandlers.vim> for examples on how to make<br>
file handler functions. As an example:<br>
<br>
<div class="helpExample"> " NFH_suffix(filename)<br>
fun! NFH_suffix(filename)<br>
..do something special with filename..<br>
endfun</div>
<br>
These functions need to be defined in some file in your .vim/plugin<br>
(vimfiles\plugin) directory. Vim's function names may not have punctuation<br>
characters (except for the underscore) in them. To support suffices that<br>
contain such characters, netrw will first convert the suffix using the<br>
following table:<br>
<br>
<div class="helpExample"> @ -> AT ! -> EXCLAMATION % -> PERCENT<br>
: -> COLON = -> EQUAL ? -> QUESTION<br>
, -> COMMA - -> MINUS ; -> SEMICOLON<br>
$ -> DOLLAR + -> PLUS ~ -> TILDE</div>
<br>
So, for example:<br>
<br>
<div class="helpExample"> file.rcs,v -> NFH_rcsCOMMAv()</div>
<br>
If more such translations are necessary, please send me email:<br>
<div class="helpExample"> NdrOchip at ScampbellPfamily.AbizM - NOSPAM</div>
with a request.<br>
<br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_browsex_viewer">g:netrw_browsex_viewer</a><br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-curdir" name="netrw-curdir">netrw-curdir</a><br>
<span class="Statement">DELETING BOOKMARKS </span><a class="Constant" href="pi_netrw.html#netrw-mB" name="netrw-mB">netrw-mB</a> {{ "{{{" }}2<br>
<br>
To delete a bookmark, use<br>
<br>
<div class="helpExample"> {cnt}mB</div>
<br>
If there are marked files, then mB will remove them from the<br>
bookmark list.<br>
<br>
Alternatively, one may use :NetrwMB! (see <a class="Identifier" href="pi_netrw.html#netrw-:NetrwMB">netrw-:NetrwMB</a>).<br>
<br>
<div class="helpExample"> :NetrwMB! [files/directories]</div>
<br>
Related Topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-gb">netrw-gb</a> how to return (go) to a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a> how to make a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> how to list bookmarks<br>
<br>
<br>
<span class="Statement">DELETING FILES OR DIRECTORIES </span><a class="Constant" href="pi_netrw.html#netrw-delete" name="netrw-delete">netrw-delete</a> <a class="Constant" href="pi_netrw.html#netrw-D" name="netrw-D">netrw-D</a> <a class="Constant" href="pi_netrw.html#netrw-del" name="netrw-del">netrw-del</a> {{ "{{{" }}2<br>
<br>
If files have not been marked with <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>: (local marked file list)<br>
<br>
Deleting/removing files and directories involves moving the cursor to the<br>
file/directory to be deleted and pressing "D". Directories must be empty<br>
first before they can be successfully removed. If the directory is a<br>
softlink to a directory, then netrw will make two requests to remove the<br>
directory before succeeding. Netrw will ask for confirmation before doing<br>
the removal(s). You may select a range of lines with the "V" command<br>
(visual selection), and then pressing "D".<br>
<br>
If files have been marked with <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>: (local marked file list)<br>
<br>
Marked files (and empty directories) will be deleted; again, you'll be<br>
asked to confirm the deletion before it actually takes place.<br>
<br>
A further approach is to delete files which match a pattern.<br>
<br>
<span class="Statement"> </span>* use :MF pattern (see <a class="Identifier" href="pi_netrw.html#netrw-:MF">netrw-:MF</a>); then press "D".<br>
<br>
<span class="Statement"> </span>* use mr (see <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a>) which will prompt you for pattern.<br>
This will cause the matching files to be marked. Then,<br>
press "D".<br>
<br>
The <a class="Identifier" href="pi_netrw.html#g:netrw_rm_cmd">g:netrw_rm_cmd</a>, <a class="Identifier" href="pi_netrw.html#g:netrw_rmf_cmd">g:netrw_rmf_cmd</a>, and <a class="Identifier" href="pi_netrw.html#g:netrw_rmdir_cmd">g:netrw_rmdir_cmd</a> variables are<br>
used to control the attempts to remove remote files and directories. The<br>
g:netrw_rm_cmd is used with files, and its default value is:<br>
<br>
g:netrw_rm_cmd: ssh HOSTNAME rm<br>
<br>
The g:netrw_rmdir_cmd variable is used to support the removal of directories.<br>
Its default value is:<br>
<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_rmdir_cmd">g:netrw_rmdir_cmd</a>: ssh HOSTNAME rmdir<br>
<br>
If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt<br>
to remove it again using the g:netrw_rmf_cmd variable. Its default value is:<br>
<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_rmf_cmd">g:netrw_rmf_cmd</a>: ssh HOSTNAME rm -f<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-d">netrw-d</a><br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_localrmdir">g:netrw_localrmdir</a> <a class="Identifier" href="pi_netrw.html#g:netrw_rm_cmd">g:netrw_rm_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_rmdir_cmd">g:netrw_rmdir_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a><br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-explore" name="netrw-explore">netrw-explore</a> <a class="Constant" href="pi_netrw.html#netrw-hexplore" name="netrw-hexplore">netrw-hexplore</a> <a class="Constant" href="pi_netrw.html#netrw-nexplore" name="netrw-nexplore">netrw-nexplore</a> <a class="Constant" href="pi_netrw.html#netrw-pexplore" name="netrw-pexplore">netrw-pexplore</a><br>
<a class="Constant" href="pi_netrw.html#netrw-rexplore" name="netrw-rexplore">netrw-rexplore</a> <a class="Constant" href="pi_netrw.html#netrw-sexplore" name="netrw-sexplore">netrw-sexplore</a> <a class="Constant" href="pi_netrw.html#netrw-texplore" name="netrw-texplore">netrw-texplore</a> <a class="Constant" href="pi_netrw.html#netrw-vexplore" name="netrw-vexplore">netrw-vexplore</a> <a class="Constant" href="pi_netrw.html#netrw-lexplore" name="netrw-lexplore">netrw-lexplore</a><br>
DIRECTORY EXPLORATION COMMANDS {{ "{{{" }}2<br>
<br>
:<span class="Special">[N]</span>Explore[!] <span class="Special">[dir]</span>... Explore directory of current file <a class="Constant" href="pi_netrw.html#:Explore" name=":Explore">:Explore</a><br>
:<span class="Special">[N]</span>Hexplore[!] <span class="Special">[dir]</span>... Horizontal Split & Explore <a class="Constant" href="pi_netrw.html#:Hexplore" name=":Hexplore">:Hexplore</a><br>
:<span class="Special">[N]</span>Lexplore[!] <span class="Special">[dir]</span>... Left Explorer Toggle <a class="Constant" href="pi_netrw.html#:Lexplore" name=":Lexplore">:Lexplore</a><br>
:<span class="Special">[N]</span>Sexplore[!] <span class="Special">[dir]</span>... Split&Explore current file's directory <a class="Constant" href="pi_netrw.html#:Sexplore" name=":Sexplore">:Sexplore</a><br>
:<span class="Special">[N]</span>Vexplore[!] <span class="Special">[dir]</span>... Vertical Split & Explore <a class="Constant" href="pi_netrw.html#:Vexplore" name=":Vexplore">:Vexplore</a><br>
:Texplore <span class="Special">[dir]</span>... Tab & Explore <a class="Constant" href="pi_netrw.html#:Texplore" name=":Texplore">:Texplore</a><br>
:Rexplore ... Return to/from Explorer <a class="Constant" href="pi_netrw.html#:Rexplore" name=":Rexplore">:Rexplore</a><br>
<br>
Used with :Explore **/pattern : (also see <a class="Identifier" href="pi_netrw.html#netrw-starstar">netrw-starstar</a>)<br>
:Nexplore............. go to next matching file <a class="Constant" href="pi_netrw.html#:Nexplore" name=":Nexplore">:Nexplore</a><br>
:Pexplore............. go to previous matching file <a class="Constant" href="pi_netrw.html#:Pexplore" name=":Pexplore">:Pexplore</a><br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Explore" name="netrw-:Explore">netrw-:Explore</a><br>
:Explore will open the local-directory browser on the current file's<br>
directory (or on directory <span class="Special">[dir]</span> if specified). The window will be<br>
split only if the file has been modified and <a class="Identifier" href="options.html#'hidden'">'hidden'</a> is not set,<br>
otherwise the browsing window will take over that window. Normally<br>
the splitting is taken horizontally.<br>
Also see: <a class="Identifier" href="pi_netrw.html#netrw-:Rexplore">netrw-:Rexplore</a><br>
:Explore! is like :Explore, but will use vertical splitting.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Hexplore" name="netrw-:Hexplore">netrw-:Hexplore</a><br>
:Hexplore <span class="Special">[dir]</span> does an :Explore with <a class="Identifier" href="windows.html#:belowright">:belowright</a> horizontal splitting.<br>
:Hexplore! <span class="Special">[dir]</span> does an :Explore with <a class="Identifier" href="windows.html#:aboveleft">:aboveleft</a> horizontal splitting.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Lexplore" name="netrw-:Lexplore">netrw-:Lexplore</a><br>
:<span class="Special">[N]</span>Lexplore <span class="Special">[dir]</span> toggles a full height Explorer window on the left hand side<br>
of the current tab. It will open a netrw window on the current<br>
directory if <span class="Special">[dir]</span> is omitted; a :Lexplore <span class="Special">[dir]</span> will show the<br>
specified directory in the left-hand side browser display no matter<br>
from which window the command is issued.<br>
<br>
By default, :Lexplore will change an uninitialized <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a><br>
to 2; edits will thus preferentially be made in window#2.<br>
<br>
The <span class="Special">[N]</span> specifies a <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> just for the new :Lexplore<br>
window.<br>
<br>
Those who like this method often also often like tree style displays;<br>
see <a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a>.<br>
<br>
Also see: <a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a> <a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a> <a class="Identifier" href="pi_netrw.html#g:netrw_wiw">g:netrw_wiw</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a> <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-c-tab">netrw-c-tab</a> <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a><br>
<br>
:<span class="Special">[N]</span>Lexplore! is like :Lexplore, except that the full-height Explorer window<br>
will open on the right hand side and an uninitialized <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a><br>
will be set to 1.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Sexplore" name="netrw-:Sexplore">netrw-:Sexplore</a><br>
:<span class="Special">[N]</span>Sexplore will always split the window before invoking the local-directory<br>
browser. As with Explore, the splitting is normally done<br>
horizontally.<br>
:<span class="Special">[N]</span>Sexplore! <span class="Special">[dir]</span> is like :Sexplore, but the splitting will be done vertically.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Texplore" name="netrw-:Texplore">netrw-:Texplore</a><br>
:Texplore <span class="Special">[dir]</span> does a <a class="Identifier" href="tabpage.html#:tabnew">:tabnew</a> before generating the browser window<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Vexplore" name="netrw-:Vexplore">netrw-:Vexplore</a><br>
:<span class="Special">[N]</span>Vexplore <span class="Special">[dir]</span> does an :Explore with <a class="Identifier" href="windows.html#:leftabove">:leftabove</a> vertical splitting.<br>
:<span class="Special">[N]</span>Vexplore! <span class="Special">[dir]</span> does an :Explore with <a class="Identifier" href="windows.html#:rightbelow">:rightbelow</a> vertical splitting.<br>
<br>
The optional parameters are:<br>
<br>
<span class="Special">[N]</span>: This parameter will override <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> to specify the quantity of<br>
rows and/or columns the new explorer window should have.<br>
Otherwise, the <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> variable, if it has been specified by the<br>
user, is used to control the quantity of rows and/or columns new<br>
explorer windows should have.<br>
<br>
<span class="Special">[dir]</span>: By default, these explorer commands use the current file's directory.<br>
However, one may explicitly provide a directory (path) to use instead;<br>
ie.<br>
<br>
<div class="helpExample"> :Explore /some/path</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-:Rexplore" name="netrw-:Rexplore">netrw-:Rexplore</a><br>
:Rexplore This command is a little different from the other Explore commands<br>
as it doesn't necessarily open an Explorer window.<br>
<br>
<span class="PreProc">Return to Explorer</span><br>
When one edits a file using netrw which can occur, for example,<br>
when pressing <span class="Special"><cr></span> while the cursor is atop a filename in a netrw<br>
browser window, a :Rexplore issued while editing that file will<br>
return the display to that of the last netrw browser display in<br>
that window.<br>
<br>
<span class="PreProc">Return from Explorer</span><br>
Conversely, when one is editing a directory, issuing a :Rexplore<br>
will return to editing the file that was last edited in that<br>
window.<br>
<br>
The <span class="Special"><2-leftmouse></span> map (which is only available under gvim and<br>
cooperative terms) does the same as :Rexplore.<br>
<br>
Also see: <a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> <a class="Identifier" href="pi_netrw.html#g:netrw_altv">g:netrw_altv</a> <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a><br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-star" name="netrw-star">netrw-star</a> <a class="Constant" href="pi_netrw.html#netrw-starpat" name="netrw-starpat">netrw-starpat</a> <a class="Constant" href="pi_netrw.html#netrw-starstar" name="netrw-starstar">netrw-starstar</a> <a class="Constant" href="pi_netrw.html#netrw-starstarpat" name="netrw-starstarpat">netrw-starstarpat</a> <a class="Constant" href="pi_netrw.html#netrw-grep" name="netrw-grep">netrw-grep</a><br>
EXPLORING WITH STARS AND PATTERNS {{ "{{{" }}2<br>
<br>
When Explore, Sexplore, Hexplore, or Vexplore are used with one of the<br>
following four patterns Explore generates a list of files which satisfy the<br>
request for the local file system. These exploration patterns will not work<br>
with remote file browsing.<br>
<br>
<span class="Statement"> </span>*/filepat files in current directory which satisfy filepat<br>
<span class="Statement"> </span>**/filepat files in current directory or below which satisfy the<br>
file pattern<br>
<span class="Statement"> </span>*//pattern files in the current directory which contain the<br>
pattern (vimgrep is used)<br>
<span class="Statement"> </span>**//pattern files in the current directory or below which contain<br>
the pattern (vimgrep is used)<br>
<<br>
The cursor will be placed on the first file in the list. One may then<br>
continue to go to subsequent files on that list via <a class="Identifier" href="pi_netrw.html#:Nexplore">:Nexplore</a> or to<br>
preceding files on that list with <a class="Identifier" href="pi_netrw.html#:Pexplore">:Pexplore</a>. Explore will update the<br>
directory and place the cursor appropriately.<br>
<br>
A plain<br>
<div class="helpExample"> :Explore</div>
will clear the explore list.<br>
<br>
If your console or gui produces recognizable shift-up or shift-down sequences,<br>
then you'll likely find using shift-downarrow and shift-uparrow convenient.<br>
They're mapped by netrw as follows:<br>
<br>
<span class="Special"><s-down></span> == Nexplore, and<br>
<span class="Special"><s-up></span> == Pexplore.<br>
<br>
As an example, consider<br>
<br>
<div class="helpExample"> :Explore */*.c<br>
:Nexplore<br>
:Nexplore<br>
:Pexplore</div>
<br>
The status line will show, on the right hand side of the status line, a<br>
message like "Match 3 of 20".<br>
<br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a> <a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_fastbrowse">g:netrw_fastbrowse</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ftp_browse_reject">g:netrw_ftp_browse_reject</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ftp_list_cmd">g:netrw_ftp_list_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ftp_sizelist_cmd">g:netrw_ftp_sizelist_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ftp_timelist_cmd">g:netrw_ftp_timelist_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a><br>
<br>
<br>
<span class="Statement">DISPLAYING INFORMATION ABOUT FILE </span><a class="Constant" href="pi_netrw.html#netrw-qf" name="netrw-qf">netrw-qf</a> {{ "{{{" }}2<br>
<br>
With the cursor atop a filename, pressing "qf" will reveal the file's size<br>
and last modification timestamp. Currently this capability is only available<br>
for local files.<br>
<br>
<br>
<span class="Statement">EDIT FILE OR DIRECTORY HIDING LIST </span><a class="Constant" href="pi_netrw.html#netrw-ctrl-h" name="netrw-ctrl-h">netrw-ctrl-h</a> <a class="Constant" href="pi_netrw.html#netrw-edithide" name="netrw-edithide">netrw-edithide</a> {{ "{{{" }}2<br>
<br>
The "<span class="Special"><ctrl-h></span>" map brings up a requestor allowing the user to change the<br>
file/directory hiding list contained in <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a>. The hiding list<br>
consists of one or more patterns delimited by commas. Files and/or<br>
directories satisfying these patterns will either be hidden (ie. not shown) or<br>
be the only ones displayed (see <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a>).<br>
<br>
The "gh" mapping (see <a class="Identifier" href="pi_netrw.html#netrw-gh">netrw-gh</a>) quickly alternates between the usual<br>
hiding list and the hiding of files or directories that begin with ".".<br>
<br>
As an example,<br>
<div class="helpExample"> let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'</div>
Effectively, this makes the effect of a <a class="Identifier" href="pi_netrw.html#netrw-gh">netrw-gh</a> command the initial setting.<br>
What it means:<br>
<br>
\(^\|\s\s\) : if the line begins with the following, -or-<br>
two consecutive spaces are encountered<br>
\zs : start the hiding match now<br>
\. : if it now begins with a dot<br>
\S\+ : and is followed by one or more non-whitespace<br>
characters<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_hide">g:netrw_hide</a> <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a><br>
Associated topics: <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a> <a class="Identifier" href="pi_netrw.html#netrw-gh">netrw-gh</a> <a class="Identifier" href="pi_netrw.html#netrw-mh">netrw-mh</a><br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-sort-sequence" name="netrw-sort-sequence">netrw-sort-sequence</a><br>
<span class="Statement">EDITING THE SORTING SEQUENCE </span><a class="Constant" href="pi_netrw.html#netrw-S" name="netrw-S">netrw-S</a> <a class="Constant" href="pi_netrw.html#netrw-sortsequence" name="netrw-sortsequence">netrw-sortsequence</a> {{ "{{{" }}2<br>
<br>
When "Sorted by" is name, one may specify priority via the sorting sequence<br>
(g:netrw_sort_sequence). The sorting sequence typically prioritizes the<br>
name-listing by suffix, although any pattern will do. Patterns are delimited<br>
by commas. The default sorting sequence is (all one line):<br>
<br>
For Unix:<br>
<div class="helpExample"> '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,<br>
\.info$,\.swp$,\.bak$,\~$'</div>
<br>
Otherwise:<br>
<div class="helpExample"> '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,<br>
\.swp$,\.bak$,\~$'</div>
<br>
The lone * is where all filenames not covered by one of the other patterns<br>
will end up. One may change the sorting sequence by modifying the<br>
g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by<br>
using the "S" map.<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-s">netrw-s</a> <a class="Identifier" href="pi_netrw.html#netrw-S">netrw-S</a><br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_sort_sequence">g:netrw_sort_sequence</a> <a class="Identifier" href="pi_netrw.html#g:netrw_sort_options">g:netrw_sort_options</a><br>
<br>
<br>
<span class="Statement">EXECUTING FILE UNDER CURSOR VIA SYSTEM() </span><a class="Constant" href="pi_netrw.html#netrw-X" name="netrw-X">netrw-X</a> {{ "{{{" }}2<br>
<br>
Pressing X while the cursor is atop an executable file will yield a prompt<br>
using the filename asking for any arguments. Upon pressing a <span class="Special">[return]</span>, netrw<br>
will then call <a class="Identifier" href="eval.html#system()">system()</a> with that command and arguments. The result will<br>
be displayed by <a class="Identifier" href="eval.html#:echomsg">:echomsg</a>, and so <a class="Identifier" href="message.html#:messages">:messages</a> will repeat display of the<br>
result. Ansi escape sequences will be stripped out.<br>
<br>
<br>
<span class="Statement">FORCING TREATMENT AS A FILE OR DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-gd" name="netrw-gd">netrw-gd</a> <a class="Constant" href="pi_netrw.html#netrw-gf" name="netrw-gf">netrw-gf</a> {{ "{{{" }}2<br>
<br>
Remote symbolic links (ie. those listed via ssh or ftp) are problematic<br>
in that it is difficult to tell whether they link to a file or to a<br>
directory.<br>
<br>
To force treatment as a file: use<br>
<div class="helpExample"> gf</div>
<br>
To force treatment as a directory: use<br>
<div class="helpExample"> gd</div>
<br>
<br>
<span class="Statement">GOING UP </span><a class="Constant" href="pi_netrw.html#netrw--" name="netrw--">netrw--</a> {{ "{{{" }}2<br>
<br>
To go up a directory, press "-" or press the <span class="Special"><cr></span> when atop the ../ directory<br>
entry in the listing.<br>
<br>
Netrw will use the command in <a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a> to perform the directory<br>
listing operation after changing HOSTNAME to the host specified by the<br>
user-prpvided url. By default netrw provides the command as:<br>
<br>
<div class="helpExample"> ssh HOSTNAME ls -FLa</div>
<br>
where the HOSTNAME becomes the [user@]hostname as requested by the attempt to<br>
read. Naturally, the user may override this command with whatever is<br>
preferred. The NetList function which implements remote browsing<br>
expects that directories will be flagged by a trailing slash.<br>
<br>
<br>
<span class="Statement">HIDING FILES OR DIRECTORIES </span><a class="Constant" href="pi_netrw.html#netrw-a" name="netrw-a">netrw-a</a> <a class="Constant" href="pi_netrw.html#netrw-hiding" name="netrw-hiding">netrw-hiding</a> {{ "{{{" }}2<br>
<br>
Netrw's browsing facility allows one to use the hiding list in one of three<br>
ways: ignore it, hide files which match, and show only those files which<br>
match.<br>
<br>
If no files have been marked via <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>:<br>
<br>
The "a" map allows the user to cycle through the three hiding modes.<br>
<br>
The <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a> variable holds a comma delimited list of patterns<br>
based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a>) To set the hiding list, use the <span class="Special"><c-h></span> map. As an<br>
example, to hide files which begin with a ".", one may use the <span class="Special"><c-h></span> map to<br>
set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'<br>
in one's <.vimrc>). One may then use the "a" key to show all files, hide<br>
matching files, or to show only the matching files.<br>
<br>
Example: \.[ch]$<br>
This hiding list command will hide/show all *.c and *.h files.<br>
<br>
Example: \.c$,\.h$<br>
This hiding list command will also hide/show all *.c and *.h<br>
files.<br>
<br>
Don't forget to use the "a" map to select the mode (normal/hiding/show) you<br>
want!<br>
<br>
If files have been marked using <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>, then this command will:<br>
<br>
if showing all files or non-hidden files:<br>
modify the g:netrw_list_hide list by appending the marked files to it<br>
and showing only non-hidden files.<br>
<br>
else if showing hidden files only:<br>
modify the g:netrw_list_hide list by removing the marked files from it<br>
and showing only non-hidden files.<br>
endif<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-gh" name="netrw-gh">netrw-gh</a> <a class="Constant" href="pi_netrw.html#netrw-hide" name="netrw-hide">netrw-hide</a><br>
As a quick shortcut, one may press<br>
<div class="helpExample"> gh</div>
to toggle between hiding files which begin with a period (dot) and not hiding<br>
them.<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a> <a class="Identifier" href="pi_netrw.html#g:netrw_hide">g:netrw_hide</a><br>
Associated topics: <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a> <a class="Identifier" href="pi_netrw.html#netrw-ctrl-h">netrw-ctrl-h</a> <a class="Identifier" href="pi_netrw.html#netrw-mh">netrw-mh</a><br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-gitignore" name="netrw-gitignore">netrw-gitignore</a><br>
Netrw provides a helper function 'netrw_gitignore#Hide()' that, when used with<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a> automatically hides all git-ignored files.<br>
<br>
'netrw_gitignore#Hide' searches for patterns in the following files:<br>
<br>
<div class="helpExample"> './.gitignore'<br>
'./.git/info/exclude'<br>
global gitignore file: `git config --global core.excludesfile`<br>
system gitignore file: `git config --system core.excludesfile`</div>
<br>
Files that do not exist, are ignored.<br>
Git-ignore patterns are taken from existing files, and converted to patterns for<br>
hiding files. For example, if you had '*.log' in your '.gitignore' file, it<br>
would be converted to '.*\.log'.<br>
<br>
To use this function, simply assign its output to <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a> option. <br>
<br>
<div class="helpExample"> Example: let g:netrw_list_hide= netrw_gitignore#Hide()<br>
Git-ignored files are hidden in Netrw.</div>
<br>
<div class="helpExample"> Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file')<br>
Function can take additional files with git-ignore patterns.</div>
<br>
<div class="helpExample"> Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$'<br>
Combining 'netrw_gitignore#Hide' with custom patterns.</div>
<br>
<br>
<span class="Statement">IMPROVING BROWSING </span><a class="Constant" href="pi_netrw.html#netrw-listhack" name="netrw-listhack">netrw-listhack</a> <a class="Constant" href="pi_netrw.html#netrw-ssh-hack" name="netrw-ssh-hack">netrw-ssh-hack</a> {{ "{{{" }}2<br>
<br>
Especially with the remote directory browser, constantly entering the password<br>
is tedious.<br>
<br>
For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength<br>
tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip<br>
for setting up no-password ssh and scp and discusses associated security<br>
issues. It used to be available at <span class="Constant"><a href="http://hacks.oreilly.com/pub/h/66">http://hacks.oreilly.com/pub/h/66</a></span> ,<br>
but apparently that address is now being redirected to some "hackzine".<br>
I'll attempt a summary based on that article and on a communication from<br>
Ben Schmidt:<br>
<br>
1. Generate a public/private key pair on the local machine<br>
(ssh client):<br>
<div class="helpExample"> ssh-keygen -t rsa<br>
(saving the file in ~/.ssh/id_rsa as prompted)</div>
<br>
2. Just hit the <span class="Special"><CR></span> when asked for passphrase (twice) for no<br>
passphrase. If you do use a passphrase, you will also need to use<br>
ssh-agent so you only have to type the passphrase once per session.<br>
If you don't use a passphrase, simply logging onto your local<br>
computer or getting access to the keyfile in any way will suffice<br>
to access any ssh servers which have that key authorized for login.<br>
<br>
3. This creates two files:<br>
<div class="helpExample"> ~/.ssh/id_rsa<br>
~/.ssh/id_rsa.pub</div>
<br>
4. On the target machine (ssh server):<br>
<div class="helpExample"> cd<br>
mkdir -p .ssh<br>
chmod 0700 .ssh</div>
<br>
5. On your local machine (ssh client): (one line)<br>
<div class="helpExample"> ssh {serverhostname}<br>
cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub</div>
<br>
or, for OpenSSH, (one line)<br>
<div class="helpExample"> ssh {serverhostname}<br>
cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub</div>
<br>
You can test it out with<br>
<div class="helpExample"> ssh {serverhostname}</div>
and you should be log onto the server machine without further need to type<br>
anything.<br>
<br>
If you decided to use a passphrase, do:<br>
<div class="helpExample"> ssh-agent $SHELL<br>
ssh-add<br>
ssh {serverhostname}</div>
You will be prompted for your key passphrase when you use ssh-add, but not<br>
subsequently when you use ssh. For use with vim, you can use<br>
<div class="helpExample"> ssh-agent vim</div>
and, when next within vim, use<br>
<div class="helpExample"> :!ssh-add</div>
Alternatively, you can apply ssh-agent to the terminal you're planning on<br>
running vim in:<br>
<div class="helpExample"> ssh-agent xterm &</div>
and do ssh-add whenever you need.<br>
<br>
For Windows, folks on the vim mailing list have mentioned that Pageant helps<br>
with avoiding the constant need to enter the password.<br>
<br>
Kingston Fung wrote about another way to avoid constantly needing to enter<br>
passwords:<br>
<br>
In order to avoid the need to type in the password for scp each time, you<br>
provide a hack in the docs to set up a non password ssh account. I found a<br>
better way to do that: I can use a regular ssh account which uses a<br>
password to access the material without the need to key-in the password<br>
each time. It's good for security and convenience. I tried ssh public key<br>
authorization + ssh-agent, implementing this, and it works! Here are two<br>
links with instructions:<br>
<br>
<span class="Constant"><a href="http://www.ibm.com/developerworks/library/l-keyc2/">http://www.ibm.com/developerworks/library/l-keyc2/</a></span><br>
<span class="Constant"><a href="http://sial.org/howto/openssh/publickey-auth/">http://sial.org/howto/openssh/publickey-auth/</a></span><br>
<br>
<br>
Ssh hints:<br>
<br>
Thomer Gil has provided a hint on how to speed up netrw+ssh:<br>
<span class="Constant"><a href="http://thomer.com/howtos/netrw_ssh.html">http://thomer.com/howtos/netrw_ssh.html</a></span><br>
<br>
Alex Young has several hints on speeding ssh up:<br>
<span class="Constant"><a href="http://usevim.com/2012/03/16/editing-remote-files/">http://usevim.com/2012/03/16/editing-remote-files/</a></span><br>
<br>
<br>
<span class="Statement">LISTING BOOKMARKS AND HISTORY </span><a class="Constant" href="pi_netrw.html#netrw-qb" name="netrw-qb">netrw-qb</a> <a class="Constant" href="pi_netrw.html#netrw-listbookmark" name="netrw-listbookmark">netrw-listbookmark</a> {{ "{{{" }}2<br>
<br>
Pressing "qb" (query bookmarks) will list both the bookmarked directories and<br>
directory traversal history.<br>
<br>
Related Topics:<br>
<a class="Identifier" href="pi_netrw.html#netrw-gb">netrw-gb</a> how to return (go) to a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a> how to make a bookmark<br>
<a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a> how to delete bookmarks<br>
<a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a> change to a predecessor directory via the history stack<br>
<a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a> change to a successor directory via the history stack<br>
<br>
<span class="Statement">MAKING A NEW DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-d" name="netrw-d">netrw-d</a> {{ "{{{" }}2<br>
<br>
With the "d" map one may make a new directory either remotely (which depends<br>
on the global variable g:netrw_mkdir_cmd) or locally (which depends on the<br>
global variable g:netrw_localmkdir). Netrw will issue a request for the new<br>
directory's name. A bare <span class="Special"><CR></span> at that point will abort the making of the<br>
directory. Attempts to make a local directory that already exists (as either<br>
a file or a directory) will be detected, reported on, and ignored.<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-D">netrw-D</a><br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_localmkdir">g:netrw_localmkdir</a> <a class="Identifier" href="pi_netrw.html#g:netrw_mkdir_cmd">g:netrw_mkdir_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_remote_mkdir">g:netrw_remote_mkdir</a> <a class="Identifier" href="pi_netrw.html#netrw-%">netrw-%</a><br>
<br>
<br>
<span class="Statement">MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY </span><a class="Constant" href="pi_netrw.html#netrw-c" name="netrw-c">netrw-c</a> {{ "{{{" }}2<br>
<br>
By default, <a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a> is 1. This setting means that the current<br>
directory will not track the browsing directory. (done for backwards<br>
compatibility with v6's file explorer).<br>
<br>
Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory<br>
track netrw's browsing directory.<br>
<br>
However, given the default setting for g:netrw_keepdir of 1 where netrw<br>
maintains its own separate notion of the current directory, in order to make<br>
the two directories the same, use the "c" map (just type c). That map will<br>
set Vim's notion of the current directory to netrw's current browsing<br>
directory.<br>
<br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a><br>
<br>
<span class="Statement">MARKING FILES </span><a class="Constant" href="pi_netrw.html#netrw-:MF" name="netrw-:MF">netrw-:MF</a> <a class="Constant" href="pi_netrw.html#netrw-mf" name="netrw-mf">netrw-mf</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a>)<br>
<br>
Netrw provides several ways to mark files:<br>
<br>
* One may mark files with the cursor atop a filename and<br>
then pressing "mf".<br>
<br>
* With gvim, in addition one may mark files with<br>
<span class="Special"><s-leftmouse></span>. (see <a class="Identifier" href="pi_netrw.html#netrw-mouse">netrw-mouse</a>)<br>
<br>
* One may use the :MF command, which takes a list of<br>
files (for local directories, the list may include<br>
wildcards -- see <a class="Identifier" href="eval.html#glob()">glob()</a>)<br>
<br>
<div class="helpExample"> :MF *.c</div>
<br>
(<span class="Todo">Note</span> that :MF uses <a class="Identifier" href="map.html#<f-args>"><f-args></a> to break the line<br>
at spaces)<br>
<br>
* Mark files using the <a class="Identifier" href="editing.html#argument-list">argument-list</a> (<a class="Identifier" href="pi_netrw.html#netrw-mA">netrw-mA</a>)<br>
<br>
* Mark files based upon a <a class="Identifier" href="quickfix.html#location-list">location-list</a> (<a class="Identifier" href="pi_netrw.html#netrw-qL">netrw-qL</a>)<br>
<br>
* Mark files based upon the quickfix list (<a class="Identifier" href="pi_netrw.html#netrw-qF">netrw-qF</a>)<br>
(<a class="Identifier" href="quickfix.html#quickfix-error-lists">quickfix-error-lists</a>)<br>
<br>
The following netrw maps make use of marked files:<br>
<br>
<a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a> Hide marked files/directories<br>
<a class="Identifier" href="pi_netrw.html#netrw-D">netrw-D</a> Delete marked files/directories<br>
<a class="Identifier" href="pi_netrw.html#netrw-ma">netrw-ma</a> Move marked files' names to <a class="Identifier" href="editing.html#arglist">arglist</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-mA">netrw-mA</a> Move <a class="Identifier" href="editing.html#arglist">arglist</a> filenames to marked file list<br>
<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a> Append marked files to bookmarks<br>
<a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a> Delete marked files from bookmarks<br>
<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a> Copy marked files to target<br>
<a class="Identifier" href="pi_netrw.html#netrw-md">netrw-md</a> Apply vimdiff to marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-me">netrw-me</a> Edit marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mF">netrw-mF</a> Unmark marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mg">netrw-mg</a> Apply vimgrep to marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a> Move marked files to target<br>
<a class="Identifier" href="pi_netrw.html#netrw-mp">netrw-mp</a> Print marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a> Set target for <a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a> and <a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-mT">netrw-mT</a> Generate tags using marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mv">netrw-mv</a> Apply vim command to marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mx">netrw-mx</a> Apply shell command to marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-mX">netrw-mX</a> Apply shell command to marked files, en bloc<br>
<a class="Identifier" href="pi_netrw.html#netrw-mz">netrw-mz</a> Compress/Decompress marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-O">netrw-O</a> Obtain marked files<br>
<a class="Identifier" href="pi_netrw.html#netrw-R">netrw-R</a> Rename marked files<br>
<br>
One may unmark files one at a time the same way one marks them; ie. place<br>
the cursor atop a marked file and press "mf". This process also works<br>
with <span class="Special"><s-leftmouse></span> using gvim. One may unmark all files by pressing<br>
"mu" (see <a class="Identifier" href="pi_netrw.html#netrw-mu">netrw-mu</a>).<br>
<br>
Marked files are highlighted using the "netrwMarkFile" highlighting group,<br>
which by default is linked to "Identifier" (see Identifier under<br>
<a class="Identifier" href="syntax.html#group-name">group-name</a>). You may change the highlighting group by putting something<br>
like<br>
<br>
<div class="helpExample"> highlight clear netrwMarkFile<br>
hi link netrwMarkFile ..whatever..</div>
<br>
into $HOME/.vim/after/syntax/netrw.vim .<br>
<br>
If the mouse is enabled and works with your vim, you may use <span class="Special"><s-leftmouse></span> to<br>
mark one or more files. You may mark multiple files by dragging the shifted<br>
leftmouse. (see <a class="Identifier" href="pi_netrw.html#netrw-mouse">netrw-mouse</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#markfilelist" name="markfilelist">markfilelist</a> <a class="Constant" href="pi_netrw.html#global_markfilelist" name="global_markfilelist">global_markfilelist</a> <a class="Constant" href="pi_netrw.html#local_markfilelist" name="local_markfilelist">local_markfilelist</a><br>
All marked files are entered onto the global marked file list; there is only<br>
one such list. In addition, every netrw buffer also has its own buffer-local<br>
marked file list; since netrw buffers are associated with specific<br>
directories, this means that each directory has its own local marked file<br>
list. The various commands which operate on marked files use one or the other<br>
of the marked file lists.<br>
<br>
Known Problem: if one is using tree mode (<a class="Identifier" href="pi_netrw.html#g:netrw_liststyle">g:netrw_liststyle</a>) and several<br>
directories have files with the same name, then marking such a file will<br>
result in all such files being highlighted as if they were all marked. The<br>
<a class="Identifier" href="pi_netrw.html#markfilelist">markfilelist</a>, however, will only have the selected file in it. This problem<br>
is unlikely to be fixed.<br>
<br>
<br>
<span class="Statement">UNMARKING FILES </span><a class="Constant" href="pi_netrw.html#netrw-mF" name="netrw-mF">netrw-mF</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>, <a class="Identifier" href="pi_netrw.html#netrw-mu">netrw-mu</a>)<br>
<br>
The "mF" command will unmark all files in the current buffer. One may also use<br>
mf (<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>) on a specific, already marked, file to unmark just that file.<br>
<br>
<span class="Statement">MARKING FILES BY LOCATION LIST </span><a class="Constant" href="pi_netrw.html#netrw-qL" name="netrw-qL">netrw-qL</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
One may convert <a class="Identifier" href="quickfix.html#location-list">location-list</a>s into a marked file list using "qL".<br>
You may then proceed with commands such as me (<a class="Identifier" href="pi_netrw.html#netrw-me">netrw-me</a>) to edit them.<br>
<br>
<br>
<span class="Statement">MARKING FILES BY QUICKFIX LIST </span><a class="Constant" href="pi_netrw.html#netrw-qF" name="netrw-qF">netrw-qF</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
One may convert <a class="Identifier" href="quickfix.html#quickfix-error-lists">quickfix-error-lists</a> into a marked file list using "qF".<br>
You may then proceed with commands such as me (<a class="Identifier" href="pi_netrw.html#netrw-me">netrw-me</a>) to edit them.<br>
Quickfix error lists are generated, for example, by calls to <a class="Identifier" href="quickfix.html#:vimgrep">:vimgrep</a>.<br>
<br>
<br>
<span class="Statement">MARKING FILES BY REGULAR EXPRESSION </span><a class="Constant" href="pi_netrw.html#netrw-mr" name="netrw-mr">netrw-mr</a> {{ "{{{" }}2<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
One may also mark files by pressing "mr"; netrw will then issue a prompt,<br>
"Enter regexp: ". You may then enter a shell-style regular expression such<br>
as *.c$ (see <a class="Identifier" href="eval.html#glob()">glob()</a>). For remote systems, glob() doesn't work -- so netrw<br>
converts "*" into ".*" (see <a class="Identifier" href="pattern.html#regexp">regexp</a>) and marks files based on that. In the<br>
future I may make it possible to use <a class="Identifier" href="pattern.html#regexp">regexp</a>s instead of glob()-style<br>
expressions (yet-another-option).<br>
<br>
<br>
MARKED FILES, ARBITRARY VIM COMMAND <a class="Constant" href="pi_netrw.html#netrw-mv" name="netrw-mv">netrw-mv</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked-file list)<br>
<br>
The "mv" map causes netrw to execute an arbitrary vim command on each file on<br>
the local marked file list, individually:<br>
<br>
* 1split<br>
* sil! keepalt e file<br>
* run vim command<br>
* sil! keepalt wq!<br>
<br>
A prompt, "Enter vim command: ", will be issued to elicit the vim command<br>
you wish used.<br>
<br>
<br>
MARKED FILES, ARBITRARY SHELL COMMAND <a class="Constant" href="pi_netrw.html#netrw-mx" name="netrw-mx">netrw-mx</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked-file list)<br>
<br>
Upon activation of the "mx" map, netrw will query the user for some (external)<br>
command to be applied to all marked files. All "%"s in the command will be<br>
substituted with the name of each marked file in turn. If no "%"s are in the<br>
command, then the command will be followed by a space and a marked filename.<br>
<br>
Example:<br>
(mark files)<br>
mx<br>
Enter command: cat<br>
<br>
The result is a series of shell commands:<br>
cat 'file1'<br>
cat 'file2'<br>
...<br>
<br>
<br>
MARKED FILES, ARBITRARY SHELL COMMAND, EN BLOC <a class="Constant" href="pi_netrw.html#netrw-mX" name="netrw-mX">netrw-mX</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked-file list)<br>
<br>
Upon activation of the 'mX' map, netrw will query the user for some (external)<br>
command to be applied to all marked files on the global marked file list. The<br>
"en bloc" means that one command will be executed on all the files at once:<br>
<br>
<div class="helpExample"> command files</div>
<br>
This approach is useful, for example, to select files and make a tarball:<br>
<br>
<div class="helpExample"> (mark files)<br>
mX<br>
Enter command: tar cf mynewtarball.tar</div>
<br>
The command that will be run with this example:<br>
<br>
tar cf mynewtarball.tar 'file1' 'file2' ...<br>
<br>
<br>
MARKED FILES: ARGUMENT LIST <a class="Constant" href="pi_netrw.html#netrw-ma" name="netrw-ma">netrw-ma</a> <a class="Constant" href="pi_netrw.html#netrw-mA" name="netrw-mA">netrw-mA</a><br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked-file list)<br>
<br>
Using ma, one moves filenames from the marked file list to the argument list.<br>
Using mA, one moves filenames from the argument list to the marked file list.<br>
<br>
See Also: <a class="Identifier" href="pi_netrw.html#netrw-qF">netrw-qF</a> <a class="Identifier" href="editing.html#argument-list">argument-list</a> <a class="Identifier" href="editing.html#:args">:args</a><br>
<br>
<br>
MARKED FILES: COMPRESSION AND DECOMPRESSION <a class="Constant" href="pi_netrw.html#netrw-mz" name="netrw-mz">netrw-mz</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked file list)<br>
<br>
If any marked files are compressed, then "mz" will decompress them.<br>
If any marked files are decompressed, then "mz" will compress them<br>
using the command specified by <a class="Identifier" href="pi_netrw.html#g:netrw_compress">g:netrw_compress</a>; by default,<br>
that's "gzip".<br>
<br>
For decompression, netrw uses a <a class="Identifier" href="eval.html#Dictionary">Dictionary</a> of suffices and their<br>
associated decompressing utilities; see <a class="Identifier" href="pi_netrw.html#g:netrw_decompress">g:netrw_decompress</a>.<br>
<br>
Remember that one can mark multiple files by regular expression<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a>); this is particularly useful to facilitate compressing and<br>
decompressing a large number of files.<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_compress">g:netrw_compress</a> <a class="Identifier" href="pi_netrw.html#g:netrw_decompress">g:netrw_decompress</a><br>
<br>
MARKED FILES: COPYING <a class="Constant" href="pi_netrw.html#netrw-mc" name="netrw-mc">netrw-mc</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(Uses the global marked file list)<br>
<br>
Select a target directory with mt (<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>). Then change directory,<br>
select file(s) (see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>), and press "mc". The copy is done<br>
from the current window (where one does the mf) to the target.<br>
<br>
If one does not have a target directory set with <a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>, then netrw<br>
will query you for a directory to copy to.<br>
<br>
One may also copy directories and their contents (local only) to a target<br>
directory.<br>
<br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_localcopycmd">g:netrw_localcopycmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_localcopydircmd">g:netrw_localcopydircmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a><br>
<br>
MARKED FILES: DIFF <a class="Constant" href="pi_netrw.html#netrw-md" name="netrw-md">netrw-md</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked file list)<br>
<br>
Use <a class="Identifier" href="diff.html#vimdiff">vimdiff</a> to visualize difference between selected files (two or<br>
three may be selected for this). Uses the global marked file list.<br>
<br>
MARKED FILES: EDITING <a class="Constant" href="pi_netrw.html#netrw-me" name="netrw-me">netrw-me</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked file list)<br>
<br>
The "me" command will place the marked files on the <a class="Identifier" href="editing.html#arglist">arglist</a> and commence<br>
editing them. One may return the to explorer window with <a class="Identifier" href="pi_netrw.html#:Rexplore">:Rexplore</a>.<br>
(use <a class="Identifier" href="editing.html#:n">:n</a> and <a class="Identifier" href="various.html#:p">:p</a> to edit next and previous files in the arglist)<br>
<br>
MARKED FILES: GREP <a class="Constant" href="pi_netrw.html#netrw-mg" name="netrw-mg">netrw-mg</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked file list)<br>
<br>
The "mg" command will apply <a class="Identifier" href="quickfix.html#:vimgrep">:vimgrep</a> to the marked files.<br>
The command will ask for the requested pattern; one may then enter:<br>
<br>
<div class="helpExample"> /pattern/[g][j]<br>
! /pattern/[g][j]<br>
pattern</div>
<br>
With /pattern/, editing will start with the first item on the <a class="Identifier" href="quickfix.html#quickfix">quickfix</a> list<br>
that vimgrep sets up (see <a class="Identifier" href="quickfix.html#:copen">:copen</a>, <a class="Identifier" href="quickfix.html#:cnext">:cnext</a>, <a class="Identifier" href="quickfix.html#:cprevious">:cprevious</a>, <a class="Identifier" href="quickfix.html#:cclose">:cclose</a>). The <a class="Identifier" href="quickfix.html#:vimgrep">:vimgrep</a><br>
command is in use, so without 'g' each line is added to quickfix list only<br>
once; with 'g' every match is included.<br>
<br>
With /pattern/j, "mg" will winnow the current marked file list to just those<br>
marked files also possessing the specified pattern. Thus, one may use<br>
<br>
<div class="helpExample"> mr ...file-pattern...<br>
mg /pattern/j</div>
<br>
to have a marked file list satisfying the file-pattern but also restricted to<br>
files containing some desired pattern.<br>
<br>
<br>
MARKED FILES: HIDING AND UNHIDING BY SUFFIX <a class="Constant" href="pi_netrw.html#netrw-mh" name="netrw-mh">netrw-mh</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked file list)<br>
<br>
The "mh" command extracts the suffices of the marked files and toggles their<br>
presence on the hiding list. Please <span class="Todo">note</span> that marking the same suffix<br>
this way multiple times will result in the suffix's presence being toggled<br>
for each file (so an even quantity of marked files having the same suffix<br>
is the same as not having bothered to select them at all).<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a> <a class="Identifier" href="pi_netrw.html#g:netrw_list_hide">g:netrw_list_hide</a><br>
<br>
MARKED FILES: MOVING <a class="Constant" href="pi_netrw.html#netrw-mm" name="netrw-mm">netrw-mm</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked file list)<br>
<br>
WARNING: moving files is more dangerous than copying them.<br>
A file being moved is first copied and then deleted; if the<br>
copy operation fails and the delete succeeds, you will lose<br>
the file. Either try things out with unimportant files<br>
first or do the copy and then delete yourself using mc and D.<br>
Use at your own risk!<br>
<br>
Select a target directory with mt (<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>). Then change directory,<br>
select file(s) (see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>), and press "mm". The move is done<br>
from the current window (where one does the mf) to the target.<br>
<br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_localmovecmd">g:netrw_localmovecmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a><br>
<br>
MARKED FILES: PRINTING <a class="Constant" href="pi_netrw.html#netrw-mp" name="netrw-mp">netrw-mp</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked file list)<br>
<br>
When "mp" is used, netrw will apply the <a class="Identifier" href="print.html#:hardcopy">:hardcopy</a> command to marked files.<br>
What netrw does is open each file in a one-line window, execute hardcopy, then<br>
close the one-line window.<br>
<br>
<br>
MARKED FILES: SOURCING <a class="Constant" href="pi_netrw.html#netrw-ms" name="netrw-ms">netrw-ms</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the local marked file list)<br>
<br>
With "ms", netrw will source the marked files (using vim's <a class="Identifier" href="repeat.html#:source">:source</a> command)<br>
<br>
<br>
MARKED FILES: SETTING THE TARGET DIRECTORY <a class="Constant" href="pi_netrw.html#netrw-mt" name="netrw-mt">netrw-mt</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
<br>
Set the marked file copy/move-to target (see <a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a> and <a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a>):<br>
<br>
<span class="Statement"> </span>* If the cursor is atop a file name, then the netrw window's currently<br>
displayed directory is used for the copy/move-to target.<br>
<br>
<span class="Statement"> </span>* Also, if the cursor is in the banner, then the netrw window's currently<br>
displayed directory is used for the copy/move-to target.<br>
Unless the target already is the current directory. In which case,<br>
typing "mf" clears the target.<br>
<br>
<span class="Statement"> </span>* However, if the cursor is atop a directory name, then that directory is<br>
used for the copy/move-to target<br>
<br>
<span class="Statement"> </span>* One may use the :MT <span class="Special">[directory]</span> command to set the target <a class="Constant" href="pi_netrw.html#netrw-:MT" name="netrw-:MT">netrw-:MT</a><br>
This command uses <a class="Identifier" href="map.html#<q-args>"><q-args></a>, so spaces in the directory name are<br>
permitted without escaping.<br>
<br>
<span class="Statement"> </span>* With mouse-enabled vim or with gvim, one may select a target by using<br>
<span class="Special"><c-leftmouse></span><br>
<br>
There is only one copy/move-to target at a time in a vim session; ie. the<br>
target is a script variable (see <a class="Identifier" href="eval.html#s:var">s:var</a>) and is shared between all netrw<br>
windows (in an instance of vim).<br>
<br>
When using menus and gvim, netrw provides a "Targets" entry which allows one<br>
to pick a target from the list of bookmarks and history.<br>
<br>
Related topics:<br>
Marking Files......................................<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a><br>
Marking Files by Regular Expression................<a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a><br>
Marked Files: Target Directory Using Bookmarks.....<a class="Identifier" href="pi_netrw.html#netrw-Tb">netrw-Tb</a><br>
Marked Files: Target Directory Using History.......<a class="Identifier" href="pi_netrw.html#netrw-Th">netrw-Th</a><br>
<br>
<br>
MARKED FILES: TAGGING <a class="Constant" href="pi_netrw.html#netrw-mT" name="netrw-mT">netrw-mT</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a> and <a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a> for how to mark files)<br>
(uses the global marked file list)<br>
<br>
The "mT" mapping will apply the command in <a class="Identifier" href="pi_netrw.html#g:netrw_ctags">g:netrw_ctags</a> (by default, it is<br>
"ctags") to marked files. For remote browsing, in order to create a tags file<br>
netrw will use ssh (see <a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a>), and so ssh must be available for<br>
this to work on remote systems. For your local system, see <a class="Identifier" href="tagsrch.html#ctags">ctags</a> on how to<br>
get a version. I myself use hdrtags, currently available at<br>
<span class="Constant"><a href="http://www.drchip.org/astronaut/src/index.html">http://www.drchip.org/astronaut/src/index.html</a></span> , and have<br>
<br>
<div class="helpExample"> let g:netrw_ctags= "hdrtag"</div>
<br>
in my <.vimrc>.<br>
<br>
When a remote set of files are tagged, the resulting tags file is "obtained";<br>
ie. a copy is transferred to the local system's directory. The now local tags<br>
file is then modified so that one may use it through the network. The<br>
modification made concerns the names of the files in the tags; each filename is<br>
preceded by the netrw-compatible url used to obtain it. When one subsequently<br>
uses one of the go to tag actions (<a class="Identifier" href="tagsrch.html#tags">tags</a>), the url will be used by netrw to<br>
edit the desired file and go to the tag.<br>
<br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_ctags">g:netrw_ctags</a> <a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a><br>
<br>
MARKED FILES: TARGET DIRECTORY USING BOOKMARKS <a class="Constant" href="pi_netrw.html#netrw-Tb" name="netrw-Tb">netrw-Tb</a> {{ "{{{" }}2<br>
<br>
Sets the marked file copy/move-to target.<br>
<br>
The <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> map will give you a list of bookmarks (and history).<br>
One may choose one of the bookmarks to become your marked file<br>
target by using <span class="Special">[count]</span>Tb (default count: 1).<br>
<br>
Related topics:<br>
Copying files to target............................<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a><br>
Listing Bookmarks and History......................<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a><br>
Marked Files: Setting The Target Directory.........<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a><br>
Marked Files: Target Directory Using History.......<a class="Identifier" href="pi_netrw.html#netrw-Th">netrw-Th</a><br>
Marking Files......................................<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a><br>
Marking Files by Regular Expression................<a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a><br>
Moving files to target.............................<a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a><br>
<br>
<br>
MARKED FILES: TARGET DIRECTORY USING HISTORY <a class="Constant" href="pi_netrw.html#netrw-Th" name="netrw-Th">netrw-Th</a> {{ "{{{" }}2<br>
<br>
Sets the marked file copy/move-to target.<br>
<br>
The <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> map will give you a list of history (and bookmarks).<br>
One may choose one of the history entries to become your marked file<br>
target by using <span class="Special">[count]</span>Th (default count: 0; ie. the current directory).<br>
<br>
Related topics:<br>
Copying files to target............................<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a><br>
Listing Bookmarks and History......................<a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a><br>
Marked Files: Setting The Target Directory.........<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a><br>
Marked Files: Target Directory Using Bookmarks.....<a class="Identifier" href="pi_netrw.html#netrw-Tb">netrw-Tb</a><br>
Marking Files......................................<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a><br>
Marking Files by Regular Expression................<a class="Identifier" href="pi_netrw.html#netrw-mr">netrw-mr</a><br>
Moving files to target.............................<a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a><br>
<br>
<br>
MARKED FILES: UNMARKING <a class="Constant" href="pi_netrw.html#netrw-mu" name="netrw-mu">netrw-mu</a> {{ "{{{" }}2<br>
(See <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>, <a class="Identifier" href="pi_netrw.html#netrw-mF">netrw-mF</a>)<br>
<br>
The "mu" mapping will unmark all currently marked files. This command differs<br>
from "mF" as the latter only unmarks files in the current directory whereas<br>
"mu" will unmark global and all buffer-local marked files.<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-mF">netrw-mF</a>)<br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-browser-settings" name="netrw-browser-settings">netrw-browser-settings</a><br>
<span class="Statement">NETRW BROWSER VARIABLES </span><a class="Constant" href="pi_netrw.html#netrw-browser-options" name="netrw-browser-options">netrw-browser-options</a> <a class="Constant" href="pi_netrw.html#netrw-browser-var" name="netrw-browser-var">netrw-browser-var</a> {{ "{{{" }}2<br>
<br>
(if you're interested in the netrw file transfer settings, see <a class="Identifier" href="pi_netrw.html#netrw-options">netrw-options</a><br>
and <a class="Identifier" href="pi_netrw.html#netrw-protocol">netrw-protocol</a>)<br>
<br>
The <netrw.vim> browser provides settings in the form of variables which<br>
you may modify; by placing these settings in your <.vimrc>, you may customize<br>
your browsing preferences. (see also: <a class="Identifier" href="pi_netrw.html#netrw-settings">netrw-settings</a>)<br>
<br>
<div class="helpExample"> --- -----------<br>
Var Explanation<br>
--- -----------</div>
<a class="Constant" href="pi_netrw.html#g:netrw_altfile" name="g:netrw_altfile">g:netrw_altfile</a> some like <a class="Identifier" href="editing.html#CTRL-^">CTRL-^</a> to return to the last<br>
edited file. Choose that by setting this<br>
parameter to 1.<br>
Others like <a class="Identifier" href="editing.html#CTRL-^">CTRL-^</a> to return to the<br>
netrw browsing buffer. Choose that by setting<br>
this parameter to 0.<br>
default: =0<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_alto" name="g:netrw_alto">g:netrw_alto</a> change from above splitting to below splitting<br>
by setting this variable (see <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a>)<br>
default: =&sb (see <a class="Identifier" href="options.html#'sb'">'sb'</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_altv" name="g:netrw_altv">g:netrw_altv</a> change from left splitting to right splitting<br>
by setting this variable (see <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a>)<br>
default: =&spr (see <a class="Identifier" href="options.html#'spr'">'spr'</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_banner" name="g:netrw_banner">g:netrw_banner</a> enable/suppress the banner<br>
=0: suppress the banner<br>
=1: banner is enabled (default)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_bannerbackslash" name="g:netrw_bannerbackslash">g:netrw_bannerbackslash</a> if this variable exists and is not zero, the<br>
banner will be displayed with backslashes<br>
rather than forward slashes.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_browse_split" name="g:netrw_browse_split">g:netrw_browse_split</a> when browsing, <span class="Special"><cr></span> will open the file by:<br>
=0: re-using the same window (default)<br>
=1: horizontally splitting the window first<br>
=2: vertically splitting the window first<br>
=3: open file in new tab<br>
=4: act like "P" (ie. open previous window)<br>
<span class="Todo">Note</span> that <a class="Identifier" href="pi_netrw.html#g:netrw_preview">g:netrw_preview</a> may be used<br>
to get vertical splitting instead of<br>
horizontal splitting.<br>
=[servername,tab-number,window-number]<br>
Given a <a class="Identifier" href="eval.html#List">List</a> such as this, a remote server<br>
named by the "servername" will be used for<br>
editing. It will also use the specified tab<br>
and window numbers to perform editing<br>
(see <a class="Identifier" href="remote.html#clientserver">clientserver</a>, <a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a>)<br>
This option does not affect <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a><br>
windows.<br>
<br>
Related topics:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> <a class="Identifier" href="pi_netrw.html#g:netrw_altv">g:netrw_altv</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a> <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a><br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a><br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_browsex_viewer" name="g:netrw_browsex_viewer">g:netrw_browsex_viewer</a> specify user's preference for a viewer:<br>
<div class="helpExample"> "kfmclient exec"<br>
"gnome-open"</div>
If<br>
<div class="helpExample"> "-"</div>
is used, then netrwFileHandler() will look for<br>
a script/function to handle the given<br>
extension. (see <a class="Identifier" href="pi_netrw.html#netrw_filehandler">netrw_filehandler</a>).<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_chgperm" name="g:netrw_chgperm">g:netrw_chgperm</a> Unix/Linux: "chmod PERM FILENAME"<br>
Windows: "cacls FILENAME /e /p PERM"<br>
Used to change access permission for a file.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_compress" name="g:netrw_compress">g:netrw_compress</a> ="gzip"<br>
Will compress marked files with this<br>
command<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:Netrw_corehandler" name="g:Netrw_corehandler">g:Netrw_corehandler</a> Allows one to specify something additional<br>
to do when handling <span class="Special"><core></span> files via netrw's<br>
browser's "x" command (see <a class="Identifier" href="pi_netrw.html#netrw-x">netrw-x</a>). If<br>
present, g:Netrw_corehandler specifies<br>
either one or more function references<br>
(see <a class="Identifier" href="eval.html#Funcref">Funcref</a>). (the capital g:Netrw...<br>
is required its holding a function reference)<br>
<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ctags" name="g:netrw_ctags">g:netrw_ctags</a> ="ctags"<br>
The default external program used to create<br>
tags<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_cursor" name="g:netrw_cursor">g:netrw_cursor</a> = 2 (default)<br>
This option controls the use of the<br>
<a class="Identifier" href="options.html#'cursorline'">'cursorline'</a> (cul) and <a class="Identifier" href="options.html#'cursorcolumn'">'cursorcolumn'</a><br>
(cuc) settings by netrw:<br>
<br>
Value Thin-Long-Tree Wide<br>
=0 u-cul u-cuc u-cul u-cuc<br>
=1 u-cul u-cuc cul u-cuc<br>
=2 cul u-cuc cul u-cuc<br>
=3 cul u-cuc cul cuc<br>
=4 cul cuc cul cuc<br>
<br>
Where<br>
u-cul : user's <a class="Identifier" href="options.html#'cursorline'">'cursorline'</a> setting used<br>
u-cuc : user's <a class="Identifier" href="options.html#'cursorcolumn'">'cursorcolumn'</a> setting used<br>
cul : <a class="Identifier" href="options.html#'cursorline'">'cursorline'</a> locally set<br>
cuc : <a class="Identifier" href="options.html#'cursorcolumn'">'cursorcolumn'</a> locally set<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_decompress" name="g:netrw_decompress">g:netrw_decompress</a> = { ".gz" : "gunzip" ,<br>
".bz2" : "bunzip2" ,<br>
".zip" : "unzip" ,<br>
".tar" : "tar -xf"}<br>
A dictionary mapping suffices to<br>
decompression programs.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_dirhistmax" name="g:netrw_dirhistmax">g:netrw_dirhistmax</a> =10: controls maximum quantity of past<br>
history. May be zero to supppress<br>
history.<br>
(related: <a class="Identifier" href="pi_netrw.html#netrw-qb">netrw-qb</a> <a class="Identifier" href="pi_netrw.html#netrw-u">netrw-u</a> <a class="Identifier" href="pi_netrw.html#netrw-U">netrw-U</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_dynamic_maxfilenamelen" name="g:netrw_dynamic_maxfilenamelen">g:netrw_dynamic_maxfilenamelen</a> =32: enables dynamic determination of<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_maxfilenamelen">g:netrw_maxfilenamelen</a>, which affects<br>
local file long listing.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_errorlvl" name="g:netrw_errorlvl">g:netrw_errorlvl</a> =0: error levels greater than or equal to<br>
this are permitted to be displayed<br>
0: notes<br>
1: warnings<br>
2: errors<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_fastbrowse" name="g:netrw_fastbrowse">g:netrw_fastbrowse</a> =0: slow speed directory browsing;<br>
never re-uses directory listings;<br>
always obtains directory listings.<br>
=1: medium speed directory browsing;<br>
re-use directory listings only<br>
when remote directory browsing.<br>
(default value)<br>
=2: fast directory browsing;<br>
only obtains directory listings when the<br>
directory hasn't been seen before<br>
(or <a class="Identifier" href="pi_netrw.html#netrw-ctrl-l">netrw-ctrl-l</a> is used).<br>
<br>
Fast browsing retains old directory listing<br>
buffers so that they don't need to be<br>
re-acquired. This feature is especially<br>
important for remote browsing. However, if<br>
a file is introduced or deleted into or from<br>
such directories, the old directory buffer<br>
becomes out-of-date. One may always refresh<br>
such a directory listing with <a class="Identifier" href="pi_netrw.html#netrw-ctrl-l">netrw-ctrl-l</a>.<br>
This option gives the user the choice of<br>
trading off accuracy (ie. up-to-date listing)<br>
versus speed.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ffkeep" name="g:netrw_ffkeep">g:netrw_ffkeep</a> (default: doesn't exist)<br>
If this variable exists and is zero, then<br>
netrw will not do a save and restore for<br>
<a class="Identifier" href="options.html#'fileformat'">'fileformat'</a>.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_fname_escape" name="g:netrw_fname_escape">g:netrw_fname_escape</a> =' ?&;%'<br>
Used on filenames before remote reading/writing<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ftp_browse_reject" name="g:netrw_ftp_browse_reject">g:netrw_ftp_browse_reject</a> ftp can produce a number of errors and warnings<br>
that can show up as "directories" and "files"<br>
in the listing. This pattern is used to<br>
remove such embedded messages. By default its<br>
value is:<br>
'^total\s\+\d\+$\|<br>
^Trying\s\+\d\+.*$\|<br>
^KERBEROS_V\d rejected\|<br>
^Security extensions not\|<br>
No such file\|<br>
: connect to address [0-9a-fA-F:]*<br>
: No route to host$'<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ftp_list_cmd" name="g:netrw_ftp_list_cmd">g:netrw_ftp_list_cmd</a> options for passing along to ftp for directory<br>
listing. Defaults:<br>
unix or g:netrw_cygwin set: : "ls -lF"<br>
otherwise "dir"<br>
<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ftp_sizelist_cmd" name="g:netrw_ftp_sizelist_cmd">g:netrw_ftp_sizelist_cmd</a> options for passing along to ftp for directory<br>
listing, sorted by size of file.<br>
Defaults:<br>
unix or g:netrw_cygwin set: : "ls -slF"<br>
otherwise "dir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ftp_timelist_cmd" name="g:netrw_ftp_timelist_cmd">g:netrw_ftp_timelist_cmd</a> options for passing along to ftp for directory<br>
listing, sorted by time of last modification.<br>
Defaults:<br>
unix or g:netrw_cygwin set: : "ls -tlF"<br>
otherwise "dir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_glob_escape" name="g:netrw_glob_escape">g:netrw_glob_escape</a> ='[]*?`{~$' (unix)<br>
='[]*?`{$' (windows<br>
These characters in directory names are<br>
escaped before applying glob()<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_gx" name="g:netrw_gx">g:netrw_gx</a> ="<span class="Special"><cfile></span>"<br>
This option controls how gx (<a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>) picks<br>
up the text under the cursor. See <a class="Identifier" href="eval.html#expand()">expand()</a><br>
for possibilities.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_hide" name="g:netrw_hide">g:netrw_hide</a> Controlled by the "a" map (see <a class="Identifier" href="pi_netrw.html#netrw-a">netrw-a</a>)<br>
=0 : show all<br>
=1 : show not-hidden files<br>
=2 : show hidden files only<br>
default: =0<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_home" name="g:netrw_home">g:netrw_home</a> The home directory for where bookmarks and<br>
history are saved (as .netrwbook and<br>
.netrwhist).<br>
default: the first directory on the<br>
<a class="Identifier" href="options.html#'runtimepath'">'runtimepath'</a><br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_keepdir" name="g:netrw_keepdir">g:netrw_keepdir</a> =1 (default) keep current directory immune from<br>
the browsing directory.<br>
=0 keep the current directory the same as the<br>
browsing directory.<br>
The current browsing directory is contained in<br>
b:netrw_curdir (also see <a class="Identifier" href="pi_netrw.html#netrw-c">netrw-c</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_keepj" name="g:netrw_keepj">g:netrw_keepj</a> ="keepj" (default) netrw attempts to keep the<br>
<a class="Identifier" href="motion.html#:jumps">:jumps</a> table unaffected.<br>
="" netrw will not use <a class="Identifier" href="motion.html#:keepjumps">:keepjumps</a> with<br>
exceptions only for the<br>
saving/restoration of position.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_list_cmd" name="g:netrw_list_cmd">g:netrw_list_cmd</a> command for listing remote directories<br>
default: (if ssh is executable)<br>
"ssh HOSTNAME ls -FLa"<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_list_cmd_options" name="g:netrw_list_cmd_options">g:netrw_list_cmd_options</a> If this variable exists, then its contents are<br>
appended to the g:netrw_list_cmd. For<br>
example, use "2>/dev/null" to get rid of banner<br>
messages on unix systems.<br>
<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_liststyle" name="g:netrw_liststyle">g:netrw_liststyle</a> Set the default listing style:<br>
= 0: thin listing (one file per line)<br>
= 1: long listing (one file per line with time<br>
stamp information and file size)<br>
= 2: wide listing (multiple files in columns)<br>
= 3: tree style listing<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_list_hide" name="g:netrw_list_hide">g:netrw_list_hide</a> comma separated pattern list for hiding files<br>
Patterns are regular expressions (see <a class="Identifier" href="pattern.html#regexp">regexp</a>)<br>
There's some special support for git-ignore<br>
files: you may add the output from the helper<br>
function 'netrw_gitignore#Hide() automatically<br>
hiding all gitignored files.<br>
For more details see <a class="Identifier" href="pi_netrw.html#netrw-gitignore">netrw-gitignore</a>.<br>
<br>
Examples:<br>
let g:netrw_list_hide= '.*\.swp$'<br>
let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$'<br>
default: ""<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_localcopycmd" name="g:netrw_localcopycmd">g:netrw_localcopycmd</a> ="cp" Linux/Unix/MacOS/Cygwin<br>
="copy" Windows<br>
Copies marked files (<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>) to target<br>
directory (<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>, <a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_localcopydircmd" name="g:netrw_localcopydircmd">g:netrw_localcopydircmd</a> ="cp -R" Linux/Unix/MacOS/Cygwin<br>
="xcopy /e /c /h/ /i /k" Windows<br>
Copies directories to target directory.<br>
(<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a>, <a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_localmkdir" name="g:netrw_localmkdir">g:netrw_localmkdir</a> command for making a local directory<br>
default: "mkdir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_localmovecmd" name="g:netrw_localmovecmd">g:netrw_localmovecmd</a> ="mv" Linux/Unix/MacOS/Cygwin<br>
="move" Windows<br>
Moves marked files (<a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>) to target<br>
directory (<a class="Identifier" href="pi_netrw.html#netrw-mt">netrw-mt</a>, <a class="Identifier" href="pi_netrw.html#netrw-mm">netrw-mm</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_localrmdir" name="g:netrw_localrmdir">g:netrw_localrmdir</a> remove directory command (rmdir)<br>
default: "rmdir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_maxfilenamelen" name="g:netrw_maxfilenamelen">g:netrw_maxfilenamelen</a> =32 by default, selected so as to make long<br>
listings fit on 80 column displays.<br>
If your screen is wider, and you have file<br>
or directory names longer than 32 bytes,<br>
you may set this option to keep listings<br>
columnar.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_mkdir_cmd" name="g:netrw_mkdir_cmd">g:netrw_mkdir_cmd</a> command for making a remote directory<br>
via ssh (also see <a class="Identifier" href="pi_netrw.html#g:netrw_remote_mkdir">g:netrw_remote_mkdir</a>)<br>
default: "ssh USEPORT HOSTNAME mkdir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_mousemaps" name="g:netrw_mousemaps">g:netrw_mousemaps</a> =1 (default) enables mouse buttons while<br>
browsing to:<br>
leftmouse : open file/directory<br>
shift-leftmouse : mark file<br>
middlemouse : same as P<br>
rightmouse : remove file/directory<br>
=0: disables mouse maps<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_nobeval" name="g:netrw_nobeval">g:netrw_nobeval</a> doesn't exist (default)<br>
If this variable exists, then balloon<br>
evaluation will be suppressed<br>
(see <a class="Identifier" href="options.html#'ballooneval'">'ballooneval'</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_sizestyle" name="g:netrw_sizestyle">g:netrw_sizestyle</a> not defined: actual bytes (default)<br>
="b" : actual bytes (default)<br>
="h" : human-readable (ex. 5k, 4m, 3g)<br>
uses 1000 base<br>
="H" : human-readable (ex. 5K, 4M, 3G)<br>
uses 1024 base<br>
The long listing (<a class="Identifier" href="pi_netrw.html#netrw-i">netrw-i</a>) and query-file<br>
maps (<a class="Identifier" href="pi_netrw.html#netrw-qf">netrw-qf</a>) will display file size<br>
using the specified style.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_usetab" name="g:netrw_usetab">g:netrw_usetab</a> if this variable exists and is non-zero, then<br>
the <span class="Special"><tab></span> map supporting shrinking/expanding a<br>
Lexplore or netrw window will be enabled.<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-c-tab">netrw-c-tab</a>)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_remote_mkdir" name="g:netrw_remote_mkdir">g:netrw_remote_mkdir</a> command for making a remote directory<br>
via ftp (also see <a class="Identifier" href="pi_netrw.html#g:netrw_mkdir_cmd">g:netrw_mkdir_cmd</a>)<br>
default: "mkdir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_retmap" name="g:netrw_retmap">g:netrw_retmap</a> if it exists and is set to one, then:<br>
* if in a netrw-selected file, AND<br>
* no normal-mode <span class="Special"><2-leftmouse></span> mapping exists,<br>
then the <span class="Special"><2-leftmouse></span> will be mapped for easy<br>
return to the netrw browser window.<br>
example: click once to select and open a file,<br>
double-click to return.<br>
<br>
<span class="Todo">Note</span> that one may instead choose to:<br>
* let g:netrw_retmap= 1, AND<br>
* nmap <span class="Special"><silent></span> YourChoice <span class="Special"><Plug></span>NetrwReturn<br>
and have another mapping instead of<br>
<span class="Special"><2-leftmouse></span> to invoke the return.<br>
<br>
You may also use the <a class="Identifier" href="pi_netrw.html#:Rexplore">:Rexplore</a> command to do<br>
the same thing.<br>
<br>
default: =0<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_rm_cmd" name="g:netrw_rm_cmd">g:netrw_rm_cmd</a> command for removing remote files<br>
default: "ssh USEPORT HOSTNAME rm"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_rmdir_cmd" name="g:netrw_rmdir_cmd">g:netrw_rmdir_cmd</a> command for removing remote directories<br>
default: "ssh USEPORT HOSTNAME rmdir"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_rmf_cmd" name="g:netrw_rmf_cmd">g:netrw_rmf_cmd</a> command for removing remote softlinks<br>
default: "ssh USEPORT HOSTNAME rm -f"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_servername" name="g:netrw_servername">g:netrw_servername</a> use this variable to provide a name for<br>
<a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> to use for its server.<br>
default: "NETRWSERVER"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_sort_by" name="g:netrw_sort_by">g:netrw_sort_by</a> sort by "name", "time", "size", or<br>
"exten".<br>
default: "name"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_sort_direction" name="g:netrw_sort_direction">g:netrw_sort_direction</a> sorting direction: "normal" or "reverse"<br>
default: "normal"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_sort_options" name="g:netrw_sort_options">g:netrw_sort_options</a> sorting is done using <a class="Identifier" href="change.html#:sort">:sort</a>; this<br>
variable's value is appended to the<br>
sort command. Thus one may ignore case,<br>
for example, with the following in your<br>
.vimrc:<br>
<div class="helpExample"> let g:netrw_sort_options="i"</div>
default: ""<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_sort_sequence" name="g:netrw_sort_sequence">g:netrw_sort_sequence</a> when sorting by name, first sort by the<br>
comma-separated pattern sequence. <span class="Todo">Note</span> that<br>
any filigree added to indicate filetypes<br>
should be accounted for in your pattern.<br>
default: '[\/]$,*,\.bak$,\.o$,\.h$,<br>
\.info$,\.swp$,\.obj$'<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_special_syntax" name="g:netrw_special_syntax">g:netrw_special_syntax</a> If true, then certain files will be shown<br>
using special syntax in the browser:<br>
<br>
netrwBak : *.bak<br>
netrwCompress: *.gz *.bz2 *.Z *.zip<br>
netrwData : *.dat<br>
netrwHdr : *.h<br>
netrwLib : *.a *.so *.lib *.dll<br>
netrwMakefile: <span class="Special">[mM]</span>akefile *.mak<br>
netrwObj : *.o *.obj<br>
netrwTags : tags ANmenu ANtags<br>
netrwTilde : *<br>
netrwTmp : tmp* *tmp<br>
<br>
These syntax highlighting groups are linked<br>
to Folded or DiffChange by default<br>
(see <a class="Identifier" href="syntax.html#hl-Folded">hl-Folded</a> and <a class="Identifier" href="syntax.html#hl-DiffChange">hl-DiffChange</a>), but<br>
one may put lines like<br>
<div class="helpExample"> hi link netrwCompress Visual</div>
into one's <.vimrc> to use one's own<br>
preferences. Alternatively, one may<br>
put such specifications into<br>
.vim/after/syntax/netrw.vim.<br>
<br>
As an example, I myself use a dark-background<br>
colorscheme with the following in<br>
.vim/after/syntax/netrw.vim:<br>
<br>
<div class="helpExample"> hi netrwCompress term=NONE cterm=NONE gui=NONE ctermfg=10 guifg=green ctermbg=0 guibg=black<br>
hi netrwData term=NONE cterm=NONE gui=NONE ctermfg=9 guifg=blue ctermbg=0 guibg=black<br>
hi netrwHdr term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1<br>
hi netrwLex term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1<br>
hi netrwYacc term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1<br>
hi netrwLib term=NONE cterm=NONE gui=NONE ctermfg=14 guifg=yellow<br>
hi netrwObj term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red<br>
hi netrwTilde term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red<br>
hi netrwTmp term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red<br>
hi netrwTags term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red<br>
hi netrwDoc term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=yellow2 guibg=Blue3<br>
hi netrwSymLink term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=grey60</div>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ssh_browse_reject" name="g:netrw_ssh_browse_reject">g:netrw_ssh_browse_reject</a> ssh can sometimes produce unwanted lines,<br>
messages, banners, and whatnot that one doesn't<br>
want masquerading as "directories" and "files".<br>
Use this pattern to remove such embedded<br>
messages. By default its value is:<br>
'^total\s\+\d\+$'<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_ssh_cmd" name="g:netrw_ssh_cmd">g:netrw_ssh_cmd</a> One may specify an executable command<br>
to use instead of ssh for remote actions<br>
such as listing, file removal, etc.<br>
default: ssh<br>
<br>
<a class="Constant" href="pi_netrw.html#g:netrw_suppress_gx_mesg" name="g:netrw_suppress_gx_mesg">g:netrw_suppress_gx_mesg</a> =1 : browsers sometimes produce messages<br>
which are normally unwanted intermixed<br>
with the page.<br>
However, when using links, for example,<br>
those messages are what the browser produces.<br>
By setting this option to 0, netrw will not<br>
suppress browser messages.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_tmpfile_escape" name="g:netrw_tmpfile_escape">g:netrw_tmpfile_escape</a> =' &;'<br>
escape() is applied to all temporary files<br>
to escape these characters.<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_timefmt" name="g:netrw_timefmt">g:netrw_timefmt</a> specify format string to vim's strftime().<br>
The default, "%c", is "the preferred date<br>
and time representation for the current<br>
locale" according to my manpage entry for<br>
strftime(); however, not all are satisfied<br>
with it. Some alternatives:<br>
"%a %d %b %Y %T",<br>
" %a %Y-%m-%d %I-%M-%S %p"<br>
default: "%c"<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_use_noswf" name="g:netrw_use_noswf">g:netrw_use_noswf</a> netrw normally avoids writing swapfiles<br>
for browser buffers. However, under some<br>
systems this apparently is causing nasty<br>
ml_get errors to appear; if you're getting<br>
ml_get errors, try putting<br>
let g:netrw_use_noswf= 0<br>
in your .vimrc.<br>
default: 1<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_winsize" name="g:netrw_winsize">g:netrw_winsize</a> specify initial size of new windows made with<br>
"o" (see <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a>), "v" (see <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a>),<br>
<a class="Identifier" href="pi_netrw.html#:Hexplore">:Hexplore</a> or <a class="Identifier" href="pi_netrw.html#:Vexplore">:Vexplore</a>. The g:netrw_winsize<br>
is an integer describing the percentage of the<br>
current netrw buffer's window to be used for<br>
the new window.<br>
If g:netrw_winsize is less than zero, then<br>
the absolute value of g:netrw_winsize lines<br>
or columns will be used for the new window.<br>
If g:netrw_winsize is zero, then a normal<br>
split will be made (ie. <a class="Identifier" href="options.html#'equalalways'">'equalalways'</a> will<br>
take effect, for example).<br>
default: 50 (for 50%)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_wiw" name="g:netrw_wiw">g:netrw_wiw</a> =1 specifies the minimum window width to use<br>
when shrinking a netrw/Lexplore window<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-c-tab">netrw-c-tab</a>).<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:netrw_xstrlen" name="g:netrw_xstrlen">g:netrw_xstrlen</a> Controls how netrw computes string lengths,<br>
including multi-byte characters' string<br>
length. (thanks to <span class="Special">N</span> Weibull, T Mechelynck)<br>
=0: uses Vim's built-in strlen()<br>
=1: number of codepoints (Latin a + combining<br>
circumflex is two codepoints) (DEFAULT)<br>
=2: number of spacing codepoints (Latin a +<br>
combining circumflex is one spacing<br>
codepoint; a hard tab is one; wide and<br>
narrow CJK are one each; etc.)<br>
=3: virtual length (counting tabs as anything<br>
between 1 and <a class="Identifier" href="options.html#'tabstop'">'tabstop'</a>, wide CJK as 2<br>
rather than 1, Arabic alif as zero when<br>
immediately preceded by lam, one<br>
otherwise, etc)<br>
<br>
<span class="Statement"> </span><a class="Constant" href="pi_netrw.html#g:NetrwTopLvlMenu" name="g:NetrwTopLvlMenu">g:NetrwTopLvlMenu</a> This variable specifies the top level<br>
menu name; by default, it's "Netrw.". If<br>
you wish to change this, do so in your<br>
.vimrc.<br>
<br>
<span class="Statement">NETRW BROWSING AND OPTION INCOMPATIBILITIES </span><a class="Constant" href="pi_netrw.html#netrw-incompatible" name="netrw-incompatible">netrw-incompatible</a> {{ "{{{" }}2<br>
<br>
Netrw has been designed to handle user options by saving them, setting the<br>
options to something that's compatible with netrw's needs, and then restoring<br>
them. However, the autochdir option:<br>
<div class="helpExample"> :set acd</div>
is problematic. Autochdir sets the current directory to that containing the<br>
file you edit; this apparently also applies to directories. In other words,<br>
autochdir sets the current directory to that containing the "file" (even if<br>
that "file" is itself a directory).<br>
<br>
<span class="Statement">NETRW SETTINGS WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-settings-window" name="netrw-settings-window">netrw-settings-window</a> {{ "{{{" }}2<br>
<br>
With the NetrwSettings.vim plugin,<br>
<div class="helpExample"> :NetrwSettings</div>
will bring up a window with the many variables that netrw uses for its<br>
settings. You may change any of their values; when you save the file, the<br>
settings therein will be used. One may also press "?" on any of the lines for<br>
help on what each of the variables do.<br>
<br>
(also see: <a class="Identifier" href="pi_netrw.html#netrw-browser-var">netrw-browser-var</a> <a class="Identifier" href="pi_netrw.html#netrw-protocol">netrw-protocol</a> <a class="Identifier" href="pi_netrw.html#netrw-variables">netrw-variables</a>)<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<span class="Statement">OBTAINING A FILE </span><a class="Constant" href="pi_netrw.html#netrw-obtain" name="netrw-obtain">netrw-obtain</a> <a class="Constant" href="pi_netrw.html#netrw-O" name="netrw-O">netrw-O</a> {{ "{{{" }}2<br>
<br>
If there are no marked files:<br>
<br>
When browsing a remote directory, one may obtain a file under the cursor<br>
(ie. get a copy on your local machine, but not edit it) by pressing the O<br>
key.<br>
<br>
If there are marked files:<br>
<br>
The marked files will be obtained (ie. a copy will be transferred to your<br>
local machine, but not set up for editing).<br>
<br>
Only ftp and scp are supported for this operation (but since these two are<br>
available for browsing, that shouldn't be a problem). The status bar will<br>
then show, on its right hand side, a message like "Obtaining filename". The<br>
statusline will be restored after the transfer is complete.<br>
<br>
Netrw can also "obtain" a file using the local browser. Netrw's display<br>
of a directory is not necessarily the same as Vim's "current directory",<br>
unless <a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a> is set to 0 in the user's <.vimrc>. One may select<br>
a file using the local browser (by putting the cursor on it) and pressing<br>
"O" will then "obtain" the file; ie. copy it to Vim's current directory.<br>
<br>
Related topics:<br>
* To see what the current directory is, use <a class="Identifier" href="editing.html#:pwd">:pwd</a><br>
* To make the currently browsed directory the current directory, see <a class="Identifier" href="pi_netrw.html#netrw-c">netrw-c</a><br>
* To automatically make the currently browsed directory the current<br>
directory, see <a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a>.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-newfile" name="netrw-newfile">netrw-newfile</a> <a class="Constant" href="pi_netrw.html#netrw-createfile" name="netrw-createfile">netrw-createfile</a><br>
OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY <a class="Constant" href="pi_netrw.html#netrw-%" name="netrw-%">netrw-%</a> {{ "{{{" }}2<br>
<br>
To open a new file in netrw's current directory, press "%". This map<br>
will query the user for a new filename; an empty file by that name will<br>
be placed in the netrw's current directory (ie. b:netrw_curdir).<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-d">netrw-d</a><br>
<br>
<br>
<span class="Statement">PREVIEW WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-p" name="netrw-p">netrw-p</a> <a class="Constant" href="pi_netrw.html#netrw-preview" name="netrw-preview">netrw-preview</a> {{ "{{{" }}2<br>
<br>
One may use a preview window by using the "p" key when the cursor is atop the<br>
desired filename to be previewed. The display will then split to show both<br>
the browser (where the cursor will remain) and the file (see <a class="Identifier" href="windows.html#:pedit">:pedit</a>). By<br>
default, the split will be taken horizontally; one may use vertical splitting<br>
if one has set <a class="Identifier" href="pi_netrw.html#g:netrw_preview">g:netrw_preview</a> first.<br>
<br>
An interesting set of netrw settings is:<br>
<br>
<div class="helpExample"> let g:netrw_preview = 1<br>
let g:netrw_liststyle = 3<br>
let g:netrw_winsize = 30</div>
<br>
These will:<br>
<br>
1. Make vertical splitting the default for previewing files<br>
2. Make the default listing style "tree"<br>
3. When a vertical preview window is opened, the directory listing<br>
will use only 30% of the columns available; the rest of the window<br>
is used for the preview window.<br>
<br>
Related: if you like this idea, you may also find :Lexplore<br>
(<a class="Identifier" href="pi_netrw.html#netrw-:Lexplore">netrw-:Lexplore</a>) or <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> of interest<br>
<br>
Also see: <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> <a class="Identifier" href="options.html#'previewwindow'">'previewwindow'</a> <a class="Identifier" href="windows.html#CTRL-W_z">CTRL-W_z</a> <a class="Identifier" href="windows.html#:pclose">:pclose</a><br>
<br>
<br>
<span class="Statement">PREVIOUS WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-P" name="netrw-P">netrw-P</a> <a class="Constant" href="pi_netrw.html#netrw-prvwin" name="netrw-prvwin">netrw-prvwin</a> {{ "{{{" }}2<br>
<br>
To edit a file or directory under the cursor in the previously used (last<br>
accessed) window (see :he <a class="Identifier" href="windows.html#CTRL-W_p">CTRL-W_p</a>), press a "P". If there's only one<br>
window, then the one window will be horizontally split (by default).<br>
<br>
If there's more than one window, the previous window will be re-used on<br>
the selected file/directory. If the previous window's associated buffer<br>
has been modified, and there's only one window with that buffer, then<br>
the user will be asked if s/he wishes to save the buffer first (yes,<br>
no, or cancel).<br>
<br>
Related Actions <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a> <a class="Identifier" href="pi_netrw.html#netrw-o">netrw-o</a> <a class="Identifier" href="pi_netrw.html#netrw-t">netrw-t</a> <a class="Identifier" href="pi_netrw.html#netrw-v">netrw-v</a><br>
Associated setting variables:<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_alto">g:netrw_alto</a> control above/below splitting<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_altv">g:netrw_altv</a> control right/left splitting<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_preview">g:netrw_preview</a> control horizontal vs vertical splitting<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a> control initial sizing<br>
<br>
Also see: <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> <a class="Identifier" href="pi_netrw.html#netrw-p">netrw-p</a><br>
<br>
<br>
<span class="Statement">REFRESHING THE LISTING </span><a class="Constant" href="pi_netrw.html#netrw-refresh" name="netrw-refresh">netrw-refresh</a> <a class="Constant" href="pi_netrw.html#netrw-ctrl-l" name="netrw-ctrl-l">netrw-ctrl-l</a> <a class="Constant" href="pi_netrw.html#netrw-ctrl_l" name="netrw-ctrl_l">netrw-ctrl_l</a> {{ "{{{" }}2<br>
<br>
To refresh either a local or remote directory listing, press ctrl-l (<span class="Special"><c-l></span>) or<br>
hit the <span class="Special"><cr></span> when atop the ./ directory entry in the listing. One may also<br>
refresh a local directory by using ":e .".<br>
<br>
<br>
<span class="Statement">REVERSING SORTING ORDER </span><a class="Constant" href="pi_netrw.html#netrw-r" name="netrw-r">netrw-r</a> <a class="Constant" href="pi_netrw.html#netrw-reverse" name="netrw-reverse">netrw-reverse</a> {{ "{{{" }}2<br>
<br>
One may toggle between normal and reverse sorting order by pressing the<br>
"r" key.<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-s">netrw-s</a><br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_sort_direction">g:netrw_sort_direction</a><br>
<br>
<br>
<span class="Statement">RENAMING FILES OR DIRECTORIES </span><a class="Constant" href="pi_netrw.html#netrw-move" name="netrw-move">netrw-move</a> <a class="Constant" href="pi_netrw.html#netrw-rename" name="netrw-rename">netrw-rename</a> <a class="Constant" href="pi_netrw.html#netrw-R" name="netrw-R">netrw-R</a> {{ "{{{" }}2<br>
<br>
If there are no marked files: (see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
Renaming files and directories involves moving the cursor to the<br>
file/directory to be moved (renamed) and pressing "R". You will then be<br>
queried for what you want the file/directory to be renamed to You may select<br>
a range of lines with the "V" command (visual selection), and then<br>
press "R"; you will be queried for each file as to what you want it<br>
renamed to.<br>
<br>
If there are marked files: (see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
<br>
Marked files will be renamed (moved). You will be queried as above in<br>
order to specify where you want the file/directory to be moved.<br>
<br>
If you answer a renaming query with a "s/frompattern/topattern/", then<br>
subsequent files on the marked file list will be renamed by taking each<br>
name, applying that substitute, and renaming each file to the result.<br>
As an example :<br>
<br>
<div class="helpExample"> mr [query: reply with *.c]<br>
R [query: reply with s/^\(.*\)\.c$/\1.cpp/]</div>
<br>
This example will mark all *.c files and then rename them to *.cpp<br>
files.<br>
<br>
The ctrl-X character has special meaning for renaming files:<br>
<br>
<div class="helpExample"> <c-x> : a single ctrl-x tells netrw to ignore the portion of the response<br>
lying between the last '/' and the ctrl-x.</div>
<br>
<div class="helpExample"> <c-x><c-x> : a pair of contiguous ctrl-x's tells netrw to ignore any<br>
portion of the string preceding the double ctrl-x's.</div>
<br>
<span class="PreProc">WARNING:</span><br>
<br>
<span class="Todo">Note</span> that moving files is a dangerous operation; copies are safer. That's<br>
because a "move" for remote files is actually a copy + delete -- and if<br>
the copy fails and the delete does not, you may lose the file.<br>
Use at your own risk.<br>
<br>
The g:netrw_rename_cmd variable is used to implement remote renaming. By<br>
default its value is:<br>
<br>
ssh HOSTNAME mv<br>
<br>
One may rename a block of files and directories by selecting them with<br>
V (<a class="Identifier" href="visual.html#linewise-visual">linewise-visual</a>) when using thin style<br>
<br>
<br>
<span class="Statement">SELECTING SORTING STYLE </span><a class="Constant" href="pi_netrw.html#netrw-s" name="netrw-s">netrw-s</a> <a class="Constant" href="pi_netrw.html#netrw-sort" name="netrw-sort">netrw-sort</a> {{ "{{{" }}2<br>
<br>
One may select the sorting style by name, time, or (file) size. The "s" map<br>
allows one to circulate amongst the three choices; the directory listing will<br>
automatically be refreshed to reflect the selected style.<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-r">netrw-r</a> <a class="Identifier" href="pi_netrw.html#netrw-S">netrw-S</a><br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_sort_by">g:netrw_sort_by</a> <a class="Identifier" href="pi_netrw.html#g:netrw_sort_sequence">g:netrw_sort_sequence</a><br>
<br>
<br>
<span class="Statement">SETTING EDITING WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-editwindow" name="netrw-editwindow">netrw-editwindow</a> <a class="Constant" href="pi_netrw.html#netrw-C" name="netrw-C">netrw-C</a> <a class="Constant" href="pi_netrw.html#netrw-:NetrwC" name="netrw-:NetrwC">netrw-:NetrwC</a> {{ "{{{" }}2<br>
<br>
One may select a netrw window for editing with the "C" mapping, using the<br>
:NetrwC [win#] command, or by setting <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> to the selected window<br>
number. Subsequent selection of a file to edit (<a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a>) will use that<br>
window.<br>
<br>
* C : by itself, will select the current window holding a netrw buffer<br>
for editing via <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a>. The C mapping is only available while in<br>
netrw buffers.<br>
<br>
* <span class="Special">[count]</span>C : the count will be used as the window number to be used<br>
for subsequent editing via <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a>.<br>
<br>
* :NetrwC will set <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> to the current window<br>
<br>
* :NetrwC win# will set <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> to the specified window<br>
number<br>
<br>
Using<br>
<div class="helpExample"> let g:netrw_chgwin= -1</div>
will restore the default editing behavior<br>
(ie. editing will use the current window).<br>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#netrw-cr">netrw-cr</a> <a class="Identifier" href="pi_netrw.html#g:netrw_browse_split">g:netrw_browse_split</a><br>
Associated setting variables: <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a><br>
<br>
<br>
<span class="Statement">SHRINKING OR EXPANDING A NETRW OR LEXPLORE WINDOW </span><a class="Constant" href="pi_netrw.html#netrw-c-tab" name="netrw-c-tab">netrw-c-tab</a> {{ "{{{" }}2<br>
<br>
The <span class="Special"><c-tab></span> key will toggle a netrw or <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> window's width,<br>
but only if <a class="Identifier" href="pi_netrw.html#g:netrw_usetab">g:netrw_usetab</a> exists and is non-zero (and, of course,<br>
only if your terminal supports differentiating <span class="Special"><c-tab></span> from a plain<br>
<span class="Special"><tab></span>).<br>
<br>
<span class="Statement"> </span>* If the current window is a netrw window, toggle its width<br>
(between <a class="Identifier" href="pi_netrw.html#g:netrw_wiw">g:netrw_wiw</a> and its original width)<br>
<br>
<span class="Statement"> </span>* Else if there is a <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> window in the current tab, toggle<br>
its width<br>
<br>
<span class="Statement"> </span>* Else bring up a <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> window<br>
<br>
If <a class="Identifier" href="pi_netrw.html#g:netrw_usetab">g:netrw_usetab</a> exists or is zero, or if there is a pre-existing mapping<br>
for <span class="Special"><c-tab></span>, then the <span class="Special"><c-tab></span> will not be mapped. One may map something other<br>
than a <span class="Special"><c-tab></span>, too: (but you'll still need to have had g:netrw_usetab set)<br>
<br>
<div class="helpExample"> nmap <unique> (whatever) <Plug>NetrwShrink</div>
<br>
Related topics: <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a><br>
Associated setting variable: <a class="Identifier" href="pi_netrw.html#g:netrw_usetab">g:netrw_usetab</a><br>
<br>
<br>
<span class="Statement">USER SPECIFIED MAPS </span><a class="Constant" href="pi_netrw.html#netrw-usermaps" name="netrw-usermaps">netrw-usermaps</a> {{ "{{{" }}1<br>
<br>
One may make customized user maps. Specify a variable, <a class="Identifier" href="pi_netrw.html#g:Netrw_UserMaps">g:Netrw_UserMaps</a>,<br>
to hold a <a class="Identifier" href="eval.html#List">List</a> of lists of keymap strings and function names:<br>
<br>
<div class="helpExample"> [["keymap-sequence","ExampleUserMapFunc"],...]</div>
<br>
When netrw is setting up maps for a netrw buffer, if <a class="Identifier" href="pi_netrw.html#g:Netrw_UserMaps">g:Netrw_UserMaps</a><br>
exists, then the internal function netrw#UserMaps(islocal) is called.<br>
This function goes through all the entries in the <a class="Identifier" href="pi_netrw.html#g:Netrw_UserMaps">g:Netrw_UserMaps</a> list:<br>
<br>
* sets up maps:<br>
<div class="helpExample"> nno <buffer> <silent> KEYMAP-SEQUENCE<br>
:call s:UserMaps(islocal,"ExampleUserMapFunc")</div>
* refreshes if result from that function call is the string<br>
"refresh"<br>
* if the result string is not "", then that string will be<br>
executed (:exe result)<br>
* if the result is a List, then the above two actions on results<br>
will be taken for every string in the result List<br>
<br>
The user function is passed one argument; it resembles<br>
<br>
<div class="helpExample"> fun! ExampleUserMapFunc(islocal)</div>
<br>
where a:islocal is 1 if it's a local-directory system call or 0 when<br>
remote-directory system call.<br>
<br>
Use netrw#Expose("varname") to access netrw-internal (script-local)<br>
variables.<br>
Use netrw#Modify("varname",newvalue) to change netrw-internal variables.<br>
Use netrw#Call("funcname"[,args]) to call a netrw-internal function with<br>
specified arguments.<br>
<br>
Example: Get a copy of netrw's marked file list:<br>
<br>
<div class="helpExample"> let netrwmarkfilelist= netrw#Expose("netrwmarkfilelist")</div>
<br>
Example: Modify the value of netrw's marked file list:<br>
<br>
<div class="helpExample"> call netrw#Modify("netrwmarkfilelist",[])</div>
<br>
Example: Clear netrw's marked file list via a mapping on gu<br>
<div class="helpExample"> " ExampleUserMap: {{ "{{{" }}2<br>
fun! ExampleUserMap(islocal)<br>
call netrw#Modify("netrwmarkfilelist",[])<br>
call netrw#Modify('netrwmarkfilemtch_{bufnr("%")}',"")<br>
let retval= ["refresh"]<br>
return retval<br>
endfun<br>
let g:Netrw_UserMaps= [["gu","ExampleUserMap"]]</div>
<br>
<br>
10. Problems and Fixes <a class="Constant" href="pi_netrw.html#netrw-problems" name="netrw-problems">netrw-problems</a> {{ "{{{" }}1<br>
<br>
(This section is likely to grow as I get feedback)<br>
(also see <a class="Identifier" href="pi_netrw.html#netrw-debug">netrw-debug</a>)<br>
<a class="Constant" href="pi_netrw.html#netrw-p1" name="netrw-p1">netrw-p1</a><br>
P1. I use windows 95, and my ftp dumps four blank lines at the<br>
end of every read.<br>
<br>
See <a class="Identifier" href="pi_netrw.html#netrw-fixup">netrw-fixup</a>, and put the following into your<br>
<.vimrc> file:<br>
<br>
let g:netrw_win95ftp= 1<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p2" name="netrw-p2">netrw-p2</a><br>
P2. I use Windows, and my network browsing with ftp doesn't sort by<br>
time or size! -or- The remote system is a Windows server; why<br>
don't I get sorts by time or size?<br>
<br>
Windows' ftp has a minimal support for ls (ie. it doesn't<br>
accept sorting options). It doesn't support the -F which<br>
gives an explanatory character (ABC/ for "ABC is a directory").<br>
Netrw then uses "dir" to get both its thin and long listings.<br>
If you think your ftp does support a full-up ls, put the<br>
following into your <.vimrc>:<br>
<br>
<div class="helpExample"> let g:netrw_ftp_list_cmd = "ls -lF"<br>
let g:netrw_ftp_timelist_cmd= "ls -tlF"<br>
let g:netrw_ftp_sizelist_cmd= "ls -slF"</div>
<br>
Alternatively, if you have cygwin on your Windows box, put<br>
into your <.vimrc>:<br>
<br>
<div class="helpExample"> let g:netrw_cygwin= 1</div>
<br>
This problem also occurs when the remote system is Windows.<br>
In this situation, the various g:netrw_ftp_[time|size]list_cmds<br>
are as shown above, but the remote system will not correctly<br>
modify its listing behavior.<br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p3" name="netrw-p3">netrw-p3</a><br>
P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw<br>
used ssh! That wasn't what I asked for...<br>
<br>
Netrw has two methods for browsing remote directories: ssh<br>
and ftp. Unless you specify ftp specifically, ssh is used.<br>
When it comes time to do download a file (not just a directory<br>
listing), netrw will use the given protocol to do so.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p4" name="netrw-p4">netrw-p4</a><br>
P4. I would like long listings to be the default.<br>
<br>
Put the following statement into your <a class="Identifier" href="starting.html#.vimrc">.vimrc</a>:<br>
<br>
<div class="helpExample"> let g:netrw_liststyle= 1</div>
<br>
Check out <a class="Identifier" href="pi_netrw.html#netrw-browser-var">netrw-browser-var</a> for more customizations that<br>
you can set.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p5" name="netrw-p5">netrw-p5</a><br>
P5. My times come up oddly in local browsing<br>
<br>
Does your system's strftime() accept the "%c" to yield dates<br>
such as "Sun Apr 27 11:49:23 1997"? If not, do a<br>
"man strftime" and find out what option should be used. Then<br>
put it into your <a class="Identifier" href="starting.html#.vimrc">.vimrc</a>:<br>
<br>
<div class="helpExample"> let g:netrw_timefmt= "%X" (where X is the option)</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p6" name="netrw-p6">netrw-p6</a><br>
P6. I want my current directory to track my browsing.<br>
How do I do that?<br>
<br>
Put the following line in your <a class="Identifier" href="starting.html#.vimrc">.vimrc</a>:<br>
<br>
<div class="helpExample"> let g:netrw_keepdir= 0</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p7" name="netrw-p7">netrw-p7</a><br>
P7. I use Chinese (or other non-ascii) characters in my filenames, and<br>
netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!<br>
<br>
(taken from an answer provided by Wu Yongwei on the vim<br>
mailing list)<br>
I now see the problem. Your code page is not 936, right? Vim<br>
seems only able to open files with names that are valid in the<br>
current code page, as are many other applications that do not<br>
use the Unicode version of Windows APIs. This is an OS-related<br>
issue. You should not have such problems when the system<br>
locale uses UTF-8, such as modern Linux distros.<br>
<br>
(...it is one more reason to recommend that people use utf-8!)<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p8" name="netrw-p8">netrw-p8</a><br>
P8. I'm getting "ssh is not executable on your system" -- what do I<br>
do?<br>
<br>
(Dudley Fox) Most people I know use putty for windows ssh. It<br>
is a free ssh/telnet application. You can read more about it<br>
here:<br>
<br>
<span class="Constant"><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty/</a></span> Also:<br>
<br>
(Marlin Unruh) This program also works for me. It's a single<br>
executable, so he/she can copy it into the Windows\System32<br>
folder and create a shortcut to it.<br>
<br>
(Dudley Fox) You might also wish to consider plink, as it<br>
sounds most similar to what you are looking for. plink is an<br>
application in the putty suite.<br>
<br>
<span class="Constant"><a href="http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink">http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink</a></span><br>
<br>
(Vissale Neang) Maybe you can try OpenSSH for windows, which<br>
can be obtained from:<br>
<br>
<span class="Constant"><a href="http://sshwindows.sourceforge.net/">http://sshwindows.sourceforge.net/</a></span><br>
<br>
It doesn't need the full Cygwin package.<br>
<br>
(Antoine Mechelynck) For individual Unix-like programs needed<br>
for work in a native-Windows environment, I recommend getting<br>
them from the GnuWin32 project on sourceforge if it has them:<br>
<br>
<span class="Constant"><a href="http://gnuwin32.sourceforge.net/">http://gnuwin32.sourceforge.net/</a></span><br>
<br>
Unlike Cygwin, which sets up a Unix-like virtual machine on<br>
top of Windows, GnuWin32 is a rewrite of Unix utilities with<br>
Windows system calls, and its programs works quite well in the<br>
cmd.exe "Dos box".<br>
<br>
(dave) Download WinSCP and use that to connect to the server.<br>
In Preferences > Editors, set gvim as your editor:<br>
<br>
- Click "Add..."<br>
- Set External Editor (adjust path as needed, include<br>
the quotes and !.! at the end):<br>
"c:\Program Files\Vim\vim70\gvim.exe" !.!<br>
- Check that the filetype in the box below is<br>
<span class="Special">{asterisk}</span>.<span class="Special">{asterisk}</span> (all files), or whatever types<br>
you want (cec: change <span class="Special">{asterisk}</span> to * ; I had to<br>
write it that way because otherwise the helptags<br>
system thinks it's a tag)<br>
- Make sure it's at the top of the listbox (click it,<br>
then click "Up" if it's not)<br>
If using the Norton Commander style, you just have to hit <span class="Special"><F4></span><br>
to edit a file in a local copy of gvim.<br>
<br>
(Vit Gottwald) How to generate public/private key and save<br>
public key it on server:<br>
<div class="helpExample"> <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready">http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready</a><br>
(8.3 Getting ready for public key authentication)</div>
<br>
How to use a private key with <span class="MissingTag">'pscp'</span>:<br>
<br>
<div class="helpExample"> <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html</a><br>
(5.2.4 Using public key authentication with PSCP)</div>
<br>
(Ben Schmidt) I find the ssh included with cwRsync is<br>
brilliant, and install cwRsync or cwRsyncServer on most<br>
Windows systems I come across these days. I guess COPSSH,<br>
packed by the same person, is probably even better for use as<br>
just ssh on Windows, and probably includes sftp, etc. which I<br>
suspect the cwRsync doesn't, though it might<br>
<br>
(cec) To make proper use of these suggestions above, you will<br>
need to modify the following user-settable variables in your<br>
.vimrc:<br>
<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_list_cmd">g:netrw_list_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_mkdir_cmd">g:netrw_mkdir_cmd</a><br>
<a class="Identifier" href="pi_netrw.html#g:netrw_rm_cmd">g:netrw_rm_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_rmdir_cmd">g:netrw_rmdir_cmd</a> <a class="Identifier" href="pi_netrw.html#g:netrw_rmf_cmd">g:netrw_rmf_cmd</a><br>
<br>
The first one (<a class="Identifier" href="pi_netrw.html#g:netrw_ssh_cmd">g:netrw_ssh_cmd</a>) is the most important; most<br>
of the others will use the string in g:netrw_ssh_cmd by<br>
default.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p9" name="netrw-p9">netrw-p9</a> <a class="Constant" href="pi_netrw.html#netrw-ml_get" name="netrw-ml_get">netrw-ml_get</a><br>
P9. I'm browsing, changing directory, and bang! ml_get errors<br>
appear and I have to kill vim. Any way around this?<br>
<br>
Normally netrw attempts to avoid writing swapfiles for<br>
its temporary directory buffers. However, on some systems<br>
this attempt appears to be causing ml_get errors to<br>
appear. Please try setting <a class="Identifier" href="pi_netrw.html#g:netrw_use_noswf">g:netrw_use_noswf</a> to 0<br>
in your <.vimrc>:<br>
<div class="helpExample"> let g:netrw_use_noswf= 0</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p10" name="netrw-p10">netrw-p10</a><br>
P10. I'm being pestered with "[something] is a directory" and<br>
"Press ENTER or type command to continue" prompts...<br>
<br>
The "[something] is a directory" prompt is issued by Vim,<br>
not by netrw, and there appears to be no way to work around<br>
it. Coupled with the default cmdheight of 1, this message<br>
causes the "Press ENTER..." prompt. So: read <a class="Identifier" href="message.html#hit-enter">hit-enter</a>;<br>
I also suggest that you set your <a class="Identifier" href="options.html#'cmdheight'">'cmdheight'</a> to 2 (or more) in<br>
your <.vimrc> file.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p11" name="netrw-p11">netrw-p11</a><br>
P11. I want to have two windows; a thin one on the left and my editing<br>
window on the right. How may I accomplish this?<br>
<br>
You probably want netrw running as in a side window. If so, you<br>
will likely find that ":<span class="Special">[N]</span>Lexplore" does what you want. The<br>
optional "<span class="Special">[N]</span>" allows you to select the quantity of columns you<br>
wish the <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a>r window to start with (see <a class="Identifier" href="pi_netrw.html#g:netrw_winsize">g:netrw_winsize</a><br>
for how this parameter works).<br>
<br>
Previous solution:<br>
<br>
* Put the following line in your <.vimrc>:<br>
let g:netrw_altv = 1<br>
* Edit the current directory: :e .<br>
* Select some file, press v<br>
* Resize the windows as you wish (see <a class="Identifier" href="windows.html#CTRL-W_<">CTRL-W_<</a> and<br>
<a class="Identifier" href="windows.html#CTRL-W_>">CTRL-W_></a>). If you're using gvim, you can drag<br>
the separating bar with your mouse.<br>
* When you want a new file, use ctrl-w h to go back to the<br>
netrw browser, select a file, then press P (see <a class="Identifier" href="windows.html#CTRL-W_h">CTRL-W_h</a><br>
and <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a>). If you're using gvim, you can press<br>
<span class="Special"><leftmouse></span> in the browser window and then press the<br>
<span class="Special"><middlemouse></span> to select the file.<br>
<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p12" name="netrw-p12">netrw-p12</a><br>
P12. My directory isn't sorting correctly, or unwanted letters are<br>
appearing in the listed filenames, or things aren't lining<br>
up properly in the wide listing, ...<br>
<br>
This may be due to an encoding problem. I myself usually use<br>
utf-8, but really only use ascii (ie. bytes from 32-126).<br>
Multibyte encodings use two (or more) bytes per character.<br>
You may need to change <a class="Identifier" href="pi_netrw.html#g:netrw_sepchr">g:netrw_sepchr</a> and/or <a class="Identifier" href="pi_netrw.html#g:netrw_xstrlen">g:netrw_xstrlen</a>.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p13" name="netrw-p13">netrw-p13</a><br>
P13. I'm a Windows + putty + ssh user, and when I attempt to browse,<br>
the directories are missing trailing "/"s so netrw treats them<br>
as file transfers instead of as attempts to browse<br>
subdirectories. How may I fix this?<br>
<br>
(mikeyao) If you want to use vim via ssh and putty under Windows,<br>
try combining the use of pscp/psftp with plink. pscp/psftp will<br>
be used to connect and plink will be used to execute commands on<br>
the server, for example: list files and directory using <a class="Type" href="options.html#'ls'">'ls'</a>.<br>
<br>
These are the settings I use to do this:<br>
<br>
<div class="helpExample"> " list files, it's the key setting, if you haven't set,<br>
" you will get a blank buffer<br>
let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"<br>
" if you haven't add putty directory in system path, you should<br>
" specify scp/sftp command. For examples:<br>
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"<br>
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p14" name="netrw-p14">netrw-p14</a><br>
P14. I would like to speed up writes using Nwrite and scp/ssh<br>
style connections. How? (Thomer M. Gil)<br>
<br>
Try using ssh's ControlMaster and ControlPath (see the ssh_config<br>
man page) to share multiple ssh connections over a single network<br>
connection. That cuts out the cryptographic handshake on each<br>
file write, sometimes speeding it up by an order of magnitude.<br>
(see <span class="Constant"><a href="http://thomer.com/howtos/netrw_ssh.html">http://thomer.com/howtos/netrw_ssh.html</a></span>)<br>
(included by permission)<br>
<br>
Add the following to your ~/.ssh/config:<br>
<br>
<div class="helpExample"> # you change "*" to the hostname you care about<br>
Host *<br>
ControlMaster auto<br>
ControlPath /tmp/%r@%h:%p</div>
<br>
Then create an ssh connection to the host and leave it running:<br>
<br>
<div class="helpExample"> ssh -N host.domain.com</div>
<br>
Now remotely open a file with Vim's Netrw and enjoy the<br>
zippiness:<br>
<br>
<div class="helpExample"> vim scp://host.domain.com//home/user/.bashrc</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p15" name="netrw-p15">netrw-p15</a><br>
P15. How may I use a double-click instead of netrw's usual single click<br>
to open a file or directory? (Ben Fritz)<br>
<br>
First, disable netrw's mapping with<br>
<div class="helpExample"> let g:netrw_mousemaps= 0</div>
and then create a netrw buffer only mapping in<br>
$HOME/.vim/after/ftplugin/netrw.vim:<br>
<div class="helpExample"> nmap <buffer> <2-leftmouse> <CR></div>
<span class="Todo">Note</span> that setting g:netrw_mousemaps to zero will turn off<br>
all netrw's mouse mappings, not just the <span class="Special"><leftmouse></span> one.<br>
(see <a class="Identifier" href="pi_netrw.html#g:netrw_mousemaps">g:netrw_mousemaps</a>)<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p16" name="netrw-p16">netrw-p16</a><br>
P16. When editing remote files (ex. :e <span class="Constant">ftp://hostname/path/file</span>),<br>
under Windows I get an <a class="Identifier" href="message.html#E303">E303</a> message complaining that it's unable<br>
to open a swap file.<br>
<br>
(romainl) It looks like you are starting Vim from a protected<br>
directory. Start netrw from your $HOME or other writable<br>
directory.<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-p17" name="netrw-p17">netrw-p17</a><br>
P17. Netrw is closing buffers on its own.<br>
What steps will reproduce the problem?<br>
1. :Explore, navigate directories, open a file<br>
2. :Explore, open another file<br>
3. Buffer opened in step 1 will be closed. o<br>
What is the expected output? What do you see instead?<br>
I expect both buffers to exist, but only the last one does.<br>
<br>
(Lance) Problem is caused by "set autochdir" in .vimrc.<br>
(drchip) I am able to duplicate this problem with <a class="Identifier" href="options.html#'acd'">'acd'</a> set.<br>
It appears that the buffers are not exactly closed;<br>
a ":ls!" will show them (although ":ls" does not).<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-P18" name="netrw-P18">netrw-P18</a><br>
P18. How to locally edit a file that's only available via<br>
another server accessible via ssh?<br>
See <span class="Constant"><a href="http://stackoverflow.com/questions/12469645/">http://stackoverflow.com/questions/12469645/</a></span><br>
"Using Vim to Remotely Edit A File on ServerB Only<br>
Accessible From ServerA"<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-P19" name="netrw-P19">netrw-P19</a><br>
P19. How do I get numbering on in directory listings?<br>
With <a class="Identifier" href="pi_netrw.html#g:netrw_bufsettings">g:netrw_bufsettings</a>, you can control netrw's buffer<br>
settings; try putting<br>
<div class="helpExample"> let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu"</div>
in your .vimrc. If you'd like to have relative numbering<br>
instead, try<br>
<div class="helpExample"> let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu"</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-P20" name="netrw-P20">netrw-P20</a><br>
P20. How may I have gvim start up showing a directory listing?<br>
Try putting the following code snippet into your .vimrc:<br>
<div class="helpExample"> augroup VimStartup<br>
au!<br>
au VimEnter * if expand("%") == "" && argc() == 0 &&<br>
\ (v:servername =~ 'GVIM\d*' || v:servername == "")<br>
\ | e . | endif<br>
augroup END</div>
You may use Lexplore instead of "e" if you're so inclined.<br>
This snippet assumes that you have client-server enabled<br>
(ie. a "huge" vim version).<br>
<br>
<a class="Constant" href="pi_netrw.html#netrw-P21" name="netrw-P21">netrw-P21</a><br>
P21. I've made a directory (or file) with an accented character, but<br>
netrw isn't letting me enter that directory/read that file:<br>
<br>
It's likely that the shell or o/s is using a different encoding<br>
than you have vim (netrw) using. A patch to vim supporting<br>
"systemencoding" may address this issue in the future; for<br>
now, just have netrw use the proper encoding. For example:<br>
<br>
<div class="helpExample"> au FileType netrw set enc=latin1</div>
<br>
<a class="Constant" href="pi_netrw.html#netrw-P22" name="netrw-P22">netrw-P22</a><br>
P22. I get an error message when I try to copy or move a file:<br>
<br>
**error** (netrw) tried using g:netrw_localcopycmd<span class="Special"><cp></span>; it doesn't work!<br>
<br>
What's wrong?<br>
<br>
Netrw uses several system level commands to do things (see<br>
<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_localcopycmd">g:netrw_localcopycmd</a>, <a class="Identifier" href="pi_netrw.html#g:netrw_localmovecmd">g:netrw_localmovecmd</a>,<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_localrmdir">g:netrw_localrmdir</a>, <a class="Identifier" href="pi_netrw.html#g:netrw_mkdir_cmd">g:netrw_mkdir_cmd</a>).<br>
<br>
You may need to adjust the default commands for one or more of<br>
these commands by setting them properly in your .vimrc. Another<br>
source of difficulty is that these commands use vim's local<br>
directory, which may not be the same as the browsing directory<br>
shown by netrw (see <a class="Identifier" href="pi_netrw.html#g:netrw_keepdir">g:netrw_keepdir</a>).<br>
<br>
<br>
<span class="PreProc">==============================================================================</span><br>
11. Debugging Netrw Itself <a class="Constant" href="pi_netrw.html#netrw-debug" name="netrw-debug">netrw-debug</a> {{ "{{{" }}1<br>
<br>
Step 1: check that the problem you've encountered hasn't already been resolved<br>
by obtaining a copy of the latest (often developmental) netrw at:<br>
<br>
<span class="Constant"><a href="http://www.drchip.org/astronaut/vim/index.html#NETRW">http://www.drchip.org/astronaut/vim/index.html#NETRW</a></span><br>
<br>
The <netrw.vim> script is typically installed on systems as something like:<br>
<br>
<div class="helpExample"> /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim<br>
/usr/local/share/vim/vim7x/autoload/netrw.vim<br>
(see output of :echo &rtp)</div>
<br>
which is loaded automatically at startup (assuming :set nocp). If you<br>
installed a new netrw, then it will be located at<br>
<br>
<div class="helpExample"> $HOME/.vim/plugin/netrwPlugin.vim<br>
$HOME/.vim/autoload/netrw.vim</div>
<br>
Step 2: assuming that you've installed the latest version of netrw,<br>
check that your problem is really due to netrw. Create a file<br>
called netrw.vimrc with the following contents:<br>
<br>
<div class="helpExample"> set nocp<br>
so $HOME/.vim/plugin/netrwPlugin.vim</div>
<br>
Then run netrw as follows:<br>
<br>
<div class="helpExample"> vim -u netrw.vimrc --noplugins -i NONE [some path here]</div>
<br>
Perform whatever netrw commands you need to, and check that the problem is<br>
still present. This procedure sidesteps any issues due to personal .vimrc<br>
settings, .viminfo file, and other plugins. If the problem does not appear,<br>
then you need to determine which setting in your .vimrc is causing the<br>
conflict with netrw or which plugin(s) is/are involved.<br>
<br>
Step 3: If the problem still is present, then get a debugging trace from<br>
netrw:<br>
<br>
1. Get the <Decho.vim> script, available as:<br>
<br>
<span class="Constant"><a href="http://www.drchip.org/astronaut/vim/index.html#DECHO">http://www.drchip.org/astronaut/vim/index.html#DECHO</a></span><br>
or<br>
<span class="Constant"><a href="http://vim.sourceforge.net/scripts/script.php?script_id=120">http://vim.sourceforge.net/scripts/script.php?script_id=120</a></span><br>
<br>
Decho.vim is provided as a "vimball"; see <a class="Identifier" href="pi_vimball.html#vimball-intro">vimball-intro</a>.<br>
<br>
2. Edit the <netrw.vim> file by typing:<br>
<br>
<div class="helpExample"> vim netrw.vim<br>
:DechoOn<br>
:wq</div>
<br>
To restore to normal non-debugging behavior, re-edit <netrw.vim><br>
and type<br>
<br>
<div class="helpExample"> vim netrw.vim<br>
:DechoOff<br>
:wq</div>
<br>
This command, provided by <Decho.vim>, will comment out all<br>
Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).<br>
<br>
3. Then bring up vim and attempt to evoke the problem by doing a<br>
transfer or doing some browsing. A set of messages should appear<br>
concerning the steps that <netrw.vim> took in attempting to<br>
read/write your file over the network in a separate tab or<br>
server vim window.<br>
<br>
To save the file, use<br>
<br>
<div class="helpExample"> :tabnext<br>
:set bt=<br>
:w! DBG</div>
<br>
Furthermore, it'd be helpful if you would type<br>
<div class="helpExample"> :Dsep <command></div>
where <span class="Special"><command></span> is the command you're about to type next,<br>
thereby making it easier to associate which part of the<br>
debugging trace is due to which command.<br>
<br>
Please send that information to <netrw.vim>'s maintainer along<br>
with the o/s you're using and the vim version that you're using<br>
(see <a class="Identifier" href="various.html#:version">:version</a>)<br>
<div class="helpExample"> NdrOchip at ScampbellPfamily.AbizM - NOSPAM</div>
<br>
<span class="PreProc">==============================================================================</span><br>
12. History <a class="Constant" href="pi_netrw.html#netrw-history" name="netrw-history">netrw-history</a> {{ "{{{" }}1<br>
<br>
v156: Feb 18, 2016 * Changed =~ to =~# where appropriate<br>
Feb 23, 2016 * s:ComposePath(base,subdir) now uses<br>
fnameescape() on the base portion<br>
Mar 01, 2016 * (gt_macki) reported where :Explore would<br>
make file unlisted. Fixed (tst943)<br>
Apr 04, 2016 * (reported by John Little) netrw normally<br>
suppresses browser messages, but sometimes<br>
those "messages" are what is wanted.<br>
See <a class="Identifier" href="pi_netrw.html#g:netrw_suppress_gx_mesg">g:netrw_suppress_gx_mesg</a><br>
Apr 06, 2016 * (reported by Carlos Pita) deleting a remote<br>
file was giving an error message. Fixed.<br>
Apr 08, 2016 * (Charles Cooper) had a problem with an<br>
undefined b:netrw_curdir. He also provided<br>
a fix.<br>
Apr 20, 2016 * Changed s:NetrwGetBuffer(); now uses<br>
dictionaries. Also fixed the "No Name"<br>
buffer problem.<br>
v155: Oct 29, 2015 * (Timur Fayzrakhmanov) reported that netrw's<br>
mapping of ctrl-l was not allowing refresh of<br>
other windows when it was done in a netrw<br>
window.<br>
Nov 05, 2015 * Improved s:TreeSqueezeDir() to use search()<br>
instead of a loop<br>
* NetrwBrowse() will return line to<br>
w:netrw_bannercnt if cursor ended up in<br>
banner<br>
Nov 16, 2015 * Added a <span class="Special"><Plug></span>NetrwTreeSqueeze (<a class="Identifier" href="pi_netrw.html#netrw-s-cr">netrw-s-cr</a>)<br>
Nov 17, 2015 * Commented out imaps -- perhaps someone can<br>
tell me how they're useful and should be<br>
retained?<br>
Nov 20, 2015 * Added <a class="Identifier" href="pi_netrw.html#netrw-ma">netrw-ma</a> and <a class="Identifier" href="pi_netrw.html#netrw-mA">netrw-mA</a> support<br>
Nov 20, 2015 * gx (<a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>) on an url downloaded the<br>
file in addition to simply bringing up the<br>
url in a browser. Fixed.<br>
Nov 23, 2015 * Added <a class="Identifier" href="pi_netrw.html#g:netrw_sizestyle">g:netrw_sizestyle</a> support<br>
Nov 27, 2015 * Inserted a lot of <span class="Special"><c-u></span>s into various netrw<br>
maps.<br>
Jan 05, 2016 * <a class="Identifier" href="pi_netrw.html#netrw-qL">netrw-qL</a> implemented to mark files based<br>
upon <a class="Identifier" href="quickfix.html#location-list">location-list</a>s; similar to <a class="Identifier" href="pi_netrw.html#netrw-qF">netrw-qF</a>.<br>
Jan 19, 2016 * using - call delete(directoryname,"d") -<br>
instead of using g:netrw_localrmdir if<br>
v7.4 + patch#1107 is available<br>
Jan 28, 2016 * changed to using <a class="Identifier" href="eval.html#winsaveview()">winsaveview()</a> and<br>
<a class="Identifier" href="eval.html#winrestview()">winrestview()</a><br>
Jan 28, 2016 * s:NetrwTreePath() now does a save and<br>
restore of view<br>
Feb 08, 2016 * Fixed a tree-listing problem with remote<br>
directories<br>
v154: Feb 26, 2015 * (Yuri Kanivetsky) reported a situation where<br>
a file was not treated properly as a file<br>
due to g:netrw_keepdir == 1<br>
Mar 25, 2015 * (requested by Ben Friz) one may now sort by<br>
extension<br>
Mar 28, 2015 * (requested by Matt Brooks) netrw has a lot<br>
of buffer-local mappings; however, some<br>
plugins (such as vim-surround) set up<br>
conflicting mappings that cause vim to wait.<br>
The "<span class="Special"><nowait></span>" modifier has been included<br>
with most of netrw's mappings to avoid that<br>
delay.<br>
Jun 26, 2015 * <a class="Identifier" href="pi_netrw.html#netrw-gn">netrw-gn</a> mapping implemted<br>
* :Ntree NotADir resulted in having<br>
the tree listing expand in the error messages<br>
window. Fixed.<br>
Jun 29, 2015 * Attempting to delete a file remotely caused<br>
an error with "keepsol" mentioned; fixed.<br>
Jul 08, 2015 * Several changes to keep the <a class="Identifier" href="motion.html#:jumps">:jumps</a> table<br>
correct when working with<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_fastbrowse">g:netrw_fastbrowse</a> set to 2<br>
* wide listing with accented characters fixed<br>
(using %-S instead of %-s with a <a class="Identifier" href="eval.html#printf()">printf()</a><br>
Jul 13, 2015 * (Daniel Hahler) CheckIfKde() could be true<br>
but kfmclient not installed. Changed order<br>
in netrw#BrowseX(): checks if kde and<br>
kfmclient, then will use xdg-open on a unix<br>
system (if xdg-open is executable)<br>
Aug 11, 2015 * (McDonnell) tree listing mode wouldn't<br>
select a file in a open subdirectory.<br>
* (McDonnell) when multiple subdirectories<br>
were concurrently open in tree listing<br>
mode, a ctrl-L wouldn't refresh properly.<br>
* The netrw:target menu showed duplicate<br>
entries<br>
Oct 13, 2015 * (mattn) provided an exception to handle<br>
windows with shellslash set but no shell<br>
Oct 23, 2015 * if g:netrw_usetab and <span class="Special"><c-tab></span> now used<br>
to control whether NetrwShrink is used<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-c-tab">netrw-c-tab</a>)<br>
v153: May 13, 2014 * added another <a class="Identifier" href="pi_netrw.html#g:netrw_ffkeep">g:netrw_ffkeep</a> usage {{ "{{{" }}2<br>
May 14, 2014 * changed s:PerformListing() so that it<br>
always sets ft=netrw for netrw buffers<br>
(ie. even when syntax highlighting is<br>
off, not available, etc)<br>
May 16, 2014 * introduced the <a class="Identifier" href="pi_netrw.html#netrw-ctrl-r">netrw-ctrl-r</a> functionality<br>
May 17, 2014 * introduced the <a class="Identifier" href="pi_netrw.html#netrw-:NetrwMB">netrw-:NetrwMB</a> functionality<br>
* mb and mB (<a class="Identifier" href="pi_netrw.html#netrw-mb">netrw-mb</a>, <a class="Identifier" href="pi_netrw.html#netrw-mB">netrw-mB</a>) will<br>
add/remove marked files from bookmark list<br>
May 20, 2014 * (Enno Nagel) reported that :Lex <span class="Special"><dirname></span><br>
wasn't working. Fixed.<br>
May 26, 2014 * restored test to prevent leftmouse window<br>
resizing from causing refresh.<br>
(see s:NetrwLeftmouse())<br>
* fixed problem where a refresh caused cursor<br>
to go just under the banner instead of<br>
staying put<br>
May 28, 2014 * (László Bimba) provided a patch for opening<br>
the <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> window 100% high, optionally<br>
on the right, and will work with remote<br>
files.<br>
May 29, 2014 * implemented :NetrwC (see <a class="Identifier" href="pi_netrw.html#netrw-:NetrwC">netrw-:NetrwC</a>)<br>
Jun 01, 2014 * Removed some "silent"s from commands used<br>
to implemented scp://... and pscp://...<br>
directory listing. Permits request for<br>
password to appear.<br>
Jun 05, 2014 * (Enno Nagel) reported that user maps "/"<br>
caused problems with "b" and "w", which<br>
are mapped (for wide listings only) to<br>
skip over files rather than just words.<br>
Jun 10, 2014 * <a class="Identifier" href="pi_netrw.html#g:netrw_gx">g:netrw_gx</a> introduced to allow users to<br>
override default "<span class="Special"><cfile></span>" with the gx<br>
(<a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>) map<br>
Jun 11, 2014 * gx (<a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>), with <a class="Identifier" href="options.html#'autowrite'">'autowrite'</a> set,<br>
will write modified files. s:NetrwBrowseX()<br>
will now save, turn off, and restore the<br>
<a class="Identifier" href="options.html#'autowrite'">'autowrite'</a> setting.<br>
Jun 13, 2014 * added visual map for gx use<br>
Jun 15, 2014 * (Enno Nagel) reported that with having hls<br>
set and wide listing style in use, that the<br>
b and w maps caused unwanted highlighting.<br>
Jul 05, 2014 * <a class="Identifier" href="pi_netrw.html#netrw-mv">netrw-mv</a> and <a class="Identifier" href="pi_netrw.html#netrw-mX">netrw-mX</a> commands included<br>
Jul 09, 2014 * <a class="Identifier" href="pi_netrw.html#g:netrw_keepj">g:netrw_keepj</a> included, allowing optional<br>
keepj<br>
Jul 09, 2014 * fixing bugs due to previous update<br>
Jul 21, 2014 * (Bruno Sutic) provided an updated<br>
netrw_gitignore.vim<br>
Jul 30, 2014 * (Yavuz Yetim) reported that editing two<br>
remote files of the same name caused the<br>
second instance to have a "temporary"<br>
name. Fixed: now they use the same buffer.<br>
Sep 18, 2014 * (Yasuhiro Matsumoto) provided a patch which<br>
allows scp and windows local paths to work.<br>
Oct 07, 2014 * gx (see <a class="Identifier" href="pi_netrw.html#netrw-gx">netrw-gx</a>) when atop a directory,<br>
will now do <a class="Identifier" href="editing.html#gf">gf</a> instead<br>
Nov 06, 2014 * For cygwin: cygstart will be available for<br>
netrw#BrowseX() to use if its executable.<br>
Nov 07, 2014 * Began support for <span class="Constant">file://</span>... urls. Will use<br>
<a class="Identifier" href="pi_netrw.html#g:netrw_file_cmd">g:netrw_file_cmd</a> (typically elinks or links)<br>
Dec 02, 2014 * began work on having mc (<a class="Identifier" href="pi_netrw.html#netrw-mc">netrw-mc</a>) copy<br>
directories. Works for linux machines,<br>
cygwin+vim, but not for windows+gvim.<br>
Dec 02, 2014 * in tree mode, netrw was not opening<br>
directories via symbolic links.<br>
Dec 02, 2014 * added resolved link information to<br>
thin and tree modes<br>
Dec 30, 2014 * (issue#231) <a class="Identifier" href="windows.html#:ls">:ls</a> was not showing<br>
remote-file buffers reliably. Fixed.<br>
v152: Apr 08, 2014 * uses the <a class="Identifier" href="options.html#'noswapfile'">'noswapfile'</a> option (requires {{ "{{{" }}2<br>
vim 7.4 with patch 213)<br>
* (Enno Nagel) turn <a class="Identifier" href="options.html#'rnu'">'rnu'</a> off in netrw<br>
buffers.<br>
* (Quinn Strahl) suggested that netrw<br>
allow regular window splitting to occur,<br>
thereby allowing <a class="Identifier" href="options.html#'equalalways'">'equalalways'</a> to take<br>
effect.<br>
* (qingtian zhao) normally, netrw will<br>
save and restore the <a class="Identifier" href="options.html#'fileformat'">'fileformat'</a>;<br>
however, sometimes that isn't wanted<br>
Apr 14, 2014 * whenever netrw marks a buffer as ro,<br>
it will also mark it as nomod.<br>
Apr 16, 2014 * sftp protocol now supported by<br>
netrw#Obtain(); this means that one<br>
may use "mc" to copy a remote file<br>
to a local file using sftp, and that<br>
the <a class="Identifier" href="pi_netrw.html#netrw-O">netrw-O</a> command can obtain remote<br>
files via sftp.<br>
* added <span class="Special">[count]</span>C support (see <a class="Identifier" href="pi_netrw.html#netrw-C">netrw-C</a>)<br>
Apr 18, 2014 * when <a class="Identifier" href="pi_netrw.html#g:netrw_chgwin">g:netrw_chgwin</a> is one more than<br>
the last window, then vertically split<br>
the last window and use it as the<br>
chgwin window.<br>
May 09, 2014 * SavePosn was "saving filename under cursor"<br>
from a non-netrw window when using :Rex.<br>
v151: Jan 22, 2014 * extended :Rexplore to return to buffer {{ "{{{" }}2<br>
prior to Explore or editing a directory<br>
* (Ken Takata) netrw gave error when<br>
clipboard was disabled. Sol'n: Placed<br>
several if has("clipboard") tests in.<br>
* Fixed <span class="Constant">ftp://X@Y@Z//</span> problem; X@Y now<br>
part of user id, and only Z is part of<br>
hostname.<br>
* (A Loumiotis) reported that completion<br>
using a directory name containing spaces<br>
did not work. Fixed with a retry in<br>
netrw#Explore() which removes the<br>
backslashes vim inserted.<br>
Feb 26, 2014 * :Rexplore now records the current file<br>
using w:netrw_rexfile when returning via<br>
<a class="Identifier" href="pi_netrw.html#:Rexplore">:Rexplore</a><br>
Mar 08, 2014 * (David Kotchan) provided some patches<br>
allowing netrw to work properly with<br>
windows shares.<br>
* Multiple one-liner help messages available<br>
by pressing <span class="Special"><cr></span> while atop the "Quick<br>
Help" line<br>
* worked on ShellCmdPost, FocusGained event<br>
handling.<br>
* <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> path: will be used to update<br>
a left-side netrw browsing directory.<br>
Mar 12, 2014 * <a class="Identifier" href="pi_netrw.html#netrw-s-cr">netrw-s-cr</a>: use <span class="Special"><s-cr></span> to close<br>
tree directory implemented<br>
Mar 13, 2014 * (Tony Mechylynck) reported that using<br>
the browser with ftp on a directory,<br>
and selecting a gzipped txt file, that<br>
an E19 occurred (which was issued by<br>
gzip.vim). Fixed.<br>
Mar 14, 2014 * Implemented :MF and :MT (see <a class="Identifier" href="pi_netrw.html#netrw-:MF">netrw-:MF</a><br>
and <a class="Identifier" href="pi_netrw.html#netrw-:MT">netrw-:MT</a>, respectively)<br>
Mar 17, 2014 * <a class="Identifier" href="pi_netrw.html#:Ntree">:Ntree</a> <span class="Special">[dir]</span> wasn't working properly; fixed<br>
Mar 18, 2014 * Changed all uses of set to setl<br>
Mar 18, 2014 * Commented the netrw_btkeep line in<br>
s:NetrwOptionSave(); the effect is that<br>
netrw buffers will remain as <a class="Identifier" href="options.html#'bt'">'bt'</a>=nofile.<br>
This should prevent swapfiles being created<br>
for netrw buffers.<br>
Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd()<br>
instead. Consistent error handling results<br>
and it also handles Window's shares<br>
* Fixed <a class="Identifier" href="pi_netrw.html#netrw-d">netrw-d</a> command when applied with ftp<br>
* https: support included for netrw#NetRead()<br>
v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to {{ "{{{" }}2<br>
return to the netrw directory listing<br>
Jul 13, 2013 * (Jonas Diemer) suggested changing<br>
a <span class="Special"><cWORD></span> to <span class="Special"><cfile></span>.<br>
Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's<br>
use of mkdir did not produce directories<br>
following the user's umask.<br>
Aug 27, 2013 * introduced <a class="Identifier" href="pi_netrw.html#g:netrw_altfile">g:netrw_altfile</a> option<br>
Sep 05, 2013 * s:Strlen() now uses <a class="Identifier" href="eval.html#strdisplaywidth()">strdisplaywidth()</a><br>
when available, by default<br>
Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't<br>
opening some directories properly from the<br>
command line.<br>
Nov 09, 2013 * <a class="Identifier" href="pi_netrw.html#:Lexplore">:Lexplore</a> introduced<br>
* (Ondrej Platek) reported an issue with<br>
netrw's trees (P15). Fixed.<br>
* (Jorge Solis) reported that "t" in<br>
tree mode caused netrw to forget its<br>
line position.<br>
Dec 05, 2013 * Added <span class="Special"><s-leftmouse></span> file marking<br>
(see <a class="Identifier" href="pi_netrw.html#netrw-mf">netrw-mf</a>)<br>
Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use<br>
strlen() instead s:Strlen() when handling<br>
multibyte chars with strpart()<br>
(ie. strpart() is byte oriented, not<br>
display-width oriented).<br>
Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes<br>
and a portion of timestamps were wrongly<br>
highlighted with the directory color when<br>
setting <span class="Comment">:let g:netrw_liststyle=1</span> on Windows.<br>
* (Paul Domaskis) noted that sometimes<br>
cursorline was activating in non-netrw<br>
windows. All but one setting of cursorline<br>
was done via setl; there was one that was<br>
overlooked. Fixed.<br>
Dec 24, 2013 * (esquifit) asked that netrw allow the<br>
/cygdrive prefix be a user-alterable<br>
parameter.<br>
Jan 02, 2014 * Fixed a problem with netrw-based ballon<br>
evaluation (ie. netrw#NetrwBaloonHelp()<br>
not having been loaded error messages)<br>
Jan 03, 2014 * Fixed a problem with tree listings<br>
* New command installed: <a class="Identifier" href="pi_netrw.html#:Ntree">:Ntree</a><br>
Jan 06, 2014 * (Ivan Brennan) reported a problem with<br>
<a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a>. Fixed.<br>
Jan 06, 2014 * Fixed a problem with <a class="Identifier" href="pi_netrw.html#netrw-P">netrw-P</a> when the<br>
modified file was to be abandoned.<br>
Jan 15, 2014 * (Matteo Cavalleri) reported that when the<br>
banner is suppressed and tree listing is<br>
used, a blank line was left at the top of<br>
the display. Fixed.<br>
Jan 20, 2014 * (Gideon Go) reported that, in tree listing<br>
style, with a previous window open, that<br>
the wrong directory was being used to open<br>
a file. Fixed. (P21)<br>
v149: Apr 18, 2013 * in wide listing format, now have maps for {{ "{{{" }}2<br>
w and b to move to next/previous file<br>
Apr 26, 2013 * one may now copy files in the same<br>
directory; netrw will issue requests for<br>
what names the files should be copied under<br>
Apr 29, 2013 * Trying Benzinger's problem again. Seems<br>
that commenting out the BufEnter and<br>
installing VimEnter (only) works. Weird<br>
problem! (tree listing, vim -O Dir1 Dir2)<br>
May 01, 2013 * :Explore ftp://... wasn't working. Fixed.<br>
May 02, 2013 * introduced <a class="Identifier" href="pi_netrw.html#g:netrw_bannerbackslash">g:netrw_bannerbackslash</a> as<br>
requested by Paul Domaskis.<br>
Jul 03, 2013 * Explore now avoids splitting when a buffer<br>
will be hidden.<br>
v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct {{ "{{{" }}2<br>
choice of listing style, hiding style, and<br>
sorting style<br>
<br>
<span class="PreProc">==============================================================================</span><br>
13. Todo <a class="Constant" href="pi_netrw.html#netrw-todo" name="netrw-todo">netrw-todo</a> {{ "{{{" }}1<br>
<br>
07/29/09 : banner :<a class="Identifier" href="pi_netrw.html#g:netrw_banner">g:netrw_banner</a> can be used to suppress the<br>
suppression banner. This feature is new and experimental,<br>
so its in the process of being debugged.<br>
09/04/09 : "gp" : See if it can be made to work for remote systems.<br>
: See if it can be made to work with marked files.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
14. Credits <a class="Constant" href="pi_netrw.html#netrw-credits" name="netrw-credits">netrw-credits</a> {{ "{{{" }}1<br>
<br>
Vim editor by Bram Moolenaar (Thanks, Bram!)<br>
dav support by C Campbell<br>
fetch support by Bram Moolenaar and C Campbell<br>
ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM><br>
http support by Bram Moolenaar <bram@moolenaar.net><br>
rcp<br>
rsync support by C Campbell (suggested by Erik Warendorph)<br>
scp support by raf <raf@comdyn.com.au><br>
sftp support by C Campbell<br>
<br>
inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell<br>
<br>
Jérôme Augé -- also using new buffer method with ftp+.netrc<br>
Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,<br>
fetch,...<br>
Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution<br>
Erik Warendorph -- for several suggestions (g:netrw_..._cmd<br>
variables, rsync etc)<br>
Doug Claar -- modifications to test for success with ftp<br>
operation<br>
<br>
<span class="PreProc">==============================================================================</span><br>
Modelines: {{ "{{{" }}1<br>
vim:tw=78:ts=8:ft=help:norl:fdm=marker<br>
</div>
</article>
<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>
<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->
</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。