blob: 32f576af6afbfb93f1ede1ed85ecc7980457a782 [file] [log] [blame]
Bram Moolenaar13600302014-05-22 18:26:40 +02001*pi_netrw.txt* For Vim version 7.4. Last change: 2014 May 13
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
Bram Moolenaarff034192013-04-24 18:51:19 +02003 ------------------------------------------------
4 NETRW REFERENCE MANUAL by Charles E. Campbell
5 ------------------------------------------------
6Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01007 (remove NOSPAM from Campbell's email first)
8
Bram Moolenaar8d043172014-01-23 14:24:41 +01009Copyright: Copyright (C) 1999-2014 Charles E Campbell *netrw-copyright*
Bram Moolenaar5b435d62012-04-05 17:33:26 +020010 The VIM LICENSE applies to the files in this package, including
11 netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
12 syntax/netrw.vim. Like anything else that's free, netrw.vim and its
13 associated files are provided *as is* and comes with no warranty of
14 any kind, either expressed or implied. No guarantees of
15 merchantability. No guarantees of suitability for any purpose. By
16 using this plugin, you agree that in no event will the copyright
17 holder be liable for any damages resulting from the use of this
18 software. Use at your own risk!
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
Bram Moolenaar1afcace2005-11-25 19:54:28 +000020
Bram Moolenaar00a927d2010-05-14 23:24:24 +020021 *dav* *ftp* *netrw-file* *rcp* *scp*
22 *davs* *http* *netrw.vim* *rsync* *sftp*
23 *fetch* *netrw* *network*
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000261. Contents *netrw-contents* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
Bram Moolenaarff034192013-04-24 18:51:19 +0200281. Contents..............................................|netrw-contents|
292. Starting With Netrw...................................|netrw-start|
303. Netrw Reference.......................................|netrw-ref|
31 EXTERNAL APPLICATIONS AND PROTOCOLS.................|netrw-externapp|
32 READING.............................................|netrw-read|
33 WRITING.............................................|netrw-write|
34 SOURCING............................................|netrw-source|
35 DIRECTORY LISTING...................................|netrw-dirlist|
36 CHANGING THE USERID AND PASSWORD....................|netrw-chgup|
37 VARIABLES AND SETTINGS..............................|netrw-variables|
38 PATHS...............................................|netrw-path|
394. Network-Oriented File Transfer........................|netrw-xfer|
40 NETRC...............................................|netrw-netrc|
41 PASSWORD............................................|netrw-passwd|
425. Activation............................................|netrw-activate|
436. Transparent Remote File Editing.......................|netrw-transparent|
447. Ex Commands...........................................|netrw-ex|
458. Variables and Options.................................|netrw-variables|
469. Browsing..............................................|netrw-browse|
47 Introduction To Browsing............................|netrw-intro-browse|
48 Quick Reference: Maps...............................|netrw-browse-maps|
49 Quick Reference: Commands...........................|netrw-browse-cmds|
50 Bookmarking A Directory.............................|netrw-mb|
51 Browsing............................................|netrw-cr|
Bram Moolenaara6878372014-03-22 21:02:50 +010052 Squeezing the Current Tree-Listing Directory......|:netrw-s-cr|
Bram Moolenaarff034192013-04-24 18:51:19 +020053 Browsing With A Horizontally Split Window...........|netrw-o|
54 Browsing With A New Tab.............................|netrw-t|
55 Browsing With A Vertically Split Window.............|netrw-v|
56 Change Listing Style.(thin wide long tree)..........|netrw-i|
57 Changing To A Bookmarked Directory..................|netrw-gb|
58 Changing To A Predecessor Directory.................|netrw-u|
59 Changing To A Successor Directory...................|netrw-U|
60 Customizing Browsing With A User Function...........|netrw-x|
61 Deleting Bookmarks..................................|netrw-mB|
62 Deleting Files Or Directories.......................|netrw-D|
63 Directory Exploring Commands........................|netrw-explore|
64 Exploring With Stars and Patterns...................|netrw-star|
65 Displaying Information About File...................|netrw-qf|
66 Edit File Or Directory Hiding List..................|netrw-ctrl-h|
67 Editing The Sorting Sequence........................|netrw-S|
68 Forcing treatment as a file or directory............|netrw-gd| |netrw-gf|
69 Going Up............................................|netrw--|
70 Hiding Files Or Directories.........................|netrw-a|
71 Improving Browsing..................................|netrw-ssh-hack|
72 Listing Bookmarks And History.......................|netrw-qb|
73 Making A New Directory..............................|netrw-d|
74 Making The Browsing Directory The Current Directory.|netrw-c|
75 Marking Files.......................................|netrw-mf|
76 Unmarking Files.....................................|netrw-mF|
77 Marking Files By QuickFix List......................|netrw-qF|
78 Marking Files By Regular Expression.................|netrw-mr|
79 Marked Files: Arbitrary Command.....................|netrw-mx|
80 Marked Files: Compression And Decompression.........|netrw-mz|
81 Marked Files: Copying...............................|netrw-mc|
82 Marked Files: Diff..................................|netrw-md|
83 Marked Files: Editing...............................|netrw-me|
84 Marked Files: Grep..................................|netrw-mg|
85 Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
86 Marked Files: Moving................................|netrw-mm|
87 Marked Files: Printing..............................|netrw-mp|
88 Marked Files: Sourcing..............................|netrw-ms|
89 Marked Files: Setting the Target Directory..........|netrw-mt|
90 Marked Files: Tagging...............................|netrw-mT|
91 Marked Files: Target Directory Using Bookmarks......|netrw-Tb|
92 Marked Files: Target Directory Using History........|netrw-Th|
93 Marked Files: Unmarking.............................|netrw-mu|
94 Netrw Browser Variables.............................|netrw-browser-var|
95 Netrw Browsing And Option Incompatibilities.........|netrw-incompatible|
96 Netrw Settings Window...............................|netrw-settings-window|
97 Obtaining A File....................................|netrw-O|
98 Preview Window......................................|netrw-p|
99 Previous Window.....................................|netrw-P|
100 Refreshing The Listing..............................|netrw-ctrl-l|
101 Reversing Sorting Order.............................|netrw-r|
102 Renaming Files Or Directories.......................|netrw-R|
103 Selecting Sorting Style.............................|netrw-s|
104 Setting Editing Window..............................|netrw-C|
10510. Problems and Fixes....................................|netrw-problems|
10611. Debugging Netrw Itself................................|netrw-debug|
10712. History...............................................|netrw-history|
10813. Todo..................................................|netrw-todo|
10914. Credits...............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000110
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111{Vi does not have any of this}
112
113==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00001142. Starting With Netrw *netrw-start* {{{1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000115
Bram Moolenaar446cb832008-06-24 21:56:24 +0000116Netrw makes reading files, writing files, browsing over a network, and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100117local browsing easy! First, make sure that you have plugins enabled, so
Bram Moolenaar446cb832008-06-24 21:56:24 +0000118you'll need to have at least the following in your <.vimrc>:
119(or see |netrw-activate|) >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000120
Bram Moolenaar9964e462007-05-05 17:54:07 +0000121 set nocp " 'compatible' is not set
122 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000123<
124(see |'cp'| and |:filetype-plugin-on|)
125
126Netrw supports "transparent" editing of files on other machines using urls
127(see |netrw-transparent|). As an example of this, let's assume you have an
Bram Moolenaar446cb832008-06-24 21:56:24 +0000128account on some other machine; if you can use scp, try: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000129
130 vim scp://hostname/path/to/file
131<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000132Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000133
Bram Moolenaar446cb832008-06-24 21:56:24 +0000134So, what if you have ftp, not ssh/scp? That's easy, too; try >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000135
136 vim ftp://hostname/path/to/file
137<
138Want to make ftp simpler to use? See if your ftp supports a file called
139<.netrc> -- typically it goes in your home directory, has read/write
140permissions for only the user to read (ie. not group, world, other, etc),
141and has lines resembling >
142
143 machine HOSTNAME login USERID password "PASSWORD"
144 machine HOSTNAME login USERID password "PASSWORD"
145 ...
Bram Moolenaar9964e462007-05-05 17:54:07 +0000146 default login USERID password "PASSWORD"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000147<
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200148Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: >
149
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200150 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE'
Bram Moolenaar97d62492012-11-15 21:28:22 +0100151<
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200152Netrw will substitute the host's machine name for "MACHINE" from the url it is
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200153attempting to open, and so one may specify >
154 userid
155 password
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200156for each site in a separate file: c:\Users\MyUserName\MachineName.
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200157
Bram Moolenaar446cb832008-06-24 21:56:24 +0000158Now about browsing -- when you just want to look around before editing a
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000159file. For browsing on your current host, just "edit" a directory: >
160
161 vim .
162 vim /home/userid/path
163<
164For browsing on a remote host, "edit" a directory (but make sure that
165the directory name is followed by a "/"): >
166
167 vim scp://hostname/
168 vim ftp://hostname/path/to/dir/
169<
170See |netrw-browse| for more!
171
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100172There are more protocols supported by netrw than just scp and ftp, too: see the
173next section, |netrw-externapp|, on how to use these external applications with
174netrw and vim.
175
Bram Moolenaar13600302014-05-22 18:26:40 +0200176PREVENTING LOADING *netrw-noload*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000177
178If you want to use plugins, but for some reason don't wish to use netrw, then
179you need to avoid loading both the plugin and the autoload portions of netrw.
180You may do so by placing the following two lines in your <.vimrc>: >
181
182 :let g:loaded_netrw = 1
183 :let g:loaded_netrwPlugin = 1
184<
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000185
186==============================================================================
Bram Moolenaar13600302014-05-22 18:26:40 +02001873. Netrw Reference *netrw-ref* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000188
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100189 Netrw supports several protocols in addition to scp and ftp as mentioned
Bram Moolenaar446cb832008-06-24 21:56:24 +0000190 in |netrw-start|. These include dav, fetch, http,... well, just look
191 at the list in |netrw-externapp|. Each protocol is associated with a
192 variable which holds the default command supporting that protocol.
193
194EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000195
Bram Moolenaar8d043172014-01-23 14:24:41 +0100196 Protocol Variable Default Value
197 -------- ---------------- -------------
198 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
199 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
200 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
201 ftp: *g:netrw_ftp_cmd* = "ftp"
202 http: *g:netrw_http_cmd* = "elinks" if elinks is available
203 http: g:netrw_http_cmd = "links" elseif links is available
204 http: g:netrw_http_cmd = "curl" elseif curl is available
205 http: g:netrw_http_cmd = "wget" elseif wget is available
206 http: g:netrw_http_cmd = "fetch" elseif fetch is available
207 http: *g:netrw_http_put_cmd* = "curl -T"
208 rcp: *g:netrw_rcp_cmd* = "rcp"
209 rsync: *g:netrw_rsync_cmd* = "rsync -a"
210 scp: *g:netrw_scp_cmd* = "scp -q"
211 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100212
213 *g:netrw_http_xcmd* : the option string for http://... protocols are
214 specified via this variable and may be independently overridden. By
215 default, the option arguments for the http-handling commands are: >
216
217 elinks : "-source >"
Bram Moolenaar97d62492012-11-15 21:28:22 +0100218 links : "-dump >"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100219 curl : "-o"
220 wget : "-q -O"
221 fetch : "-o"
222<
223 For example, if your system has elinks, and you'd rather see the
224 page using an attempt at rendering the text, you may wish to have >
225 let g:netrw_http_xcmd= "-dump >"
226< in your .vimrc.
227
Bram Moolenaar8d043172014-01-23 14:24:41 +0100228 g:netrw_http_put_cmd: this option specifies both the executable and
229 any needed options. This command does a PUT operation to the url.
230
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231
Bram Moolenaar446cb832008-06-24 21:56:24 +0000232READING *netrw-read* *netrw-nread* {{{2
233
234 Generally, one may just use the url notation with a normal editing
235 command, such as >
236
237 :e ftp://[user@]machine/path
238<
239 Netrw also provides the Nread command:
240
Bram Moolenaar071d4272004-06-13 20:20:40 +0000241 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000242 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000243 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000244 :Nread "machine id password path" uses ftp
245 :Nread "dav://machine[:port]/path" uses cadaver
246 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000247 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000248 :Nread "http://[user@]machine/path" uses http uses wget
249 :Nread "rcp://[user@]machine/path" uses rcp
250 :Nread "rsync://[user@]machine[:port]/path" uses rsync
251 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
252 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000253
Bram Moolenaar446cb832008-06-24 21:56:24 +0000254WRITING *netrw-write* *netrw-nwrite* {{{2
255
256 One may just use the url notation with a normal file writing
257 command, such as >
258
259 :w ftp://[user@]machine/path
260<
261 Netrw also provides the Nwrite command:
262
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000263 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000264 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000265 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000266 :Nwrite "machine id password path" uses ftp
267 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000268 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000269 :Nwrite "rcp://[user@]machine/path" uses rcp
270 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
271 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
272 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273 http: not supported!
274
Bram Moolenaar446cb832008-06-24 21:56:24 +0000275SOURCING *netrw-source* {{{2
276
277 One may just use the url notation with the normal file sourcing
278 command, such as >
279
280 :so ftp://[user@]machine/path
281<
282 Netrw also provides the Nsource command:
283
Bram Moolenaar9964e462007-05-05 17:54:07 +0000284 :Nsource ? give help
285 :Nsource "dav://machine[:port]/path" uses cadaver
286 :Nsource "fetch://[user@]machine/path" uses fetch
287 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
288 :Nsource "http://[user@]machine/path" uses http uses wget
289 :Nsource "rcp://[user@]machine/path" uses rcp
290 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
291 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
292 :Nsource "sftp://[user@]machine/path" uses sftp
293
Bram Moolenaar13600302014-05-22 18:26:40 +0200294DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +0000295
296 One may browse a directory to get a listing by simply attempting to
297 edit the directory: >
298
299 :e scp://[user]@hostname/path/
300 :e ftp://[user]@hostname/path/
301<
Bram Moolenaar251e1912011-06-19 05:09:16 +0200302 For remote directory listings (ie. those using scp or ftp), that
303 trailing "/" is necessary (the slash tells netrw to treat the argument
304 as a directory to browse instead of as a file to download).
Bram Moolenaar446cb832008-06-24 21:56:24 +0000305
Bram Moolenaar251e1912011-06-19 05:09:16 +0200306 The Nread command may also be used to accomplish this (again, that
307 trailing slash is necessary): >
Bram Moolenaar446cb832008-06-24 21:56:24 +0000308
Bram Moolenaar251e1912011-06-19 05:09:16 +0200309 :Nread [protocol]://[user]@hostname/path/
310<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000311 *netrw-login* *netrw-password*
312CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000313
Bram Moolenaar071d4272004-06-13 20:20:40 +0000314 Attempts to use ftp will prompt you for a user-id and a password.
Bram Moolenaar15146672011-10-20 22:22:38 +0200315 These will be saved in global variables |g:netrw_uid| and
316 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings,
317 thereby simplifying use of ftp. However, if you need to use a
318 different user id and/or password, you'll want to call |NetUserPass()|
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000319 first. To work around the need to enter passwords, check if your ftp
320 supports a <.netrc> file in your home directory. Also see
321 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
Bram Moolenaar15146672011-10-20 22:22:38 +0200322 to not need to use passwords for scp, look at |netrw-ssh-hack|).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323
324 :NetUserPass [uid [password]] -- prompts as needed
325 :call NetUserPass() -- prompts for uid and password
326 :call NetUserPass("uid") -- prompts for password
327 :call NetUserPass("uid","password") -- sets global uid and password
328
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200329(Related topics: |ftp| |netrw-userpass| |netrw-start|)
330
Bram Moolenaar446cb832008-06-24 21:56:24 +0000331NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200332 (Also see:
333 |netrw-browser-var| : netrw browser option variables
334 |netrw-protocol| : file transfer protocol option variables
335 |netrw-settings| : additional file transfer options
336 |netrw-browser-options| : these options affect browsing directories
337 )
Bram Moolenaar9964e462007-05-05 17:54:07 +0000338
Bram Moolenaar446cb832008-06-24 21:56:24 +0000339Netrw provides a lot of variables which allow you to customize netrw to your
340preferences. One way to look at them is via the command :NetrwSettings (see
341|netrw-settings|) which will display your current netrw settings. Most such
342settings are described below, in |netrw-browser-options|, and in
343|netrw-externapp|:
Bram Moolenaar9964e462007-05-05 17:54:07 +0000344
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100345 *b:netrw_lastfile* last file Network-read/written retained on a
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200346 per-buffer basis (supports plain :Nw )
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100347
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200348 *g:netrw_bufsettings* the settings that netrw buffers have
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200349 (default) noma nomod nonu nowrap ro nobl
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200350
Bram Moolenaar13600302014-05-22 18:26:40 +0200351 *g:netrw_chgwin* specifies a window number where subsequent file edits
352 will take place. (also see |netrw-C|)
353 (default) -1
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100354
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200355 *g:Netrw_funcref* specifies a function (or functions) to be called when
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200356 netrw edits a file. The file is first edited, and
357 then the function reference (|Funcref|) is called.
358 This variable may also hold a |List| of Funcrefs.
359 (default) not defined. (the capital in g:Netrw...
360 is required by its holding a function reference)
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200361>
362 Example: place in .vimrc; affects all file opening
363 fun! MyFuncRef()
364 endfun
365 let g:Netrw_funcref= function("MyFuncRef")
366<
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200367 *g:netrw_ftp* if it doesn't exist, use default ftp
368 =0 use default ftp (uid password)
369 =1 use alternate ftp method (user uid password)
370 If you're having trouble with ftp, try changing the
371 value of this variable to see if the alternate ftp
372 method works for your setup.
373
Bram Moolenaar13600302014-05-22 18:26:40 +0200374 *g:netrw_ftp_options* Chosen by default, these options are supposed to
375 turn interactive prompting off and to restrain ftp
376 from attempting auto-login upon initial connection.
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200377 However, it appears that not all ftp implementations
378 support this (ex. ncftp).
379 ="-i -n"
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000380
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100381 *g:netrw_ftpextracmd* default: doesn't exist
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200382 If this variable exists, then any string it contains
383 will be placed into the commands set to your ftp
384 client. As an example:
385 ="passive"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000386
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000387 *g:netrw_ftpmode* ="binary" (default)
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200388 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000389
Bram Moolenaar9964e462007-05-05 17:54:07 +0000390 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200391 =1 If you have a <.netrc> file but it doesn't work and
392 you want it ignored, then set this variable as
393 shown. (default for Windows + cmd.exe)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000394
395 *g:netrw_menu* =0 disable netrw's menu
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200396 =1 (default) netrw's menu enabled
Bram Moolenaar9964e462007-05-05 17:54:07 +0000397
398 *g:netrw_nogx* if this variable exists, then the "gx" map will not
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200399 be available (see |netrw-gx|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000400
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100401 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200402 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
Bram Moolenaar446cb832008-06-24 21:56:24 +0000403
404 *g:netrw_preview* =0 (default) preview window shown in a horizontally
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200405 split window
406 =1 preview window shown in a vertically split window.
Bram Moolenaar13600302014-05-22 18:26:40 +0200407 Also affects the "previous window" (see |netrw-P|)
408 in the same way.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000409
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200410 *g:netrw_scpport* = "-P" : option to use to set port for scp
411 *g:netrw_sshport* = "-p" : option to use to set port for ssh
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000412
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200413 *g:netrw_sepchr* =\0xff
414 =\0x01 for enc == euc-jp (and perhaps it should be for
415 others, too, please let me know)
416 Separates priority codes from filenames internally.
417 See |netrw-p12|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100418
Bram Moolenaar446cb832008-06-24 21:56:24 +0000419 *g:netrw_silent* =0 : transfers done normally
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200420 =1 : transfers done silently
Bram Moolenaar446cb832008-06-24 21:56:24 +0000421
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000422 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200423 line window. This window provides reliable
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200424 delivery of messages. (default)
425 =0 : messages from netrw will use echoerr ;
426 messages don't always seem to show up this
427 way, but one doesn't have to quit the window.
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +0000428
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000429 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200430 lines that o/s's ftp "provides" on transfers
431 =0 force normal ftp behavior (no trailing line removal)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000432
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200433 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
434 permits network browsing to use ls with time and
435 size sorting (default if windows)
436 =0 assume Windows' scp accepts windows-style paths
437 Network browsing uses dir instead of ls
438 This option is ignored if you're using unix
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000439
440 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200441 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000442
Bram Moolenaar446cb832008-06-24 21:56:24 +0000443PATHS *netrw-path* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000444
445Paths to files are generally user-directory relative for most protocols.
446It is possible that some protocol will make paths relative to some
447associated directory, however.
448>
449 example: vim scp://user@host/somefile
450 example: vim scp://user@host/subdir1/subdir2/somefile
451<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000452where "somefile" is in the "user"'s home directory. If you wish to get a
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000453file using root-relative paths, use the full path:
454>
455 example: vim scp://user@host//somefile
456 example: vim scp://user@host//subdir1/subdir2/somefile
457<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458
459==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00004604. Network-Oriented File Transfer *netrw-xfer* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000461
462Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000463(<netrw.vim>) using plugin techniques. It currently supports both reading and
464writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000465dav/cadaver, rsync, or sftp.
466
467http is currently supported read-only via use of wget or fetch.
468
469<netrw.vim> is a standard plugin which acts as glue between Vim and the
470various file transfer programs. It uses autocommand events (BufReadCmd,
471FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
472
473 ex. vim ftp://hostname/path/to/file
474<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000475The characters preceding the colon specify the protocol to use; in the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000476example, it's ftp. The <netrw.vim> script then formulates a command or a
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000477series of commands (typically ftp) which it issues to an external program
478(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
479from/written to a temporary file (under Unix/Linux, /tmp/...) which the
480<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100482Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,
483ftp is not a secure protocol. User names and passwords are transmitted "in
484the clear" over the internet; any snooper tool can pick these up; this is not
485a netrw thing, this is a ftp thing. If you're concerned about this, please
486try to use scp or sftp instead.
487
488Netrw re-uses the user id and password during the same vim session and so long
489as the remote hostname remains the same.
490
491Jan seems to be a bit confused about how netrw handles ftp; normally multiple
492commands are performed in a "ftp session", and he seems to feel that the
493uid/password should only be retained over one ftp session. However, netrw
494does every ftp operation in a separate "ftp session"; so remembering the
495uid/password for just one "ftp session" would be the same as not remembering
496the uid/password at all. IMHO this would rapidly grow tiresome as one
497browsed remote directories, for example.
498
499On the other hand, thanks go to Jan M. for pointing out the many
500vulnerabilities that netrw (and vim itself) had had in handling "crafted"
501filenames. The |shellescape()| and |fnameescape()| functions were written in
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200502response by Bram Moolenaar to handle these sort of problems, and netrw has
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100503been modified to use them. Still, my advice is, if the "filename" looks like
504a vim command that you aren't comfortable with having executed, don't open it.
505
Bram Moolenaar9964e462007-05-05 17:54:07 +0000506 *netrw-putty* *netrw-pscp* *netrw-psftp*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000507One may modify any protocol's implementing external application by setting a
508variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000509"scp -q"). As an example, consider using PuTTY: >
Bram Moolenaar9964e462007-05-05 17:54:07 +0000510
511 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
512 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000513<
Bram Moolenaar15146672011-10-20 22:22:38 +0200514(note: it has been reported that windows 7 with putty v0.6's "-batch" option
515 doesn't work, so its best to leave it off for that system)
516
Bram Moolenaar9964e462007-05-05 17:54:07 +0000517See |netrw-p8| for more about putty, pscp, psftp, etc.
518
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000520Unfortunately, some implementations are noisy (ie., add junk to the end of the
521file). Thus, concerned users may decide to write a NetReadFixup() function
522that will clean up after reading with their ftp. Some Unix systems (ie.,
523FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
524not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100525Consequently, if "fetch" is available (ie. executable), it may be preferable
526to use it for ftp://... based transfers.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527
528For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000529transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530>
531 vim rcp://[user@]machine/path
532 vim scp://[user@]machine/path
533<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100534If your ftp supports <.netrc>, then it too can be transparently used
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535if the needed triad of machine name, user id, and password are present in
536that file. Your ftp must be able to use the <.netrc> file on its own, however.
537>
538 vim ftp://[user@]machine[[:#]portnumber]/path
539<
Bram Moolenaaradc21822011-04-01 18:03:16 +0200540Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
541an option, -s:filename (filename can and probably should be a full path)
542which contains ftp commands which will be automatically run whenever ftp
543starts. You may use this feature to enter a user and password for one site: >
544 userid
545 password
Bram Moolenaar13600302014-05-22 18:26:40 +0200546< *netrw-windows-netrc* *netrw-windows-s*
547If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines
548only) netrw will substitute the current machine name requested for ftp
549connections for MACHINE. Hence one can have multiple machine.ftp files
550containing login and password for ftp. Example: >
Bram Moolenaaradc21822011-04-01 18:03:16 +0200551
Bram Moolenaarff034192013-04-24 18:51:19 +0200552 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
553 vim ftp://myhost.somewhere.net/
Bram Moolenaar13600302014-05-22 18:26:40 +0200554
Bram Moolenaaradc21822011-04-01 18:03:16 +0200555will use a file >
Bram Moolenaar13600302014-05-22 18:26:40 +0200556
Bram Moolenaaradc21822011-04-01 18:03:16 +0200557 C:\Users\Myself\myhost.ftp
558<
559Often, ftp will need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000560The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561the actually-typed-in password. Netrw will retain the userid and password
562for subsequent read/writes from the most recent transfer so subsequent
563transfers (read/write) to or from that machine will take place without
564additional prompting.
565
566 *netrw-urls*
567 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000568 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000569 +=================================+============================+============+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000570 | DAV: | | |
571 | dav://host/path | | cadaver |
572 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000573 +---------------------------------+----------------------------+------------+
Bram Moolenaar446cb832008-06-24 21:56:24 +0000574 | DAV + SSL: | | |
575 | davs://host/path | | cadaver |
576 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
577 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000578 | FETCH: | | |
579 | fetch://[user@]host/path | | |
580 | fetch://[user@]host:http/path | Not Available | fetch |
581 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000582 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000583 | FILE: | | |
584 | file:///* | file:///* | |
585 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000586 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000587 | FTP: (*3) | (*3) | |
588 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
589 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
590 | :Nread host path | :Nwrite host path | ftp+.netrc |
591 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000593 | HTTP: wget is executable: (*4) | | |
594 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000595 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000596 | HTTP: fetch is executable (*4) | | |
597 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000598 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000599 | RCP: | | |
600 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000601 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000602 | RSYNC: | | |
603 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
604 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
605 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000606 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000607 | SCP: | | |
608 | scp://[user@]host/path | scp://[user@]host/path | scp |
609 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000610 +---------------------------------+----------------------------+------------+
Bram Moolenaar9964e462007-05-05 17:54:07 +0000611 | SFTP: | | |
612 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
613 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000614 +=================================+============================+============+
615
616 (*1) For an absolute path use scp://machine//path.
617
618 (*2) if <.netrc> is present, it is assumed that it will
619 work with your ftp client. Otherwise the script will
Bram Moolenaar9964e462007-05-05 17:54:07 +0000620 prompt for user-id and password.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000621
Bram Moolenaar9964e462007-05-05 17:54:07 +0000622 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623 if a different port is needed than the standard ftp port
624
625 (*4) for http:..., if wget is available it will be used. Otherwise,
626 if fetch is available it will be used.
627
628Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
629
630
631NETRC *netrw-netrc*
632
Bram Moolenaar446cb832008-06-24 21:56:24 +0000633The <.netrc> file, typically located in your home directory, contains lines
634therein which map a hostname (machine name) to the user id and password you
635prefer to use with it.
636
Bram Moolenaar071d4272004-06-13 20:20:40 +0000637The typical syntax for lines in a <.netrc> file is given as shown below.
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000638Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000639>
640 machine {full machine name} login {user-id} password "{password}"
641 default login {user-id} password "{password}"
642
643Your ftp client must handle the use of <.netrc> on its own, but if the
644<.netrc> file exists, an ftp transfer will not ask for the user-id or
645password.
646
647 Note:
648 Since this file contains passwords, make very sure nobody else can
649 read this file! Most programs will refuse to use a .netrc that is
650 readable for others. Don't forget that the system administrator can
Bram Moolenaar446cb832008-06-24 21:56:24 +0000651 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000652
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200653Even though Windows' ftp clients typically do not support .netrc, netrw has
654a work-around: see |netrw-windows-s|.
655
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656
657PASSWORD *netrw-passwd*
658
659The script attempts to get passwords for ftp invisibly using |inputsecret()|,
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200660a built-in Vim function. See |netrw-userpass| for how to change the password
Bram Moolenaar071d4272004-06-13 20:20:40 +0000661after one has set it.
662
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000663Unfortunately there doesn't appear to be a way for netrw to feed a password to
664scp. Thus every transfer via scp will require re-entry of the password.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000665However, |netrw-ssh-hack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000666
667
668==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00006695. Activation *netrw-activate* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000670
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000671Network-oriented file transfers are available by default whenever Vim's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000672|'nocompatible'| mode is enabled. Netrw's script files reside in your
673system's plugin, autoload, and syntax directories; just the
674plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
675vim. The main script in autoload/netrw.vim is only loaded when you actually
676use netrw. I suggest that, at a minimum, you have at least the following in
677your <.vimrc> customization file: >
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000678
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000679 set nocp
680 if version >= 600
681 filetype plugin indent on
682 endif
683<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000684
685==============================================================================
Bram Moolenaar13600302014-05-22 18:26:40 +02006866. Transparent Remote File Editing *netrw-transparent* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000687
688Transparent file transfers occur whenever a regular file read or write
Bram Moolenaar446cb832008-06-24 21:56:24 +0000689(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
690events) is made. Thus one may read, write, or source files across networks
691just as easily as if they were local files! >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000692
693 vim ftp://[user@]machine/path
694 ...
695 :wq
696
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000697See |netrw-activate| for more on how to encourage your vim to use plugins
698such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000699
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000700
Bram Moolenaar071d4272004-06-13 20:20:40 +0000701==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00007027. Ex Commands *netrw-ex* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000703
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000704The usual read/write commands are supported. There are also a few
Bram Moolenaar446cb832008-06-24 21:56:24 +0000705additional commands available. Often you won't need to use Nwrite or
Bram Moolenaar9964e462007-05-05 17:54:07 +0000706Nread as shown in |netrw-transparent| (ie. simply use >
707 :e url
708 :r url
709 :w url
710instead, as appropriate) -- see |netrw-urls|. In the explanations
711below, a {netfile} is an url to a remote file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000712
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200713 *:Nwrite* *:Nw*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000714:[range]Nw[rite] Write the specified lines to the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000715 file as specified in b:netrw_lastfile.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200716 (related: |netrw-nwrite|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000717
Bram Moolenaar446cb832008-06-24 21:56:24 +0000718:[range]Nw[rite] {netfile} [{netfile}]...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000719 Write the specified lines to the {netfile}.
720
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200721 *:Nread* *:Nr*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100722:Nr[ead] Read the lines from the file specified in b:netrw_lastfile
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200723 into the current buffer. (related: |netrw-nread|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000724
Bram Moolenaar446cb832008-06-24 21:56:24 +0000725:Nr[ead] {netfile} {netfile}...
Bram Moolenaar071d4272004-06-13 20:20:40 +0000726 Read the {netfile} after the current line.
727
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200728 *:Nsource* *:Ns*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000729:Ns[ource] {netfile}
Bram Moolenaar9964e462007-05-05 17:54:07 +0000730 Source the {netfile}.
731 To start up vim using a remote .vimrc, one may use
732 the following (all on one line) (tnx to Antoine Mechelynck) >
733 vim -u NORC -N
734 --cmd "runtime plugin/netrwPlugin.vim"
735 --cmd "source scp://HOSTNAME/.vimrc"
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200736< (related: |netrw-source|)
737
738:call NetUserPass() *NetUserPass()*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000739 If g:netrw_uid and s:netrw_passwd don't exist,
740 this function will query the user for them.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200741 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000742
743:call NetUserPass("userid")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000744 This call will set the g:netrw_uid and, if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745 the password doesn't exist, will query the user for it.
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200746 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000747
748:call NetUserPass("userid","passwd")
Bram Moolenaar446cb832008-06-24 21:56:24 +0000749 This call will set both the g:netrw_uid and s:netrw_passwd.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000750 The user-id and password are used by ftp transfers. One may
Bram Moolenaar446cb832008-06-24 21:56:24 +0000751 effectively remove the user-id and password by using empty
752 strings (ie. "").
Bram Moolenaar00a927d2010-05-14 23:24:24 +0200753 (related: |netrw-userpass|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754
Bram Moolenaar9964e462007-05-05 17:54:07 +0000755:NetrwSettings This command is described in |netrw-settings| -- used to
756 display netrw settings and change netrw behavior.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000757
Bram Moolenaar071d4272004-06-13 20:20:40 +0000758
759==============================================================================
Bram Moolenaar13600302014-05-22 18:26:40 +02007608. Variables and Options *netrw-var* *netrw-settings* {{{1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000761
Bram Moolenaar15146672011-10-20 22:22:38 +0200762(also see: |netrw-options| |netrw-variables| |netrw-protocol|
Bram Moolenaar5b435d62012-04-05 17:33:26 +0200763 |netrw-browser-settings| |netrw-browser-options| )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000764
Bram Moolenaar9964e462007-05-05 17:54:07 +0000765The <netrw.vim> script provides several variables which act as options to
Bram Moolenaar446cb832008-06-24 21:56:24 +0000766affect <netrw.vim>'s file transfer behavior. These variables typically may be
767set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
Bram Moolenaar15146672011-10-20 22:22:38 +0200768 *netrw-options*
Bram Moolenaar446cb832008-06-24 21:56:24 +0000769>
Bram Moolenaar9964e462007-05-05 17:54:07 +0000770 -------------
771 Netrw Options
772 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000773 Option Meaning
774 -------------- -----------------------------------------------
775<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000776 b:netrw_col Holds current cursor position (during NetWrite)
777 g:netrw_cygwin =1 assume scp under windows is from cygwin
778 (default/windows)
779 =0 assume scp under windows accepts windows
780 style paths (default/else)
781 g:netrw_ftp =0 use default ftp (uid password)
782 g:netrw_ftpmode ="binary" (default)
783 ="ascii" (your choice)
784 g:netrw_ignorenetrc =1 (default)
785 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000786 want it used, then set this variable. Its
787 mere existence is enough to cause <.netrc>
788 to be ignored.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000789 b:netrw_lastfile Holds latest method/machine/path.
790 b:netrw_line Holds current line number (during NetWrite)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000791 g:netrw_silent =0 transfers done normally
792 =1 transfers done silently
793 g:netrw_uid Holds current user-id for ftp.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000794 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
795 =1 use WinNT/2K/XP's rcp, binary mode
796 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
797 =1 use default method to do ftp >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000798 -----------------------------------------------------------------------
799<
Bram Moolenaar13600302014-05-22 18:26:40 +0200800 *netrw-internal-variables*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000801The script will also make use of the following variables internally, albeit
802temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000803>
804 -------------------
805 Temporary Variables
806 -------------------
807 Variable Meaning
808 -------- ------------------------------------
809<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100810 b:netrw_method Index indicating rcp/ftp+.netrc/ftp
811 w:netrw_method (same as b:netrw_method)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000812 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100813 b:netrw_fname Holds filename being accessed >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000814 ------------------------------------------------------------
815<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000816 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000817
818Netrw supports a number of protocols. These protocols are invoked using the
819variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000820>
821 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000822 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000823 ------------------------
Bram Moolenaar9964e462007-05-05 17:54:07 +0000824 Option Type Setting Meaning
825 --------- -------- -------------- ---------------------------
Bram Moolenaar8d043172014-01-23 14:24:41 +0100826< netrw_ftp variable =doesn't exist userid set by "user userid"
Bram Moolenaar9964e462007-05-05 17:54:07 +0000827 =0 userid set by "user userid"
828 =1 userid set by "userid"
829 NetReadFixup function =doesn't exist no change
830 =exists Allows user to have files
831 read via ftp automatically
832 transformed however they wish
833 by NetReadFixup()
Bram Moolenaar8d043172014-01-23 14:24:41 +0100834 g:netrw_dav_cmd var ="cadaver" if cadaver is executable
835 g:netrw_dav_cmd var ="curl -o" elseif curl is executable
836 g:netrw_fetch_cmd var ="fetch -o" if fetch is available
837 g:netrw_ftp_cmd var ="ftp"
838 g:netrw_http_cmd var ="fetch -o" if fetch is available
839 g:netrw_http_cmd var ="wget -O" else if wget is available
840 g:netrw_http_put_cmd var ="curl -T"
841 g:netrw_list_cmd var ="ssh USEPORT HOSTNAME ls -Fa"
842 g:netrw_rcp_cmd var ="rcp"
843 g:netrw_rsync_cmd var ="rsync -a"
844 g:netrw_scp_cmd var ="scp -q"
845 g:netrw_sftp_cmd var ="sftp" >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000846 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000847<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000848 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000849
Bram Moolenaar9964e462007-05-05 17:54:07 +0000850The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
851specify the external program to use handle the ftp protocol. They may
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200852include command line options (such as -p for passive mode). Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000853
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +0200854 let g:netrw_ftp_cmd= "ftp -p"
855<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000856Browsing is supported by using the |g:netrw_list_cmd|; the substring
857"HOSTNAME" will be changed via substitution with whatever the current request
858is for a hostname.
859
860Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
861that give trouble . In order to best understand how to use these options if
862ftp is giving you troubles, a bit of discussion is provided on how netrw does
863ftp reads.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000864
865For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000866temporary file:
867>
868 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
869 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000870<
Bram Moolenaar9964e462007-05-05 17:54:07 +0000871 open machine [port] open machine [port]
872 user userid password userid password
873 [g:netrw_ftpmode] password
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200874 [g:netrw_ftpextracmd] [g:netrw_ftpmode]
Bram Moolenaar9964e462007-05-05 17:54:07 +0000875 get filename tempfile [g:netrw_extracmd]
876 get filename tempfile >
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000877 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000878<
Bram Moolenaar8ada2cc2010-07-29 20:43:36 +0200879The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
Bram Moolenaar9964e462007-05-05 17:54:07 +0000880
Bram Moolenaar071d4272004-06-13 20:20:40 +0000881Netrw then executes the lines above by use of a filter:
882>
883 :%! {g:netrw_ftp_cmd} -i [-n]
884<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000885where
886 g:netrw_ftp_cmd is usually "ftp",
887 -i tells ftp not to be interactive
888 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
889
890If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000891userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000892The temporary file is then read into the main editing session window that
893requested it and the temporary file deleted.
894
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000895If your ftp doesn't accept the "user" command and immediately just demands a
896userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000897
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000898 *netrw-cadaver*
899To handle the SSL certificate dialog for untrusted servers, one may pull
900down the certificate and place it into /usr/ssl/cert.pem. This operation
901renders the server treatment as "trusted".
902
Bram Moolenaar433f7c82006-03-21 21:29:36 +0000903 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904If your ftp for whatever reason generates unwanted lines (such as AUTH
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100905messages) you may write a NetReadFixup() function:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906>
907 function! NetReadFixup(method,line1,line2)
908 " a:line1: first new line in current file
909 " a:line2: last new line in current file
910 if a:method == 1 "rcp
911 elseif a:method == 2 "ftp + <.netrc>
912 elseif a:method == 3 "ftp + machine,uid,password,filename
913 elseif a:method == 4 "scp
914 elseif a:method == 5 "http/wget
915 elseif a:method == 6 "dav/cadaver
916 elseif a:method == 7 "rsync
917 elseif a:method == 8 "fetch
918 elseif a:method == 9 "sftp
Bram Moolenaar9964e462007-05-05 17:54:07 +0000919 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000920 endif
921 endfunction
922>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000923The NetReadFixup() function will be called if it exists and thus allows you to
924customize your reading process. As a further example, <netrw.vim> contains
925just such a function to handle Windows 95 ftp. For whatever reason, Windows
92695's ftp dumps four blank lines at the end of a transfer, and so it is
927desirable to automate their removal. Here's some code taken from <netrw.vim>
928itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000929>
930 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000931 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar9964e462007-05-05 17:54:07 +0000933 let fourblanklines= line2 - 3
934 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000935 endif
936 endfunction
937 endif
938>
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200939(Related topics: |ftp| |netrw-userpass| |netrw-start|)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000940
941==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00009429. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100943 *netrw-browser* *netrw-dir* *netrw-list*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000944
Bram Moolenaar446cb832008-06-24 21:56:24 +0000945INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
946 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000947
Bram Moolenaar446cb832008-06-24 21:56:24 +0000948Netrw supports the browsing of directories on your local system and on remote
949hosts; browsing includes listing files and directories, entering directories,
950editing files therein, deleting files/directories, making new directories,
951moving (renaming) files and directories, copying files and directories, etc.
952One may mark files and execute any system command on them! The Netrw browser
953generally implements the previous explorer's maps and commands for remote
954directories, although details (such as pertinent global variable names)
955necessarily differ. To browse a directory, simply "edit" it! >
Bram Moolenaar269ec652004-07-29 08:43:53 +0000956
Bram Moolenaar446cb832008-06-24 21:56:24 +0000957 vim /your/directory/
958 vim .
959 vim c:\your\directory\
960<
961(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
962 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000963
964The Netrw remote file and directory browser handles two protocols: ssh and
Bram Moolenaar446cb832008-06-24 21:56:24 +0000965ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
966in its remote browsing. Specifying any other protocol will cause it to be
967used for file transfers; but the ssh protocol will be used to do remote
968browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000969
Bram Moolenaar446cb832008-06-24 21:56:24 +0000970To use Netrw's remote directory browser, simply attempt to read a "file" with
971a trailing slash and it will be interpreted as a request to list a directory:
972>
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000973 vim [protocol]://[user@]hostname/path/
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000974<
Bram Moolenaar446cb832008-06-24 21:56:24 +0000975where [protocol] is typically scp or ftp. As an example, try: >
Bram Moolenaar4ea8fe12006-03-09 22:32:39 +0000976
Bram Moolenaar446cb832008-06-24 21:56:24 +0000977 vim ftp://ftp.home.vim.org/pub/vim/
978<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100979For local directories, the trailing slash is not required. Again, because it's
Bram Moolenaar446cb832008-06-24 21:56:24 +0000980easy to miss: to browse remote directories, the url must terminate with a
981slash!
Bram Moolenaar83bab712005-08-01 21:58:57 +0000982
Bram Moolenaar446cb832008-06-24 21:56:24 +0000983If you'd like to avoid entering the password repeatedly for remote directory
984listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
985ftp, see |netrw-netrc| (if your ftp supports it).
Bram Moolenaar83bab712005-08-01 21:58:57 +0000986
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987There are several things you can do to affect the browser's display of files:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000988
Bram Moolenaar446cb832008-06-24 21:56:24 +0000989 * To change the listing style, press the "i" key (|netrw-i|).
990 Currently there are four styles: thin, long, wide, and tree.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100991 To make that change "permanent", see |g:netrw_liststyle|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000992
Bram Moolenaar446cb832008-06-24 21:56:24 +0000993 * To hide files (don't want to see those xyz~ files anymore?) see
994 |netrw-ctrl-h|.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000995
Bram Moolenaar446cb832008-06-24 21:56:24 +0000996 * Press s to sort files by name, time, or size.
997
998See |netrw-browse-cmds| for all the things you can do with netrw!
999
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001000 *netrw-getftype* *netrw-filigree* *netrw-ftype*
1001The |getftype()| function is used to append a bit of filigree to indicate
1002filetype to locally listed files:
1003
1004 directory : /
1005 executable : *
1006 fifo : |
1007 links : @
1008 sockets : =
1009
1010The filigree also affects the |g:netrw_sort_sequence|.
1011
Bram Moolenaar446cb832008-06-24 21:56:24 +00001012
1013QUICK HELP *netrw-quickhelp* {{{2
1014 (Use ctrl-] to select a topic)~
1015 Intro to Browsing...............................|netrw-intro-browse|
1016 Quick Reference: Maps.........................|netrw-quickmap|
1017 Quick Reference: Commands.....................|netrw-browse-cmds|
1018 Hiding
1019 Edit hiding list..............................|netrw-ctrl-h|
1020 Hiding Files or Directories...................|netrw-a|
1021 Hiding/Unhiding by suffix.....................|netrw-mh|
1022 Hiding dot-files.............................|netrw-gh|
1023 Listing Style
1024 Select listing style (thin/long/wide/tree)....|netrw-i|
1025 Associated setting variable...................|g:netrw_liststyle|
1026 Shell command used to perform listing.........|g:netrw_list_cmd|
1027 Quick file info...............................|netrw-qf|
1028 Sorted by
1029 Select sorting style (name/time/size).........|netrw-s|
1030 Editing the sorting sequence..................|netrw-S|
Bram Moolenaarc236c162008-07-13 17:41:49 +00001031 Sorting options...............................|g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001032 Associated setting variable...................|g:netrw_sort_sequence|
1033 Reverse sorting order.........................|netrw-r|
1034
1035
1036 *netrw-quickmap* *netrw-quickmaps*
1037QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001038>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001039 --- ----------------- ----
1040 Map Quick Explanation Link
1041 --- ----------------- ----
1042< <F1> Causes Netrw to issue help
1043 <cr> Netrw will enter the directory or read the file |netrw-cr|
1044 <del> Netrw will attempt to remove the file/directory |netrw-del|
1045 - Makes Netrw go up one directory |netrw--|
1046 a Toggles between normal display, |netrw-a|
Bram Moolenaar13600302014-05-22 18:26:40 +02001047 hiding (suppress display of files matching g:netrw_list_hide)
1048 showing (display only files which match g:netrw_list_hide)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001049 c Make browsing directory the current directory |netrw-c|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001050 C Setting the editing window |netrw-C|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001051 d Make a directory |netrw-d|
1052 D Attempt to remove the file(s)/directory(ies) |netrw-D|
1053 gb Go to previous bookmarked directory |netrw-gb|
1054 gh Quick hide/unhide of dot-files |netrw-gh|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001055 <c-h> Edit file hiding list |netrw-ctrl-h|
1056 i Cycle between thin, long, wide, and tree listings |netrw-i|
1057 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
1058 mb Bookmark current directory |netrw-mb|
1059 mc Copy marked files to marked-file target directory |netrw-mc|
1060 md Apply diff to marked files (up to 3) |netrw-md|
1061 me Place marked files on arg list and edit them |netrw-me|
1062 mf Mark a file |netrw-mf|
1063 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
1064 mm Move marked files to marked-file target directory |netrw-mm|
1065 mp Print marked files |netrw-mp|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001066 mr Mark files satisfying a shell-style |regexp| |netrw-mr|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001067 mt Current browsing directory becomes markfile target |netrw-mt|
1068 mT Apply ctags to marked files |netrw-mT|
1069 mu Unmark all marked files |netrw-mu|
1070 mx Apply arbitrary shell command to marked files |netrw-mx|
1071 mz Compress/decompress marked files |netrw-mz|
1072 o Enter the file/directory under the cursor in a new |netrw-o|
Bram Moolenaar13600302014-05-22 18:26:40 +02001073 browser window. A horizontal split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001074 O Obtain a file specified by cursor |netrw-O|
1075 p Preview the file |netrw-p|
1076 P Browse in the previously used window |netrw-P|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001077 qb List bookmarked directories and history |netrw-qb|
1078 qf Display information on file |netrw-qf|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001079 r Reverse sorting order |netrw-r|
1080 R Rename the designed file(s)/directory(ies) |netrw-R|
1081 s Select sorting style: by name, time, or file size |netrw-s|
1082 S Specify suffix priority for name-sorting |netrw-S|
1083 t Enter the file/directory under the cursor in a new tab|netrw-t|
1084 u Change to recently-visited directory |netrw-u|
1085 U Change to subsequently-visited directory |netrw-U|
1086 v Enter the file/directory under the cursor in a new |netrw-v|
Bram Moolenaar13600302014-05-22 18:26:40 +02001087 browser window. A vertical split is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001088 x View file with an associated program |netrw-x|
Bram Moolenaar97d62492012-11-15 21:28:22 +01001089 X Execute filename under cursor via |system()| |netrw-X|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001090
Bram Moolenaarc236c162008-07-13 17:41:49 +00001091 % Open a new file in netrw's current directory |netrw-%|
1092
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001093 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001094 <leftmouse> (gvim only) selects word under mouse as if a <cr>
1095 had been pressed (ie. edit file, change directory)
1096 <middlemouse> (gvim only) same as P selecting word under mouse;
1097 see |netrw-P|
1098 <rightmouse> (gvim only) delete file/directory using word under
1099 mouse
1100 <2-leftmouse> (gvim only) when:
Bram Moolenaar13600302014-05-22 18:26:40 +02001101 * in a netrw-selected file, AND
1102 * |g:netrw_retmap| == 1 AND
1103 * the user doesn't already have a <2-leftmouse>
Bram Moolenaarff034192013-04-24 18:51:19 +02001104 mapping defined before netrw is autoloaded,
Bram Moolenaar446cb832008-06-24 21:56:24 +00001105 then a double clicked leftmouse button will return
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001106 to the netrw browser window. See |g:netrw_retmap|.
Bram Moolenaar8d043172014-01-23 14:24:41 +01001107 <s-leftmouse> (gvim only) like mf, will mark files. Dragging
1108 the shifted leftmouse will mark multiple files.
1109 (see |netrw-mf|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001110
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001111 (to disable mouse buttons while browsing: |g:netrw_mousemaps|)
1112
Bram Moolenaar446cb832008-06-24 21:56:24 +00001113 *netrw-quickcom* *netrw-quickcoms*
1114QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
Bram Moolenaar8d043172014-01-23 14:24:41 +01001115 :NetrwClean[!]............................................|netrw-clean|
1116 :NetrwSettings............................................|netrw-settings|
1117 :Ntree....................................................|netrw-ntree|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001118 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
1119 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
Bram Moolenaar8d043172014-01-23 14:24:41 +01001120 :Lexplore [dir] Left Explorer Toggle...................|netrw-explore|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001121 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1122 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1123 :Rexplore Return to Explorer.....................|netrw-explore|
1124 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
1125 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
1126 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1127
1128BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001129
Bram Moolenaar446cb832008-06-24 21:56:24 +00001130One may easily "bookmark" a directory by using >
1131
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001132 mb
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001133<
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001134Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
1135kept in sorted order.
1136
1137Related Topics:
1138 |netrw-gb| how to return (go) to a bookmark
1139 |netrw-mB| how to delete bookmarks
1140 |netrw-qb| how to list bookmarks
Bram Moolenaar4a85b412006-04-23 22:40:29 +00001141
1142
Bram Moolenaar446cb832008-06-24 21:56:24 +00001143BROWSING *netrw-cr* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001144
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001145Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001146Hitting the <cr> (the return key) will select the file or directory.
1147Directories will themselves be listed, and files will be opened using the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001148protocol given in the original read request.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001149
Bram Moolenaar446cb832008-06-24 21:56:24 +00001150 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
1151 two or more spaces delimit filenames and directory names for the long and
1152 wide listing formats. Thus, if your filename or directory name has two or
1153 more sequential spaces embedded in it, or any trailing spaces, then you'll
1154 need to use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001155
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001156The |g:netrw_browse_split| option, which is zero by default, may be used to
Bram Moolenaar446cb832008-06-24 21:56:24 +00001157cause the opening of files to be done in a new window or tab instead of the
1158default. When the option is one or two, the splitting will be taken
1159horizontally or vertically, respectively. When the option is set to three, a
1160<cr> will cause the file to appear in a new tab.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001161
Bram Moolenaar83bab712005-08-01 21:58:57 +00001162
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001163When using the gui (gvim), one may select a file by pressing the <leftmouse>
1164button. In addition, if
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001165
Bram Moolenaar446cb832008-06-24 21:56:24 +00001166 *|g:netrw_retmap| == 1 AND (its default value is 0)
1167 * in a netrw-selected file, AND
1168 * the user doesn't already have a <2-leftmouse> mapping defined before
1169 netrw is loaded
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001170
Bram Moolenaar446cb832008-06-24 21:56:24 +00001171then a doubly-clicked leftmouse button will return to the netrw browser
1172window.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001173
Bram Moolenaar446cb832008-06-24 21:56:24 +00001174Netrw attempts to speed up browsing, especially for remote browsing where one
1175may have to enter passwords, by keeping and re-using previously obtained
1176directory listing buffers. The |g:netrw_fastbrowse| variable is used to
1177control this behavior; one may have slow browsing (no buffer re-use), medium
1178speed browsing (re-use directory buffer listings only for remote directories),
1179and fast browsing (re-use directory buffer listings as often as possible).
1180The price for such re-use is that when changes are made (such as new files
1181are introduced into a directory), the listing may become out-of-date. One may
1182always refresh directory listing buffers by pressing ctrl-L (see
1183|netrw-ctrl-l|).
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001184
Bram Moolenaara6878372014-03-22 21:02:50 +01001185 *:netrw-s-cr*
1186 Squeezing the Current Tree-Listing Directory~
1187 When the tree listing style is enabled (see |netrw-i|) and one is using
1188 gvim, then the <s-cr> mapping may be used to squeeze (close) the
1189 directory currently containing the cursor.
1190
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001191
Bram Moolenaar446cb832008-06-24 21:56:24 +00001192Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1193Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1194 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1195 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1196 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1197
1198
1199BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1200
1201Normally one enters a file or directory using the <cr>. However, the "o" map
1202allows one to open a new window to hold the new directory listing or file. A
1203horizontal split is used. (for vertical splitting, see |netrw-v|)
1204
1205Normally, the o key splits the window horizontally with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001206cursor at the top.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001207
1208Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1209
Bram Moolenaarff034192013-04-24 18:51:19 +02001210Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02001211Associated setting variables:
1212 |g:netrw_alto| control above/below splitting
1213 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001214
Bram Moolenaarff034192013-04-24 18:51:19 +02001215BROWSING WITH A NEW TAB *netrw-t*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001216
1217Normally one enters a file or directory using the <cr>. The "t" map
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001218allows one to open a new window holding the new directory listing or file in
Bram Moolenaarff034192013-04-24 18:51:19 +02001219a new tab.
1220
1221If you'd like to have the new listing in a background tab, use |gT|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001222
Bram Moolenaar15146672011-10-20 22:22:38 +02001223Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v|
1224Associated setting variables:
1225 |g:netrw_winsize| control initial sizing
Bram Moolenaar446cb832008-06-24 21:56:24 +00001226
1227BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1228
1229Normally one enters a file or directory using the <cr>. However, the "v" map
1230allows one to open a new window to hold the new directory listing or file. A
1231vertical split is used. (for horizontal splitting, see |netrw-o|)
1232
1233Normally, the v key splits the window vertically with the new window and
Bram Moolenaar15146672011-10-20 22:22:38 +02001234cursor at the left.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001235
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001236There is only one tree listing buffer; using "v" on a displayed subdirectory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001237will split the screen, but the same buffer will be shown twice.
1238
Bram Moolenaar13600302014-05-22 18:26:40 +02001239Related Actions: |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02001240Associated setting variables:
1241 |g:netrw_altv| control right/left splitting
1242 |g:netrw_winsize| control initial sizing
1243
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001244
1245CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001246
Bram Moolenaar9964e462007-05-05 17:54:07 +00001247The "i" map cycles between the thin, long, wide, and tree listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001248
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001249The thin listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001250
Bram Moolenaar8299df92004-07-10 09:47:34 +00001251The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001252directories or displays the filename, file size (in bytes), and the time and
1253date of last modification for local directories. With the long listing
1254format, netrw is not able to recognize filenames which have trailing spaces.
1255Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001256
Bram Moolenaar9964e462007-05-05 17:54:07 +00001257The wide listing format uses two or more contiguous spaces to delineate
1258filenames; when using that format, netrw won't be able to recognize or use
1259filenames which have two or more contiguous spaces embedded in the name or any
1260trailing spaces. The thin listing format will, however, work with such files.
Bram Moolenaar13600302014-05-22 18:26:40 +02001261The wide listing format is the most compact.
Bram Moolenaar9964e462007-05-05 17:54:07 +00001262
1263The tree listing format has a top directory followed by files and directories
Bram Moolenaar13600302014-05-22 18:26:40 +02001264preceded by one or more "|"s, which indicate the directory depth. One may
1265open and close directories by pressing the <cr> key while atop the directory
1266name.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001267
1268One may make a preferred listing style your default; see |g:netrw_liststyle|.
1269As an example, by putting the following line in your .vimrc, >
1270 let g:netrw_liststyle= 4
1271the tree style will become your default listing style.
Bram Moolenaar8299df92004-07-10 09:47:34 +00001272
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001273One typical way to use the netrw tree display is to: >
1274
1275 vim .
1276 (use i until a tree display shows)
1277 navigate to a file
1278 v (edit as desired in vertically split window)
1279 ctrl-w h (to return to the netrw listing)
1280 P (edit newly selected file in the previous window)
1281 ctrl-w h (to return to the netrw listing)
1282 P (edit newly selected file in the previous window)
1283 ...etc...
1284<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001285Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1286 |g:netrw_timefmt| |g:netrw_list_cmd|
Bram Moolenaar8299df92004-07-10 09:47:34 +00001287
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001288CHANGE FILE PERMISSION *netrw-gp* {{{2
1289
1290"gp" will ask you for a new permission for the file named under the cursor.
1291Currently, this only works for local files.
1292
1293Associated setting variables: |g:netrw_chgperm|
1294
Bram Moolenaar83bab712005-08-01 21:58:57 +00001295
Bram Moolenaar446cb832008-06-24 21:56:24 +00001296CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
Bram Moolenaar843ee412004-06-30 16:16:41 +00001297
Bram Moolenaar446cb832008-06-24 21:56:24 +00001298To change directory back to a bookmarked directory, use
Bram Moolenaar843ee412004-06-30 16:16:41 +00001299
Bram Moolenaar446cb832008-06-24 21:56:24 +00001300 {cnt}gb
Bram Moolenaar843ee412004-06-30 16:16:41 +00001301
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001302Any count may be used to reference any of the bookmarks.
Bram Moolenaarff034192013-04-24 18:51:19 +02001303Note that |netrw-qb| shows both bookmarks and history; to go
1304to a location stored in the history see |netrw-u| and |netrw-U|.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001305
1306Related Topics:
1307 |netrw-mB| how to delete bookmarks
1308 |netrw-mb| how to make a bookmark
1309 |netrw-qb| how to list bookmarks
Bram Moolenaar843ee412004-06-30 16:16:41 +00001310
Bram Moolenaar843ee412004-06-30 16:16:41 +00001311
Bram Moolenaar00a927d2010-05-14 23:24:24 +02001312CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001313
1314Every time you change to a new directory (new for the current session),
1315netrw will save the directory in a recently-visited directory history
Bram Moolenaaradc21822011-04-01 18:03:16 +02001316list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001317"u" map, one can change to an earlier directory (predecessor). To do
1318the opposite, see |netrw-U|.
1319
Bram Moolenaarff034192013-04-24 18:51:19 +02001320The "u" map also accepts counts to go back in the history several slots.
1321For your convenience, |netrw-qb| lists the history number which can be
1322re-used in that count.
1323
1324See |g:netrw_dirhistmax| for how to control the quantity of history stack
1325slots.
1326
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001327
Bram Moolenaar446cb832008-06-24 21:56:24 +00001328CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001329
1330With the "U" map, one can change to a later directory (successor).
1331This map is the opposite of the "u" map. (see |netrw-u|) Use the
Bram Moolenaar446cb832008-06-24 21:56:24 +00001332q map to list both the bookmarks and history. (see |netrw-qb|)
1333
Bram Moolenaarff034192013-04-24 18:51:19 +02001334The "U" map also accepts counts to go forward in the history several slots.
1335
1336See |g:netrw_dirhistmax| for how to control the quantity of history stack
1337slots.
1338
Bram Moolenaar446cb832008-06-24 21:56:24 +00001339
Bram Moolenaar8d043172014-01-23 14:24:41 +01001340CHANGING TREE TOP *netrw-ntree* *:Ntree*
1341
1342One may specify a new tree top for tree listings using >
1343
1344 :Ntree [dirname]
1345
1346Without a "dirname", the current line is used (and any leading depth
1347information is elided).
1348With a "dirname", the specified directory name is used.
1349
1350
Bram Moolenaar446cb832008-06-24 21:56:24 +00001351NETRW CLEAN *netrw-clean* *:NetrwClean*
1352
1353With :NetrwClean one may easily remove netrw from one's home directory;
1354more precisely, from the first directory on your |'runtimepath'|.
1355
1356With :NetrwClean!, netrw will remove netrw from all directories on your
1357|'runtimepath'|.
1358
1359With either form of the command, netrw will first ask for confirmation
1360that the removal is in fact what you want to do. If netrw doesn't have
1361permission to remove a file, it will issue an error message.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001362
Bram Moolenaar9964e462007-05-05 17:54:07 +00001363 *netrw-gx*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001364CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
Bram Moolenaar9964e462007-05-05 17:54:07 +00001365 (also see |netrw_filehandler|)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001366
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001367Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1368best seen with a special handler (ie. a tool provided with your computer).
1369Netrw allows one to invoke such special handlers by: >
1370
1371 * when Exploring, hit the "x" key
1372 * when editing, hit gx with the cursor atop the special filename
Bram Moolenaar9964e462007-05-05 17:54:07 +00001373< (not available if the |g:netrw_nogx| variable exists)
1374
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001375Netrw determines which special handler by the following method:
1376
1377 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1378 view files. Examples of useful settings (place into your <.vimrc>): >
1379
1380 :let g:netrw_browsex_viewer= "kfmclient exec"
1381< or >
1382 :let g:netrw_browsex_viewer= "gnome-open"
1383<
1384 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1385 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001386
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001387 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001388 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001389 * for KDE (with kfmclient) : kfmclient is used.
1390 * for Mac OS X : open is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001391 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001392
1393The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001394appropriate application to use to "handle" these files. Such things as
1395OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1396*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001397
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001398 *netrw_filehandler*
Bram Moolenaar9964e462007-05-05 17:54:07 +00001399
1400The "x" map applies a function to a file, based on its extension. Of course,
1401the handler function must exist for it to be called!
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001402>
1403 Ex. mypgm.html x ->
Bram Moolenaar9964e462007-05-05 17:54:07 +00001404 NFH_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001405<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001406Users may write their own netrw File Handler functions to support more
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001407suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
Bram Moolenaar9964e462007-05-05 17:54:07 +00001408examples on how to make file handler functions. As an example: >
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001409
Bram Moolenaar9964e462007-05-05 17:54:07 +00001410 " NFH_suffix(filename)
1411 fun! NFH_suffix(filename)
1412 ..do something special with filename..
1413 endfun
1414<
1415These functions need to be defined in some file in your .vim/plugin
1416(vimfiles\plugin) directory. Vim's function names may not have punctuation
1417characters (except for the underscore) in them. To support suffices that
1418contain such characters, netrw will first convert the suffix using the
1419following table: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001420
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001421 @ -> AT ! -> EXCLAMATION % -> PERCENT
1422 : -> COLON = -> EQUAL ? -> QUESTION
Bram Moolenaar9964e462007-05-05 17:54:07 +00001423 , -> COMMA - -> MINUS ; -> SEMICOLON
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001424 $ -> DOLLAR + -> PLUS ~ -> TILDE
1425<
Bram Moolenaar9964e462007-05-05 17:54:07 +00001426So, for example: >
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001427
Bram Moolenaar9964e462007-05-05 17:54:07 +00001428 file.rcs,v -> NFH_rcsCOMMAv()
1429<
1430If more such translations are necessary, please send me email: >
1431 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1432with a request.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001433
Bram Moolenaar446cb832008-06-24 21:56:24 +00001434Associated setting variable: |g:netrw_browsex_viewer|
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001435
Bram Moolenaar446cb832008-06-24 21:56:24 +00001436 *netrw-curdir*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001437DELETING BOOKMARKS *netrw-mB* {{{2
1438
1439To delete a bookmark, use >
1440
1441 {cnt}mB
1442<
1443Related Topics:
1444 |netrw-gb| how to return (go) to a bookmark
1445 |netrw-mb| how to make a bookmark
1446 |netrw-qb| how to list bookmarks
1447
1448
Bram Moolenaar446cb832008-06-24 21:56:24 +00001449DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001450
Bram Moolenaar446cb832008-06-24 21:56:24 +00001451If files have not been marked with |netrw-mf|: (local marked file list)
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001452
Bram Moolenaar446cb832008-06-24 21:56:24 +00001453 Deleting/removing files and directories involves moving the cursor to the
1454 file/directory to be deleted and pressing "D". Directories must be empty
1455 first before they can be successfully removed. If the directory is a
1456 softlink to a directory, then netrw will make two requests to remove the
1457 directory before succeeding. Netrw will ask for confirmation before doing
1458 the removal(s). You may select a range of lines with the "V" command
1459 (visual selection), and then pressing "D".
Bram Moolenaar9964e462007-05-05 17:54:07 +00001460
Bram Moolenaar446cb832008-06-24 21:56:24 +00001461If files have been marked with |netrw-mf|: (local marked file list)
1462
1463 Marked files (and empty directories) will be deleted; again, you'll be
1464 asked to confirm the deletion before it actually takes place.
1465
Bram Moolenaar13600302014-05-22 18:26:40 +02001466A further approach is to delete files which match a pattern.
1467
1468 * use :MF pattern (see |netrw-:MF|); then press "D".
1469
1470 * use mr (see |netrw-mr|) which will prompt you for pattern.
1471 This will cause the matching files to be marked. Then,
1472 press "D".
1473
Bram Moolenaar446cb832008-06-24 21:56:24 +00001474The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
Bram Moolenaar13600302014-05-22 18:26:40 +02001475used to control the attempts to remove remote files and directories. The
Bram Moolenaar446cb832008-06-24 21:56:24 +00001476g:netrw_rm_cmd is used with files, and its default value is:
1477
1478 g:netrw_rm_cmd: ssh HOSTNAME rm
1479
1480The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1481Its default value is:
1482
Bram Moolenaar13600302014-05-22 18:26:40 +02001483 |g:netrw_rmdir_cmd|: ssh HOSTNAME rmdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001484
1485If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1486to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1487
Bram Moolenaar13600302014-05-22 18:26:40 +02001488 |g:netrw_rmf_cmd|: ssh HOSTNAME rm -f
Bram Moolenaar446cb832008-06-24 21:56:24 +00001489
Bram Moolenaar15146672011-10-20 22:22:38 +02001490Related topics: |netrw-d|
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001491Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001492 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001493
1494
Bram Moolenaar446cb832008-06-24 21:56:24 +00001495*netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
Bram Moolenaar8d043172014-01-23 14:24:41 +01001496*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore* *netrw-lexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001497DIRECTORY EXPLORATION COMMANDS {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001498
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001499 :[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1500 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
Bram Moolenaara6878372014-03-22 21:02:50 +01001501 :Rexplore ... Return to/from Explorer *:Rexplore*
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001502 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
1503 :Texplore [dir]... Tab & Explore *:Texplore*
1504 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar8d043172014-01-23 14:24:41 +01001505 :Lexplore [dir]... Left Explorer Toggle *:Lexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001506
1507 Used with :Explore **/pattern : (also see |netrw-starstar|)
1508 :Nexplore............. go to next matching file *:Nexplore*
1509 :Pexplore............. go to previous matching file *:Pexplore*
1510
Bram Moolenaara6878372014-03-22 21:02:50 +01001511 *netrw-:Explore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001512:Explore will open the local-directory browser on the current file's
1513 directory (or on directory [dir] if specified). The window will be
1514 split only if the file has been modified, otherwise the browsing
1515 window will take over that window. Normally the splitting is taken
1516 horizontally.
Bram Moolenaara6878372014-03-22 21:02:50 +01001517 Also see: |netrw-:Rexplore|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001518:Explore! is like :Explore, but will use vertical splitting.
Bram Moolenaara6878372014-03-22 21:02:50 +01001519 *netrw-:Lexplore*
Bram Moolenaar8d043172014-01-23 14:24:41 +01001520:Lexplore [dir] toggles an Explorer window on the left hand side
1521 of the current tab It will open a netrw window on the current
Bram Moolenaara6878372014-03-22 21:02:50 +01001522 directory if [dir] is omitted; a :Lexplore [dir] will show
1523 the specified directory in the left-hand side browser display
1524 no matter from which window the command is issued. By default,
1525 :Lexplore will change an uninitialized |g:netrw_chgwin| to 2;
1526 edits will thus be preferentially made in window#2.
1527 Also see: |netrw-C|| |g:netrw_chgwin| |g:netrw_winsize|
1528 |netrw-p| |netrw-P|| |g:netrw_browse_split|
1529 *netrw-:Sexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001530:Sexplore will always split the window before invoking the local-directory
1531 browser. As with Explore, the splitting is normally done
1532 horizontally.
1533:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
Bram Moolenaara6878372014-03-22 21:02:50 +01001534 *netrw-:Hexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001535:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1536:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
Bram Moolenaara6878372014-03-22 21:02:50 +01001537 *netrw-:Vexplore*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001538:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1539:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
Bram Moolenaara6878372014-03-22 21:02:50 +01001540 *netrw-:Texplore*
Bram Moolenaar8d043172014-01-23 14:24:41 +01001541:Texplore [dir] does a |:tabnew| before generating the browser window
Bram Moolenaar446cb832008-06-24 21:56:24 +00001542
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001543By default, these commands use the current file's directory. However, one may
1544explicitly provide a directory (path) to use.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001545
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001546The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1547columns the new explorer window should have.
1548
1549Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1550user, is used to control the quantity of rows and/or columns new explorer
1551windows should have.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001552
Bram Moolenaara6878372014-03-22 21:02:50 +01001553 *netrw-:Rexplore*
1554:Rexplore This command is a little different from the others as it doesn't
1555 necessarily open an Explorer window.
1556
1557 Return to Explorer~
1558 When one edits a file, for example by pressing <cr> when the
1559 cursor is atop a file in a netrw browser window, :Rexplore will
Bram Moolenaar13600302014-05-22 18:26:40 +02001560 return the display to that of the last netrw browser display
1561 in that window.
Bram Moolenaara6878372014-03-22 21:02:50 +01001562
1563 Return from Explorer~
1564 Conversely, when one is editing a directory, issuing a :Rexplore
Bram Moolenaar13600302014-05-22 18:26:40 +02001565 will return to editing the file that was last edited in that
Bram Moolenaara6878372014-03-22 21:02:50 +01001566 window.
1567
1568 The <2-leftmouse> map (which is only available under gvim and
1569 cooperative terms) does the same as :Rexplore.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001570
Bram Moolenaar8d043172014-01-23 14:24:41 +01001571Also see: |g:netrw_alto| |g:netrw_altv| |g:netrw_winsize|
1572
Bram Moolenaar446cb832008-06-24 21:56:24 +00001573
1574*netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1575EXPLORING WITH STARS AND PATTERNS
1576
1577When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1578following four styles, Explore generates a list of files which satisfy
1579the request. >
1580
1581 */filepat files in current directory which satisfy filepat
1582 **/filepat files in current directory or below which satisfy the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001583 file pattern
Bram Moolenaar446cb832008-06-24 21:56:24 +00001584 *//pattern files in the current directory which contain the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001585 pattern (vimgrep is used)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001586 **//pattern files in the current directory or below which contain
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001587 the pattern (vimgrep is used)
Bram Moolenaar572cb562005-08-05 21:35:02 +00001588<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001589The cursor will be placed on the first file in the list. One may then
1590continue to go to subsequent files on that list via |:Nexplore| or to
1591preceding files on that list with |:Pexplore|. Explore will update the
1592directory and place the cursor appropriately.
1593
1594A plain >
1595 :Explore
1596will clear the explore list.
1597
1598If your console or gui produces recognizable shift-up or shift-down sequences,
1599then you'll likely find using shift-downarrow and shift-uparrow convenient.
1600They're mapped by netrw:
1601
1602 <s-down> == Nexplore, and
1603 <s-up> == Pexplore.
1604
1605As an example, consider
1606>
1607 :Explore */*.c
1608 :Nexplore
1609 :Nexplore
1610 :Pexplore
1611<
1612The status line will show, on the right hand side of the status line, a
1613message like "Match 3 of 20".
1614
Bram Moolenaara6878372014-03-22 21:02:50 +01001615Associated setting variables:
1616 |g:netrw_keepdir| |g:netrw_browse_split|
1617 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1618 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1619 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1620 |g:netrw_liststyle|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001621
1622
Bram Moolenaar446cb832008-06-24 21:56:24 +00001623DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001624
Bram Moolenaar446cb832008-06-24 21:56:24 +00001625With the cursor atop a filename, pressing "qf" will reveal the file's size
1626and last modification timestamp. Currently this capability is only available
1627for local files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001628
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001629
Bram Moolenaar446cb832008-06-24 21:56:24 +00001630EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001631
Bram Moolenaar446cb832008-06-24 21:56:24 +00001632The "<ctrl-h>" map brings up a requestor allowing the user to change the
1633file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1634consists of one or more patterns delimited by commas. Files and/or
1635directories satisfying these patterns will either be hidden (ie. not shown) or
1636be the only ones displayed (see |netrw-a|).
1637
1638The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1639hiding list and the hiding of files or directories that begin with ".".
1640
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001641As an example, >
1642 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
1643Effectively, this makes the effect of a |netrw-gh| command the initial setting.
1644What it means:
1645
1646 \(^\|\s\s\) : if the line begins with the following, -or-
1647 two consecutive spaces are encountered
1648 \zs : start the hiding match now
1649 \. : if it now begins with a dot
1650 \S\+ : and is followed by one or more non-whitespace
1651 characters
1652
Bram Moolenaar446cb832008-06-24 21:56:24 +00001653Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1654Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001655
Bram Moolenaar15146672011-10-20 22:22:38 +02001656 *netrw-sort-sequence*
Bram Moolenaar446cb832008-06-24 21:56:24 +00001657EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1658
1659When "Sorted by" is name, one may specify priority via the sorting sequence
1660(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1661name-listing by suffix, although any pattern will do. Patterns are delimited
1662by commas. The default sorting sequence is (all one line):
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001663
1664For Unix: >
1665 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1666 \.info$,\.swp$,\.bak$,\~$'
1667<
1668Otherwise: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001669 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1670 \.swp$,\.bak$,\~$'
1671<
1672The lone * is where all filenames not covered by one of the other patterns
1673will end up. One may change the sorting sequence by modifying the
1674g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1675using the "S" map.
1676
Bram Moolenaarc236c162008-07-13 17:41:49 +00001677Related topics: |netrw-s| |netrw-S|
1678Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001679
1680
Bram Moolenaar97d62492012-11-15 21:28:22 +01001681EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X*
1682
1683Pressing X while the cursor is atop an executable file will yield a prompt
1684using the filename asking for any arguments. Upon pressing a [return], netrw
1685will then call |system()| with that command and arguments. The result will
1686be displayed by |:echomsg|, and so |:messages| will repeat display of the
1687result. Ansi escape sequences will be stripped out.
1688
1689
Bram Moolenaaradc21822011-04-01 18:03:16 +02001690FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
1691
1692Remote symbolic links (ie. those listed via ssh or ftp) are problematic
1693in that it is difficult to tell whether they link to a file or to a
1694directory.
1695
1696To force treatment as a file: use >
Bram Moolenaar97d62492012-11-15 21:28:22 +01001697 gf
Bram Moolenaaradc21822011-04-01 18:03:16 +02001698<
1699To force treatment as a directory: use >
Bram Moolenaar97d62492012-11-15 21:28:22 +01001700 gd
Bram Moolenaaradc21822011-04-01 18:03:16 +02001701<
1702
Bram Moolenaar446cb832008-06-24 21:56:24 +00001703GOING UP *netrw--* {{{2
1704
1705To go up a directory, press "-" or press the <cr> when atop the ../ directory
1706entry in the listing.
1707
1708Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1709listing operation after changing HOSTNAME to the host specified by the
Bram Moolenaara6878372014-03-22 21:02:50 +01001710user-prpvided url. By default netrw provides the command as: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00001711
1712 ssh HOSTNAME ls -FLa
Bram Moolenaara6878372014-03-22 21:02:50 +01001713<
Bram Moolenaar446cb832008-06-24 21:56:24 +00001714where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1715read. Naturally, the user may override this command with whatever is
1716preferred. The NetList function which implements remote browsing
1717expects that directories will be flagged by a trailing slash.
1718
1719
1720HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1721
1722Netrw's browsing facility allows one to use the hiding list in one of three
1723ways: ignore it, hide files which match, and show only those files which
1724match.
1725
1726If no files have been marked via |netrw-mf|:
1727
1728The "a" map allows the user to cycle through the three hiding modes.
1729
1730The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1731based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1732(also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1733example, to hide files which begin with a ".", one may use the <c-h> map to
1734set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1735in one's <.vimrc>). One may then use the "a" key to show all files, hide
1736matching files, or to show only the matching files.
1737
1738 Example: \.[ch]$
1739 This hiding list command will hide/show all *.c and *.h files.
1740
1741 Example: \.c$,\.h$
1742 This hiding list command will also hide/show all *.c and *.h
1743 files.
1744
1745Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1746want!
1747
1748If files have been marked using |netrw-mf|, then this command will:
1749
1750 if showing all files or non-hidden files:
1751 modify the g:netrw_list_hide list by appending the marked files to it
1752 and showing only non-hidden files.
1753
1754 else if showing hidden files only:
1755 modify the g:netrw_list_hide list by removing the marked files from it
1756 and showing only non-hidden files.
1757 endif
1758
1759 *netrw-gh* *netrw-hide*
1760As a quick shortcut, one may press >
1761 gh
1762to toggle between hiding files which begin with a period (dot) and not hiding
1763them.
1764
Bram Moolenaar8d043172014-01-23 14:24:41 +01001765Associated setting variables: |g:netrw_list_hide| |g:netrw_hide|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001766Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1767
Bram Moolenaar8d043172014-01-23 14:24:41 +01001768 *netrw-gitignore*
1769Netrw provides a helper function 'netrw_gitignore#Hide()' that, when used with
1770|g:netrw_list_hide| automatically hides all git-ignored files.
1771
1772'netrw_gitignore#Hide' searches for patterns in the following files:
1773 './.gitignore'
1774 './.git/info/exclude'
1775 global gitignore file: `git config --global core.excludesfile`
1776 system gitignore file: `git config --system core.excludesfile`
1777
1778Files that do not exist, are ignored.
1779Git-ignore patterns are taken from existing files, and converted to patterns for
1780hiding files. For example, if you had '*.log' in your '.gitignore' file, it
1781would be converted to '.*\.log'.
1782
1783To use this function, simply assign it's output to |g:netrw_list_hide| option.
1784
1785 Example: let g:netrw_list_hide= netrw_gitignore#Hide()
1786 Git-ignored files are hidden in Netrw.
1787
1788 Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file')
1789 Function can take additional files with git-ignore patterns.
1790
1791 Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$'
1792 Combining 'netrw_gitignore#Hide' with custom patterns.
1793
1794
Bram Moolenaar446cb832008-06-24 21:56:24 +00001795IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001796
1797Especially with the remote directory browser, constantly entering the password
1798is tedious.
1799
Bram Moolenaar9964e462007-05-05 17:54:07 +00001800For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00001801tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1802for setting up no-password ssh and scp and discusses associated security
Bram Moolenaar9964e462007-05-05 17:54:07 +00001803issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1804but apparently that address is now being redirected to some "hackzine".
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001805I'll attempt a summary based on that article and on a communication from
1806Ben Schmidt:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001807
Bram Moolenaare37d50a2008-08-06 17:06:04 +00001808 1. Generate a public/private key pair on the local machine
1809 (ssh client): >
1810 ssh-keygen -t rsa
1811 (saving the file in ~/.ssh/id_rsa as prompted)
1812<
1813 2. Just hit the <CR> when asked for passphrase (twice) for no
1814 passphrase. If you do use a passphrase, you will also need to use
1815 ssh-agent so you only have to type the passphrase once per session.
1816 If you don't use a passphrase, simply logging onto your local
1817 computer or getting access to the keyfile in any way will suffice
1818 to access any ssh servers which have that key authorized for login.
1819
1820 3. This creates two files: >
1821 ~/.ssh/id_rsa
1822 ~/.ssh/id_rsa.pub
1823<
1824 4. On the target machine (ssh server): >
1825 cd
1826 mkdir -p .ssh
1827 chmod 0700 .ssh
1828<
1829 5. On your local machine (ssh client): (one line) >
1830 ssh {serverhostname}
1831 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1832<
1833 or, for OpenSSH, (one line) >
1834 ssh {serverhostname}
1835 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1836<
1837You can test it out with >
1838 ssh {serverhostname}
1839and you should be log onto the server machine without further need to type
1840anything.
1841
1842If you decided to use a passphrase, do: >
1843 ssh-agent $SHELL
1844 ssh-add
1845 ssh {serverhostname}
1846You will be prompted for your key passphrase when you use ssh-add, but not
1847subsequently when you use ssh. For use with vim, you can use >
1848 ssh-agent vim
1849and, when next within vim, use >
1850 :!ssh-add
1851Alternatively, you can apply ssh-agent to the terminal you're planning on
1852running vim in: >
1853 ssh-agent xterm &
1854and do ssh-add whenever you need.
Bram Moolenaar843ee412004-06-30 16:16:41 +00001855
Bram Moolenaar9964e462007-05-05 17:54:07 +00001856For Windows, folks on the vim mailing list have mentioned that Pageant helps
1857with avoiding the constant need to enter the password.
Bram Moolenaar433f7c82006-03-21 21:29:36 +00001858
Bram Moolenaar446cb832008-06-24 21:56:24 +00001859Kingston Fung wrote about another way to avoid constantly needing to enter
1860passwords:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001861
Bram Moolenaar446cb832008-06-24 21:56:24 +00001862 In order to avoid the need to type in the password for scp each time, you
1863 provide a hack in the docs to set up a non password ssh account. I found a
1864 better way to do that: I can use a regular ssh account which uses a
1865 password to access the material without the need to key-in the password
1866 each time. It's good for security and convenience. I tried ssh public key
1867 authorization + ssh-agent, implementing this, and it works! Here are two
1868 links with instructions:
1869
1870 http://www.ibm.com/developerworks/library/l-keyc2/
1871 http://sial.org/howto/openssh/publickey-auth/
1872
1873
Bram Moolenaar8d043172014-01-23 14:24:41 +01001874 Ssh hints:
1875
1876 Thomer Gil has provided a hint on how to speed up netrw+ssh:
1877 http://thomer.com/howtos/netrw_ssh.html
1878
1879 Alex Young has several hints on speeding ssh up:
1880 http://usevim.com/2012/03/16/editing-remote-files/
1881
1882
Bram Moolenaar446cb832008-06-24 21:56:24 +00001883LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1884
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001885Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1886directory traversal history.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001887
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01001888Related Topics:
1889 |netrw-gb| how to return (go) to a bookmark
1890 |netrw-mb| how to make a bookmark
1891 |netrw-mB| how to delete bookmarks
1892 |netrw-u| change to a predecessor directory via the history stack
1893 |netrw-U| change to a successor directory via the history stack
Bram Moolenaar446cb832008-06-24 21:56:24 +00001894
1895MAKING A NEW DIRECTORY *netrw-d* {{{2
1896
1897With the "d" map one may make a new directory either remotely (which depends
1898on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
Bram Moolenaar5b435d62012-04-05 17:33:26 +02001899global variable g:netrw_localmkdir). Netrw will issue a request for the new
Bram Moolenaar446cb832008-06-24 21:56:24 +00001900directory's name. A bare <CR> at that point will abort the making of the
1901directory. Attempts to make a local directory that already exists (as either
1902a file or a directory) will be detected, reported on, and ignored.
1903
Bram Moolenaar15146672011-10-20 22:22:38 +02001904Related topics: |netrw-D|
Bram Moolenaar8d043172014-01-23 14:24:41 +01001905Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd|
1906 |g:netrw_remote_mkdir| |netrw-%|
Bram Moolenaar446cb832008-06-24 21:56:24 +00001907
1908
1909MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1910
1911By default, |g:netrw_keepdir| is 1. This setting means that the current
Bram Moolenaarff034192013-04-24 18:51:19 +02001912directory will not track the browsing directory. (done for backwards
1913compatibility with v6's file explorer).
Bram Moolenaar446cb832008-06-24 21:56:24 +00001914
Bram Moolenaarff034192013-04-24 18:51:19 +02001915Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00001916track netrw's browsing directory.
1917
1918However, given the default setting for g:netrw_keepdir of 1 where netrw
1919maintains its own separate notion of the current directory, in order to make
1920the two directories the same, use the "c" map (just type c). That map will
1921set Vim's notion of the current directory to netrw's current browsing
1922directory.
1923
1924Associated setting variable: |g:netrw_keepdir|
1925
Bram Moolenaara6878372014-03-22 21:02:50 +01001926MARKING FILES *netrw-:MF* *netrw-mf* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001927 (also see |netrw-mr|)
1928
Bram Moolenaara6878372014-03-22 21:02:50 +01001929Netrw has several ways of marking files:
1930
1931 * One may mark files with the cursor atop a filename and
Bram Moolenaar13600302014-05-22 18:26:40 +02001932 then pressing "mf".
Bram Moolenaara6878372014-03-22 21:02:50 +01001933
1934 * With gvim, in addition one may mark files with
Bram Moolenaar13600302014-05-22 18:26:40 +02001935 <s-leftmouse>. (see |netrw-mouse|)
Bram Moolenaara6878372014-03-22 21:02:50 +01001936
1937 * One may use the :MF command, which takes a list of
Bram Moolenaar13600302014-05-22 18:26:40 +02001938 files (for local directories, the list may include
1939 wildcards -- see |glob()|) >
Bram Moolenaara6878372014-03-22 21:02:50 +01001940
1941 :MF *.c
1942<
1943 * Note that :MF uses |<f-args>| to break the line
Bram Moolenaar13600302014-05-22 18:26:40 +02001944 at spaces.
1945
1946 * Mark files based upon the quickfix list (|netrw-qF|)
Bram Moolenaara6878372014-03-22 21:02:50 +01001947
1948The following netrw maps make use of marked files:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001949
1950 |netrw-a| Hide marked files/directories
1951 |netrw-D| Delete marked files/directories
1952 |netrw-mc| Copy marked files to target
1953 |netrw-md| Apply vimdiff to marked files
1954 |netrw-me| Edit marked files
Bram Moolenaarff034192013-04-24 18:51:19 +02001955 |netrw-mF| Unmark marked files
Bram Moolenaar446cb832008-06-24 21:56:24 +00001956 |netrw-mg| Apply vimgrep to marked files
Bram Moolenaara6878372014-03-22 21:02:50 +01001957 |netrw-mm| Move marked files to target
Bram Moolenaar446cb832008-06-24 21:56:24 +00001958 |netrw-mp| Print marked files
1959 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1960 |netrw-mT| Generate tags using marked files
1961 |netrw-mx| Apply shell command to marked files
1962 |netrw-mz| Compress/Decompress marked files
1963 |netrw-O| Obtain marked files
1964 |netrw-R| Rename marked files
1965
1966One may unmark files one at a time the same way one marks them; ie. place
1967the cursor atop a marked file and press "mf". This process also works
1968with <s-leftmouse> using gvim. One may unmark all files by pressing
1969"mu" (see |netrw-mu|).
1970
Bram Moolenaaradc21822011-04-01 18:03:16 +02001971Marked files are highlighted using the "netrwMarkFile" highlighting group,
1972which by default is linked to "Identifier" (see Identifier under
1973|group-name|). You may change the highlighting group by putting something
1974like >
1975
1976 highlight clear netrwMarkFile
1977 hi link netrwMarkFile ..whatever..
1978<
1979into $HOME/.vim/after/syntax/netrw.vim .
1980
Bram Moolenaar8d043172014-01-23 14:24:41 +01001981If the mouse is enabled and works with your vim, you may use <s-leftmouse> to
1982mark one or more files. You may mark multiple files by dragging the shifted
1983leftmouse. (see |netrw-mouse|)
1984
Bram Moolenaar446cb832008-06-24 21:56:24 +00001985*markfilelist* *global_markfilelist* *local_markfilelist*
1986All marked files are entered onto the global marked file list; there is only
1987one such list. In addition, every netrw buffer also has its own local marked
1988file list; since netrw buffers are associated with specific directories, this
1989means that each directory has its own local marked file list. The various
1990commands which operate on marked files use one or the other of the marked file
1991lists.
1992
Bram Moolenaara6878372014-03-22 21:02:50 +01001993Known Problem: if one is using tree mode (|g:netrw_liststyle|) and several
1994directories have files with the same name, then marking such a file will
1995result in all such files being highlighted as if they were all marked. The
1996|markfilelist|, however, will only have the selected file in it. This problem
1997is unlikely to be fixed.
1998
Bram Moolenaar446cb832008-06-24 21:56:24 +00001999
Bram Moolenaarff034192013-04-24 18:51:19 +02002000UNMARKING FILES *netrw-mF* {{{2
2001 (also see |netrw-mf|)
2002
2003This command will unmark all files in the current buffer. One may also use
2004mf (|netrw-mf|) on a specific file to unmark just that file.
2005
2006
2007MARKING FILES BY QUICKFIX LIST *netrw-qF*
2008 (also see |netrw-mf|)
2009
2010One may convert the |quickfix-error-lists| into a marked file list using
2011"qF". You may then proceed with commands such as me (|netrw-me|) to
2012edit them. Quickfix error lists are generated, for example, by calls
2013to |:vimgrep|.
2014
2015
Bram Moolenaar446cb832008-06-24 21:56:24 +00002016MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
2017 (also see |netrw-mf|)
2018
2019One may also mark files by pressing "mr"; netrw will then issue a prompt,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002020"Enter regexp: ". You may then enter a shell-style regular expression such
2021as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw
2022converts "*" into ".*" (see |regexp|) and marks files based on that. In the
2023future I may make it possible to use |regexp|s instead of glob()-style
2024expressions (yet-another-option).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002025
2026
2027MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
2028 (See |netrw-mf| and |netrw-mr| for how to mark files)
2029 (uses the local marked-file list)
2030
2031Upon activation of the "mx" map, netrw will query the user for some (external)
2032command to be applied to all marked files. All "%"s in the command will be
2033substituted with the name of each marked file in turn. If no "%"s are in the
2034command, then the command will be followed by a space and a marked filename.
2035
2036
2037MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
2038 (See |netrw-mf| and |netrw-mr| for how to mark files)
2039 (uses the local marked file list)
2040
2041If any marked files are compressed, then "mz" will decompress them.
2042If any marked files are decompressed, then "mz" will compress them
2043using the command specified by |g:netrw_compress|; by default,
2044that's "gzip".
2045
2046For decompression, netrw provides a |Dictionary| of suffices and their
2047associated decompressing utilities; see |g:netrw_decompress|.
2048
2049Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
2050
2051MARKED FILES: COPYING *netrw-mc* {{{2
2052 (See |netrw-mf| and |netrw-mr| for how to mark files)
2053 (Uses the global marked file list)
2054
2055Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02002056select file(s) (see |netrw-mf|), and press "mc". The copy is done
2057from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002058
2059Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
2060
2061MARKED FILES: DIFF *netrw-md* {{{2
2062 (See |netrw-mf| and |netrw-mr| for how to mark files)
2063 (uses the global marked file list)
2064
2065Use |vimdiff| to visualize difference between selected files (two or
2066three may be selected for this). Uses the global marked file list.
2067
2068MARKED FILES: EDITING *netrw-me* {{{2
2069 (See |netrw-mf| and |netrw-mr| for how to mark files)
2070 (uses the global marked file list)
2071
2072This command will place the marked files on the |arglist| and commence
2073editing them. One may return the to explorer window with |:Rexplore|.
Bram Moolenaarff034192013-04-24 18:51:19 +02002074(use |:n| and |:p| to edit next and previous files in the arglist)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002075
2076MARKED FILES: GREP *netrw-mg* {{{2
2077 (See |netrw-mf| and |netrw-mr| for how to mark files)
2078 (uses the global marked file list)
2079
Bram Moolenaarff034192013-04-24 18:51:19 +02002080This command will apply |:vimgrep| to the marked files.
2081The command will ask for the requested pattern; one may then enter: >
2082
Bram Moolenaar446cb832008-06-24 21:56:24 +00002083 /pattern/[g][j]
2084 ! /pattern/[g][j]
2085 pattern
2086<
Bram Moolenaarff034192013-04-24 18:51:19 +02002087In the cases of "j" option usage as shown above, "mg" will winnow the current
2088marked file list to just those possessing the specified pattern.
2089Thus, one may use >
2090 mr ...file-pattern
2091 mg ..contents-pattern
2092to have a marked file list satisfying the file-pattern but containing the
2093desried contents-pattern.
2094
Bram Moolenaar446cb832008-06-24 21:56:24 +00002095MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
2096 (See |netrw-mf| and |netrw-mr| for how to mark files)
2097 (uses the local marked file list)
2098
2099This command extracts the suffices of the marked files and toggles their
2100presence on the hiding list. Please note that marking the same suffix
2101this way multiple times will result in the suffix's presence being toggled
2102for each file (so an even quantity of marked files having the same suffix
2103is the same as not having bothered to select them at all).
2104
2105Related topics: |netrw-a| |g:netrw_list_hide|
2106
2107MARKED FILES: MOVING *netrw-mm* {{{2
2108 (See |netrw-mf| and |netrw-mr| for how to mark files)
2109 (uses the global marked file list)
2110
Bram Moolenaare37d50a2008-08-06 17:06:04 +00002111 WARNING: moving files is more dangerous than copying them.
2112 A file being moved is first copied and then deleted; if the
2113 copy operation fails and the delete succeeds, you will lose
2114 the file. Either try things out with unimportant files
2115 first or do the copy and then delete yourself using mc and D.
2116 Use at your own risk!
2117
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002118Select a target directory with mt (|netrw-mt|). Then change directory,
Bram Moolenaaradc21822011-04-01 18:03:16 +02002119select file(s) (see |netrw-mf|), and press "mm". The move is done
2120from the current window (where one does the mf) to the target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002121
2122Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
2123
2124MARKED FILES: PRINTING *netrw-mp* {{{2
2125 (See |netrw-mf| and |netrw-mr| for how to mark files)
2126 (uses the local marked file list)
2127
2128Netrw will apply the |:hardcopy| command to marked files. What it does
2129is open each file in a one-line window, execute hardcopy, then close the
2130one-line window.
2131
2132
2133MARKED FILES: SOURCING *netrw-ms* {{{2
2134 (See |netrw-mf| and |netrw-mr| for how to mark files)
2135 (uses the local marked file list)
2136
2137Netrw will source the marked files (using vim's |:source| command)
2138
2139
Bram Moolenaarff034192013-04-24 18:51:19 +02002140MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
2141 (See |netrw-mf| and |netrw-mr| for how to mark files)
2142
2143Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
2144
2145 * If the cursor is atop a file name, then the netrw window's currently
2146 displayed directory is used for the copy/move-to target.
2147
2148 * Also, if the cursor is in the banner, then the netrw window's currently
2149 displayed directory is used for the copy/move-to target.
2150 Unless the target already is the current directory. In which case,
2151 remove the target.
2152
2153 * However, if the cursor is atop a directory name, then that directory is
2154 used for the copy/move-to target
2155
Bram Moolenaara6878372014-03-22 21:02:50 +01002156 * One may use the :MT [directory] command to set the target *netrw-:MT*
2157 This command uses |<q-args>|, so spaces in the directory name are
2158 permitted without escaping.
2159
Bram Moolenaarff034192013-04-24 18:51:19 +02002160There is only one copy/move-to target per vim session; ie. the target is a
2161script variable (see |s:var|) and is shared between all netrw windows (in an
2162instance of vim).
2163
2164When using menus and gvim, netrw provides a "Targets" entry which allows one
2165to pick a target from the list of bookmarks and history.
2166
2167Related topics:
2168 Marking Files......................................|netrw-mf|
2169 Marking Files by Regular Expression................|netrw-mr|
2170 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb|
2171 Marked Files: Target Directory Using History.......|netrw-Th|
2172
2173
Bram Moolenaar446cb832008-06-24 21:56:24 +00002174MARKED FILES: TAGGING *netrw-mT* {{{2
2175 (See |netrw-mf| and |netrw-mr| for how to mark files)
2176 (uses the global marked file list)
2177
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002178The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is
Bram Moolenaar446cb832008-06-24 21:56:24 +00002179"ctags") to marked files. For remote browsing, in order to create a tags file
2180netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
2181this to work on remote systems. For your local system, see |ctags| on how to
2182get a version. I myself use hdrtags, currently available at
Bram Moolenaar97d62492012-11-15 21:28:22 +01002183http://www.drchip.org/astronaut/src/index.html , and have >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002184
2185 let g:netrw_ctags= "hdrtag"
2186<
2187in my <.vimrc>.
2188
2189When a remote set of files are tagged, the resulting tags file is "obtained";
Bram Moolenaara6878372014-03-22 21:02:50 +01002190ie. a copy is transferred to the local system's directory. The now local tags
Bram Moolenaar446cb832008-06-24 21:56:24 +00002191file is then modified so that one may use it through the network. The
Bram Moolenaara6878372014-03-22 21:02:50 +01002192modification made concerns the names of the files in the tags; each filename is
Bram Moolenaar446cb832008-06-24 21:56:24 +00002193preceded by the netrw-compatible url used to obtain it. When one subsequently
2194uses one of the go to tag actions (|tags|), the url will be used by netrw to
2195edit the desired file and go to the tag.
2196
Bram Moolenaarc236c162008-07-13 17:41:49 +00002197Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
Bram Moolenaar446cb832008-06-24 21:56:24 +00002198
Bram Moolenaarff034192013-04-24 18:51:19 +02002199MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002200
Bram Moolenaara6878372014-03-22 21:02:50 +01002201Sets the marked file copy/move-to target.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002202
Bram Moolenaarff034192013-04-24 18:51:19 +02002203The |netrw-qb| map will give you a list of bookmarks (and history).
2204One may choose one of the bookmarks to become your marked file
2205target by using [count]Tb (default count: 1).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002206
Bram Moolenaarff034192013-04-24 18:51:19 +02002207Related topics:
Bram Moolenaara6878372014-03-22 21:02:50 +01002208 Copying files to target............................|netrw-mc|
Bram Moolenaarff034192013-04-24 18:51:19 +02002209 Listing Bookmarks and History......................|netrw-qb|
2210 Marked Files: Setting The Target Directory.........|netrw-mt|
2211 Marked Files: Target Directory Using History.......|netrw-Th|
2212 Marking Files......................................|netrw-mf|
2213 Marking Files by Regular Expression................|netrw-mr|
Bram Moolenaara6878372014-03-22 21:02:50 +01002214 Moving files to target.............................|netrw-mm|
Bram Moolenaar446cb832008-06-24 21:56:24 +00002215
Bram Moolenaar446cb832008-06-24 21:56:24 +00002216
Bram Moolenaarff034192013-04-24 18:51:19 +02002217MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002218
Bram Moolenaara6878372014-03-22 21:02:50 +01002219Sets the marked file copy/move-to target.
Bram Moolenaarff034192013-04-24 18:51:19 +02002220
2221The |netrw-qb| map will give you a list of history (and bookmarks).
2222One may choose one of the history entries to become your marked file
2223target by using [count]Th (default count: 0; ie. the current directory).
2224
2225Related topics:
Bram Moolenaara6878372014-03-22 21:02:50 +01002226 Copying files to target............................|netrw-mc|
Bram Moolenaarff034192013-04-24 18:51:19 +02002227 Listing Bookmarks and History......................|netrw-qb|
2228 Marked Files: Setting The Target Directory.........|netrw-mt|
2229 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb|
2230 Marking Files......................................|netrw-mf|
2231 Marking Files by Regular Expression................|netrw-mr|
Bram Moolenaara6878372014-03-22 21:02:50 +01002232 Moving files to target.............................|netrw-mm|
Bram Moolenaarff034192013-04-24 18:51:19 +02002233
Bram Moolenaar446cb832008-06-24 21:56:24 +00002234
2235MARKED FILES: UNMARKING *netrw-mu* {{{2
2236 (See |netrw-mf| and |netrw-mr| for how to mark files)
2237
2238The "mu" mapping will unmark all currently marked files.
2239
Bram Moolenaar15146672011-10-20 22:22:38 +02002240 *netrw-browser-settings*
Bram Moolenaar446cb832008-06-24 21:56:24 +00002241NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
2242
Bram Moolenaar15146672011-10-20 22:22:38 +02002243(if you're interested in the netrw file transfer settings, see |netrw-options|
2244 and |netrw-protocol|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002245
2246The <netrw.vim> browser provides settings in the form of variables which
2247you may modify; by placing these settings in your <.vimrc>, you may customize
2248your browsing preferences. (see also: |netrw-settings|)
2249>
2250 --- -----------
2251 Var Explanation
2252 --- -----------
Bram Moolenaar8d043172014-01-23 14:24:41 +01002253< *g:netrw_altfile* some like |CTRL-^| to return to the last
2254 edited file. Choose that by setting this
2255 parameter to 1.
2256 Others like |CTRL-^| to return to the
2257 netrw browsing buffer. Choose that by setting
2258 this parameter to 0.
2259 default: =0
2260
2261 *g:netrw_alto* change from above splitting to below splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00002262 by setting this variable (see |netrw-o|)
2263 default: =&sb (see |'sb'|)
2264
Bram Moolenaarff034192013-04-24 18:51:19 +02002265 *g:netrw_altv* change from left splitting to right splitting
Bram Moolenaar446cb832008-06-24 21:56:24 +00002266 by setting this variable (see |netrw-v|)
2267 default: =&spr (see |'spr'|)
2268
Bram Moolenaarff034192013-04-24 18:51:19 +02002269 *g:netrw_banner* enable/suppress the banner
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002270 =0: suppress the banner
2271 =1: banner is enabled (default)
2272 NOTE: suppressing the banner is a new feature
2273 which may cause problems.
2274
Bram Moolenaare6ae6222013-05-21 21:01:10 +02002275 *g:netrw_bannerbackslash* if this variable exists and is not zero, the
2276 banner will be displayed with backslashes
2277 rather than forward slashes.
2278
Bram Moolenaarff034192013-04-24 18:51:19 +02002279 *g:netrw_browse_split* when browsing, <cr> will open the file by:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002280 =0: re-using the same window
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002281 =1: horizontally splitting the window first
2282 =2: vertically splitting the window first
Bram Moolenaar446cb832008-06-24 21:56:24 +00002283 =3: open file in new tab
2284 =4: act like "P" (ie. open previous window)
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002285 Note that |g:netrw_preview| may be used
2286 to get vertical splitting instead of
2287 horizontal splitting.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002288
Bram Moolenaar8d043172014-01-23 14:24:41 +01002289 Related topics:
2290 |netrw-cr| |netrw-C|
2291 |g:netrw_alto| |g:netrw_altv|
2292
Bram Moolenaarff034192013-04-24 18:51:19 +02002293 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
Bram Moolenaar446cb832008-06-24 21:56:24 +00002294 "kfmclient exec"
2295 "gnome-open"
2296< If >
2297 "-"
2298< is used, then netrwFileHandler() will look for
2299 a script/function to handle the given
2300 extension. (see |netrw_filehandler|).
2301
Bram Moolenaarff034192013-04-24 18:51:19 +02002302 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002303 Windows: "cacls FILENAME /e /p PERM"
2304 Used to change access permission for a file.
2305
Bram Moolenaarff034192013-04-24 18:51:19 +02002306 *g:netrw_compress* ="gzip"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002307 Will compress marked files with this
2308 command
2309
Bram Moolenaarff034192013-04-24 18:51:19 +02002310 *g:Netrw_corehandler* Allows one to specify something additional
Bram Moolenaar15146672011-10-20 22:22:38 +02002311 to do when handling <core> files via netrw's
2312 browser's "x" command (see |netrw-x|). If
2313 present, g:Netrw_corehandler specifies
2314 either one or more function references
2315 (see |Funcref|). (the capital g:Netrw...
2316 is required its holding a function reference)
2317
2318
Bram Moolenaarff034192013-04-24 18:51:19 +02002319 *g:netrw_ctags* ="ctags"
2320 The default external program used to create
2321 tags
Bram Moolenaarc236c162008-07-13 17:41:49 +00002322
Bram Moolenaarff034192013-04-24 18:51:19 +02002323 *g:netrw_cursor* = 2 (default)
Bram Moolenaaradc21822011-04-01 18:03:16 +02002324 This option controls the use of the
2325 |'cursorline'| (cul) and |'cursorcolumn'|
2326 (cuc) settings by netrw:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002327
Bram Moolenaaradc21822011-04-01 18:03:16 +02002328 Value Thin-Long-Tree Wide
2329 =0 u-cul u-cuc u-cul u-cuc
2330 =1 u-cul u-cuc cul u-cuc
2331 =2 cul u-cuc cul u-cuc
2332 =3 cul u-cuc cul cuc
2333 =4 cul cuc cul cuc
2334
2335 Where
2336 u-cul : user's |'cursorline'| setting used
2337 u-cuc : user's |'cursorcolumn'| setting used
2338 cul : |'cursorline'| locally set
2339 cuc : |'cursorcolumn'| locally set
2340
Bram Moolenaarff034192013-04-24 18:51:19 +02002341 *g:netrw_decompress* = { ".gz" : "gunzip" ,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002342 ".bz2" : "bunzip2" ,
2343 ".zip" : "unzip" ,
2344 ".tar" : "tar -xf"}
2345 A dictionary mapping suffices to
2346 decompression programs.
2347
Bram Moolenaaradc21822011-04-01 18:03:16 +02002348 *g:netrw_dirhistmax* =10: controls maximum quantity of past
2349 history. May be zero to supppress
2350 history.
2351 (related: |netrw-qb| |netrw-u| |netrw-U|)
2352
Bram Moolenaar97d62492012-11-15 21:28:22 +01002353 *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of
2354 |g:netrw_maxfilenamelen|, which affects
2355 local file long listing.
Bram Moolenaara6878372014-03-22 21:02:50 +01002356
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002357 *g:netrw_errorlvl* =0: error levels greater than or equal to
2358 this are permitted to be displayed
2359 0: notes
2360 1: warnings
2361 2: errors
2362
Bram Moolenaarff034192013-04-24 18:51:19 +02002363 *g:netrw_fastbrowse* =0: slow speed directory browsing;
Bram Moolenaar13600302014-05-22 18:26:40 +02002364 never re-uses directory listings;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002365 always obtains directory listings.
2366 =1: medium speed directory browsing;
2367 re-use directory listings only
2368 when remote directory browsing.
2369 (default value)
2370 =2: fast directory browsing;
2371 only obtains directory listings when the
2372 directory hasn't been seen before
2373 (or |netrw-ctrl-l| is used).
2374
2375 Fast browsing retains old directory listing
2376 buffers so that they don't need to be
2377 re-acquired. This feature is especially
2378 important for remote browsing. However, if
2379 a file is introduced or deleted into or from
2380 such directories, the old directory buffer
2381 becomes out-of-date. One may always refresh
2382 such a directory listing with |netrw-ctrl-l|.
2383 This option gives the user the choice of
2384 trading off accuracy (ie. up-to-date listing)
2385 versus speed.
2386
Bram Moolenaar13600302014-05-22 18:26:40 +02002387 *g:netrw_ffkeep* (default: doesn't exist)
2388 If this variable exists and is zero, then
2389 netrw will not do a save and restore for
2390 |'fileformat'|.
2391
Bram Moolenaarff034192013-04-24 18:51:19 +02002392 *g:netrw_fname_escape* =' ?&;%'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002393 Used on filenames before remote reading/writing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002394
Bram Moolenaarff034192013-04-24 18:51:19 +02002395 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
Bram Moolenaar446cb832008-06-24 21:56:24 +00002396 that can show up as "directories" and "files"
2397 in the listing. This pattern is used to
2398 remove such embedded messages. By default its
2399 value is:
2400 '^total\s\+\d\+$\|
2401 ^Trying\s\+\d\+.*$\|
2402 ^KERBEROS_V\d rejected\|
2403 ^Security extensions not\|
2404 No such file\|
2405 : connect to address [0-9a-fA-F:]*
2406 : No route to host$'
2407
Bram Moolenaarff034192013-04-24 18:51:19 +02002408 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002409 listing. Defaults:
2410 unix or g:netrw_cygwin set: : "ls -lF"
2411 otherwise "dir"
2412
2413
Bram Moolenaarff034192013-04-24 18:51:19 +02002414 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002415 listing, sorted by size of file.
2416 Defaults:
2417 unix or g:netrw_cygwin set: : "ls -slF"
2418 otherwise "dir"
2419
Bram Moolenaarff034192013-04-24 18:51:19 +02002420 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
Bram Moolenaar446cb832008-06-24 21:56:24 +00002421 listing, sorted by time of last modification.
2422 Defaults:
2423 unix or g:netrw_cygwin set: : "ls -tlF"
2424 otherwise "dir"
2425
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002426 *g:netrw_glob_escape* ='[]*?`{~$' (unix)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002427 ='[]*?`{$' (windows
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002428 These characters in directory names are
Bram Moolenaar446cb832008-06-24 21:56:24 +00002429 escaped before applying glob()
2430
Bram Moolenaarff034192013-04-24 18:51:19 +02002431 *g:netrw_hide* Controlled by the "a" map (see |netrw-a|)
2432 =0 : show all
2433 =1 : show not-hidden files
2434 =2 : show hidden files only
Bram Moolenaar446cb832008-06-24 21:56:24 +00002435 default: =0
2436
Bram Moolenaarff034192013-04-24 18:51:19 +02002437 *g:netrw_home* The home directory for where bookmarks and
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002438 history are saved (as .netrwbook and
2439 .netrwhist).
2440 default: the first directory on the
2441 |'runtimepath'|
2442
Bram Moolenaarff034192013-04-24 18:51:19 +02002443 *g:netrw_keepdir* =1 (default) keep current directory immune from
Bram Moolenaar446cb832008-06-24 21:56:24 +00002444 the browsing directory.
2445 =0 keep the current directory the same as the
2446 browsing directory.
2447 The current browsing directory is contained in
2448 b:netrw_curdir (also see |netrw-c|)
2449
Bram Moolenaarff034192013-04-24 18:51:19 +02002450 *g:netrw_list_cmd* command for listing remote directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002451 default: (if ssh is executable)
2452 "ssh HOSTNAME ls -FLa"
2453
Bram Moolenaarff034192013-04-24 18:51:19 +02002454 *g:netrw_liststyle* Set the default listing style:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002455 = 0: thin listing (one file per line)
2456 = 1: long listing (one file per line with time
2457 stamp information and file size)
2458 = 2: wide listing (multiple files in columns)
2459 = 3: tree style listing
Bram Moolenaar8d043172014-01-23 14:24:41 +01002460
Bram Moolenaarff034192013-04-24 18:51:19 +02002461 *g:netrw_list_hide* comma separated pattern list for hiding files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002462 Patterns are regular expressions (see |regexp|)
Bram Moolenaar8d043172014-01-23 14:24:41 +01002463 There's some special support for git-ignore
2464 files: you may add the output from the helper
2465 function 'netrw_gitignore#Hide() automatically
2466 hiding all gitignored files.
2467 For more details see |netrw-gitignore|.
2468
2469 Examples:
2470 let g:netrw_list_hide= '.*\.swp$'
2471 let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$'
2472 default: ""
Bram Moolenaar446cb832008-06-24 21:56:24 +00002473
Bram Moolenaarff034192013-04-24 18:51:19 +02002474 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002475 ="copy" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002476 Copies marked files (|netrw-mf|) to target
2477 directory (|netrw-mt|, |netrw-mc|)
2478
Bram Moolenaare6ae6222013-05-21 21:01:10 +02002479 *g:netrw_localmkdir* command for making a local directory
2480 default: "mkdir"
2481
Bram Moolenaarff034192013-04-24 18:51:19 +02002482 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002483 ="move" Windows
Bram Moolenaar446cb832008-06-24 21:56:24 +00002484 Moves marked files (|netrw-mf|) to target
2485 directory (|netrw-mt|, |netrw-mm|)
2486
Bram Moolenaarff034192013-04-24 18:51:19 +02002487 *g:netrw_localrmdir* remove directory command (rmdir)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002488 default: "rmdir"
2489
Bram Moolenaarff034192013-04-24 18:51:19 +02002490 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
Bram Moolenaar446cb832008-06-24 21:56:24 +00002491 listings fit on 80 column displays.
2492 If your screen is wider, and you have file
2493 or directory names longer than 32 bytes,
2494 you may set this option to keep listings
2495 columnar.
2496
Bram Moolenaarff034192013-04-24 18:51:19 +02002497 *g:netrw_mkdir_cmd* command for making a remote directory
Bram Moolenaar15146672011-10-20 22:22:38 +02002498 via ssh (also see |g:netrw_remote_mkdir|)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002499 default: "ssh USEPORT HOSTNAME mkdir"
2500
Bram Moolenaar251e1912011-06-19 05:09:16 +02002501 *g:netrw_mousemaps* =1 (default) enables mouse buttons while
2502 browsing to:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002503 leftmouse : open file/directory
2504 shift-leftmouse : mark file
2505 middlemouse : same as P
2506 rightmouse : remove file/directory
2507 =0: disables mouse maps
2508
Bram Moolenaar15146672011-10-20 22:22:38 +02002509 *g:netrw_nobeval* doesn't exist (default)
2510 If this variable exists, then balloon
2511 evaluation will be suppressed
2512 (see |'ballooneval'|)
2513
Bram Moolenaara6878372014-03-22 21:02:50 +01002514 *g:netrw_remote_mkdir* command for making a remote directory
Bram Moolenaar15146672011-10-20 22:22:38 +02002515 via ftp (also see |g:netrw_mkdir_cmd|)
2516 default: "mkdir"
2517
Bram Moolenaarff034192013-04-24 18:51:19 +02002518 *g:netrw_retmap* if it exists and is set to one, then:
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002519 * if in a netrw-selected file, AND
2520 * no normal-mode <2-leftmouse> mapping exists,
2521 then the <2-leftmouse> will be mapped for easy
Bram Moolenaar446cb832008-06-24 21:56:24 +00002522 return to the netrw browser window.
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002523 example: click once to select and open a file,
2524 double-click to return.
2525
2526 Note that one may instead choose to:
2527 * let g:netrw_retmap= 1, AND
2528 * nmap <silent> YourChoice <Plug>NetrwReturn
2529 and have another mapping instead of
2530 <2-leftmouse> to invoke the return.
2531
2532 You may also use the |:Rexplore| command to do
2533 the same thing.
2534
Bram Moolenaar446cb832008-06-24 21:56:24 +00002535 default: =0
2536
Bram Moolenaar13600302014-05-22 18:26:40 +02002537 *g:netrw_rm_cmd* command for removing remote files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002538 default: "ssh USEPORT HOSTNAME rm"
2539
Bram Moolenaar13600302014-05-22 18:26:40 +02002540 *g:netrw_rmdir_cmd* command for removing remote directories
Bram Moolenaar446cb832008-06-24 21:56:24 +00002541 default: "ssh USEPORT HOSTNAME rmdir"
2542
Bram Moolenaar13600302014-05-22 18:26:40 +02002543 *g:netrw_rmf_cmd* command for removing remote softlinks
Bram Moolenaar446cb832008-06-24 21:56:24 +00002544 default: "ssh USEPORT HOSTNAME rm -f"
2545
Bram Moolenaarff034192013-04-24 18:51:19 +02002546 *g:netrw_sort_by* sort by "name", "time", or "size"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002547 default: "name"
2548
Bram Moolenaarff034192013-04-24 18:51:19 +02002549 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002550 default: "normal"
2551
Bram Moolenaarff034192013-04-24 18:51:19 +02002552 *g:netrw_sort_options* sorting is done using |:sort|; this
Bram Moolenaarc236c162008-07-13 17:41:49 +00002553 variable's value is appended to the
2554 sort command. Thus one may ignore case,
2555 for example, with the following in your
2556 .vimrc: >
2557 let g:netrw_sort_options="i"
2558< default: ""
2559
Bram Moolenaarff034192013-04-24 18:51:19 +02002560 *g:netrw_sort_sequence* when sorting by name, first sort by the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002561 comma-separated pattern sequence. Note that
Bram Moolenaara6878372014-03-22 21:02:50 +01002562 any filigree added to indicate filetypes
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002563 should be accounted for in your pattern.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002564 default: '[\/]$,*,\.bak$,\.o$,\.h$,
2565 \.info$,\.swp$,\.obj$'
2566
Bram Moolenaarff034192013-04-24 18:51:19 +02002567 *g:netrw_special_syntax* If true, then certain files will be shown
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002568 using special syntax in the browser:
Bram Moolenaar446cb832008-06-24 21:56:24 +00002569
2570 netrwBak : *.bak
2571 netrwCompress: *.gz *.bz2 *.Z *.zip
2572 netrwData : *.dat
2573 netrwHdr : *.h
2574 netrwLib : *.a *.so *.lib *.dll
2575 netrwMakefile: [mM]akefile *.mak
2576 netrwObj : *.o *.obj
2577 netrwTags : tags ANmenu ANtags
Bram Moolenaara6878372014-03-22 21:02:50 +01002578 netrwTilde : *
Bram Moolenaar446cb832008-06-24 21:56:24 +00002579 netrwTmp : tmp* *tmp
2580
2581 These syntax highlighting groups are linked
2582 to Folded or DiffChange by default
2583 (see |hl-Folded| and |hl-DiffChange|), but
2584 one may put lines like >
2585 hi link netrwCompress Visual
2586< into one's <.vimrc> to use one's own
Bram Moolenaara6878372014-03-22 21:02:50 +01002587 preferences. Alternatively, one may
2588 put such specifications into
2589 .vim/after/syntax/netrw.vim.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002590
Bram Moolenaara6878372014-03-22 21:02:50 +01002591 As an example, I myself use a dark-background
2592 colorscheme with the following in
2593 .vim/after/syntax/netrw.vim: >
2594
2595 hi netrwCompress term=NONE cterm=NONE gui=NONE ctermfg=10 guifg=green ctermbg=0 guibg=black
2596 hi netrwData term=NONE cterm=NONE gui=NONE ctermfg=9 guifg=blue ctermbg=0 guibg=black
2597 hi netrwHdr term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
2598 hi netrwLex term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
2599 hi netrwYacc term=NONE cterm=NONE,italic gui=NONE guifg=SeaGreen1
2600 hi netrwLib term=NONE cterm=NONE gui=NONE ctermfg=14 guifg=yellow
2601 hi netrwObj term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
2602 hi netrwTilde term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
2603 hi netrwTmp term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
2604 hi netrwTags term=NONE cterm=NONE gui=NONE ctermfg=12 guifg=red
2605 hi netrwDoc term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=yellow2 guibg=Blue3
2606 hi netrwSymLink term=NONE cterm=NONE gui=NONE ctermfg=220 ctermbg=27 guifg=grey60
2607<
Bram Moolenaarff034192013-04-24 18:51:19 +02002608 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002609 messages, banners, and whatnot that one doesn't
2610 want masquerading as "directories" and "files".
2611 Use this pattern to remove such embedded
2612 messages. By default its value is:
2613 '^total\s\+\d\+$'
2614
Bram Moolenaare6ae6222013-05-21 21:01:10 +02002615 *g:netrw_ssh_cmd* One may specify an executable command
2616 to use instead of ssh for remote actions
2617 such as listing, file removal, etc.
2618 default: ssh
2619
Bram Moolenaar446cb832008-06-24 21:56:24 +00002620
Bram Moolenaarff034192013-04-24 18:51:19 +02002621 *g:netrw_tmpfile_escape* =' &;'
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002622 escape() is applied to all temporary files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002623 to escape these characters.
2624
Bram Moolenaarff034192013-04-24 18:51:19 +02002625 *g:netrw_timefmt* specify format string to vim's strftime().
Bram Moolenaar446cb832008-06-24 21:56:24 +00002626 The default, "%c", is "the preferred date
2627 and time representation for the current
2628 locale" according to my manpage entry for
2629 strftime(); however, not all are satisfied
2630 with it. Some alternatives:
2631 "%a %d %b %Y %T",
2632 " %a %Y-%m-%d %I-%M-%S %p"
2633 default: "%c"
2634
Bram Moolenaarff034192013-04-24 18:51:19 +02002635 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002636 for browser buffers. However, under some
Bram Moolenaar446cb832008-06-24 21:56:24 +00002637 systems this apparently is causing nasty
2638 ml_get errors to appear; if you're getting
2639 ml_get errors, try putting
2640 let g:netrw_use_noswf= 0
2641 in your .vimrc.
Bram Moolenaara6878372014-03-22 21:02:50 +01002642 default: 1
Bram Moolenaar446cb832008-06-24 21:56:24 +00002643
Bram Moolenaarff034192013-04-24 18:51:19 +02002644 *g:netrw_winsize* specify initial size of new windows made with
Bram Moolenaar446cb832008-06-24 21:56:24 +00002645 "o" (see |netrw-o|), "v" (see |netrw-v|),
Bram Moolenaar251e1912011-06-19 05:09:16 +02002646 |:Hexplore| or |:Vexplore|. The g:netrw_winsize
2647 is an integer describing the percentage of the
2648 current netrw buffer's window to be used for
2649 the new window.
Bram Moolenaar15146672011-10-20 22:22:38 +02002650 If g:netrw_winsize is less than zero, then
2651 the absolute value of g:netrw_winsize lines
2652 or columns will be used for the new window.
Bram Moolenaar13600302014-05-22 18:26:40 +02002653 If g:netrw_winsize is zero, then a normal
2654 split will be made (ie. |'equalalways'| will
2655 take effect, for example).
Bram Moolenaar251e1912011-06-19 05:09:16 +02002656 default: 50 (for 50%)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002657
Bram Moolenaarff034192013-04-24 18:51:19 +02002658 *g:netrw_xstrlen* Controls how netrw computes string lengths,
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002659 including multi-byte characters' string
Bram Moolenaar446cb832008-06-24 21:56:24 +00002660 length. (thanks to N Weibull, T Mechelynck)
2661 =0: uses Vim's built-in strlen()
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002662 =1: number of codepoints (Latin a + combining
Bram Moolenaar446cb832008-06-24 21:56:24 +00002663 circumflex is two codepoints) (DEFAULT)
2664 =2: number of spacing codepoints (Latin a +
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002665 combining circumflex is one spacing
Bram Moolenaar446cb832008-06-24 21:56:24 +00002666 codepoint; a hard tab is one; wide and
2667 narrow CJK are one each; etc.)
2668 =3: virtual length (counting tabs as anything
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002669 between 1 and |'tabstop'|, wide CJK as 2
Bram Moolenaar446cb832008-06-24 21:56:24 +00002670 rather than 1, Arabic alif as zero when
2671 immediately preceded by lam, one
2672 otherwise, etc)
2673
Bram Moolenaarff034192013-04-24 18:51:19 +02002674 *g:NetrwTopLvlMenu* This variable specifies the top level
Bram Moolenaar446cb832008-06-24 21:56:24 +00002675 menu name; by default, it's "Netrw.". If
2676 you wish to change this, do so in your
2677 .vimrc.
2678
2679NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2680
2681Netrw has been designed to handle user options by saving them, setting the
2682options to something that's compatible with netrw's needs, and then restoring
2683them. However, the autochdir option: >
2684 :set acd
Bram Moolenaara6878372014-03-22 21:02:50 +01002685is problematic. Autochdir sets the current directory to that containing the
Bram Moolenaar446cb832008-06-24 21:56:24 +00002686file you edit; this apparently also applies to directories. In other words,
2687autochdir sets the current directory to that containing the "file" (even if
2688that "file" is itself a directory).
2689
Bram Moolenaar15146672011-10-20 22:22:38 +02002690NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002691
2692With the NetrwSettings.vim plugin, >
2693 :NetrwSettings
2694will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00002695settings. You may change any of their values; when you save the file, the
2696settings therein will be used. One may also press "?" on any of the lines for
2697help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002698
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002699(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
Bram Moolenaar9964e462007-05-05 17:54:07 +00002700
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00002701
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00002702==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00002703OBTAINING A FILE *netrw-O* {{{2
2704
2705If there are no marked files:
2706
2707 When browsing a remote directory, one may obtain a file under the cursor
2708 (ie. get a copy on your local machine, but not edit it) by pressing the O
2709 key.
2710
2711If there are marked files:
2712
2713 The marked files will be obtained (ie. a copy will be transferred to your
2714 local machine, but not set up for editing).
2715
2716Only ftp and scp are supported for this operation (but since these two are
2717available for browsing, that shouldn't be a problem). The status bar will
2718then show, on its right hand side, a message like "Obtaining filename". The
2719statusline will be restored after the transfer is complete.
2720
2721Netrw can also "obtain" a file using the local browser. Netrw's display
2722of a directory is not necessarily the same as Vim's "current directory",
2723unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2724a file using the local browser (by putting the cursor on it) and pressing
2725"O" will then "obtain" the file; ie. copy it to Vim's current directory.
2726
2727Related topics:
2728 * To see what the current directory is, use |:pwd|
2729 * To make the currently browsed directory the current directory, see |netrw-c|
2730 * To automatically make the currently browsed directory the current
2731 directory, see |g:netrw_keepdir|.
2732
Bram Moolenaaradc21822011-04-01 18:03:16 +02002733 *netrw-createfile*
Bram Moolenaarc236c162008-07-13 17:41:49 +00002734OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2735
Bram Moolenaara6878372014-03-22 21:02:50 +01002736To open a new file in netrw's current directory, press "%". This map
2737will query the user for a new filename; an empty file by that name will
2738be placed in the netrw's current directory (ie. b:netrw_curdir).
Bram Moolenaarc236c162008-07-13 17:41:49 +00002739
Bram Moolenaar8d043172014-01-23 14:24:41 +01002740Related topics: |netrw-d|
2741
Bram Moolenaarc236c162008-07-13 17:41:49 +00002742
Bram Moolenaar446cb832008-06-24 21:56:24 +00002743PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2744
2745One may use a preview window by using the "p" key when the cursor is atop the
2746desired filename to be previewed. The display will then split to show both
2747the browser (where the cursor will remain) and the file (see |:pedit|).
2748By default, the split will be taken horizontally; one may use vertical
2749splitting if one has set |g:netrw_preview| first.
2750
Bram Moolenaar00a927d2010-05-14 23:24:24 +02002751An interesting set of netrw settings is: >
2752
2753 let g:netrw_preview = 1
2754 let g:netrw_liststyle = 3
2755 let g:netrw_winsize = 30
2756
2757These will:
2758 1. Make vertical splitting the default for previewing files
2759 2. Make the default listing style "tree"
2760 3. When a vertical preview window is opened, the directory listing
Bram Moolenaar5b435d62012-04-05 17:33:26 +02002761 will use only 30% of the columns available; the rest of the window
2762 is used for the preview window.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002763
Bram Moolenaara6878372014-03-22 21:02:50 +01002764Also see: |g:netrw_chgwin| |netrw-P|
2765
2766
Bram Moolenaar446cb832008-06-24 21:56:24 +00002767PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2768
2769To edit a file or directory in the previously used (last accessed) window (see
2770:he |CTRL-W_p|), press a "P". If there's only one window, then the one window
Bram Moolenaar15146672011-10-20 22:22:38 +02002771will be horizontally split (by default).
Bram Moolenaar446cb832008-06-24 21:56:24 +00002772
2773If there's more than one window, the previous window will be re-used on
2774the selected file/directory. If the previous window's associated buffer
2775has been modified, and there's only one window with that buffer, then
2776the user will be asked if s/he wishes to save the buffer first (yes,
2777no, or cancel).
2778
Bram Moolenaarff034192013-04-24 18:51:19 +02002779Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v|
Bram Moolenaar15146672011-10-20 22:22:38 +02002780Associated setting variables:
2781 |g:netrw_alto| control above/below splitting
2782 |g:netrw_altv| control right/left splitting
2783 |g:netrw_preview| control horizontal vs vertical splitting
2784 |g:netrw_winsize| control initial sizing
2785
Bram Moolenaara6878372014-03-22 21:02:50 +01002786Also see: |g:netrw_chgwin| |netrw-p|
2787
Bram Moolenaar446cb832008-06-24 21:56:24 +00002788
2789REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2790
2791To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2792hit the <cr> when atop the ./ directory entry in the listing. One may also
2793refresh a local directory by using ":e .".
2794
2795
Bram Moolenaarff034192013-04-24 18:51:19 +02002796REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2797
2798One may toggle between normal and reverse sorting order by pressing the
2799"r" key.
2800
2801Related topics: |netrw-s|
2802Associated setting variable: |g:netrw_sort_direction|
2803
2804
Bram Moolenaar446cb832008-06-24 21:56:24 +00002805RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2806
2807If there are no marked files: (see |netrw-mf|)
2808
2809 Renaming/moving files and directories involves moving the cursor to the
2810 file/directory to be moved (renamed) and pressing "R". You will then be
2811 queried for where you want the file/directory to be moved. You may select
2812 a range of lines with the "V" command (visual selection), and then
2813 pressing "R".
2814
2815If there are marked files: (see |netrw-mf|)
2816
2817 Marked files will be renamed (moved). You will be queried as above in
2818 order to specify where you want the file/directory to be moved.
2819
2820 WARNING:~
2821
2822 Note that moving files is a dangerous operation; copies are safer. That's
2823 because a "move" for remote files is actually a copy + delete -- and if
2824 the copy fails and the delete does not, you may lose the file.
Bram Moolenaara6878372014-03-22 21:02:50 +01002825 Use at your own risk.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002826
2827The g:netrw_rename_cmd variable is used to implement renaming. By default its
2828value is:
2829
2830 ssh HOSTNAME mv
2831
2832One may rename a block of files and directories by selecting them with
2833the V (|linewise-visual|).
2834
2835
Bram Moolenaar446cb832008-06-24 21:56:24 +00002836SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2837
2838One may select the sorting style by name, time, or (file) size. The "s" map
2839allows one to circulate amongst the three choices; the directory listing will
2840automatically be refreshed to reflect the selected style.
2841
2842Related topics: |netrw-r| |netrw-S|
2843Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2844
2845
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002846SETTING EDITING WINDOW *netrw-C* {{{2
2847
2848One may select a netrw window for editing with the "C" mapping, or by setting
2849g:netrw_chgwin to the selected window number. Subsequent selection of a file
2850to edit (|netrw-cr|) will use that window.
2851
Bram Moolenaar13600302014-05-22 18:26:40 +02002852 * C by itself, will select the current window for editing via
2853 |netrw-cr|
2854
2855 * [count]C the count will be used as the window number to be used
2856 for editing via |netrw-cr|.
2857Using >
2858 let g:netrw_chgwin= -1
2859will restore the default editing behavior (ie. use the current window).
2860
Bram Moolenaar8d043172014-01-23 14:24:41 +01002861Related topics: |netrw-cr| |g:netrw_browse_split|
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002862Associated setting variables: |g:netrw_chgwin|
2863
2864
Bram Moolenaar446cb832008-06-24 21:56:24 +0000286510. Problems and Fixes *netrw-problems* {{{1
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002866
2867 (This section is likely to grow as I get feedback)
2868 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00002869 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002870 P1. I use windows 95, and my ftp dumps four blank lines at the
2871 end of every read.
2872
2873 See |netrw-fixup|, and put the following into your
2874 <.vimrc> file:
2875
2876 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002877
Bram Moolenaar488c6512005-08-11 20:09:58 +00002878 *netrw-p2*
Bram Moolenaar9964e462007-05-05 17:54:07 +00002879 P2. I use Windows, and my network browsing with ftp doesn't sort by
2880 time or size! -or- The remote system is a Windows server; why
2881 don't I get sorts by time or size?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002882
2883 Windows' ftp has a minimal support for ls (ie. it doesn't
2884 accept sorting options). It doesn't support the -F which
2885 gives an explanatory character (ABC/ for "ABC is a directory").
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002886 Netrw then uses "dir" to get both its thin and long listings.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002887 If you think your ftp does support a full-up ls, put the
2888 following into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002889
Bram Moolenaar9964e462007-05-05 17:54:07 +00002890 let g:netrw_ftp_list_cmd = "ls -lF"
2891 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2892 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2893<
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002894 Alternatively, if you have cygwin on your Windows box, put
Bram Moolenaar9964e462007-05-05 17:54:07 +00002895 into your <.vimrc>: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002896
2897 let g:netrw_cygwin= 1
Bram Moolenaar9964e462007-05-05 17:54:07 +00002898<
2899 This problem also occurs when the remote system is Windows.
2900 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2901 are as shown above, but the remote system will not correctly
2902 modify its listing behavior.
2903
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002904
Bram Moolenaar488c6512005-08-11 20:09:58 +00002905 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002906 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2907 used ssh! That wasn't what I asked for...
2908
2909 Netrw has two methods for browsing remote directories: ssh
2910 and ftp. Unless you specify ftp specifically, ssh is used.
2911 When it comes time to do download a file (not just a directory
2912 listing), netrw will use the given protocol to do so.
2913
Bram Moolenaar488c6512005-08-11 20:09:58 +00002914 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002915 P4. I would like long listings to be the default.
2916
Bram Moolenaar446cb832008-06-24 21:56:24 +00002917 Put the following statement into your |.vimrc|: >
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002918
Bram Moolenaar446cb832008-06-24 21:56:24 +00002919 let g:netrw_liststyle= 1
2920<
2921 Check out |netrw-browser-var| for more customizations that
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002922 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002923
Bram Moolenaar488c6512005-08-11 20:09:58 +00002924 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002925 P5. My times come up oddly in local browsing
2926
2927 Does your system's strftime() accept the "%c" to yield dates
Bram Moolenaarff034192013-04-24 18:51:19 +02002928 such as "Sun Apr 27 11:49:23 1997"? If not, do a
2929 "man strftime" and find out what option should be used. Then
2930 put it into your |.vimrc|: >
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002931
Bram Moolenaar446cb832008-06-24 21:56:24 +00002932 let g:netrw_timefmt= "%X" (where X is the option)
2933<
Bram Moolenaar488c6512005-08-11 20:09:58 +00002934 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00002935 P6. I want my current directory to track my browsing.
2936 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00002937
Bram Moolenaar446cb832008-06-24 21:56:24 +00002938 Put the following line in your |.vimrc|:
2939>
Bram Moolenaar433f7c82006-03-21 21:29:36 +00002940 let g:netrw_keepdir= 0
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002941<
Bram Moolenaar9964e462007-05-05 17:54:07 +00002942 *netrw-p7*
2943 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2944 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00002945
Bram Moolenaar9964e462007-05-05 17:54:07 +00002946 (taken from an answer provided by Wu Yongwei on the vim
2947 mailing list)
Bram Moolenaara6878372014-03-22 21:02:50 +01002948 I now see the problem. Your code page is not 936, right? Vim
Bram Moolenaar9964e462007-05-05 17:54:07 +00002949 seems only able to open files with names that are valid in the
2950 current code page, as are many other applications that do not
2951 use the Unicode version of Windows APIs. This is an OS-related
2952 issue. You should not have such problems when the system
2953 locale uses UTF-8, such as modern Linux distros.
2954
2955 (...it is one more reason to recommend that people use utf-8!)
2956
2957 *netrw-p8*
2958 P8. I'm getting "ssh is not executable on your system" -- what do I
2959 do?
2960
2961 (Dudley Fox) Most people I know use putty for windows ssh. It
2962 is a free ssh/telnet application. You can read more about it
2963 here:
2964
2965 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2966
2967 (Marlin Unruh) This program also works for me. It's a single
2968 executable, so he/she can copy it into the Windows\System32
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002969 folder and create a shortcut to it.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002970
2971 (Dudley Fox) You might also wish to consider plink, as it
2972 sounds most similar to what you are looking for. plink is an
2973 application in the putty suite.
2974
2975 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2976
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002977 (Vissale Neang) Maybe you can try OpenSSH for windows, which
Bram Moolenaar9964e462007-05-05 17:54:07 +00002978 can be obtained from:
2979
2980 http://sshwindows.sourceforge.net/
2981
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002982 It doesn't need the full Cygwin package.
Bram Moolenaar9964e462007-05-05 17:54:07 +00002983
2984 (Antoine Mechelynck) For individual Unix-like programs needed
2985 for work in a native-Windows environment, I recommend getting
2986 them from the GnuWin32 project on sourceforge if it has them:
2987
2988 http://gnuwin32.sourceforge.net/
2989
2990 Unlike Cygwin, which sets up a Unix-like virtual machine on
2991 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2992 Windows system calls, and its programs works quite well in the
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01002993 cmd.exe "Dos box".
Bram Moolenaar9964e462007-05-05 17:54:07 +00002994
2995 (dave) Download WinSCP and use that to connect to the server.
2996 In Preferences > Editors, set gvim as your editor:
2997
2998 - Click "Add..."
2999 - Set External Editor (adjust path as needed, include
3000 the quotes and !.! at the end):
3001 "c:\Program Files\Vim\vim70\gvim.exe" !.!
3002 - Check that the filetype in the box below is
3003 {asterisk}.{asterisk} (all files), or whatever types
3004 you want (cec: change {asterisk} to * ; I had to
3005 write it that way because otherwise the helptags
Bram Moolenaar446cb832008-06-24 21:56:24 +00003006 system thinks it's a tag)
3007 - Make sure it's at the top of the listbox (click it,
3008 then click "Up" if it's not)
Bram Moolenaar9964e462007-05-05 17:54:07 +00003009 If using the Norton Commander style, you just have to hit <F4>
3010 to edit a file in a local copy of gvim.
3011
3012 (Vit Gottwald) How to generate public/private key and save
3013 public key it on server: >
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02003014 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
3015 (8.3 Getting ready for public key authentication)
Bram Moolenaar9964e462007-05-05 17:54:07 +00003016<
Bram Moolenaar446cb832008-06-24 21:56:24 +00003017 How to use a private key with 'pscp': >
3018
Bram Moolenaar5ac3b1a2010-07-27 22:50:36 +02003019 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
3020 (5.2.4 Using public key authentication with PSCP)
Bram Moolenaar9964e462007-05-05 17:54:07 +00003021<
Bram Moolenaar446cb832008-06-24 21:56:24 +00003022 (Ben Schmidt) I find the ssh included with cwRsync is
3023 brilliant, and install cwRsync or cwRsyncServer on most
3024 Windows systems I come across these days. I guess COPSSH,
3025 packed by the same person, is probably even better for use as
3026 just ssh on Windows, and probably includes sftp, etc. which I
3027 suspect the cwRsync doesn't, though it might
3028
Bram Moolenaar9964e462007-05-05 17:54:07 +00003029 (cec) To make proper use of these suggestions above, you will
3030 need to modify the following user-settable variables in your
3031 .vimrc:
3032
Bram Moolenaar446cb832008-06-24 21:56:24 +00003033 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
3034 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
Bram Moolenaar9964e462007-05-05 17:54:07 +00003035
3036 The first one (|g:netrw_ssh_cmd|) is the most important; most
3037 of the others will use the string in g:netrw_ssh_cmd by
3038 default.
3039 *netrw-p9* *netrw-ml_get*
3040 P9. I'm browsing, changing directory, and bang! ml_get errors
3041 appear and I have to kill vim. Any way around this?
3042
3043 Normally netrw attempts to avoid writing swapfiles for
3044 its temporary directory buffers. However, on some systems
3045 this attempt appears to be causing ml_get errors to
3046 appear. Please try setting |g:netrw_use_noswf| to 0
3047 in your <.vimrc>: >
3048 let g:netrw_use_noswf= 0
3049<
Bram Moolenaar446cb832008-06-24 21:56:24 +00003050 *netrw-p10*
3051 P10. I'm being pestered with "[something] is a directory" and
3052 "Press ENTER or type command to continue" prompts...
3053
3054 The "[something] is a directory" prompt is issued by Vim,
3055 not by netrw, and there appears to be no way to work around
3056 it. Coupled with the default cmdheight of 1, this message
3057 causes the "Press ENTER..." prompt. So: read |hit-enter|;
3058 I also suggest that you set your |'cmdheight'| to 2 (or more) in
3059 your <.vimrc> file.
3060
3061 *netrw-p11*
3062 P11. I want to have two windows; a thin one on the left and my editing
Bram Moolenaar251e1912011-06-19 05:09:16 +02003063 window on the right. How may I accomplish this?
Bram Moolenaar446cb832008-06-24 21:56:24 +00003064
3065 * Put the following line in your <.vimrc>:
3066 let g:netrw_altv = 1
3067 * Edit the current directory: :e .
3068 * Select some file, press v
3069 * Resize the windows as you wish (see |CTRL-W_<| and
3070 |CTRL-W_>|). If you're using gvim, you can drag
3071 the separating bar with your mouse.
3072 * When you want a new file, use ctrl-w h to go back to the
3073 netrw browser, select a file, then press P (see |CTRL-W_h|
3074 and |netrw-P|). If you're using gvim, you can press
3075 <leftmouse> in the browser window and then press the
3076 <middlemouse> to select the file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00003077
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003078 *netrw-p12*
3079 P12. My directory isn't sorting correctly, or unwanted letters are
3080 appearing in the listed filenames, or things aren't lining
3081 up properly in the wide listing, ...
3082
3083 This may be due to an encoding problem. I myself usually use
3084 utf-8, but really only use ascii (ie. bytes from 32-126).
3085 Multibyte encodings use two (or more) bytes per character.
3086 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
3087
Bram Moolenaar00a927d2010-05-14 23:24:24 +02003088 *netrw-p13*
3089 P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
3090 the directories are missing trailing "/"s so netrw treats them
3091 as file transfers instead of as attempts to browse
3092 subdirectories. How may I fix this?
3093
3094 (mikeyao) If you want to use vim via ssh and putty under Windows,
3095 try combining the use of pscp/psftp with plink. pscp/psftp will
3096 be used to connect and plink will be used to execute commands on
3097 the server, for example: list files and directory using 'ls'.
3098
3099 These are the settings I use to do this:
3100>
3101 " list files, it's the key setting, if you haven't set,
3102 " you will get a blank buffer
3103 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
3104 " if you haven't add putty directory in system path, you should
3105 " specify scp/sftp command. For examples:
3106 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
3107 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
3108<
Bram Moolenaar251e1912011-06-19 05:09:16 +02003109 *netrw-p14*
3110 P14. I'd would like to speed up writes using Nwrite and scp/ssh
3111 style connections. How? (Thomer M. Gil)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02003112
Bram Moolenaar251e1912011-06-19 05:09:16 +02003113 Try using ssh's ControlMaster and ControlPath (see the ssh_config
3114 man page) to share multiple ssh connections over a single network
3115 connection. That cuts out the cryptographic handshake on each
3116 file write, sometimes speeding it up by an order of magnitude.
3117 (see http://thomer.com/howtos/netrw_ssh.html)
3118 (included by permission)
3119
3120 Add the following to your ~/.ssh/config: >
3121
3122 # you change "*" to the hostname you care about
3123 Host *
3124 ControlMaster auto
3125 ControlPath /tmp/%r@%h:%p
3126
3127< Then create an ssh connection to the host and leave it running: >
3128
3129 ssh -N host.domain.com
3130
3131< Now remotely open a file with Vim's Netrw and enjoy the
3132 zippiness: >
3133
3134 vim scp://host.domain.com//home/user/.bashrc
3135<
3136 *netrw-p15*
3137 P15. How may I use a double-click instead of netrw's usual single click
3138 to open a file or directory? (Ben Fritz)
3139
3140 First, disable netrw's mapping with >
3141 let g:netrw_mousemaps= 0
3142< and then create a netrw buffer only mapping in
3143 $HOME/.vim/after/ftplugin/netrw.vim: >
3144 nmap <buffer> <2-leftmouse> <CR>
3145< Note that setting g:netrw_mousemaps to zero will turn off
3146 all netrw's mouse mappings, not just the <leftmouse> one.
3147 (see |g:netrw_mousemaps|)
Bram Moolenaar00a927d2010-05-14 23:24:24 +02003148
Bram Moolenaar13600302014-05-22 18:26:40 +02003149 *netrw-p16*
3150 P16. When editing remote files (ex. :e ftp://hostname/path/file),
3151 under Windows I get an |E303| message complaining that its unable
3152 to open a swap file.
3153
3154 (romainl) It looks like you are starting Vim from a protected
3155 directory. Start if from your $HOME or another writable
3156 directory.
3157
Bram Moolenaarc0197e22004-09-13 20:26:32 +00003158==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +0000315911. Debugging Netrw Itself *netrw-debug* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003160
Bram Moolenaaradc21822011-04-01 18:03:16 +02003161The <netrw.vim> script is typically available as something like:
Bram Moolenaar488c6512005-08-11 20:09:58 +00003162>
Bram Moolenaar446cb832008-06-24 21:56:24 +00003163 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
3164 /usr/local/share/vim/vim7x/autoload/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00003165<
Bram Moolenaar071d4272004-06-13 20:20:40 +00003166which is loaded automatically at startup (assuming :set nocp).
3167
3168 1. Get the <Decho.vim> script, available as:
3169
Bram Moolenaar97d62492012-11-15 21:28:22 +01003170 http://www.drchip.org/astronaut/vim/index.html#DECHO
Bram Moolenaar071d4272004-06-13 20:20:40 +00003171 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003172 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00003173
Bram Moolenaara6878372014-03-22 21:02:50 +01003174 Decho.vim is provided as a "vimball"; see |vimball-intro|.
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00003175
Bram Moolenaar446cb832008-06-24 21:56:24 +00003176 2. Edit the <netrw.vim> file by typing: >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00003177
3178 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00003179 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00003180 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00003181<
3182 To restore to normal non-debugging behavior, re-edit <netrw.vim>
3183 and type >
Bram Moolenaar071d4272004-06-13 20:20:40 +00003184
Bram Moolenaard4755bb2004-09-02 19:12:26 +00003185 vim netrw.vim
3186 :DechoOff
3187 :wq
Bram Moolenaar446cb832008-06-24 21:56:24 +00003188<
Bram Moolenaard4755bb2004-09-02 19:12:26 +00003189 This command, provided by <Decho.vim>, will comment out all
3190 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
3191
Bram Moolenaar446cb832008-06-24 21:56:24 +00003192 3. Then bring up vim and attempt to evoke the problem by doing a
3193 transfer or doing some browsing. A set of messages should appear
3194 concerning the steps that <netrw.vim> took in attempting to
3195 read/write your file over the network in a separate tab.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003196
Bram Moolenaar9964e462007-05-05 17:54:07 +00003197 To save the file, use >
Bram Moolenaar8d043172014-01-23 14:24:41 +01003198
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +01003199 :tabnext
Bram Moolenaar9964e462007-05-05 17:54:07 +00003200 :set bt=
3201 :w! DBG
Bram Moolenaar8d043172014-01-23 14:24:41 +01003202
3203< Furthermore, it'd be helpful if you would type >
Bram Moolenaara6878372014-03-22 21:02:50 +01003204 :Dsep <command>
3205< where <command> is the command you're about to type next,
3206 thereby making it easier to associate which part of the
3207 debugging trace is due to which command.
Bram Moolenaar8d043172014-01-23 14:24:41 +01003208
Bram Moolenaara6878372014-03-22 21:02:50 +01003209 Please send that information to <netrw.vim>'s maintainer along
3210 with the o/s you're using and vim version you're using
3211 (see |:version|) >
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00003212 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar9964e462007-05-05 17:54:07 +00003213<
Bram Moolenaar071d4272004-06-13 20:20:40 +00003214==============================================================================
Bram Moolenaar9964e462007-05-05 17:54:07 +0000321512. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003216
Bram Moolenaar13600302014-05-22 18:26:40 +02003217 v152: Apr 08, 2014 * uses the |'noswapfile'| option (requires
3218 vim 7.4 with patch 213)
3219 * (Enno Nagel) turn |'rnu'| off in netrw
3220 buffers.
3221 * (Quinn Strahl) suggested that netrw
3222 allow regular window splitting to occur,
3223 thereby allowing |'equalalways'| to take
3224 effect.
3225 * (qingtian zhao) normally, netrw will
3226 save and restore the |'fileformat'|;
3227 however, sometimes that isn't wanted
3228 Apr 14, 2014 * whenever netrw marks a buffer as ro,
3229 it will also mark it as nomod.
3230 Apr 16, 2014 * sftp protocol now supported by
3231 netrw#Obtain(); this means that one
3232 may use "mc" to copy a remote file
3233 to a local file using sftp, and that
3234 the |netrw-O| command can obtain remote
3235 files via sftp.
3236 * added [count]C support (see |netrw-C|)
3237 Apr 18, 2014 * when |g:netrw_chgwin| is one more than
3238 the last window, then vertically split
3239 the last window and use it as the
3240 chgwin window.
3241 May 09, 2014 * SavePosn was "saving filename under cursor"
3242 from a non-netrw window when using :Rex.
Bram Moolenaara6878372014-03-22 21:02:50 +01003243 v151: Jan 22, 2014 * extended :Rexplore to return to buffer
3244 prior to Explore or editing a directory
3245 * (Ken Takata) netrw gave error when
3246 clipboard was disabled. Sol'n: Placed
3247 several if has("clipboard") tests in.
3248 * Fixed ftp://X@Y@Z// problem; X@Y now
3249 part of user id, and only Z is part of
3250 hostname.
3251 * (A Loumiotis) reported that completion
3252 using a directory name containing spaces
3253 did not work. Fixed with a retry in
3254 netrw#Explore() which removes the
3255 backslashes vim inserted.
3256 Feb 26, 2014 * :Rexplore now records the current file
3257 using w:netrw_rexfile when returning via
3258 |:Rexplore|
3259 Mar 08, 2014 * (David Kotchan) provided some patches
3260 allowing netrw to work properly with
3261 windows shares.
3262 * Multiple one-liner help messages available
3263 by pressing <cr> while atop the "Quick
3264 Help" line
3265 * worked on ShellCmdPost, FocusGained event
3266 handling.
3267 * |:Lexplore| path: will be used to update
3268 a left-side netrw browsing directory.
3269 Mar 12, 2014 * |:netrw-s-cr|: use <s-cr> to close
3270 tree directory implemented
3271 Mar 13, 2014 * (Tony Mechylynck) reported that using
3272 the browser with ftp on a directory,
3273 and selecting a gzipped txt file, that
3274 an E19 occurred (which was issued by
3275 gzip.vim). Fixed.
3276 Mar 14, 2014 * Implemented :MF and :MT (see |netrw-:MF|
3277 and |netrw-:MT|, respectively)
3278 Mar 17, 2014 * |:Ntree| [dir] wasn't working properly; fixed
3279 Mar 18, 2014 * Changed all uses of set to setl
3280 Mar 18, 2014 * Commented the netrw_btkeep line in
3281 s:NetrwOptionSave(); the effect is that
3282 netrw buffers will remain as |'bt'|=nofile.
3283 This should prevent swapfiles being created
3284 for netrw buffers.
3285 Mar 20, 2014 * Changed all uses of lcd to use s:NetrwLcd()
3286 instead. Consistent error handling results
3287 and it also handles Window's shares
3288 * Fixed |netrw-d| command when applied with ftp
3289 * https: support included for netrw#NetRead()
Bram Moolenaar8d043172014-01-23 14:24:41 +01003290 v150: Jul 12, 2013 * removed a "keepalt" to allow ":e #" to
3291 return to the netrw directory listing
3292 Jul 13, 2013 * (Jonas Diemer) suggested changing
3293 a <cWORD> to <cfile>.
3294 Jul 21, 2013 * (Yuri Kanivetsky) reported that netrw's
3295 use of mkdir did not produce directories
Bram Moolenaara6878372014-03-22 21:02:50 +01003296 following the user's umask.
Bram Moolenaar8d043172014-01-23 14:24:41 +01003297 Aug 27, 2013 * introduced |g:netrw_altfile| option
3298 Sep 05, 2013 * s:Strlen() now uses |strdisplaywidth()|
3299 when available, by default
3300 Sep 12, 2013 * (Selyano Baldo) reported that netrw wasn't
3301 opening some directories properly from the
3302 command line.
3303 Nov 09, 2013 * |:Lexplore| introduced
3304 * (Ondrej Platek) reported an issue with
3305 netrw's trees (P15). Fixed.
3306 * (Jorge Solis) reported that "t" in
3307 tree mode caused netrw to forget its
3308 line position.
3309 Dec 05, 2013 * Added <s-leftmouse> file marking
3310 (see |netrw-mf|)
3311 Dec 05, 2013 * (Yasuhiro Matsumoto) Explore should use
3312 strlen() instead s:Strlen() when handling
3313 multibyte chars with strpart()
3314 (ie. strpart() is byte oriented, not
3315 display-width oriented).
3316 Dec 09, 2013 * (Ken Takata) Provided a patch; File sizes
3317 and a portion of timestamps were wrongly
3318 highlighted with the directory color when
3319 setting `:let g:netrw_liststyle=1` on Windows.
3320 * (Paul Domaskis) noted that sometimes
3321 cursorline was activating in non-netrw
3322 windows. All but one setting of cursorline
3323 was done via setl; there was one that was
3324 overlooked. Fixed.
3325 Dec 24, 2013 * (esquifit) asked that netrw allow the
3326 /cygdrive prefix be a user-alterable
3327 parameter.
3328 Jan 02, 2014 * Fixed a problem with netrw-based ballon
3329 evaluation (ie. netrw#NetrwBaloonHelp()
3330 not having been loaded error messages)
3331 Jan 03, 2014 * Fixed a problem with tree listings
3332 * New command installed: |:Ntree|
3333 Jan 06, 2014 * (Ivan Brennan) reported a problem with
3334 |netrw-P|. Fixed.
3335 Jan 06, 2014 * Fixed a problem with |netrw-P| when the
3336 modified file was to be abandoned.
3337 Jan 15, 2014 * (Matteo Cavalleri) reported that when the
3338 banner is suppressed and tree listing is
3339 used, a blank line was left at the top of
3340 the display. Fixed.
3341 Jan 20, 2014 * (Gideon Go) reported that, in tree listing
3342 style, with a previous window open, that
3343 the wrong directory was being used to open
3344 a file. Fixed. (P21)
Bram Moolenaare6ae6222013-05-21 21:01:10 +02003345 v149: Apr 18, 2013 * in wide listing format, now have maps for
3346 w and b to move to next/previous file
3347 Apr 26, 2013 * one may now copy files in the same
3348 directory; netrw will issue requests for
3349 what names the files should be copied under
3350 Apr 29, 2013 * Trying Benzinger's problem again. Seems
3351 that commenting out the BufEnter and
3352 installing VimEnter (only) works. Weird
3353 problem! (tree listing, vim -O Dir1 Dir2)
3354 May 01, 2013 * :Explore ftp://... wasn't working. Fixed.
3355 May 02, 2013 * introduced |g:netrw_bannerbackslash| as
3356 requested by Paul Domaskis.
Bram Moolenaar8d043172014-01-23 14:24:41 +01003357 Jul 03, 2013 * Explore now avoids splitting when a buffer
3358 will be hidden.
Bram Moolenaarff034192013-04-24 18:51:19 +02003359 v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct
3360 choice of listing style, hiding style, and
3361 sorting style
3362 v147: Nov 24, 2012 * (James McCoy) Even with g:netrw_dirhistmax
3363 at zero, the .vim/ directory would be
3364 created to support history/bookmarks. I've
3365 gone over netrw to suppress history and
3366 bookmarking when g:netrw_dirhistmax is zero.
3367 For instance, the menus will display
3368 (disabled) when attempts to use
3369 bookmarks/history are made.
3370 Nov 29, 2012 * (Kim Jang-hwan) reported that with
3371 g:Align_xstrlen set to 3 that the cursor was
3372 moved (linewise) after invocation. This
3373 problem also afflicted netrw.
3374 (see |g:netrw_xstrlen|) Fixed.
3375 Jan 21, 2013 * (mattn) provided a patch to insert some
3376 endifs needed with the code implementing
3377 |netrw-O|.
3378 Jan 24, 2013 * (John Szakmeister) found that remote file
3379 editing resulted in filetype options being
3380 overwritten by NetrwOptionRestore(). I
3381 moved filetype detect from NetrwGetFile()
3382 to NetrwOptionRestore.
3383 Feb 17, 2013 * (Yukhiro Nakadaira) provided a patch
3384 correcting some syntax errors.
3385 Feb 28, 2013 * (Ingo Karkat) provided a patch preventing
3386 receipt of an |E95| when revisiting a
3387 file://... style url.
3388 Mar 18, 2013 * (Gary Johnson) pointed out that changing
3389 cedit to <Esc> caused problems with visincr;
3390 the cedit setting is now bypassed in netrw too.
3391 Apr 02, 2013 * (Paul Domaskis) reported an undefined
3392 variable error (s:didstarstar) was
3393 occurring. It is now defined at
3394 initialization.
3395 * included additional sanity checking for the
3396 marked file functions.
3397 * included |netrw-qF| and special "j" option
3398 handling for |netrw-mg|
3399 Apr 12, 2013 * |netrw-u| and |netrw-U| now handle counts
3400 * the former mapping for "T" has been removed;
3401 in its place are new maps, |netrw-Tb| and |netrw-Th|.
3402 * the menu now supports a "Targets" entry for
3403 easier target selection. (see |netrw-mt|)
3404 * (Paul Domaskis) reported some problems with
3405 moving/copying files under Windows' gvim
3406 (ie. not cygwin). Fixed.
3407 * (Paul Mueller) provided a patch to get
3408 start and rundll working via |netrw-gx|
3409 by bypassing the user's |'shellslash'| option.
Bram Moolenaar97d62492012-11-15 21:28:22 +01003410 v146: Oct 20, 2012 * (David Kotchan) reported that under Windows,
3411 directories named with unusual characters
3412 such as "#" or "$" were not being listed
3413 properly.
3414 * (Kenny Lee) reported that the buffer list
3415 was being populated by netrw buffers.
3416 Netrw will now |:bwipe| netrw buffers
3417 upon editing a file if g:netrw_fastbrowse
3418 is zero and its not in tree listing style.
Bram Moolenaarff034192013-04-24 18:51:19 +02003419 * fixed a bug with s:NetrwInit() that
3420 prevented initialization with |Lists| and
3421 |Dictionaries|.
3422 * |netrw-mu| now unmarks marked-file lists
Bram Moolenaar97d62492012-11-15 21:28:22 +01003423 v145: Apr 05, 2012 * moved some command from a g:netrw_local_...
3424 format to g:netwr_local... format
3425 * included some NOTE level messages about
3426 commands that aren't executable
3427 * |g:netrw_errorlvl| (default: NOTE=0)
3428 option introduced
3429 May 18, 2012 * (Ilya Dogolazky) a scenario where a
3430 |g:netrw_fastbrowse| of zero did not
3431 have a local directory refreshed fixed.
3432 Jul 10, 2012 * (Donatas) |netrw-gb| wasn't working due
3433 to an incorrectly used variable.
3434 Aug 09, 2012 * (Bart Baker) netrw was doubling
3435 of entries after a split.
3436 * (code by Takahiro Yoshihara) implemented
3437 |g:netrw_dynamic_maxfilenamelen|
3438 Aug 31, 2012 * (Andrew Wong) netrw refresh overwriting
3439 the yank buffer.
3440 v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used,
3441 or their wincmd equivalents, on a netrw
3442 buffer, the netrw's w: variables were
3443 not copied over. Fixed.
3444 Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented
3445 out, and was mistakenly used during
3446 RestorePosn. Unfortunately, I'm not
3447 sure why it was commented out, so this
3448 "fix" may re-introduce an earlier problem.
3449 Mar 21, 2012 * included s:rexposn internally to make
3450 :Rex return the cursor to the same pos'n
3451 upon restoration of netrw buffer
3452 Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove
3453 "/" from the netrw buffer's usual |'isk'|
3454 in order to allow "filetype detect" to work
3455 properly for scripts.
3456 v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative
3457 number; the absolute value of it will then
3458 be used to specify lines/columns instead of
3459 a percentage.
3460 Jul 05, 2011 * the "d" map now supports mkdir via ftp
3461 See |netrw-d| and |g:netrw_remote_mkdir|
3462 Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore
3463 to use a percentage of |winwidth()| instead
3464 of a percentage of |winheight()|.
3465 Jul 11, 2011 * included support for https://... I'm just
3466 beginning to test this, however.
3467 Aug 01, 2011 * changed RestoreOptions to also restore
3468 cursor position in netrw buffers.
3469 Aug 12, 2011 * added a note about "%" to the balloon
3470 Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon
3471 evaluation is suppressed.
3472 Aug 31, 2011 * (Benjamin R Haskell) provided a patch that
3473 implements non-standard port handling for
3474 files opened via the remote browser.
3475 Aug 31, 2011 * Fixed a **//pattern Explorer bug
3476 Sep 15, 2011 * (reported by Francesco Campana) netrw
3477 now permits the "@" to be part of the
3478 user id (if there's an @ that appears
3479 to the right).
3480 Nov 21, 2011 * New option: |g:netrw_ftp_options|
3481 Dec 07, 2011 * (James Sinclair) provided a fix handling
3482 attempts to use a uid and password when
3483 they weren't defined. This affected
3484 NetWrite (NetRead already had that fix).
Bram Moolenaar071d4272004-06-13 20:20:40 +00003485
3486
3487==============================================================================
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100348813. Todo *netrw-todo* {{{1
3489
349007/29/09 : banner :|g:netrw_banner| can be used to suppress the
3491 suppression banner. This feature is new and experimental,
3492 so its in the process of being debugged.
349309/04/09 : "gp" : See if it can be made to work for remote systems.
3494 : See if it can be made to work with marked files.
3495
3496==============================================================================
349714. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00003498
3499 Vim editor by Bram Moolenaar (Thanks, Bram!)
3500 dav support by C Campbell
3501 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003502 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00003503 http support by Bram Moolenaar <bram@moolenaar.net>
3504 rcp
3505 rsync support by C Campbell (suggested by Erik Warendorph)
3506 scp support by raf <raf@comdyn.com.au>
3507 sftp support by C Campbell
3508
3509 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3510
3511 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003512 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003513 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00003514 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3515 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3516 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00003517 Doug Claar -- modifications to test for success with ftp
Bram Moolenaar7aa9f6a2007-05-10 18:00:30 +00003518 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00003519
3520==============================================================================
Bram Moolenaar446cb832008-06-24 21:56:24 +00003521Modelines: {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +00003522 vim:tw=78:ts=8:ft=help:norl:fdm=marker