Mercurial > vim
annotate runtime/doc/pi_netrw.txt @ 5294:359743c1f59a v7.4
release version 7.4
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 10 Aug 2013 15:00:24 +0200 |
parents | 09c88160095d |
children | 350272cbf1fd |
rev | line source |
---|---|
5294 | 1 *pi_netrw.txt* For Vim version 7.4. Last change: 2013 May 18 |
4339 | 2 |
3 ------------------------------------------------ | |
4 NETRW REFERENCE MANUAL by Charles E. Campbell | |
5 ------------------------------------------------ | |
6 Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM> | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
7 (remove NOSPAM from Campbell's email first) |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
8 |
4339 | 9 Copyright: Copyright (C) 1999-2013 Charles E Campbell *netrw-copyright* |
3456 | 10 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! | |
7 | 19 |
559 | 20 |
2152 | 21 *dav* *ftp* *netrw-file* *rcp* *scp* |
22 *davs* *http* *netrw.vim* *rsync* *sftp* | |
23 *fetch* *netrw* *network* | |
7 | 24 |
25 ============================================================================== | |
1621 | 26 1. Contents *netrw-contents* {{{1 |
7 | 27 |
4339 | 28 1. Contents..............................................|netrw-contents| |
29 2. Starting With Netrw...................................|netrw-start| | |
30 3. 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| | |
39 4. Network-Oriented File Transfer........................|netrw-xfer| | |
40 NETRC...............................................|netrw-netrc| | |
41 PASSWORD............................................|netrw-passwd| | |
42 5. Activation............................................|netrw-activate| | |
43 6. Transparent Remote File Editing.......................|netrw-transparent| | |
44 7. Ex Commands...........................................|netrw-ex| | |
45 8. Variables and Options.................................|netrw-variables| | |
46 9. 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| | |
52 Browsing With A Horizontally Split Window...........|netrw-o| | |
53 Browsing With A New Tab.............................|netrw-t| | |
54 Browsing With A Vertically Split Window.............|netrw-v| | |
55 Change Listing Style.(thin wide long tree)..........|netrw-i| | |
56 Changing To A Bookmarked Directory..................|netrw-gb| | |
57 Changing To A Predecessor Directory.................|netrw-u| | |
58 Changing To A Successor Directory...................|netrw-U| | |
59 Customizing Browsing With A User Function...........|netrw-x| | |
60 Deleting Bookmarks..................................|netrw-mB| | |
61 Deleting Files Or Directories.......................|netrw-D| | |
62 Directory Exploring Commands........................|netrw-explore| | |
63 Exploring With Stars and Patterns...................|netrw-star| | |
64 Displaying Information About File...................|netrw-qf| | |
65 Edit File Or Directory Hiding List..................|netrw-ctrl-h| | |
66 Editing The Sorting Sequence........................|netrw-S| | |
67 Forcing treatment as a file or directory............|netrw-gd| |netrw-gf| | |
68 Going Up............................................|netrw--| | |
69 Hiding Files Or Directories.........................|netrw-a| | |
70 Improving Browsing..................................|netrw-ssh-hack| | |
71 Listing Bookmarks And History.......................|netrw-qb| | |
72 Making A New Directory..............................|netrw-d| | |
73 Making The Browsing Directory The Current Directory.|netrw-c| | |
74 Marking Files.......................................|netrw-mf| | |
75 Unmarking Files.....................................|netrw-mF| | |
76 Marking Files By QuickFix List......................|netrw-qF| | |
77 Marking Files By Regular Expression.................|netrw-mr| | |
78 Marked Files: Arbitrary Command.....................|netrw-mx| | |
79 Marked Files: Compression And Decompression.........|netrw-mz| | |
80 Marked Files: Copying...............................|netrw-mc| | |
81 Marked Files: Diff..................................|netrw-md| | |
82 Marked Files: Editing...............................|netrw-me| | |
83 Marked Files: Grep..................................|netrw-mg| | |
84 Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh| | |
85 Marked Files: Moving................................|netrw-mm| | |
86 Marked Files: Printing..............................|netrw-mp| | |
87 Marked Files: Sourcing..............................|netrw-ms| | |
88 Marked Files: Setting the Target Directory..........|netrw-mt| | |
89 Marked Files: Tagging...............................|netrw-mT| | |
90 Marked Files: Target Directory Using Bookmarks......|netrw-Tb| | |
91 Marked Files: Target Directory Using History........|netrw-Th| | |
92 Marked Files: Unmarking.............................|netrw-mu| | |
93 Netrw Browser Variables.............................|netrw-browser-var| | |
94 Netrw Browsing And Option Incompatibilities.........|netrw-incompatible| | |
95 Netrw Settings Window...............................|netrw-settings-window| | |
96 Obtaining A File....................................|netrw-O| | |
97 Preview Window......................................|netrw-p| | |
98 Previous Window.....................................|netrw-P| | |
99 Refreshing The Listing..............................|netrw-ctrl-l| | |
100 Reversing Sorting Order.............................|netrw-r| | |
101 Renaming Files Or Directories.......................|netrw-R| | |
102 Selecting Sorting Style.............................|netrw-s| | |
103 Setting Editing Window..............................|netrw-C| | |
104 10. Problems and Fixes....................................|netrw-problems| | |
105 11. Debugging Netrw Itself................................|netrw-debug| | |
106 12. History...............................................|netrw-history| | |
107 13. Todo..................................................|netrw-todo| | |
108 14. Credits...............................................|netrw-credits| | |
7 | 109 |
110 {Vi does not have any of this} | |
111 | |
112 ============================================================================== | |
1621 | 113 2. Starting With Netrw *netrw-start* {{{1 |
114 | |
115 Netrw makes reading files, writing files, browsing over a network, and | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
116 local browsing easy! First, make sure that you have plugins enabled, so |
1621 | 117 you'll need to have at least the following in your <.vimrc>: |
118 (or see |netrw-activate|) > | |
650 | 119 |
1121 | 120 set nocp " 'compatible' is not set |
121 filetype plugin on " plugins are enabled | |
650 | 122 < |
123 (see |'cp'| and |:filetype-plugin-on|) | |
124 | |
125 Netrw supports "transparent" editing of files on other machines using urls | |
126 (see |netrw-transparent|). As an example of this, let's assume you have an | |
1621 | 127 account on some other machine; if you can use scp, try: > |
650 | 128 |
129 vim scp://hostname/path/to/file | |
130 < | |
1621 | 131 Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|! |
132 | |
133 So, what if you have ftp, not ssh/scp? That's easy, too; try > | |
650 | 134 |
135 vim ftp://hostname/path/to/file | |
136 < | |
137 Want to make ftp simpler to use? See if your ftp supports a file called | |
138 <.netrc> -- typically it goes in your home directory, has read/write | |
139 permissions for only the user to read (ie. not group, world, other, etc), | |
140 and has lines resembling > | |
141 | |
142 machine HOSTNAME login USERID password "PASSWORD" | |
143 machine HOSTNAME login USERID password "PASSWORD" | |
144 ... | |
1121 | 145 default login USERID password "PASSWORD" |
650 | 146 < |
3456 | 147 Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: > |
148 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
149 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE' |
3920 | 150 < |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
151 Netrw will substitute the host's machine name for "MACHINE" from the url it is |
3456 | 152 attempting to open, and so one may specify > |
153 userid | |
154 password | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
155 for each site in a separate file: c:\Users\MyUserName\MachineName. |
3456 | 156 |
1621 | 157 Now about browsing -- when you just want to look around before editing a |
650 | 158 file. For browsing on your current host, just "edit" a directory: > |
159 | |
160 vim . | |
161 vim /home/userid/path | |
162 < | |
163 For browsing on a remote host, "edit" a directory (but make sure that | |
164 the directory name is followed by a "/"): > | |
165 | |
166 vim scp://hostname/ | |
167 vim ftp://hostname/path/to/dir/ | |
168 < | |
169 See |netrw-browse| for more! | |
170 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
171 There are more protocols supported by netrw than just scp and ftp, too: see the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
172 next section, |netrw-externapp|, on how to use these external applications with |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
173 netrw and vim. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
174 |
2152 | 175 PREVENTING LOADING *netrw-noload* |
1621 | 176 |
177 If you want to use plugins, but for some reason don't wish to use netrw, then | |
178 you need to avoid loading both the plugin and the autoload portions of netrw. | |
179 You may do so by placing the following two lines in your <.vimrc>: > | |
180 | |
181 :let g:loaded_netrw = 1 | |
182 :let g:loaded_netrwPlugin = 1 | |
183 < | |
650 | 184 |
185 ============================================================================== | |
2152 | 186 3. Netrw Reference *netrw-ref* {{{1 |
1621 | 187 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
188 Netrw supports several protocols in addition to scp and ftp as mentioned |
1621 | 189 in |netrw-start|. These include dav, fetch, http,... well, just look |
190 at the list in |netrw-externapp|. Each protocol is associated with a | |
191 variable which holds the default command supporting that protocol. | |
192 | |
193 EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2 | |
7 | 194 |
482 | 195 Protocol Variable Default Value |
196 -------- ---------------- ------------- | |
2751 | 197 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable |
198 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available | |
199 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available | |
200 ftp: *g:netrw_ftp_cmd* = "ftp" | |
201 http: *g:netrw_http_cmd* = "elinks" if elinks is available | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
202 http: g:netrw_http_cmd = "links" elseif links is available |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
203 http: g:netrw_http_cmd = "curl" elseif curl is available |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
204 http: g:netrw_http_cmd = "wget" elseif wget is available |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
205 http: g:netrw_http_cmd = "fetch" elseif fetch is available |
2751 | 206 rcp: *g:netrw_rcp_cmd* = "rcp" |
207 rsync: *g:netrw_rsync_cmd* = "rsync -a" | |
208 scp: *g:netrw_scp_cmd* = "scp -q" | |
209 sftp: *g:netrw_sftp_cmd* = "sftp" | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
210 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
211 *g:netrw_http_xcmd* : the option string for http://... protocols are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
212 specified via this variable and may be independently overridden. By |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
213 default, the option arguments for the http-handling commands are: > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
214 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
215 elinks : "-source >" |
3920 | 216 links : "-dump >" |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
217 curl : "-o" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
218 wget : "-q -O" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
219 fetch : "-o" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
220 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
221 For example, if your system has elinks, and you'd rather see the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
222 page using an attempt at rendering the text, you may wish to have > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
223 let g:netrw_http_xcmd= "-dump >" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
224 < in your .vimrc. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
225 |
7 | 226 |
1621 | 227 READING *netrw-read* *netrw-nread* {{{2 |
228 | |
229 Generally, one may just use the url notation with a normal editing | |
230 command, such as > | |
231 | |
232 :e ftp://[user@]machine/path | |
233 < | |
234 Netrw also provides the Nread command: | |
235 | |
7 | 236 :Nread ? give help |
22 | 237 :Nread "machine:path" uses rcp |
482 | 238 :Nread "machine path" uses ftp w/ <.netrc> |
22 | 239 :Nread "machine id password path" uses ftp |
240 :Nread "dav://machine[:port]/path" uses cadaver | |
241 :Nread "fetch://[user@]machine/path" uses fetch | |
482 | 242 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
22 | 243 :Nread "http://[user@]machine/path" uses http uses wget |
244 :Nread "rcp://[user@]machine/path" uses rcp | |
245 :Nread "rsync://[user@]machine[:port]/path" uses rsync | |
246 :Nread "scp://[user@]machine[[:#]port]/path" uses scp | |
247 :Nread "sftp://[user@]machine/path" uses sftp | |
7 | 248 |
1621 | 249 WRITING *netrw-write* *netrw-nwrite* {{{2 |
250 | |
251 One may just use the url notation with a normal file writing | |
252 command, such as > | |
253 | |
254 :w ftp://[user@]machine/path | |
255 < | |
256 Netrw also provides the Nwrite command: | |
257 | |
794 | 258 :Nwrite ? give help |
22 | 259 :Nwrite "machine:path" uses rcp |
482 | 260 :Nwrite "machine path" uses ftp w/ <.netrc> |
22 | 261 :Nwrite "machine id password path" uses ftp |
262 :Nwrite "dav://machine[:port]/path" uses cadaver | |
482 | 263 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
22 | 264 :Nwrite "rcp://[user@]machine/path" uses rcp |
265 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync | |
266 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp | |
267 :Nwrite "sftp://[user@]machine/path" uses sftp | |
7 | 268 http: not supported! |
269 | |
1621 | 270 SOURCING *netrw-source* {{{2 |
271 | |
272 One may just use the url notation with the normal file sourcing | |
273 command, such as > | |
274 | |
275 :so ftp://[user@]machine/path | |
276 < | |
277 Netrw also provides the Nsource command: | |
278 | |
1121 | 279 :Nsource ? give help |
280 :Nsource "dav://machine[:port]/path" uses cadaver | |
281 :Nsource "fetch://[user@]machine/path" uses fetch | |
282 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> | |
283 :Nsource "http://[user@]machine/path" uses http uses wget | |
284 :Nsource "rcp://[user@]machine/path" uses rcp | |
285 :Nsource "rsync://[user@]machine[:port]/path" uses rsync | |
286 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp | |
287 :Nsource "sftp://[user@]machine/path" uses sftp | |
288 | |
4339 | 289 DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2 |
1621 | 290 |
291 One may browse a directory to get a listing by simply attempting to | |
292 edit the directory: > | |
293 | |
294 :e scp://[user]@hostname/path/ | |
295 :e ftp://[user]@hostname/path/ | |
296 < | |
2908 | 297 For remote directory listings (ie. those using scp or ftp), that |
298 trailing "/" is necessary (the slash tells netrw to treat the argument | |
299 as a directory to browse instead of as a file to download). | |
300 | |
301 The Nread command may also be used to accomplish this (again, that | |
302 trailing slash is necessary): > | |
303 | |
304 :Nread [protocol]://[user]@hostname/path/ | |
305 < | |
1621 | 306 *netrw-login* *netrw-password* |
307 CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2 | |
1209 | 308 |
7 | 309 Attempts to use ftp will prompt you for a user-id and a password. |
3153 | 310 These will be saved in global variables |g:netrw_uid| and |
311 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings, | |
312 thereby simplifying use of ftp. However, if you need to use a | |
313 different user id and/or password, you'll want to call |NetUserPass()| | |
1209 | 314 first. To work around the need to enter passwords, check if your ftp |
315 supports a <.netrc> file in your home directory. Also see | |
316 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how | |
3153 | 317 to not need to use passwords for scp, look at |netrw-ssh-hack|). |
7 | 318 |
319 :NetUserPass [uid [password]] -- prompts as needed | |
320 :call NetUserPass() -- prompts for uid and password | |
321 :call NetUserPass("uid") -- prompts for password | |
322 :call NetUserPass("uid","password") -- sets global uid and password | |
323 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
324 (Related topics: |ftp| |netrw-userpass| |netrw-start|) |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
325 |
1621 | 326 NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2 |
3456 | 327 (Also see: |
328 |netrw-browser-var| : netrw browser option variables | |
329 |netrw-protocol| : file transfer protocol option variables | |
330 |netrw-settings| : additional file transfer options | |
331 |netrw-browser-options| : these options affect browsing directories | |
332 ) | |
1621 | 333 |
334 Netrw provides a lot of variables which allow you to customize netrw to your | |
335 preferences. One way to look at them is via the command :NetrwSettings (see | |
336 |netrw-settings|) which will display your current netrw settings. Most such | |
337 settings are described below, in |netrw-browser-options|, and in | |
338 |netrw-externapp|: | |
1121 | 339 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
340 *b:netrw_lastfile* last file Network-read/written retained on a |
3456 | 341 per-buffer basis (supports plain :Nw ) |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
342 |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
343 *g:netrw_bufsettings* the settings that netrw buffers have |
3456 | 344 (default) noma nomod nonu nowrap ro nobl |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
345 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
346 *g:netrw_chgwin* specifies a window number where file edits will take |
3456 | 347 place. (also see |netrw-C|) |
348 (default) not defined | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
349 |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
350 *g:Netrw_funcref* specifies a function (or functions) to be called when |
3456 | 351 netrw edits a file. The file is first edited, and |
352 then the function reference (|Funcref|) is called. | |
353 This variable may also hold a |List| of Funcrefs. | |
354 (default) not defined. (the capital in g:Netrw... | |
355 is required by its holding a function reference) | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
356 > |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
357 Example: place in .vimrc; affects all file opening |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
358 fun! MyFuncRef() |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
359 endfun |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
360 let g:Netrw_funcref= function("MyFuncRef") |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
361 < |
3456 | 362 *g:netrw_ftp* if it doesn't exist, use default ftp |
363 =0 use default ftp (uid password) | |
364 =1 use alternate ftp method (user uid password) | |
365 If you're having trouble with ftp, try changing the | |
366 value of this variable to see if the alternate ftp | |
367 method works for your setup. | |
368 | |
369 *g:netrw_ftp_options* Chosen by default, these options are supposed to turn | |
370 interactive prompting off and to restrain ftp from | |
371 attempting auto-login upon initial connection. | |
372 However, it appears that not all ftp implementations | |
373 support this (ex. ncftp). | |
374 ="-i -n" | |
482 | 375 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
376 *g:netrw_ftpextracmd* default: doesn't exist |
3456 | 377 If this variable exists, then any string it contains |
378 will be placed into the commands set to your ftp | |
379 client. As an example: | |
380 ="passive" | |
1121 | 381 |
482 | 382 *g:netrw_ftpmode* ="binary" (default) |
3456 | 383 ="ascii" |
482 | 384 |
1121 | 385 *g:netrw_ignorenetrc* =0 (default for linux, cygwin) |
3456 | 386 =1 If you have a <.netrc> file but it doesn't work and |
387 you want it ignored, then set this variable as | |
388 shown. (default for Windows + cmd.exe) | |
1121 | 389 |
390 *g:netrw_menu* =0 disable netrw's menu | |
3456 | 391 =1 (default) netrw's menu enabled |
1121 | 392 |
393 *g:netrw_nogx* if this variable exists, then the "gx" map will not | |
3456 | 394 be available (see |netrw-gx|) |
482 | 395 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
396 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis |
3456 | 397 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis |
1621 | 398 |
399 *g:netrw_preview* =0 (default) preview window shown in a horizontally | |
3456 | 400 split window |
401 =1 preview window shown in a vertically split window. | |
402 Also affects the "previous window" (see |netrw-P|) in | |
403 the same way. | |
404 | |
405 *g:netrw_scpport* = "-P" : option to use to set port for scp | |
406 *g:netrw_sshport* = "-p" : option to use to set port for ssh | |
407 | |
408 *g:netrw_sepchr* =\0xff | |
409 =\0x01 for enc == euc-jp (and perhaps it should be for | |
410 others, too, please let me know) | |
411 Separates priority codes from filenames internally. | |
412 See |netrw-p12|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
413 |
1621 | 414 *g:netrw_silent* =0 : transfers done normally |
3456 | 415 =1 : transfers done silently |
1621 | 416 |
1209 | 417 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one |
3456 | 418 line window. This window provides reliable |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
419 delivery of messages. (default) |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
420 =0 : messages from netrw will use echoerr ; |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
421 messages don't always seem to show up this |
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
422 way, but one doesn't have to quit the window. |
1209 | 423 |
482 | 424 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank |
3456 | 425 lines that o/s's ftp "provides" on transfers |
426 =0 force normal ftp behavior (no trailing line removal) | |
427 | |
428 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also | |
429 permits network browsing to use ls with time and | |
430 size sorting (default if windows) | |
431 =0 assume Windows' scp accepts windows-style paths | |
432 Network browsing uses dir instead of ls | |
433 This option is ignored if you're using unix | |
482 | 434 |
435 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP | |
3456 | 436 =1 use WinNT's rcp in binary mode (default) |
22 | 437 |
1621 | 438 PATHS *netrw-path* {{{2 |
466 | 439 |
482 | 440 Paths to files are generally user-directory relative for most protocols. |
441 It is possible that some protocol will make paths relative to some | |
442 associated directory, however. | |
443 > | |
444 example: vim scp://user@host/somefile | |
445 example: vim scp://user@host/subdir1/subdir2/somefile | |
446 < | |
1621 | 447 where "somefile" is in the "user"'s home directory. If you wish to get a |
482 | 448 file using root-relative paths, use the full path: |
449 > | |
450 example: vim scp://user@host//somefile | |
451 example: vim scp://user@host//subdir1/subdir2/somefile | |
452 < | |
7 | 453 |
454 ============================================================================== | |
1621 | 455 4. Network-Oriented File Transfer *netrw-xfer* {{{1 |
7 | 456 |
457 Network-oriented file transfer under Vim is implemented by a VimL-based script | |
559 | 458 (<netrw.vim>) using plugin techniques. It currently supports both reading and |
459 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch, | |
7 | 460 dav/cadaver, rsync, or sftp. |
461 | |
462 http is currently supported read-only via use of wget or fetch. | |
463 | |
464 <netrw.vim> is a standard plugin which acts as glue between Vim and the | |
465 various file transfer programs. It uses autocommand events (BufReadCmd, | |
466 FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. > | |
467 | |
468 ex. vim ftp://hostname/path/to/file | |
469 < | |
559 | 470 The characters preceding the colon specify the protocol to use; in the |
1621 | 471 example, it's ftp. The <netrw.vim> script then formulates a command or a |
559 | 472 series of commands (typically ftp) which it issues to an external program |
473 (ftp, scp, etc) which does the actual file transfer/protocol. Files are read | |
474 from/written to a temporary file (under Unix/Linux, /tmp/...) which the | |
475 <netrw.vim> script will clean up. | |
7 | 476 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
477 Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
478 ftp is not a secure protocol. User names and passwords are transmitted "in |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
479 the clear" over the internet; any snooper tool can pick these up; this is not |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
480 a netrw thing, this is a ftp thing. If you're concerned about this, please |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
481 try to use scp or sftp instead. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
482 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
483 Netrw re-uses the user id and password during the same vim session and so long |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
484 as the remote hostname remains the same. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
485 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
486 Jan seems to be a bit confused about how netrw handles ftp; normally multiple |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
487 commands are performed in a "ftp session", and he seems to feel that the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
488 uid/password should only be retained over one ftp session. However, netrw |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
489 does every ftp operation in a separate "ftp session"; so remembering the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
490 uid/password for just one "ftp session" would be the same as not remembering |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
491 the uid/password at all. IMHO this would rapidly grow tiresome as one |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
492 browsed remote directories, for example. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
493 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
494 On the other hand, thanks go to Jan M. for pointing out the many |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
495 vulnerabilities that netrw (and vim itself) had had in handling "crafted" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
496 filenames. The |shellescape()| and |fnameescape()| functions were written in |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
497 response by Bram Moolenaar to handle these sort of problems, and netrw has |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
498 been modified to use them. Still, my advice is, if the "filename" looks like |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
499 a vim command that you aren't comfortable with having executed, don't open it. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
500 |
1121 | 501 *netrw-putty* *netrw-pscp* *netrw-psftp* |
559 | 502 One may modify any protocol's implementing external application by setting a |
503 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to | |
794 | 504 "scp -q"). As an example, consider using PuTTY: > |
1121 | 505 |
506 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch' | |
507 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"' | |
794 | 508 < |
3153 | 509 (note: it has been reported that windows 7 with putty v0.6's "-batch" option |
510 doesn't work, so its best to leave it off for that system) | |
511 | |
1121 | 512 See |netrw-p8| for more about putty, pscp, psftp, etc. |
513 | |
7 | 514 Ftp, an old protocol, seems to be blessed by numerous implementations. |
559 | 515 Unfortunately, some implementations are noisy (ie., add junk to the end of the |
516 file). Thus, concerned users may decide to write a NetReadFixup() function | |
517 that will clean up after reading with their ftp. Some Unix systems (ie., | |
518 FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is | |
519 not noisy and more convenient, actually, for <netrw.vim> to use. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
520 Consequently, if "fetch" is available (ie. executable), it may be preferable |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
521 to use it for ftp://... based transfers. |
7 | 522 |
523 For rcp, scp, sftp, and http, one may use network-oriented file transfers | |
459 | 524 transparently; ie. |
7 | 525 > |
526 vim rcp://[user@]machine/path | |
527 vim scp://[user@]machine/path | |
528 < | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
529 If your ftp supports <.netrc>, then it too can be transparently used |
7 | 530 if the needed triad of machine name, user id, and password are present in |
531 that file. Your ftp must be able to use the <.netrc> file on its own, however. | |
532 > | |
533 vim ftp://[user@]machine[[:#]portnumber]/path | |
534 < | |
2751 | 535 Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses |
536 an option, -s:filename (filename can and probably should be a full path) | |
537 which contains ftp commands which will be automatically run whenever ftp | |
538 starts. You may use this feature to enter a user and password for one site: > | |
539 userid | |
540 password | |
3456 | 541 < *netrw-windows-netrc* *netrw-windows-s* |
2751 | 542 If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only) |
3456 | 543 netrw will substitute the current machine name requested for ftp connections |
2751 | 544 for MACHINE. Hence one can have multiple machine.ftp files containing login |
545 and password for ftp. Example: > | |
546 | |
4339 | 547 let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE' |
548 vim ftp://myhost.somewhere.net/ | |
2751 | 549 will use a file > |
550 C:\Users\Myself\myhost.ftp | |
551 < | |
552 Often, ftp will need to query the user for the userid and password. | |
459 | 553 The latter will be done "silently"; ie. asterisks will show up instead of |
7 | 554 the actually-typed-in password. Netrw will retain the userid and password |
555 for subsequent read/writes from the most recent transfer so subsequent | |
556 transfers (read/write) to or from that machine will take place without | |
557 additional prompting. | |
558 | |
559 *netrw-urls* | |
560 +=================================+============================+============+ | |
1121 | 561 | Reading | Writing | Uses | |
7 | 562 +=================================+============================+============+ |
1121 | 563 | DAV: | | | |
564 | dav://host/path | | cadaver | | |
565 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | | |
7 | 566 +---------------------------------+----------------------------+------------+ |
1621 | 567 | DAV + SSL: | | | |
568 | davs://host/path | | cadaver | | |
569 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver | | |
570 +---------------------------------+----------------------------+------------+ | |
1121 | 571 | FETCH: | | | |
572 | fetch://[user@]host/path | | | | |
573 | fetch://[user@]host:http/path | Not Available | fetch | | |
574 | :Nread fetch://[user@]host/path| | | | |
7 | 575 +---------------------------------+----------------------------+------------+ |
1121 | 576 | FILE: | | | |
577 | file:///* | file:///* | | | |
578 | file://localhost/* | file://localhost/* | | | |
7 | 579 +---------------------------------+----------------------------+------------+ |
1121 | 580 | FTP: (*3) | (*3) | | |
581 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | | |
582 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | | |
583 | :Nread host path | :Nwrite host path | ftp+.netrc | | |
584 | :Nread host uid pass path | :Nwrite host uid pass path | ftp | | |
7 | 585 +---------------------------------+----------------------------+------------+ |
1121 | 586 | HTTP: wget is executable: (*4) | | | |
587 | http://[user@]host/path | Not Available | wget | | |
7 | 588 +---------------------------------+----------------------------+------------+ |
1121 | 589 | HTTP: fetch is executable (*4) | | | |
590 | http://[user@]host/path | Not Available | fetch | | |
7 | 591 +---------------------------------+----------------------------+------------+ |
1121 | 592 | RCP: | | | |
593 | rcp://[user@]host/path | rcp://[user@]host/path | rcp | | |
7 | 594 +---------------------------------+----------------------------+------------+ |
1121 | 595 | RSYNC: | | | |
596 | rsync://[user@]host/path | rsync://[user@]host/path | rsync | | |
597 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | | |
598 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | | |
7 | 599 +---------------------------------+----------------------------+------------+ |
1121 | 600 | SCP: | | | |
601 | scp://[user@]host/path | scp://[user@]host/path | scp | | |
602 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | | |
7 | 603 +---------------------------------+----------------------------+------------+ |
1121 | 604 | SFTP: | | | |
605 | sftp://[user@]host/path | sftp://[user@]host/path | sftp | | |
606 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | | |
7 | 607 +=================================+============================+============+ |
608 | |
609 (*1) For an absolute path use scp://machine//path. | |
610 | |
611 (*2) if <.netrc> is present, it is assumed that it will | |
612 work with your ftp client. Otherwise the script will | |
1121 | 613 prompt for user-id and password. |
7 | 614 |
1121 | 615 (*3) for ftp, "machine" may be machine#port or machine:port |
7 | 616 if a different port is needed than the standard ftp port |
617 | |
618 (*4) for http:..., if wget is available it will be used. Otherwise, | |
619 if fetch is available it will be used. | |
620 | |
621 Both the :Nread and the :Nwrite ex-commands can accept multiple filenames. | |
622 | |
623 | |
624 NETRC *netrw-netrc* | |
625 | |
1621 | 626 The <.netrc> file, typically located in your home directory, contains lines |
627 therein which map a hostname (machine name) to the user id and password you | |
628 prefer to use with it. | |
629 | |
7 | 630 The typical syntax for lines in a <.netrc> file is given as shown below. |
799 | 631 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't. |
7 | 632 > |
633 machine {full machine name} login {user-id} password "{password}" | |
634 default login {user-id} password "{password}" | |
635 | |
636 Your ftp client must handle the use of <.netrc> on its own, but if the | |
637 <.netrc> file exists, an ftp transfer will not ask for the user-id or | |
638 password. | |
639 | |
640 Note: | |
641 Since this file contains passwords, make very sure nobody else can | |
642 read this file! Most programs will refuse to use a .netrc that is | |
643 readable for others. Don't forget that the system administrator can | |
1621 | 644 still read the file! Ie. for Linux/Unix: chmod 600 .netrc |
7 | 645 |
3456 | 646 Even though Windows' ftp clients typically do not support .netrc, netrw has |
647 a work-around: see |netrw-windows-s|. | |
648 | |
7 | 649 |
650 PASSWORD *netrw-passwd* | |
651 | |
652 The script attempts to get passwords for ftp invisibly using |inputsecret()|, | |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
653 a built-in Vim function. See |netrw-userpass| for how to change the password |
7 | 654 after one has set it. |
655 | |
559 | 656 Unfortunately there doesn't appear to be a way for netrw to feed a password to |
657 scp. Thus every transfer via scp will require re-entry of the password. | |
1621 | 658 However, |netrw-ssh-hack| can help with this problem. |
7 | 659 |
660 | |
661 ============================================================================== | |
1621 | 662 5. Activation *netrw-activate* {{{1 |
7 | 663 |
799 | 664 Network-oriented file transfers are available by default whenever Vim's |
1621 | 665 |'nocompatible'| mode is enabled. Netrw's script files reside in your |
666 system's plugin, autoload, and syntax directories; just the | |
667 plugin/netrwPlugin.vim script is sourced automatically whenever you bring up | |
668 vim. The main script in autoload/netrw.vim is only loaded when you actually | |
669 use netrw. I suggest that, at a minimum, you have at least the following in | |
670 your <.vimrc> customization file: > | |
799 | 671 |
559 | 672 set nocp |
673 if version >= 600 | |
674 filetype plugin indent on | |
675 endif | |
676 < | |
7 | 677 |
678 ============================================================================== | |
2751 | 679 6. Transparent Remote File Editing *netrw-transparent* {{{1 |
7 | 680 |
681 Transparent file transfers occur whenever a regular file read or write | |
1621 | 682 (invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd| |
683 events) is made. Thus one may read, write, or source files across networks | |
684 just as easily as if they were local files! > | |
7 | 685 |
686 vim ftp://[user@]machine/path | |
687 ... | |
688 :wq | |
689 | |
559 | 690 See |netrw-activate| for more on how to encourage your vim to use plugins |
691 such as netrw. | |
7 | 692 |
799 | 693 |
7 | 694 ============================================================================== |
1621 | 695 7. Ex Commands *netrw-ex* {{{1 |
7 | 696 |
799 | 697 The usual read/write commands are supported. There are also a few |
1621 | 698 additional commands available. Often you won't need to use Nwrite or |
1121 | 699 Nread as shown in |netrw-transparent| (ie. simply use > |
700 :e url | |
701 :r url | |
702 :w url | |
703 instead, as appropriate) -- see |netrw-urls|. In the explanations | |
704 below, a {netfile} is an url to a remote file. | |
7 | 705 |
2152 | 706 *:Nwrite* *:Nw* |
1621 | 707 :[range]Nw[rite] Write the specified lines to the current |
7 | 708 file as specified in b:netrw_lastfile. |
2152 | 709 (related: |netrw-nwrite|) |
7 | 710 |
1621 | 711 :[range]Nw[rite] {netfile} [{netfile}]... |
7 | 712 Write the specified lines to the {netfile}. |
713 | |
2152 | 714 *:Nread* *:Nr* |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
715 :Nr[ead] Read the lines from the file specified in b:netrw_lastfile |
2152 | 716 into the current buffer. (related: |netrw-nread|) |
7 | 717 |
1621 | 718 :Nr[ead] {netfile} {netfile}... |
7 | 719 Read the {netfile} after the current line. |
720 | |
2152 | 721 *:Nsource* *:Ns* |
1621 | 722 :Ns[ource] {netfile} |
1121 | 723 Source the {netfile}. |
724 To start up vim using a remote .vimrc, one may use | |
725 the following (all on one line) (tnx to Antoine Mechelynck) > | |
726 vim -u NORC -N | |
727 --cmd "runtime plugin/netrwPlugin.vim" | |
728 --cmd "source scp://HOSTNAME/.vimrc" | |
2152 | 729 < (related: |netrw-source|) |
730 | |
731 :call NetUserPass() *NetUserPass()* | |
1621 | 732 If g:netrw_uid and s:netrw_passwd don't exist, |
733 this function will query the user for them. | |
2152 | 734 (related: |netrw-userpass|) |
7 | 735 |
736 :call NetUserPass("userid") | |
1621 | 737 This call will set the g:netrw_uid and, if |
7 | 738 the password doesn't exist, will query the user for it. |
2152 | 739 (related: |netrw-userpass|) |
7 | 740 |
741 :call NetUserPass("userid","passwd") | |
1621 | 742 This call will set both the g:netrw_uid and s:netrw_passwd. |
7 | 743 The user-id and password are used by ftp transfers. One may |
1621 | 744 effectively remove the user-id and password by using empty |
745 strings (ie. ""). | |
2152 | 746 (related: |netrw-userpass|) |
7 | 747 |
1121 | 748 :NetrwSettings This command is described in |netrw-settings| -- used to |
749 display netrw settings and change netrw behavior. | |
482 | 750 |
7 | 751 |
752 ============================================================================== | |
3456 | 753 8. Variables and Options *netrw-var* *netrw-settings* {{{1 |
3153 | 754 |
755 (also see: |netrw-options| |netrw-variables| |netrw-protocol| | |
3456 | 756 |netrw-browser-settings| |netrw-browser-options| ) |
7 | 757 |
1121 | 758 The <netrw.vim> script provides several variables which act as options to |
1621 | 759 affect <netrw.vim>'s file transfer behavior. These variables typically may be |
760 set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|) | |
3153 | 761 *netrw-options* |
1621 | 762 > |
1121 | 763 ------------- |
764 Netrw Options | |
765 ------------- | |
9 | 766 Option Meaning |
767 -------------- ----------------------------------------------- | |
768 < | |
1121 | 769 b:netrw_col Holds current cursor position (during NetWrite) |
770 g:netrw_cygwin =1 assume scp under windows is from cygwin | |
771 (default/windows) | |
772 =0 assume scp under windows accepts windows | |
773 style paths (default/else) | |
774 g:netrw_ftp =0 use default ftp (uid password) | |
775 g:netrw_ftpmode ="binary" (default) | |
776 ="ascii" (your choice) | |
777 g:netrw_ignorenetrc =1 (default) | |
778 if you have a <.netrc> file but you don't | |
7 | 779 want it used, then set this variable. Its |
780 mere existence is enough to cause <.netrc> | |
781 to be ignored. | |
1121 | 782 b:netrw_lastfile Holds latest method/machine/path. |
783 b:netrw_line Holds current line number (during NetWrite) | |
784 g:netrw_silent =0 transfers done normally | |
785 =1 transfers done silently | |
786 g:netrw_uid Holds current user-id for ftp. | |
787 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) | |
788 =1 use WinNT/2K/XP's rcp, binary mode | |
789 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc | |
790 =1 use default method to do ftp > | |
9 | 791 ----------------------------------------------------------------------- |
792 < | |
3153 | 793 *netrw-internal-variables* |
7 | 794 The script will also make use of the following variables internally, albeit |
795 temporarily. | |
9 | 796 > |
797 ------------------- | |
798 Temporary Variables | |
799 ------------------- | |
800 Variable Meaning | |
801 -------- ------------------------------------ | |
802 < | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
803 b:netrw_method Index indicating rcp/ftp+.netrc/ftp |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
804 w:netrw_method (same as b:netrw_method) |
7 | 805 g:netrw_machine Holds machine name parsed from input |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
806 b:netrw_fname Holds filename being accessed > |
9 | 807 ------------------------------------------------------------ |
808 < | |
1621 | 809 *netrw-protocol* |
7 | 810 |
9 | 811 Netrw supports a number of protocols. These protocols are invoked using the |
812 variables listed below, and may be modified by the user. | |
7 | 813 > |
814 ------------------------ | |
1121 | 815 Protocol Control Options |
7 | 816 ------------------------ |
1121 | 817 Option Type Setting Meaning |
818 --------- -------- -------------- --------------------------- | |
9 | 819 < |
1121 | 820 netrw_ftp variable =doesn't exist userid set by "user userid" |
821 =0 userid set by "user userid" | |
822 =1 userid set by "userid" | |
823 NetReadFixup function =doesn't exist no change | |
824 =exists Allows user to have files | |
825 read via ftp automatically | |
826 transformed however they wish | |
827 by NetReadFixup() | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
828 g:netrw_dav_cmd variable ="cadaver" if cadaver is executable |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
829 g:netrw_dav_cmd variable ="curl -o" elseif curl is executable |
1121 | 830 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available |
7 | 831 g:netrw_ftp_cmd variable ="ftp" |
650 | 832 g:netrw_http_cmd variable ="fetch -o" if fetch is available |
833 g:netrw_http_cmd variable ="wget -O" else if wget is available | |
1121 | 834 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa" |
7 | 835 g:netrw_rcp_cmd variable ="rcp" |
836 g:netrw_rsync_cmd variable ="rsync -a" | |
837 g:netrw_scp_cmd variable ="scp -q" | |
9 | 838 g:netrw_sftp_cmd variable ="sftp" > |
839 ------------------------------------------------------------------------- | |
7 | 840 < |
12 | 841 *netrw-ftp* |
1121 | 842 |
843 The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|) | |
844 specify the external program to use handle the ftp protocol. They may | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
845 include command line options (such as -p for passive mode). Example: > |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
846 |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
847 let g:netrw_ftp_cmd= "ftp -p" |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
848 < |
1121 | 849 Browsing is supported by using the |g:netrw_list_cmd|; the substring |
850 "HOSTNAME" will be changed via substitution with whatever the current request | |
851 is for a hostname. | |
7 | 852 |
1121 | 853 Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's |
854 that give trouble . In order to best understand how to use these options if | |
855 ftp is giving you troubles, a bit of discussion is provided on how netrw does | |
856 ftp reads. | |
9 | 857 |
858 For ftp, netrw typically builds up lines of one of the following formats in a | |
7 | 859 temporary file: |
860 > | |
861 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 | |
862 ---------------------------------- ------------------------------ | |
9 | 863 < |
1121 | 864 open machine [port] open machine [port] |
865 user userid password userid password | |
866 [g:netrw_ftpmode] password | |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
867 [g:netrw_ftpextracmd] [g:netrw_ftpmode] |
1121 | 868 get filename tempfile [g:netrw_extracmd] |
869 get filename tempfile > | |
9 | 870 --------------------------------------------------------------------- |
7 | 871 < |
2432
80229a724a11
Updated runtime files. :TOhtml improvements by Benjamin Fritz.
Bram Moolenaar <bram@vim.org>
parents:
2426
diff
changeset
|
872 The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional. |
1121 | 873 |
7 | 874 Netrw then executes the lines above by use of a filter: |
875 > | |
876 :%! {g:netrw_ftp_cmd} -i [-n] | |
877 < | |
878 where | |
879 g:netrw_ftp_cmd is usually "ftp", | |
880 -i tells ftp not to be interactive | |
881 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>) | |
882 | |
883 If <.netrc> exists it will be used to avoid having to query the user for | |
9 | 884 userid and password. The transferred file is put into a temporary file. |
7 | 885 The temporary file is then read into the main editing session window that |
886 requested it and the temporary file deleted. | |
887 | |
559 | 888 If your ftp doesn't accept the "user" command and immediately just demands a |
889 userid, then try putting "let netrw_ftp=1" in your <.vimrc>. | |
7 | 890 |
12 | 891 *netrw-cadaver* |
892 To handle the SSL certificate dialog for untrusted servers, one may pull | |
893 down the certificate and place it into /usr/ssl/cert.pem. This operation | |
894 renders the server treatment as "trusted". | |
895 | |
794 | 896 *netrw-fixup* *netreadfixup* |
7 | 897 If your ftp for whatever reason generates unwanted lines (such as AUTH |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
898 messages) you may write a NetReadFixup() function: |
7 | 899 > |
900 function! NetReadFixup(method,line1,line2) | |
901 " a:line1: first new line in current file | |
902 " a:line2: last new line in current file | |
903 if a:method == 1 "rcp | |
904 elseif a:method == 2 "ftp + <.netrc> | |
905 elseif a:method == 3 "ftp + machine,uid,password,filename | |
906 elseif a:method == 4 "scp | |
907 elseif a:method == 5 "http/wget | |
908 elseif a:method == 6 "dav/cadaver | |
909 elseif a:method == 7 "rsync | |
910 elseif a:method == 8 "fetch | |
911 elseif a:method == 9 "sftp | |
1121 | 912 else " complain |
7 | 913 endif |
914 endfunction | |
915 > | |
559 | 916 The NetReadFixup() function will be called if it exists and thus allows you to |
917 customize your reading process. As a further example, <netrw.vim> contains | |
918 just such a function to handle Windows 95 ftp. For whatever reason, Windows | |
919 95's ftp dumps four blank lines at the end of a transfer, and so it is | |
920 desirable to automate their removal. Here's some code taken from <netrw.vim> | |
921 itself: | |
7 | 922 > |
923 if has("win95") && g:netrw_win95ftp | |
9 | 924 fun! NetReadFixup(method, line1, line2) |
7 | 925 if method == 3 " ftp (no <.netrc>) |
1121 | 926 let fourblanklines= line2 - 3 |
927 silent fourblanklines.",".line2."g/^\s*/d" | |
7 | 928 endif |
929 endfunction | |
930 endif | |
931 > | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
932 (Related topics: |ftp| |netrw-userpass| |netrw-start|) |
7 | 933 |
934 ============================================================================== | |
1621 | 935 9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
936 *netrw-browser* *netrw-dir* *netrw-list* |
1621 | 937 |
938 INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2 | |
939 (Quick References: |netrw-quickmaps| |netrw-quickcoms|) | |
940 | |
941 Netrw supports the browsing of directories on your local system and on remote | |
942 hosts; browsing includes listing files and directories, entering directories, | |
943 editing files therein, deleting files/directories, making new directories, | |
944 moving (renaming) files and directories, copying files and directories, etc. | |
945 One may mark files and execute any system command on them! The Netrw browser | |
946 generally implements the previous explorer's maps and commands for remote | |
947 directories, although details (such as pertinent global variable names) | |
948 necessarily differ. To browse a directory, simply "edit" it! > | |
949 | |
950 vim /your/directory/ | |
951 vim . | |
952 vim c:\your\directory\ | |
953 < | |
954 (Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t| | |
955 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| ) | |
22 | 956 |
957 The Netrw remote file and directory browser handles two protocols: ssh and | |
1621 | 958 ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp |
959 in its remote browsing. Specifying any other protocol will cause it to be | |
960 used for file transfers; but the ssh protocol will be used to do remote | |
961 browsing. | |
962 | |
963 To use Netrw's remote directory browser, simply attempt to read a "file" with | |
964 a trailing slash and it will be interpreted as a request to list a directory: | |
965 > | |
9 | 966 vim [protocol]://[user@]hostname/path/ |
1621 | 967 < |
968 where [protocol] is typically scp or ftp. As an example, try: > | |
969 | |
970 vim ftp://ftp.home.vim.org/pub/vim/ | |
719 | 971 < |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
972 For local directories, the trailing slash is not required. Again, because it's |
1621 | 973 easy to miss: to browse remote directories, the url must terminate with a |
974 slash! | |
975 | |
976 If you'd like to avoid entering the password repeatedly for remote directory | |
977 listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with | |
978 ftp, see |netrw-netrc| (if your ftp supports it). | |
979 | |
980 There are several things you can do to affect the browser's display of files: | |
981 | |
982 * To change the listing style, press the "i" key (|netrw-i|). | |
983 Currently there are four styles: thin, long, wide, and tree. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
984 To make that change "permanent", see |g:netrw_liststyle|. |
1621 | 985 |
986 * To hide files (don't want to see those xyz~ files anymore?) see | |
987 |netrw-ctrl-h|. | |
988 | |
989 * Press s to sort files by name, time, or size. | |
990 | |
991 See |netrw-browse-cmds| for all the things you can do with netrw! | |
992 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
993 *netrw-getftype* *netrw-filigree* *netrw-ftype* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
994 The |getftype()| function is used to append a bit of filigree to indicate |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
995 filetype to locally listed files: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
996 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
997 directory : / |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
998 executable : * |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
999 fifo : | |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1000 links : @ |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1001 sockets : = |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1002 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1003 The filigree also affects the |g:netrw_sort_sequence|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1004 |
1621 | 1005 |
1006 QUICK HELP *netrw-quickhelp* {{{2 | |
1007 (Use ctrl-] to select a topic)~ | |
1008 Intro to Browsing...............................|netrw-intro-browse| | |
1009 Quick Reference: Maps.........................|netrw-quickmap| | |
1010 Quick Reference: Commands.....................|netrw-browse-cmds| | |
1011 Hiding | |
1012 Edit hiding list..............................|netrw-ctrl-h| | |
1013 Hiding Files or Directories...................|netrw-a| | |
1014 Hiding/Unhiding by suffix.....................|netrw-mh| | |
1015 Hiding dot-files.............................|netrw-gh| | |
1016 Listing Style | |
1017 Select listing style (thin/long/wide/tree)....|netrw-i| | |
1018 Associated setting variable...................|g:netrw_liststyle| | |
1019 Shell command used to perform listing.........|g:netrw_list_cmd| | |
1020 Quick file info...............................|netrw-qf| | |
1021 Sorted by | |
1022 Select sorting style (name/time/size).........|netrw-s| | |
1023 Editing the sorting sequence..................|netrw-S| | |
1668 | 1024 Sorting options...............................|g:netrw_sort_options| |
1621 | 1025 Associated setting variable...................|g:netrw_sort_sequence| |
1026 Reverse sorting order.........................|netrw-r| | |
1027 | |
1028 | |
1029 *netrw-quickmap* *netrw-quickmaps* | |
1030 QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 | |
466 | 1031 > |
1621 | 1032 --- ----------------- ---- |
1033 Map Quick Explanation Link | |
1034 --- ----------------- ---- | |
1035 < <F1> Causes Netrw to issue help | |
1036 <cr> Netrw will enter the directory or read the file |netrw-cr| | |
1037 <del> Netrw will attempt to remove the file/directory |netrw-del| | |
1038 - Makes Netrw go up one directory |netrw--| | |
1039 a Toggles between normal display, |netrw-a| | |
1040 hiding (suppress display of files matching g:netrw_list_hide) | |
1041 showing (display only files which match g:netrw_list_hide) | |
1042 c Make browsing directory the current directory |netrw-c| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1043 C Setting the editing window |netrw-C| |
1621 | 1044 d Make a directory |netrw-d| |
1045 D Attempt to remove the file(s)/directory(ies) |netrw-D| | |
1046 gb Go to previous bookmarked directory |netrw-gb| | |
1047 gh Quick hide/unhide of dot-files |netrw-gh| | |
1048 <c-h> Edit file hiding list |netrw-ctrl-h| | |
1049 i Cycle between thin, long, wide, and tree listings |netrw-i| | |
1050 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
1051 mb Bookmark current directory |netrw-mb| | |
1052 mc Copy marked files to marked-file target directory |netrw-mc| | |
1053 md Apply diff to marked files (up to 3) |netrw-md| | |
1054 me Place marked files on arg list and edit them |netrw-me| | |
1055 mf Mark a file |netrw-mf| | |
1056 mh Toggle marked file suffices' presence on hiding list |netrw-mh| | |
1057 mm Move marked files to marked-file target directory |netrw-mm| | |
1058 mp Print marked files |netrw-mp| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1059 mr Mark files satisfying a shell-style |regexp| |netrw-mr| |
1621 | 1060 mt Current browsing directory becomes markfile target |netrw-mt| |
1061 mT Apply ctags to marked files |netrw-mT| | |
1062 mu Unmark all marked files |netrw-mu| | |
1063 mx Apply arbitrary shell command to marked files |netrw-mx| | |
1064 mz Compress/decompress marked files |netrw-mz| | |
1065 o Enter the file/directory under the cursor in a new |netrw-o| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1066 browser window. A horizontal split is used. |
1621 | 1067 O Obtain a file specified by cursor |netrw-O| |
1068 p Preview the file |netrw-p| | |
1069 P Browse in the previously used window |netrw-P| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1070 qb List bookmarked directories and history |netrw-qb| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1071 qf Display information on file |netrw-qf| |
1621 | 1072 r Reverse sorting order |netrw-r| |
1073 R Rename the designed file(s)/directory(ies) |netrw-R| | |
1074 s Select sorting style: by name, time, or file size |netrw-s| | |
1075 S Specify suffix priority for name-sorting |netrw-S| | |
1076 t Enter the file/directory under the cursor in a new tab|netrw-t| | |
1077 u Change to recently-visited directory |netrw-u| | |
1078 U Change to subsequently-visited directory |netrw-U| | |
1079 v Enter the file/directory under the cursor in a new |netrw-v| | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1080 browser window. A vertical split is used. |
1621 | 1081 x View file with an associated program |netrw-x| |
3920 | 1082 X Execute filename under cursor via |system()| |netrw-X| |
1621 | 1083 |
1668 | 1084 % Open a new file in netrw's current directory |netrw-%| |
1085 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1086 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse* |
1621 | 1087 <leftmouse> (gvim only) selects word under mouse as if a <cr> |
1088 had been pressed (ie. edit file, change directory) | |
1089 <middlemouse> (gvim only) same as P selecting word under mouse; | |
1090 see |netrw-P| | |
1091 <rightmouse> (gvim only) delete file/directory using word under | |
1092 mouse | |
1093 <2-leftmouse> (gvim only) when: | |
1094 * in a netrw-selected file, AND | |
1095 * |g:netrw_retmap| == 1 AND | |
4339 | 1096 * the user doesn't already have a <2-leftmouse> |
1097 mapping defined before netrw is autoloaded, | |
1621 | 1098 then a double clicked leftmouse button will return |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1099 to the netrw browser window. See |g:netrw_retmap|. |
1621 | 1100 <s-leftmouse> (gvim only) like mf, will mark files |
1101 | |
2152 | 1102 (to disable mouse buttons while browsing: |g:netrw_mousemaps|) |
1103 | |
1621 | 1104 *netrw-quickcom* *netrw-quickcoms* |
1105 QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2 | |
1106 :NetrwClean[!] ...........................................|netrw-clean| | |
1107 :NetrwSettings ...........................................|netrw-settings| | |
1108 :Explore[!] [dir] Explore directory of current file......|netrw-explore| | |
1109 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore| | |
1110 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| | |
1111 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| | |
1112 :Rexplore Return to Explorer.....................|netrw-explore| | |
1113 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore| | |
1114 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore| | |
1115 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore| | |
1116 | |
1117 BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1118 |
1621 | 1119 One may easily "bookmark" a directory by using > |
1120 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1121 mb |
839 | 1122 < |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1123 Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1124 kept in sorted order. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1125 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1126 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1127 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1128 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1129 |netrw-qb| how to list bookmarks |
1621 | 1130 |
1131 | |
1132 BROWSING *netrw-cr* {{{2 | |
12 | 1133 |
9 | 1134 Browsing is simple: move the cursor onto a file or directory of interest. |
11 | 1135 Hitting the <cr> (the return key) will select the file or directory. |
1136 Directories will themselves be listed, and files will be opened using the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1137 protocol given in the original read request. |
559 | 1138 |
1621 | 1139 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that |
1140 two or more spaces delimit filenames and directory names for the long and | |
1141 wide listing formats. Thus, if your filename or directory name has two or | |
1142 more sequential spaces embedded in it, or any trailing spaces, then you'll | |
1143 need to use the "thin" format to select it. | |
519 | 1144 |
650 | 1145 The |g:netrw_browse_split| option, which is zero by default, may be used to |
1621 | 1146 cause the opening of files to be done in a new window or tab instead of the |
1147 default. When the option is one or two, the splitting will be taken | |
1148 horizontally or vertically, respectively. When the option is set to three, a | |
1149 <cr> will cause the file to appear in a new tab. | |
1150 | |
1151 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1152 When using the gui (gvim), one may select a file by pressing the <leftmouse> |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1153 button. In addition, if |
1621 | 1154 |
1155 *|g:netrw_retmap| == 1 AND (its default value is 0) | |
1156 * in a netrw-selected file, AND | |
1157 * the user doesn't already have a <2-leftmouse> mapping defined before | |
1158 netrw is loaded | |
1159 | |
1160 then a doubly-clicked leftmouse button will return to the netrw browser | |
1161 window. | |
1162 | |
1163 Netrw attempts to speed up browsing, especially for remote browsing where one | |
1164 may have to enter passwords, by keeping and re-using previously obtained | |
1165 directory listing buffers. The |g:netrw_fastbrowse| variable is used to | |
1166 control this behavior; one may have slow browsing (no buffer re-use), medium | |
1167 speed browsing (re-use directory buffer listings only for remote directories), | |
1168 and fast browsing (re-use directory buffer listings as often as possible). | |
1169 The price for such re-use is that when changes are made (such as new files | |
1170 are introduced into a directory), the listing may become out-of-date. One may | |
1171 always refresh directory listing buffers by pressing ctrl-L (see | |
1172 |netrw-ctrl-l|). | |
1173 | |
1174 | |
1175 Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v| | |
1176 Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse| | |
1177 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| | |
1178 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd| | |
1179 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf| | |
1180 | |
1181 | |
1182 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2 | |
1183 | |
1184 Normally one enters a file or directory using the <cr>. However, the "o" map | |
1185 allows one to open a new window to hold the new directory listing or file. A | |
1186 horizontal split is used. (for vertical splitting, see |netrw-v|) | |
1187 | |
1188 Normally, the o key splits the window horizontally with the new window and | |
3153 | 1189 cursor at the top. |
1621 | 1190 |
1191 Associated setting variables: |g:netrw_alto| |g:netrw_winsize| | |
1192 | |
4339 | 1193 Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-v| |
3153 | 1194 Associated setting variables: |
1195 |g:netrw_alto| control above/below splitting | |
1196 |g:netrw_winsize| control initial sizing | |
1621 | 1197 |
4339 | 1198 BROWSING WITH A NEW TAB *netrw-t* |
1621 | 1199 |
1200 Normally one enters a file or directory using the <cr>. The "t" map | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1201 allows one to open a new window holding the new directory listing or file in |
4339 | 1202 a new tab. |
1203 | |
1204 If you'd like to have the new listing in a background tab, use |gT|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1205 |
3153 | 1206 Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v| |
1207 Associated setting variables: | |
1208 |g:netrw_winsize| control initial sizing | |
1621 | 1209 |
1210 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2 | |
1211 | |
1212 Normally one enters a file or directory using the <cr>. However, the "v" map | |
1213 allows one to open a new window to hold the new directory listing or file. A | |
1214 vertical split is used. (for horizontal splitting, see |netrw-o|) | |
1215 | |
1216 Normally, the v key splits the window vertically with the new window and | |
3153 | 1217 cursor at the left. |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1218 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1219 There is only one tree listing buffer; using "v" on a displayed subdirectory |
1621 | 1220 will split the screen, but the same buffer will be shown twice. |
1221 | |
1222 Associated setting variable: |g:netrw_altv| |g:netrw_winsize| | |
1223 | |
4339 | 1224 Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v| |
3153 | 1225 Associated setting variables: |
1226 |g:netrw_altv| control right/left splitting | |
1227 |g:netrw_winsize| control initial sizing | |
1228 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1229 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1230 CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2 |
519 | 1231 |
1121 | 1232 The "i" map cycles between the thin, long, wide, and tree listing formats. |
12 | 1233 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1234 The thin listing format gives just the files' and directories' names. |
519 | 1235 |
15 | 1236 The long listing is either based on the "ls" command via ssh for remote |
559 | 1237 directories or displays the filename, file size (in bytes), and the time and |
1238 date of last modification for local directories. With the long listing | |
1239 format, netrw is not able to recognize filenames which have trailing spaces. | |
1240 Use the thin listing format for such files. | |
519 | 1241 |
1121 | 1242 The wide listing format uses two or more contiguous spaces to delineate |
1243 filenames; when using that format, netrw won't be able to recognize or use | |
1244 filenames which have two or more contiguous spaces embedded in the name or any | |
1245 trailing spaces. The thin listing format will, however, work with such files. | |
1246 This listing format is the most compact. | |
1247 | |
1248 The tree listing format has a top directory followed by files and directories | |
1249 preceded by a "|". One may open and close directories by pressing the <cr> | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1250 key while atop the directory name. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1251 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1252 One may make a preferred listing style your default; see |g:netrw_liststyle|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1253 As an example, by putting the following line in your .vimrc, > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1254 let g:netrw_liststyle= 4 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1255 the tree style will become your default listing style. |
15 | 1256 |
3456 | 1257 One typical way to use the netrw tree display is to: > |
1258 | |
1259 vim . | |
1260 (use i until a tree display shows) | |
1261 navigate to a file | |
1262 v (edit as desired in vertically split window) | |
1263 ctrl-w h (to return to the netrw listing) | |
1264 P (edit newly selected file in the previous window) | |
1265 ctrl-w h (to return to the netrw listing) | |
1266 P (edit newly selected file in the previous window) | |
1267 ...etc... | |
1268 < | |
1621 | 1269 Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen| |
1270 |g:netrw_timefmt| |g:netrw_list_cmd| | |
1271 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1272 CHANGE FILE PERMISSION *netrw-gp* {{{2 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1273 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1274 "gp" will ask you for a new permission for the file named under the cursor. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1275 Currently, this only works for local files. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1276 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1277 Associated setting variables: |g:netrw_chgperm| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1278 |
1621 | 1279 |
1280 CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2 | |
1281 | |
1282 To change directory back to a bookmarked directory, use | |
1283 | |
1284 {cnt}gb | |
1285 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1286 Any count may be used to reference any of the bookmarks. |
4339 | 1287 Note that |netrw-qb| shows both bookmarks and history; to go |
1288 to a location stored in the history see |netrw-u| and |netrw-U|. | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1289 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1290 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1291 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1292 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1293 |netrw-qb| how to list bookmarks |
1621 | 1294 |
1295 | |
2152 | 1296 CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2 |
36 | 1297 |
1298 Every time you change to a new directory (new for the current session), | |
1299 netrw will save the directory in a recently-visited directory history | |
2751 | 1300 list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the |
36 | 1301 "u" map, one can change to an earlier directory (predecessor). To do |
1302 the opposite, see |netrw-U|. | |
1303 | |
4339 | 1304 The "u" map also accepts counts to go back in the history several slots. |
1305 For your convenience, |netrw-qb| lists the history number which can be | |
1306 re-used in that count. | |
1307 | |
1308 See |g:netrw_dirhistmax| for how to control the quantity of history stack | |
1309 slots. | |
1310 | |
36 | 1311 |
1621 | 1312 CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2 |
36 | 1313 |
1314 With the "U" map, one can change to a later directory (successor). | |
1315 This map is the opposite of the "u" map. (see |netrw-u|) Use the | |
1621 | 1316 q map to list both the bookmarks and history. (see |netrw-qb|) |
1317 | |
4339 | 1318 The "U" map also accepts counts to go forward in the history several slots. |
1319 | |
1320 See |g:netrw_dirhistmax| for how to control the quantity of history stack | |
1321 slots. | |
1322 | |
1621 | 1323 |
1324 NETRW CLEAN *netrw-clean* *:NetrwClean* | |
1325 | |
1326 With :NetrwClean one may easily remove netrw from one's home directory; | |
1327 more precisely, from the first directory on your |'runtimepath'|. | |
1328 | |
1329 With :NetrwClean!, netrw will remove netrw from all directories on your | |
1330 |'runtimepath'|. | |
1331 | |
1332 With either form of the command, netrw will first ask for confirmation | |
1333 that the removal is in fact what you want to do. If netrw doesn't have | |
1334 permission to remove a file, it will issue an error message. | |
36 | 1335 |
1121 | 1336 *netrw-gx* |
1621 | 1337 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2 |
1121 | 1338 (also see |netrw_filehandler|) |
650 | 1339 |
1340 Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are | |
1341 best seen with a special handler (ie. a tool provided with your computer). | |
1342 Netrw allows one to invoke such special handlers by: > | |
12 | 1343 |
650 | 1344 * when Exploring, hit the "x" key |
1345 * when editing, hit gx with the cursor atop the special filename | |
1121 | 1346 < (not available if the |g:netrw_nogx| variable exists) |
1347 | |
650 | 1348 Netrw determines which special handler by the following method: |
1349 | |
1350 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to | |
1351 view files. Examples of useful settings (place into your <.vimrc>): > | |
1352 | |
1353 :let g:netrw_browsex_viewer= "kfmclient exec" | |
1354 < or > | |
1355 :let g:netrw_browsex_viewer= "gnome-open" | |
1356 < | |
1357 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be | |
1358 invoked first (see |netrw_filehandler|). | |
12 | 1359 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1360 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. |
650 | 1361 * for Gnome (with gnome-open): gnome-open is used. |
1621 | 1362 * for KDE (with kfmclient) : kfmclient is used. |
1363 * for Mac OS X : open is used. | |
559 | 1364 * otherwise the netrwFileHandler plugin is used. |
482 | 1365 |
1366 The file's suffix is used by these various approaches to determine an | |
559 | 1367 appropriate application to use to "handle" these files. Such things as |
1368 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, | |
1369 *.eps) can be handled. | |
482 | 1370 |
650 | 1371 *netrw_filehandler* |
1121 | 1372 |
1373 The "x" map applies a function to a file, based on its extension. Of course, | |
1374 the handler function must exist for it to be called! | |
12 | 1375 > |
1376 Ex. mypgm.html x -> | |
1121 | 1377 NFH_html("scp://user@host/some/path/mypgm.html") |
12 | 1378 < |
1121 | 1379 Users may write their own netrw File Handler functions to support more |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1380 suffixes with special handling. See <autoload/netrwFileHandlers.vim> for |
1121 | 1381 examples on how to make file handler functions. As an example: > |
12 | 1382 |
1121 | 1383 " NFH_suffix(filename) |
1384 fun! NFH_suffix(filename) | |
1385 ..do something special with filename.. | |
1386 endfun | |
1387 < | |
1388 These functions need to be defined in some file in your .vim/plugin | |
1389 (vimfiles\plugin) directory. Vim's function names may not have punctuation | |
1390 characters (except for the underscore) in them. To support suffices that | |
1391 contain such characters, netrw will first convert the suffix using the | |
1392 following table: > | |
650 | 1393 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1394 @ -> AT ! -> EXCLAMATION % -> PERCENT |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1395 : -> COLON = -> EQUAL ? -> QUESTION |
1121 | 1396 , -> COMMA - -> MINUS ; -> SEMICOLON |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1397 $ -> DOLLAR + -> PLUS ~ -> TILDE |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1398 < |
1121 | 1399 So, for example: > |
650 | 1400 |
1121 | 1401 file.rcs,v -> NFH_rcsCOMMAv() |
1402 < | |
1403 If more such translations are necessary, please send me email: > | |
1404 NdrOchip at ScampbellPfamily.AbizM - NOSPAM | |
1405 with a request. | |
482 | 1406 |
1621 | 1407 Associated setting variable: |g:netrw_browsex_viewer| |
1408 | |
1409 *netrw-curdir* | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1410 DELETING BOOKMARKS *netrw-mB* {{{2 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1411 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1412 To delete a bookmark, use > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1413 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1414 {cnt}mB |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1415 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1416 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1417 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1418 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1419 |netrw-qb| how to list bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1420 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1421 |
1621 | 1422 DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2 |
1423 | |
1424 If files have not been marked with |netrw-mf|: (local marked file list) | |
1425 | |
1426 Deleting/removing files and directories involves moving the cursor to the | |
1427 file/directory to be deleted and pressing "D". Directories must be empty | |
1428 first before they can be successfully removed. If the directory is a | |
1429 softlink to a directory, then netrw will make two requests to remove the | |
1430 directory before succeeding. Netrw will ask for confirmation before doing | |
1431 the removal(s). You may select a range of lines with the "V" command | |
1432 (visual selection), and then pressing "D". | |
1433 | |
1434 If files have been marked with |netrw-mf|: (local marked file list) | |
1435 | |
1436 Marked files (and empty directories) will be deleted; again, you'll be | |
1437 asked to confirm the deletion before it actually takes place. | |
1438 | |
1439 The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are | |
1440 used to control the attempts to remove files and directories. The | |
1441 g:netrw_rm_cmd is used with files, and its default value is: | |
1442 | |
1443 g:netrw_rm_cmd: ssh HOSTNAME rm | |
1444 | |
1445 The g:netrw_rmdir_cmd variable is used to support the removal of directories. | |
1446 Its default value is: | |
1447 | |
1448 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir | |
1449 | |
1450 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt | |
1451 to remove it again using the g:netrw_rmf_cmd variable. Its default value is: | |
1452 | |
1453 g:netrw_rmf_cmd: ssh HOSTNAME rm -f | |
1454 | |
3153 | 1455 Related topics: |netrw-d| |
3456 | 1456 Associated setting variable: |g:netrw_localrmdir| |g:netrw_rm_cmd| |
1621 | 1457 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd| |
1458 | |
1459 | |
1460 *netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore* | |
1461 *netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore* | |
1462 DIRECTORY EXPLORATION COMMANDS {{{2 | |
1463 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1464 :[N]Explore[!] [dir]... Explore directory of current file *:Explore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1465 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1466 :Rexplore ... Return to Explorer *:Rexplore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1467 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1468 :Texplore [dir]... Tab & Explore *:Texplore* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1469 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* |
1621 | 1470 |
1471 Used with :Explore **/pattern : (also see |netrw-starstar|) | |
1472 :Nexplore............. go to next matching file *:Nexplore* | |
1473 :Pexplore............. go to previous matching file *:Pexplore* | |
1474 | |
1475 :Explore will open the local-directory browser on the current file's | |
1476 directory (or on directory [dir] if specified). The window will be | |
1477 split only if the file has been modified, otherwise the browsing | |
1478 window will take over that window. Normally the splitting is taken | |
1479 horizontally. | |
1480 :Explore! is like :Explore, but will use vertical splitting. | |
1481 :Sexplore will always split the window before invoking the local-directory | |
1482 browser. As with Explore, the splitting is normally done | |
1483 horizontally. | |
1484 :Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. | |
1485 :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. | |
1486 :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. | |
1487 :Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. | |
1488 :Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. | |
1489 :Texplore [dir] does a tabnew before generating the browser window | |
1490 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1491 By default, these commands use the current file's directory. However, one may |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1492 explicitly provide a directory (path) to use. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1493 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1494 The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1495 columns the new explorer window should have. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1496 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1497 Otherwise, the |g:netrw_winsize| variable, if it has been specified by the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1498 user, is used to control the quantity of rows and/or columns new explorer |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1499 windows should have. |
1621 | 1500 |
1501 :Rexplore This command is a little different from the others. When one | |
1502 edits a file, for example by pressing <cr> when atop a file in | |
1503 a netrw browser window, :Rexplore will return the display to | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1504 that of the last netrw browser window. It is a command version |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1505 of the <2-leftmouse> map (which is only available under gvim and |
1621 | 1506 cooperative terms). |
1507 | |
1508 | |
1509 *netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat* | |
1510 EXPLORING WITH STARS AND PATTERNS | |
1511 | |
1512 When Explore, Sexplore, Hexplore, or Vexplore are used with one of the | |
1513 following four styles, Explore generates a list of files which satisfy | |
1514 the request. > | |
1515 | |
1516 */filepat files in current directory which satisfy filepat | |
1517 **/filepat files in current directory or below which satisfy the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1518 file pattern |
1621 | 1519 *//pattern files in the current directory which contain the |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1520 pattern (vimgrep is used) |
1621 | 1521 **//pattern files in the current directory or below which contain |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1522 the pattern (vimgrep is used) |
464 | 1523 < |
1621 | 1524 The cursor will be placed on the first file in the list. One may then |
1525 continue to go to subsequent files on that list via |:Nexplore| or to | |
1526 preceding files on that list with |:Pexplore|. Explore will update the | |
1527 directory and place the cursor appropriately. | |
1528 | |
1529 A plain > | |
1530 :Explore | |
1531 will clear the explore list. | |
1532 | |
1533 If your console or gui produces recognizable shift-up or shift-down sequences, | |
1534 then you'll likely find using shift-downarrow and shift-uparrow convenient. | |
1535 They're mapped by netrw: | |
1536 | |
1537 <s-down> == Nexplore, and | |
1538 <s-up> == Pexplore. | |
1539 | |
1540 As an example, consider | |
1541 > | |
1542 :Explore */*.c | |
1543 :Nexplore | |
1544 :Nexplore | |
1545 :Pexplore | |
1546 < | |
1547 The status line will show, on the right hand side of the status line, a | |
1548 message like "Match 3 of 20". | |
1549 | |
1550 Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split| | |
1551 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject| | |
1552 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd| | |
1553 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd| | |
1554 |g:netrw_liststyle| | |
1555 | |
1556 | |
1557 DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2 | |
1558 | |
1559 With the cursor atop a filename, pressing "qf" will reveal the file's size | |
1560 and last modification timestamp. Currently this capability is only available | |
1561 for local files. | |
1562 | |
1563 | |
1564 EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2 | |
1565 | |
1566 The "<ctrl-h>" map brings up a requestor allowing the user to change the | |
1567 file/directory hiding list contained in |g:netrw_list_hide|. The hiding list | |
1568 consists of one or more patterns delimited by commas. Files and/or | |
1569 directories satisfying these patterns will either be hidden (ie. not shown) or | |
1570 be the only ones displayed (see |netrw-a|). | |
1571 | |
1572 The "gh" mapping (see |netrw-gh|) quickly alternates between the usual | |
1573 hiding list and the hiding of files or directories that begin with ".". | |
1574 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1575 As an example, > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1576 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+' |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1577 Effectively, this makes the effect of a |netrw-gh| command the initial setting. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1578 What it means: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1579 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1580 \(^\|\s\s\) : if the line begins with the following, -or- |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1581 two consecutive spaces are encountered |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1582 \zs : start the hiding match now |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1583 \. : if it now begins with a dot |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1584 \S\+ : and is followed by one or more non-whitespace |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1585 characters |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1586 |
1621 | 1587 Associated setting variables: |g:netrw_hide| |g:netrw_list_hide| |
1588 Associated topics: |netrw-a| |netrw-gh| |netrw-mh| | |
1589 | |
3153 | 1590 *netrw-sort-sequence* |
1621 | 1591 EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2 |
1592 | |
1593 When "Sorted by" is name, one may specify priority via the sorting sequence | |
1594 (g:netrw_sort_sequence). The sorting sequence typically prioritizes the | |
1595 name-listing by suffix, although any pattern will do. Patterns are delimited | |
1596 by commas. The default sorting sequence is (all one line): | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1597 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1598 For Unix: > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1599 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1600 \.info$,\.swp$,\.bak$,\~$' |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1601 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1602 Otherwise: > |
1621 | 1603 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$, |
1604 \.swp$,\.bak$,\~$' | |
1605 < | |
1606 The lone * is where all filenames not covered by one of the other patterns | |
1607 will end up. One may change the sorting sequence by modifying the | |
1608 g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by | |
1609 using the "S" map. | |
1610 | |
1668 | 1611 Related topics: |netrw-s| |netrw-S| |
1612 Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options| | |
1621 | 1613 |
1614 | |
3920 | 1615 EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* |
1616 | |
1617 Pressing X while the cursor is atop an executable file will yield a prompt | |
1618 using the filename asking for any arguments. Upon pressing a [return], netrw | |
1619 will then call |system()| with that command and arguments. The result will | |
1620 be displayed by |:echomsg|, and so |:messages| will repeat display of the | |
1621 result. Ansi escape sequences will be stripped out. | |
1622 | |
1623 | |
2751 | 1624 FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2 |
1625 | |
1626 Remote symbolic links (ie. those listed via ssh or ftp) are problematic | |
1627 in that it is difficult to tell whether they link to a file or to a | |
1628 directory. | |
1629 | |
1630 To force treatment as a file: use > | |
3920 | 1631 gf |
2751 | 1632 < |
1633 To force treatment as a directory: use > | |
3920 | 1634 gd |
2751 | 1635 < |
1636 | |
1621 | 1637 GOING UP *netrw--* {{{2 |
1638 | |
1639 To go up a directory, press "-" or press the <cr> when atop the ../ directory | |
1640 entry in the listing. | |
1641 | |
1642 Netrw will use the command in |g:netrw_list_cmd| to perform the directory | |
1643 listing operation after changing HOSTNAME to the host specified by the | |
1644 user-provided url. By default netrw provides the command as: | |
1645 | |
1646 ssh HOSTNAME ls -FLa | |
1647 | |
1648 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to | |
1649 read. Naturally, the user may override this command with whatever is | |
1650 preferred. The NetList function which implements remote browsing | |
1651 expects that directories will be flagged by a trailing slash. | |
1652 | |
1653 | |
1654 HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2 | |
1655 | |
1656 Netrw's browsing facility allows one to use the hiding list in one of three | |
1657 ways: ignore it, hide files which match, and show only those files which | |
1658 match. | |
1659 | |
1660 If no files have been marked via |netrw-mf|: | |
1661 | |
1662 The "a" map allows the user to cycle through the three hiding modes. | |
1663 | |
1664 The |g:netrw_list_hide| variable holds a comma delimited list of patterns | |
1665 based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list. | |
1666 (also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an | |
1667 example, to hide files which begin with a ".", one may use the <c-h> map to | |
1668 set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*' | |
1669 in one's <.vimrc>). One may then use the "a" key to show all files, hide | |
1670 matching files, or to show only the matching files. | |
1671 | |
1672 Example: \.[ch]$ | |
1673 This hiding list command will hide/show all *.c and *.h files. | |
1674 | |
1675 Example: \.c$,\.h$ | |
1676 This hiding list command will also hide/show all *.c and *.h | |
1677 files. | |
1678 | |
1679 Don't forget to use the "a" map to select the mode (normal/hiding/show) you | |
1680 want! | |
1681 | |
1682 If files have been marked using |netrw-mf|, then this command will: | |
1683 | |
1684 if showing all files or non-hidden files: | |
1685 modify the g:netrw_list_hide list by appending the marked files to it | |
1686 and showing only non-hidden files. | |
1687 | |
1688 else if showing hidden files only: | |
1689 modify the g:netrw_list_hide list by removing the marked files from it | |
1690 and showing only non-hidden files. | |
1691 endif | |
1692 | |
1693 *netrw-gh* *netrw-hide* | |
1694 As a quick shortcut, one may press > | |
1695 gh | |
1696 to toggle between hiding files which begin with a period (dot) and not hiding | |
1697 them. | |
1698 | |
4339 | 1699 Associated setting variable: |g:netrw_list_hide| |g:netrw_hide| |
1621 | 1700 Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh| |
1701 | |
1702 IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2 | |
12 | 1703 |
1704 Especially with the remote directory browser, constantly entering the password | |
1705 is tedious. | |
1706 | |
1121 | 1707 For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength |
1209 | 1708 tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip |
1709 for setting up no-password ssh and scp and discusses associated security | |
1121 | 1710 issues. It used to be available at http://hacks.oreilly.com/pub/h/66 , |
1711 but apparently that address is now being redirected to some "hackzine". | |
1698 | 1712 I'll attempt a summary based on that article and on a communication from |
1713 Ben Schmidt: | |
1714 | |
1715 1. Generate a public/private key pair on the local machine | |
1716 (ssh client): > | |
1717 ssh-keygen -t rsa | |
1718 (saving the file in ~/.ssh/id_rsa as prompted) | |
1719 < | |
1720 2. Just hit the <CR> when asked for passphrase (twice) for no | |
1721 passphrase. If you do use a passphrase, you will also need to use | |
1722 ssh-agent so you only have to type the passphrase once per session. | |
1723 If you don't use a passphrase, simply logging onto your local | |
1724 computer or getting access to the keyfile in any way will suffice | |
1725 to access any ssh servers which have that key authorized for login. | |
1726 | |
1727 3. This creates two files: > | |
1728 ~/.ssh/id_rsa | |
1729 ~/.ssh/id_rsa.pub | |
1730 < | |
1731 4. On the target machine (ssh server): > | |
1732 cd | |
1733 mkdir -p .ssh | |
1734 chmod 0700 .ssh | |
1735 < | |
1736 5. On your local machine (ssh client): (one line) > | |
1737 ssh {serverhostname} | |
1738 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub | |
1739 < | |
1740 or, for OpenSSH, (one line) > | |
1741 ssh {serverhostname} | |
1742 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub | |
1743 < | |
1744 You can test it out with > | |
1745 ssh {serverhostname} | |
1746 and you should be log onto the server machine without further need to type | |
1747 anything. | |
1748 | |
1749 If you decided to use a passphrase, do: > | |
1750 ssh-agent $SHELL | |
1751 ssh-add | |
1752 ssh {serverhostname} | |
1753 You will be prompted for your key passphrase when you use ssh-add, but not | |
1754 subsequently when you use ssh. For use with vim, you can use > | |
1755 ssh-agent vim | |
1756 and, when next within vim, use > | |
1757 :!ssh-add | |
1758 Alternatively, you can apply ssh-agent to the terminal you're planning on | |
1759 running vim in: > | |
1760 ssh-agent xterm & | |
1761 and do ssh-add whenever you need. | |
9 | 1762 |
1121 | 1763 For Windows, folks on the vim mailing list have mentioned that Pageant helps |
1764 with avoiding the constant need to enter the password. | |
794 | 1765 |
1621 | 1766 Kingston Fung wrote about another way to avoid constantly needing to enter |
1767 passwords: | |
1768 | |
1769 In order to avoid the need to type in the password for scp each time, you | |
1770 provide a hack in the docs to set up a non password ssh account. I found a | |
1771 better way to do that: I can use a regular ssh account which uses a | |
1772 password to access the material without the need to key-in the password | |
1773 each time. It's good for security and convenience. I tried ssh public key | |
1774 authorization + ssh-agent, implementing this, and it works! Here are two | |
1775 links with instructions: | |
1776 | |
1777 http://www.ibm.com/developerworks/library/l-keyc2/ | |
1778 http://sial.org/howto/openssh/publickey-auth/ | |
1779 | |
1780 | |
1781 LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2 | |
1782 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1783 Pressing "qb" (query bookmarks) will list both the bookmarked directories and |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1784 directory traversal history. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1785 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1786 Related Topics: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1787 |netrw-gb| how to return (go) to a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1788 |netrw-mb| how to make a bookmark |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1789 |netrw-mB| how to delete bookmarks |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1790 |netrw-u| change to a predecessor directory via the history stack |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1791 |netrw-U| change to a successor directory via the history stack |
1621 | 1792 |
1793 MAKING A NEW DIRECTORY *netrw-d* {{{2 | |
1794 | |
1795 With the "d" map one may make a new directory either remotely (which depends | |
1796 on the global variable g:netrw_mkdir_cmd) or locally (which depends on the | |
3456 | 1797 global variable g:netrw_localmkdir). Netrw will issue a request for the new |
1621 | 1798 directory's name. A bare <CR> at that point will abort the making of the |
1799 directory. Attempts to make a local directory that already exists (as either | |
1800 a file or a directory) will be detected, reported on, and ignored. | |
1801 | |
3153 | 1802 Related topics: |netrw-D| |
3456 | 1803 Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd| |
3153 | 1804 |g:netrw_remote_mkdir| |
1621 | 1805 |
1806 | |
1807 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2 | |
1808 | |
1809 By default, |g:netrw_keepdir| is 1. This setting means that the current | |
4339 | 1810 directory will not track the browsing directory. (done for backwards |
1811 compatibility with v6's file explorer). | |
1812 | |
1813 Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory | |
1621 | 1814 track netrw's browsing directory. |
1815 | |
1816 However, given the default setting for g:netrw_keepdir of 1 where netrw | |
1817 maintains its own separate notion of the current directory, in order to make | |
1818 the two directories the same, use the "c" map (just type c). That map will | |
1819 set Vim's notion of the current directory to netrw's current browsing | |
1820 directory. | |
1821 | |
1822 Associated setting variable: |g:netrw_keepdir| | |
1823 | |
1824 MARKING FILES *netrw-mf* {{{2 | |
1825 (also see |netrw-mr|) | |
1826 | |
1827 One may mark files with the cursor atop a filename and then pressing "mf". | |
1828 With gvim, one may also mark files with <s-leftmouse>. The following netrw | |
1829 maps make use of marked files: | |
1830 | |
1831 |netrw-a| Hide marked files/directories | |
1832 |netrw-D| Delete marked files/directories | |
1833 |netrw-mc| Copy marked files to target | |
1834 |netrw-md| Apply vimdiff to marked files | |
1835 |netrw-me| Edit marked files | |
4339 | 1836 |netrw-mF| Unmark marked files |
1621 | 1837 |netrw-mg| Apply vimgrep to marked files |
1838 |netrw-mm| Move marked files | |
1839 |netrw-mp| Print marked files | |
1840 |netrw-mt| Set target for |netrw-mm| and |netrw-mc| | |
1841 |netrw-mT| Generate tags using marked files | |
1842 |netrw-mx| Apply shell command to marked files | |
1843 |netrw-mz| Compress/Decompress marked files | |
4339 | 1844 |netrw-qF| Mark files using quickfix list |
1621 | 1845 |netrw-O| Obtain marked files |
1846 |netrw-R| Rename marked files | |
1847 | |
1848 One may unmark files one at a time the same way one marks them; ie. place | |
1849 the cursor atop a marked file and press "mf". This process also works | |
1850 with <s-leftmouse> using gvim. One may unmark all files by pressing | |
1851 "mu" (see |netrw-mu|). | |
1852 | |
2751 | 1853 Marked files are highlighted using the "netrwMarkFile" highlighting group, |
1854 which by default is linked to "Identifier" (see Identifier under | |
1855 |group-name|). You may change the highlighting group by putting something | |
1856 like > | |
1857 | |
1858 highlight clear netrwMarkFile | |
1859 hi link netrwMarkFile ..whatever.. | |
1860 < | |
1861 into $HOME/.vim/after/syntax/netrw.vim . | |
1862 | |
1621 | 1863 *markfilelist* *global_markfilelist* *local_markfilelist* |
1864 All marked files are entered onto the global marked file list; there is only | |
1865 one such list. In addition, every netrw buffer also has its own local marked | |
1866 file list; since netrw buffers are associated with specific directories, this | |
1867 means that each directory has its own local marked file list. The various | |
1868 commands which operate on marked files use one or the other of the marked file | |
1869 lists. | |
1870 | |
1871 | |
4339 | 1872 UNMARKING FILES *netrw-mF* {{{2 |
1873 (also see |netrw-mf|) | |
1874 | |
1875 This command will unmark all files in the current buffer. One may also use | |
1876 mf (|netrw-mf|) on a specific file to unmark just that file. | |
1877 | |
1878 | |
1879 MARKING FILES BY QUICKFIX LIST *netrw-qF* | |
1880 (also see |netrw-mf|) | |
1881 | |
1882 One may convert the |quickfix-error-lists| into a marked file list using | |
1883 "qF". You may then proceed with commands such as me (|netrw-me|) to | |
1884 edit them. Quickfix error lists are generated, for example, by calls | |
1885 to |:vimgrep|. | |
1886 | |
1887 | |
1621 | 1888 MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2 |
1889 (also see |netrw-mf|) | |
1890 | |
1891 One may also mark files by pressing "mr"; netrw will then issue a prompt, | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1892 "Enter regexp: ". You may then enter a shell-style regular expression such |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1893 as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1894 converts "*" into ".*" (see |regexp|) and marks files based on that. In the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1895 future I may make it possible to use |regexp|s instead of glob()-style |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1896 expressions (yet-another-option). |
1621 | 1897 |
1898 | |
1899 MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2 | |
1900 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1901 (uses the local marked-file list) | |
1902 | |
1903 Upon activation of the "mx" map, netrw will query the user for some (external) | |
1904 command to be applied to all marked files. All "%"s in the command will be | |
1905 substituted with the name of each marked file in turn. If no "%"s are in the | |
1906 command, then the command will be followed by a space and a marked filename. | |
1907 | |
1908 | |
1909 MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2 | |
1910 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1911 (uses the local marked file list) | |
1912 | |
1913 If any marked files are compressed, then "mz" will decompress them. | |
1914 If any marked files are decompressed, then "mz" will compress them | |
1915 using the command specified by |g:netrw_compress|; by default, | |
1916 that's "gzip". | |
1917 | |
1918 For decompression, netrw provides a |Dictionary| of suffices and their | |
1919 associated decompressing utilities; see |g:netrw_decompress|. | |
1920 | |
1921 Associated setting variables: |g:netrw_compress| |g:netrw_decompress| | |
1922 | |
1923 MARKED FILES: COPYING *netrw-mc* {{{2 | |
1924 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1925 (Uses the global marked file list) | |
1926 | |
1927 Select a target directory with mt (|netrw-mt|). Then change directory, | |
2751 | 1928 select file(s) (see |netrw-mf|), and press "mc". The copy is done |
1929 from the current window (where one does the mf) to the target. | |
1621 | 1930 |
1931 Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd| | |
1932 | |
1933 MARKED FILES: DIFF *netrw-md* {{{2 | |
1934 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1935 (uses the global marked file list) | |
1936 | |
1937 Use |vimdiff| to visualize difference between selected files (two or | |
1938 three may be selected for this). Uses the global marked file list. | |
1939 | |
1940 MARKED FILES: EDITING *netrw-me* {{{2 | |
1941 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1942 (uses the global marked file list) | |
1943 | |
1944 This command will place the marked files on the |arglist| and commence | |
1945 editing them. One may return the to explorer window with |:Rexplore|. | |
4339 | 1946 (use |:n| and |:p| to edit next and previous files in the arglist) |
1621 | 1947 |
1948 MARKED FILES: GREP *netrw-mg* {{{2 | |
1949 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1950 (uses the global marked file list) | |
1951 | |
4339 | 1952 This command will apply |:vimgrep| to the marked files. |
1953 The command will ask for the requested pattern; one may then enter: > | |
1954 | |
1621 | 1955 /pattern/[g][j] |
1956 ! /pattern/[g][j] | |
1957 pattern | |
1958 < | |
4339 | 1959 In the cases of "j" option usage as shown above, "mg" will winnow the current |
1960 marked file list to just those possessing the specified pattern. | |
1961 Thus, one may use > | |
1962 mr ...file-pattern | |
1963 mg ..contents-pattern | |
1964 to have a marked file list satisfying the file-pattern but containing the | |
1965 desried contents-pattern. | |
1966 | |
1621 | 1967 MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2 |
1968 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1969 (uses the local marked file list) | |
1970 | |
1971 This command extracts the suffices of the marked files and toggles their | |
1972 presence on the hiding list. Please note that marking the same suffix | |
1973 this way multiple times will result in the suffix's presence being toggled | |
1974 for each file (so an even quantity of marked files having the same suffix | |
1975 is the same as not having bothered to select them at all). | |
1976 | |
1977 Related topics: |netrw-a| |g:netrw_list_hide| | |
1978 | |
1979 MARKED FILES: MOVING *netrw-mm* {{{2 | |
1980 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1981 (uses the global marked file list) | |
1982 | |
1698 | 1983 WARNING: moving files is more dangerous than copying them. |
1984 A file being moved is first copied and then deleted; if the | |
1985 copy operation fails and the delete succeeds, you will lose | |
1986 the file. Either try things out with unimportant files | |
1987 first or do the copy and then delete yourself using mc and D. | |
1988 Use at your own risk! | |
1989 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
1990 Select a target directory with mt (|netrw-mt|). Then change directory, |
2751 | 1991 select file(s) (see |netrw-mf|), and press "mm". The move is done |
1992 from the current window (where one does the mf) to the target. | |
1621 | 1993 |
1994 Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd| | |
1995 | |
1996 MARKED FILES: PRINTING *netrw-mp* {{{2 | |
1997 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
1998 (uses the local marked file list) | |
1999 | |
2000 Netrw will apply the |:hardcopy| command to marked files. What it does | |
2001 is open each file in a one-line window, execute hardcopy, then close the | |
2002 one-line window. | |
2003 | |
2004 | |
2005 MARKED FILES: SOURCING *netrw-ms* {{{2 | |
2006 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2007 (uses the local marked file list) | |
2008 | |
2009 Netrw will source the marked files (using vim's |:source| command) | |
2010 | |
2011 | |
4339 | 2012 MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2 |
2013 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2014 | |
2015 Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|): | |
2016 | |
2017 * If the cursor is atop a file name, then the netrw window's currently | |
2018 displayed directory is used for the copy/move-to target. | |
2019 | |
2020 * Also, if the cursor is in the banner, then the netrw window's currently | |
2021 displayed directory is used for the copy/move-to target. | |
2022 Unless the target already is the current directory. In which case, | |
2023 remove the target. | |
2024 | |
2025 * However, if the cursor is atop a directory name, then that directory is | |
2026 used for the copy/move-to target | |
2027 | |
2028 There is only one copy/move-to target per vim session; ie. the target is a | |
2029 script variable (see |s:var|) and is shared between all netrw windows (in an | |
2030 instance of vim). | |
2031 | |
2032 When using menus and gvim, netrw provides a "Targets" entry which allows one | |
2033 to pick a target from the list of bookmarks and history. | |
2034 | |
2035 Related topics: | |
2036 Marking Files......................................|netrw-mf| | |
2037 Marking Files by Regular Expression................|netrw-mr| | |
2038 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb| | |
2039 Marked Files: Target Directory Using History.......|netrw-Th| | |
2040 | |
2041 | |
1621 | 2042 MARKED FILES: TAGGING *netrw-mT* {{{2 |
2043 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2044 (uses the global marked file list) | |
2045 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2046 The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is |
1621 | 2047 "ctags") to marked files. For remote browsing, in order to create a tags file |
2048 netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for | |
2049 this to work on remote systems. For your local system, see |ctags| on how to | |
2050 get a version. I myself use hdrtags, currently available at | |
3920 | 2051 http://www.drchip.org/astronaut/src/index.html , and have > |
1621 | 2052 |
2053 let g:netrw_ctags= "hdrtag" | |
2054 < | |
2055 in my <.vimrc>. | |
2056 | |
2057 When a remote set of files are tagged, the resulting tags file is "obtained"; | |
2058 ie. a copy is transferred to the local system's directory. The local tags | |
2059 file is then modified so that one may use it through the network. The | |
2060 modification is concerns the names of the files in the tags; each filename is | |
2061 preceded by the netrw-compatible url used to obtain it. When one subsequently | |
2062 uses one of the go to tag actions (|tags|), the url will be used by netrw to | |
2063 edit the desired file and go to the tag. | |
2064 | |
1668 | 2065 Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd| |
1621 | 2066 |
4339 | 2067 MARKED FILES: TARGET DIRECTORY USING BOOKMARKS *netrw-Tb* {{{2 |
2068 | |
2069 Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|). | |
2070 | |
2071 The |netrw-qb| map will give you a list of bookmarks (and history). | |
2072 One may choose one of the bookmarks to become your marked file | |
2073 target by using [count]Tb (default count: 1). | |
2074 | |
2075 Related topics: | |
2076 Listing Bookmarks and History......................|netrw-qb| | |
2077 Marked Files: Setting The Target Directory.........|netrw-mt| | |
2078 Marked Files: Target Directory Using History.......|netrw-Th| | |
2079 Marking Files......................................|netrw-mf| | |
2080 Marking Files by Regular Expression................|netrw-mr| | |
2081 | |
2082 | |
2083 MARKED FILES: TARGET DIRECTORY USING HISTORY *netrw-Th* {{{2 | |
2084 | |
2085 Sets the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|). | |
2086 | |
2087 The |netrw-qb| map will give you a list of history (and bookmarks). | |
2088 One may choose one of the history entries to become your marked file | |
2089 target by using [count]Th (default count: 0; ie. the current directory). | |
2090 | |
2091 Related topics: | |
2092 Listing Bookmarks and History......................|netrw-qb| | |
2093 Marked Files: Setting The Target Directory.........|netrw-mt| | |
2094 Marked Files: Target Directory Using Bookmarks.....|netrw-Tb| | |
2095 Marking Files......................................|netrw-mf| | |
2096 Marking Files by Regular Expression................|netrw-mr| | |
2097 | |
1621 | 2098 |
2099 MARKED FILES: UNMARKING *netrw-mu* {{{2 | |
2100 (See |netrw-mf| and |netrw-mr| for how to mark files) | |
2101 | |
2102 The "mu" mapping will unmark all currently marked files. | |
2103 | |
3153 | 2104 *netrw-browser-settings* |
1621 | 2105 NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2 |
2106 | |
3153 | 2107 (if you're interested in the netrw file transfer settings, see |netrw-options| |
2108 and |netrw-protocol|) | |
1621 | 2109 |
2110 The <netrw.vim> browser provides settings in the form of variables which | |
2111 you may modify; by placing these settings in your <.vimrc>, you may customize | |
2112 your browsing preferences. (see also: |netrw-settings|) | |
2113 > | |
2114 --- ----------- | |
2115 Var Explanation | |
2116 --- ----------- | |
4339 | 2117 < *g:netrw_alto* change from above splitting to below splitting |
1621 | 2118 by setting this variable (see |netrw-o|) |
2119 default: =&sb (see |'sb'|) | |
2120 | |
4339 | 2121 *g:netrw_altv* change from left splitting to right splitting |
1621 | 2122 by setting this variable (see |netrw-v|) |
2123 default: =&spr (see |'spr'|) | |
2124 | |
4339 | 2125 *g:netrw_banner* enable/suppress the banner |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2126 =0: suppress the banner |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2127 =1: banner is enabled (default) |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2128 NOTE: suppressing the banner is a new feature |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2129 which may cause problems. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2130 |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2131 *g:netrw_bannerbackslash* if this variable exists and is not zero, the |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2132 banner will be displayed with backslashes |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2133 rather than forward slashes. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2134 |
4339 | 2135 *g:netrw_browse_split* when browsing, <cr> will open the file by: |
1621 | 2136 =0: re-using the same window |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2137 =1: horizontally splitting the window first |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2138 =2: vertically splitting the window first |
1621 | 2139 =3: open file in new tab |
2140 =4: act like "P" (ie. open previous window) | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2141 Note that |g:netrw_preview| may be used |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2142 to get vertical splitting instead of |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2143 horizontal splitting. |
1621 | 2144 |
4339 | 2145 *g:netrw_browsex_viewer* specify user's preference for a viewer: > |
1621 | 2146 "kfmclient exec" |
2147 "gnome-open" | |
2148 < If > | |
2149 "-" | |
2150 < is used, then netrwFileHandler() will look for | |
2151 a script/function to handle the given | |
2152 extension. (see |netrw_filehandler|). | |
2153 | |
4339 | 2154 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME" |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2155 Windows: "cacls FILENAME /e /p PERM" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2156 Used to change access permission for a file. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2157 |
4339 | 2158 *g:netrw_compress* ="gzip" |
1621 | 2159 Will compress marked files with this |
2160 command | |
2161 | |
4339 | 2162 *g:Netrw_corehandler* Allows one to specify something additional |
3153 | 2163 to do when handling <core> files via netrw's |
2164 browser's "x" command (see |netrw-x|). If | |
2165 present, g:Netrw_corehandler specifies | |
2166 either one or more function references | |
2167 (see |Funcref|). (the capital g:Netrw... | |
2168 is required its holding a function reference) | |
2169 | |
2170 | |
4339 | 2171 *g:netrw_ctags* ="ctags" |
2172 The default external program used to create | |
2173 tags | |
2174 | |
2175 *g:netrw_cursor* = 2 (default) | |
2751 | 2176 This option controls the use of the |
2177 |'cursorline'| (cul) and |'cursorcolumn'| | |
2178 (cuc) settings by netrw: | |
2179 | |
2180 Value Thin-Long-Tree Wide | |
2181 =0 u-cul u-cuc u-cul u-cuc | |
2182 =1 u-cul u-cuc cul u-cuc | |
2183 =2 cul u-cuc cul u-cuc | |
2184 =3 cul u-cuc cul cuc | |
2185 =4 cul cuc cul cuc | |
2186 | |
2187 Where | |
2188 u-cul : user's |'cursorline'| setting used | |
2189 u-cuc : user's |'cursorcolumn'| setting used | |
2190 cul : |'cursorline'| locally set | |
2191 cuc : |'cursorcolumn'| locally set | |
2192 | |
4339 | 2193 *g:netrw_decompress* = { ".gz" : "gunzip" , |
1621 | 2194 ".bz2" : "bunzip2" , |
2195 ".zip" : "unzip" , | |
2196 ".tar" : "tar -xf"} | |
2197 A dictionary mapping suffices to | |
2198 decompression programs. | |
2199 | |
2751 | 2200 *g:netrw_dirhistmax* =10: controls maximum quantity of past |
2201 history. May be zero to supppress | |
2202 history. | |
2203 (related: |netrw-qb| |netrw-u| |netrw-U|) | |
2204 | |
3920 | 2205 *g:netrw_dynamic_maxfilenamelen* =32: enables dynamic determination of |
2206 |g:netrw_maxfilenamelen|, which affects | |
2207 local file long listing. | |
3456 | 2208 *g:netrw_errorlvl* =0: error levels greater than or equal to |
2209 this are permitted to be displayed | |
2210 0: notes | |
2211 1: warnings | |
2212 2: errors | |
2213 | |
4339 | 2214 *g:netrw_fastbrowse* =0: slow speed directory browsing; |
1621 | 2215 never re-uses directory listings, |
2216 always obtains directory listings. | |
2217 =1: medium speed directory browsing; | |
2218 re-use directory listings only | |
2219 when remote directory browsing. | |
2220 (default value) | |
2221 =2: fast directory browsing; | |
2222 only obtains directory listings when the | |
2223 directory hasn't been seen before | |
2224 (or |netrw-ctrl-l| is used). | |
2225 | |
2226 Fast browsing retains old directory listing | |
2227 buffers so that they don't need to be | |
2228 re-acquired. This feature is especially | |
2229 important for remote browsing. However, if | |
2230 a file is introduced or deleted into or from | |
2231 such directories, the old directory buffer | |
2232 becomes out-of-date. One may always refresh | |
2233 such a directory listing with |netrw-ctrl-l|. | |
2234 This option gives the user the choice of | |
2235 trading off accuracy (ie. up-to-date listing) | |
2236 versus speed. | |
2237 | |
4339 | 2238 *g:netrw_fname_escape* =' ?&;%' |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2239 Used on filenames before remote reading/writing |
1621 | 2240 |
4339 | 2241 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings |
1621 | 2242 that can show up as "directories" and "files" |
2243 in the listing. This pattern is used to | |
2244 remove such embedded messages. By default its | |
2245 value is: | |
2246 '^total\s\+\d\+$\| | |
2247 ^Trying\s\+\d\+.*$\| | |
2248 ^KERBEROS_V\d rejected\| | |
2249 ^Security extensions not\| | |
2250 No such file\| | |
2251 : connect to address [0-9a-fA-F:]* | |
2252 : No route to host$' | |
2253 | |
4339 | 2254 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory |
1621 | 2255 listing. Defaults: |
2256 unix or g:netrw_cygwin set: : "ls -lF" | |
2257 otherwise "dir" | |
2258 | |
2259 | |
4339 | 2260 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory |
1621 | 2261 listing, sorted by size of file. |
2262 Defaults: | |
2263 unix or g:netrw_cygwin set: : "ls -slF" | |
2264 otherwise "dir" | |
2265 | |
4339 | 2266 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory |
1621 | 2267 listing, sorted by time of last modification. |
2268 Defaults: | |
2269 unix or g:netrw_cygwin set: : "ls -tlF" | |
2270 otherwise "dir" | |
2271 | |
3456 | 2272 *g:netrw_glob_escape* ='[]*?`{~$' (unix) |
2152 | 2273 ='[]*?`{$' (windows |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2274 These characters in directory names are |
1621 | 2275 escaped before applying glob() |
2276 | |
4339 | 2277 *g:netrw_hide* Controlled by the "a" map (see |netrw-a|) |
2278 =0 : show all | |
2279 =1 : show not-hidden files | |
2280 =2 : show hidden files only | |
1621 | 2281 default: =0 |
2282 | |
4339 | 2283 *g:netrw_home* The home directory for where bookmarks and |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2284 history are saved (as .netrwbook and |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2285 .netrwhist). |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2286 default: the first directory on the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2287 |'runtimepath'| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2288 |
4339 | 2289 *g:netrw_keepdir* =1 (default) keep current directory immune from |
1621 | 2290 the browsing directory. |
2291 =0 keep the current directory the same as the | |
2292 browsing directory. | |
2293 The current browsing directory is contained in | |
2294 b:netrw_curdir (also see |netrw-c|) | |
2295 | |
4339 | 2296 *g:netrw_list_cmd* command for listing remote directories |
1621 | 2297 default: (if ssh is executable) |
2298 "ssh HOSTNAME ls -FLa" | |
2299 | |
4339 | 2300 *g:netrw_liststyle* Set the default listing style: |
1621 | 2301 = 0: thin listing (one file per line) |
2302 = 1: long listing (one file per line with time | |
2303 stamp information and file size) | |
2304 = 2: wide listing (multiple files in columns) | |
2305 = 3: tree style listing | |
4339 | 2306 *g:netrw_list_hide* comma separated pattern list for hiding files |
1621 | 2307 Patterns are regular expressions (see |regexp|) |
2308 Example: let g:netrw_list_hide= '.*\.swp$' | |
2309 default: "" | |
2310 | |
4339 | 2311 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2312 ="copy" Windows |
1621 | 2313 Copies marked files (|netrw-mf|) to target |
2314 directory (|netrw-mt|, |netrw-mc|) | |
2315 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2316 *g:netrw_localmkdir* command for making a local directory |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2317 default: "mkdir" |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2318 |
4339 | 2319 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2320 ="move" Windows |
1621 | 2321 Moves marked files (|netrw-mf|) to target |
2322 directory (|netrw-mt|, |netrw-mm|) | |
2323 | |
4339 | 2324 *g:netrw_localrmdir* remove directory command (rmdir) |
1621 | 2325 default: "rmdir" |
2326 | |
4339 | 2327 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long |
1621 | 2328 listings fit on 80 column displays. |
2329 If your screen is wider, and you have file | |
2330 or directory names longer than 32 bytes, | |
2331 you may set this option to keep listings | |
2332 columnar. | |
2333 | |
4339 | 2334 *g:netrw_mkdir_cmd* command for making a remote directory |
3153 | 2335 via ssh (also see |g:netrw_remote_mkdir|) |
1621 | 2336 default: "ssh USEPORT HOSTNAME mkdir" |
2337 | |
2908 | 2338 *g:netrw_mousemaps* =1 (default) enables mouse buttons while |
2339 browsing to: | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2340 leftmouse : open file/directory |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2341 shift-leftmouse : mark file |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2342 middlemouse : same as P |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2343 rightmouse : remove file/directory |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2344 =0: disables mouse maps |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2345 |
3153 | 2346 *g:netrw_nobeval* doesn't exist (default) |
2347 If this variable exists, then balloon | |
2348 evaluation will be suppressed | |
2349 (see |'ballooneval'|) | |
2350 | |
4339 | 2351 *g:netrw_remote_mkdir* command for making a local directory |
3153 | 2352 via ftp (also see |g:netrw_mkdir_cmd|) |
2353 default: "mkdir" | |
2354 | |
4339 | 2355 *g:netrw_retmap* if it exists and is set to one, then: |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2356 * if in a netrw-selected file, AND |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2357 * no normal-mode <2-leftmouse> mapping exists, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2358 then the <2-leftmouse> will be mapped for easy |
1621 | 2359 return to the netrw browser window. |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2360 example: click once to select and open a file, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2361 double-click to return. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2362 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2363 Note that one may instead choose to: |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2364 * let g:netrw_retmap= 1, AND |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2365 * nmap <silent> YourChoice <Plug>NetrwReturn |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2366 and have another mapping instead of |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2367 <2-leftmouse> to invoke the return. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2368 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2369 You may also use the |:Rexplore| command to do |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2370 the same thing. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2371 |
1621 | 2372 default: =0 |
2373 | |
4339 | 2374 *g:netrw_rm_cmd* command for removing files |
1621 | 2375 default: "ssh USEPORT HOSTNAME rm" |
2376 | |
4339 | 2377 *g:netrw_rmdir_cmd* command for removing directories |
1621 | 2378 default: "ssh USEPORT HOSTNAME rmdir" |
2379 | |
4339 | 2380 *g:netrw_rmf_cmd* command for removing softlinks |
1621 | 2381 default: "ssh USEPORT HOSTNAME rm -f" |
2382 | |
4339 | 2383 *g:netrw_sort_by* sort by "name", "time", or "size" |
1621 | 2384 default: "name" |
2385 | |
4339 | 2386 *g:netrw_sort_direction* sorting direction: "normal" or "reverse" |
1621 | 2387 default: "normal" |
2388 | |
4339 | 2389 *g:netrw_sort_options* sorting is done using |:sort|; this |
1668 | 2390 variable's value is appended to the |
2391 sort command. Thus one may ignore case, | |
2392 for example, with the following in your | |
2393 .vimrc: > | |
2394 let g:netrw_sort_options="i" | |
2395 < default: "" | |
2396 | |
4339 | 2397 *g:netrw_sort_sequence* when sorting by name, first sort by the |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2398 comma-separated pattern sequence. Note that |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2399 the filigree added to indicate filetypes |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2400 should be accounted for in your pattern. |
1621 | 2401 default: '[\/]$,*,\.bak$,\.o$,\.h$, |
2402 \.info$,\.swp$,\.obj$' | |
2403 | |
4339 | 2404 *g:netrw_special_syntax* If true, then certain files will be shown |
3456 | 2405 using special syntax in the browser: |
1621 | 2406 |
2407 netrwBak : *.bak | |
2408 netrwCompress: *.gz *.bz2 *.Z *.zip | |
2409 netrwData : *.dat | |
2410 netrwHdr : *.h | |
2411 netrwLib : *.a *.so *.lib *.dll | |
2412 netrwMakefile: [mM]akefile *.mak | |
2413 netrwObj : *.o *.obj | |
2414 netrwTags : tags ANmenu ANtags | |
2751 | 2415 netrwTilde : *~ |
1621 | 2416 netrwTmp : tmp* *tmp |
2417 | |
2418 These syntax highlighting groups are linked | |
2419 to Folded or DiffChange by default | |
2420 (see |hl-Folded| and |hl-DiffChange|), but | |
2421 one may put lines like > | |
2422 hi link netrwCompress Visual | |
2423 < into one's <.vimrc> to use one's own | |
2424 preferences. | |
2425 | |
4339 | 2426 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines, |
1621 | 2427 messages, banners, and whatnot that one doesn't |
2428 want masquerading as "directories" and "files". | |
2429 Use this pattern to remove such embedded | |
2430 messages. By default its value is: | |
2431 '^total\s\+\d\+$' | |
2432 | |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2433 *g:netrw_ssh_cmd* One may specify an executable command |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2434 to use instead of ssh for remote actions |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2435 such as listing, file removal, etc. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2436 default: ssh |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
2437 |
1621 | 2438 |
4339 | 2439 *g:netrw_tmpfile_escape* =' &;' |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2440 escape() is applied to all temporary files |
1621 | 2441 to escape these characters. |
2442 | |
4339 | 2443 *g:netrw_timefmt* specify format string to vim's strftime(). |
1621 | 2444 The default, "%c", is "the preferred date |
2445 and time representation for the current | |
2446 locale" according to my manpage entry for | |
2447 strftime(); however, not all are satisfied | |
2448 with it. Some alternatives: | |
2449 "%a %d %b %Y %T", | |
2450 " %a %Y-%m-%d %I-%M-%S %p" | |
2451 default: "%c" | |
2452 | |
4339 | 2453 *g:netrw_use_noswf* netrw normally avoids writing swapfiles |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2454 for browser buffers. However, under some |
1621 | 2455 systems this apparently is causing nasty |
2456 ml_get errors to appear; if you're getting | |
2457 ml_get errors, try putting | |
2458 let g:netrw_use_noswf= 0 | |
2459 in your .vimrc. | |
2460 | |
4339 | 2461 *g:netrw_winsize* specify initial size of new windows made with |
1621 | 2462 "o" (see |netrw-o|), "v" (see |netrw-v|), |
2908 | 2463 |:Hexplore| or |:Vexplore|. The g:netrw_winsize |
2464 is an integer describing the percentage of the | |
2465 current netrw buffer's window to be used for | |
2466 the new window. | |
3153 | 2467 If g:netrw_winsize is less than zero, then |
2468 the absolute value of g:netrw_winsize lines | |
2469 or columns will be used for the new window. | |
2908 | 2470 default: 50 (for 50%) |
1621 | 2471 |
4339 | 2472 *g:netrw_xstrlen* Controls how netrw computes string lengths, |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2473 including multi-byte characters' string |
1621 | 2474 length. (thanks to N Weibull, T Mechelynck) |
2475 =0: uses Vim's built-in strlen() | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2476 =1: number of codepoints (Latin a + combining |
1621 | 2477 circumflex is two codepoints) (DEFAULT) |
2478 =2: number of spacing codepoints (Latin a + | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2479 combining circumflex is one spacing |
1621 | 2480 codepoint; a hard tab is one; wide and |
2481 narrow CJK are one each; etc.) | |
2482 =3: virtual length (counting tabs as anything | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2483 between 1 and |'tabstop'|, wide CJK as 2 |
1621 | 2484 rather than 1, Arabic alif as zero when |
2485 immediately preceded by lam, one | |
2486 otherwise, etc) | |
2487 | |
4339 | 2488 *g:NetrwTopLvlMenu* This variable specifies the top level |
1621 | 2489 menu name; by default, it's "Netrw.". If |
2490 you wish to change this, do so in your | |
2491 .vimrc. | |
2492 | |
2493 NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2 | |
2494 | |
2495 Netrw has been designed to handle user options by saving them, setting the | |
2496 options to something that's compatible with netrw's needs, and then restoring | |
2497 them. However, the autochdir option: > | |
2498 :set acd | |
2499 is problematical. Autochdir sets the current directory to that containing the | |
2500 file you edit; this apparently also applies to directories. In other words, | |
2501 autochdir sets the current directory to that containing the "file" (even if | |
2502 that "file" is itself a directory). | |
2503 | |
3153 | 2504 NETRW SETTINGS WINDOW *netrw-settings-window* {{{2 |
482 | 2505 |
2506 With the NetrwSettings.vim plugin, > | |
2507 :NetrwSettings | |
2508 will bring up a window with the many variables that netrw uses for its | |
559 | 2509 settings. You may change any of their values; when you save the file, the |
2510 settings therein will be used. One may also press "?" on any of the lines for | |
2511 help on what each of the variables do. | |
482 | 2512 |
3456 | 2513 (also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|) |
1121 | 2514 |
482 | 2515 |
9 | 2516 ============================================================================== |
1621 | 2517 OBTAINING A FILE *netrw-O* {{{2 |
2518 | |
2519 If there are no marked files: | |
2520 | |
2521 When browsing a remote directory, one may obtain a file under the cursor | |
2522 (ie. get a copy on your local machine, but not edit it) by pressing the O | |
2523 key. | |
2524 | |
2525 If there are marked files: | |
2526 | |
2527 The marked files will be obtained (ie. a copy will be transferred to your | |
2528 local machine, but not set up for editing). | |
2529 | |
2530 Only ftp and scp are supported for this operation (but since these two are | |
2531 available for browsing, that shouldn't be a problem). The status bar will | |
2532 then show, on its right hand side, a message like "Obtaining filename". The | |
2533 statusline will be restored after the transfer is complete. | |
2534 | |
2535 Netrw can also "obtain" a file using the local browser. Netrw's display | |
2536 of a directory is not necessarily the same as Vim's "current directory", | |
2537 unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select | |
2538 a file using the local browser (by putting the cursor on it) and pressing | |
2539 "O" will then "obtain" the file; ie. copy it to Vim's current directory. | |
2540 | |
2541 Related topics: | |
2542 * To see what the current directory is, use |:pwd| | |
2543 * To make the currently browsed directory the current directory, see |netrw-c| | |
2544 * To automatically make the currently browsed directory the current | |
2545 directory, see |g:netrw_keepdir|. | |
2546 | |
2751 | 2547 *netrw-createfile* |
1668 | 2548 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* |
2549 | |
2550 To open a file in netrw's current directory, press "%". This map will | |
2551 query the user for a new filename; an empty file by that name will be | |
2552 placed in the netrw's current directory (ie. b:netrw_curdir). | |
2553 | |
2554 | |
1621 | 2555 PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2 |
2556 | |
2557 One may use a preview window by using the "p" key when the cursor is atop the | |
2558 desired filename to be previewed. The display will then split to show both | |
2559 the browser (where the cursor will remain) and the file (see |:pedit|). | |
2560 By default, the split will be taken horizontally; one may use vertical | |
2561 splitting if one has set |g:netrw_preview| first. | |
2562 | |
2152 | 2563 An interesting set of netrw settings is: > |
2564 | |
2565 let g:netrw_preview = 1 | |
2566 let g:netrw_liststyle = 3 | |
2567 let g:netrw_winsize = 30 | |
2568 | |
2569 These will: | |
2570 1. Make vertical splitting the default for previewing files | |
2571 2. Make the default listing style "tree" | |
2572 3. When a vertical preview window is opened, the directory listing | |
3456 | 2573 will use only 30% of the columns available; the rest of the window |
2574 is used for the preview window. | |
1621 | 2575 |
2576 PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2 | |
2577 | |
2578 To edit a file or directory in the previously used (last accessed) window (see | |
2579 :he |CTRL-W_p|), press a "P". If there's only one window, then the one window | |
3153 | 2580 will be horizontally split (by default). |
1621 | 2581 |
2582 If there's more than one window, the previous window will be re-used on | |
2583 the selected file/directory. If the previous window's associated buffer | |
2584 has been modified, and there's only one window with that buffer, then | |
2585 the user will be asked if s/he wishes to save the buffer first (yes, | |
2586 no, or cancel). | |
2587 | |
4339 | 2588 Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-v| |
3153 | 2589 Associated setting variables: |
2590 |g:netrw_alto| control above/below splitting | |
2591 |g:netrw_altv| control right/left splitting | |
2592 |g:netrw_preview| control horizontal vs vertical splitting | |
2593 |g:netrw_winsize| control initial sizing | |
2594 | |
1621 | 2595 |
2596 REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2 | |
2597 | |
2598 To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or | |
2599 hit the <cr> when atop the ./ directory entry in the listing. One may also | |
2600 refresh a local directory by using ":e .". | |
2601 | |
2602 | |
4339 | 2603 REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2 |
2604 | |
2605 One may toggle between normal and reverse sorting order by pressing the | |
2606 "r" key. | |
2607 | |
2608 Related topics: |netrw-s| | |
2609 Associated setting variable: |g:netrw_sort_direction| | |
2610 | |
2611 | |
1621 | 2612 RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2 |
2613 | |
2614 If there are no marked files: (see |netrw-mf|) | |
2615 | |
2616 Renaming/moving files and directories involves moving the cursor to the | |
2617 file/directory to be moved (renamed) and pressing "R". You will then be | |
2618 queried for where you want the file/directory to be moved. You may select | |
2619 a range of lines with the "V" command (visual selection), and then | |
2620 pressing "R". | |
2621 | |
2622 If there are marked files: (see |netrw-mf|) | |
2623 | |
2624 Marked files will be renamed (moved). You will be queried as above in | |
2625 order to specify where you want the file/directory to be moved. | |
2626 | |
2627 WARNING:~ | |
2628 | |
2629 Note that moving files is a dangerous operation; copies are safer. That's | |
2630 because a "move" for remote files is actually a copy + delete -- and if | |
2631 the copy fails and the delete does not, you may lose the file. | |
2632 | |
2633 The g:netrw_rename_cmd variable is used to implement renaming. By default its | |
2634 value is: | |
2635 | |
2636 ssh HOSTNAME mv | |
2637 | |
2638 One may rename a block of files and directories by selecting them with | |
2639 the V (|linewise-visual|). | |
2640 | |
2641 | |
2642 SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2 | |
2643 | |
2644 One may select the sorting style by name, time, or (file) size. The "s" map | |
2645 allows one to circulate amongst the three choices; the directory listing will | |
2646 automatically be refreshed to reflect the selected style. | |
2647 | |
2648 Related topics: |netrw-r| |netrw-S| | |
2649 Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence| | |
2650 | |
2651 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2652 SETTING EDITING WINDOW *netrw-C* {{{2 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2653 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2654 One may select a netrw window for editing with the "C" mapping, or by setting |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2655 g:netrw_chgwin to the selected window number. Subsequent selection of a file |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2656 to edit (|netrw-cr|) will use that window. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2657 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2658 Related topics: |netrw-cr| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2659 Associated setting variables: |g:netrw_chgwin| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2660 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2661 |
1621 | 2662 10. Problems and Fixes *netrw-problems* {{{1 |
24 | 2663 |
2664 (This section is likely to grow as I get feedback) | |
2665 (also see |netrw-debug|) | |
477 | 2666 *netrw-p1* |
24 | 2667 P1. I use windows 95, and my ftp dumps four blank lines at the |
2668 end of every read. | |
2669 | |
2670 See |netrw-fixup|, and put the following into your | |
2671 <.vimrc> file: | |
2672 | |
2673 let g:netrw_win95ftp= 1 | |
466 | 2674 |
477 | 2675 *netrw-p2* |
1121 | 2676 P2. I use Windows, and my network browsing with ftp doesn't sort by |
2677 time or size! -or- The remote system is a Windows server; why | |
2678 don't I get sorts by time or size? | |
24 | 2679 |
2680 Windows' ftp has a minimal support for ls (ie. it doesn't | |
2681 accept sorting options). It doesn't support the -F which | |
2682 gives an explanatory character (ABC/ for "ABC is a directory"). | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2683 Netrw then uses "dir" to get both its thin and long listings. |
1121 | 2684 If you think your ftp does support a full-up ls, put the |
2685 following into your <.vimrc>: > | |
24 | 2686 |
1121 | 2687 let g:netrw_ftp_list_cmd = "ls -lF" |
2688 let g:netrw_ftp_timelist_cmd= "ls -tlF" | |
2689 let g:netrw_ftp_sizelist_cmd= "ls -slF" | |
2690 < | |
24 | 2691 Alternatively, if you have cygwin on your Windows box, put |
1121 | 2692 into your <.vimrc>: > |
24 | 2693 |
2694 let g:netrw_cygwin= 1 | |
1121 | 2695 < |
2696 This problem also occurs when the remote system is Windows. | |
2697 In this situation, the various g:netrw_ftp_[time|size]list_cmds | |
2698 are as shown above, but the remote system will not correctly | |
2699 modify its listing behavior. | |
2700 | |
24 | 2701 |
477 | 2702 *netrw-p3* |
24 | 2703 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw |
2704 used ssh! That wasn't what I asked for... | |
2705 | |
2706 Netrw has two methods for browsing remote directories: ssh | |
2707 and ftp. Unless you specify ftp specifically, ssh is used. | |
2708 When it comes time to do download a file (not just a directory | |
2709 listing), netrw will use the given protocol to do so. | |
2710 | |
477 | 2711 *netrw-p4* |
24 | 2712 P4. I would like long listings to be the default. |
2713 | |
1621 | 2714 Put the following statement into your |.vimrc|: > |
2715 | |
1121 | 2716 let g:netrw_liststyle= 1 |
1621 | 2717 < |
2718 Check out |netrw-browser-var| for more customizations that | |
26 | 2719 you can set. |
24 | 2720 |
477 | 2721 *netrw-p5* |
24 | 2722 P5. My times come up oddly in local browsing |
2723 | |
2724 Does your system's strftime() accept the "%c" to yield dates | |
4339 | 2725 such as "Sun Apr 27 11:49:23 1997"? If not, do a |
2726 "man strftime" and find out what option should be used. Then | |
2727 put it into your |.vimrc|: > | |
1621 | 2728 |
24 | 2729 let g:netrw_timefmt= "%X" (where X is the option) |
1621 | 2730 < |
477 | 2731 *netrw-p6* |
26 | 2732 P6. I want my current directory to track my browsing. |
2733 How do I do that? | |
24 | 2734 |
1621 | 2735 Put the following line in your |.vimrc|: |
2736 > | |
794 | 2737 let g:netrw_keepdir= 0 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2738 < |
1121 | 2739 *netrw-p7* |
2740 P7. I use Chinese (or other non-ascii) characters in my filenames, and | |
2741 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! | |
466 | 2742 |
1121 | 2743 (taken from an answer provided by Wu Yongwei on the vim |
2744 mailing list) | |
2745 I now see the problem. You code page is not 936, right? Vim | |
2746 seems only able to open files with names that are valid in the | |
2747 current code page, as are many other applications that do not | |
2748 use the Unicode version of Windows APIs. This is an OS-related | |
2749 issue. You should not have such problems when the system | |
2750 locale uses UTF-8, such as modern Linux distros. | |
2751 | |
2752 (...it is one more reason to recommend that people use utf-8!) | |
2753 | |
2754 *netrw-p8* | |
2755 P8. I'm getting "ssh is not executable on your system" -- what do I | |
2756 do? | |
2757 | |
2758 (Dudley Fox) Most people I know use putty for windows ssh. It | |
2759 is a free ssh/telnet application. You can read more about it | |
2760 here: | |
2761 | |
2762 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also: | |
2763 | |
2764 (Marlin Unruh) This program also works for me. It's a single | |
2765 executable, so he/she can copy it into the Windows\System32 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2766 folder and create a shortcut to it. |
1121 | 2767 |
2768 (Dudley Fox) You might also wish to consider plink, as it | |
2769 sounds most similar to what you are looking for. plink is an | |
2770 application in the putty suite. | |
2771 | |
2772 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink | |
2773 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2774 (Vissale Neang) Maybe you can try OpenSSH for windows, which |
1121 | 2775 can be obtained from: |
2776 | |
2777 http://sshwindows.sourceforge.net/ | |
2778 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2779 It doesn't need the full Cygwin package. |
1121 | 2780 |
2781 (Antoine Mechelynck) For individual Unix-like programs needed | |
2782 for work in a native-Windows environment, I recommend getting | |
2783 them from the GnuWin32 project on sourceforge if it has them: | |
2784 | |
2785 http://gnuwin32.sourceforge.net/ | |
2786 | |
2787 Unlike Cygwin, which sets up a Unix-like virtual machine on | |
2788 top of Windows, GnuWin32 is a rewrite of Unix utilities with | |
2789 Windows system calls, and its programs works quite well in the | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2790 cmd.exe "Dos box". |
1121 | 2791 |
2792 (dave) Download WinSCP and use that to connect to the server. | |
2793 In Preferences > Editors, set gvim as your editor: | |
2794 | |
2795 - Click "Add..." | |
2796 - Set External Editor (adjust path as needed, include | |
2797 the quotes and !.! at the end): | |
2798 "c:\Program Files\Vim\vim70\gvim.exe" !.! | |
2799 - Check that the filetype in the box below is | |
2800 {asterisk}.{asterisk} (all files), or whatever types | |
2801 you want (cec: change {asterisk} to * ; I had to | |
2802 write it that way because otherwise the helptags | |
1621 | 2803 system thinks it's a tag) |
2804 - Make sure it's at the top of the listbox (click it, | |
2805 then click "Up" if it's not) | |
1121 | 2806 If using the Norton Commander style, you just have to hit <F4> |
2807 to edit a file in a local copy of gvim. | |
2808 | |
2809 (Vit Gottwald) How to generate public/private key and save | |
2810 public key it on server: > | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
2811 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
2812 (8.3 Getting ready for public key authentication) |
1121 | 2813 < |
1621 | 2814 How to use a private key with 'pscp': > |
2815 | |
2420
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
2816 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html |
6de9efd58dc0
Updated runtime files. New netrw plugin version.
Bram Moolenaar <bram@vim.org>
parents:
2413
diff
changeset
|
2817 (5.2.4 Using public key authentication with PSCP) |
1121 | 2818 < |
1621 | 2819 (Ben Schmidt) I find the ssh included with cwRsync is |
2820 brilliant, and install cwRsync or cwRsyncServer on most | |
2821 Windows systems I come across these days. I guess COPSSH, | |
2822 packed by the same person, is probably even better for use as | |
2823 just ssh on Windows, and probably includes sftp, etc. which I | |
2824 suspect the cwRsync doesn't, though it might | |
2825 | |
1121 | 2826 (cec) To make proper use of these suggestions above, you will |
2827 need to modify the following user-settable variables in your | |
2828 .vimrc: | |
2829 | |
1621 | 2830 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd| |
2831 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd| | |
1121 | 2832 |
2833 The first one (|g:netrw_ssh_cmd|) is the most important; most | |
2834 of the others will use the string in g:netrw_ssh_cmd by | |
2835 default. | |
2836 *netrw-p9* *netrw-ml_get* | |
2837 P9. I'm browsing, changing directory, and bang! ml_get errors | |
2838 appear and I have to kill vim. Any way around this? | |
2839 | |
2840 Normally netrw attempts to avoid writing swapfiles for | |
2841 its temporary directory buffers. However, on some systems | |
2842 this attempt appears to be causing ml_get errors to | |
2843 appear. Please try setting |g:netrw_use_noswf| to 0 | |
2844 in your <.vimrc>: > | |
2845 let g:netrw_use_noswf= 0 | |
2846 < | |
1621 | 2847 *netrw-p10* |
2848 P10. I'm being pestered with "[something] is a directory" and | |
2849 "Press ENTER or type command to continue" prompts... | |
2850 | |
2851 The "[something] is a directory" prompt is issued by Vim, | |
2852 not by netrw, and there appears to be no way to work around | |
2853 it. Coupled with the default cmdheight of 1, this message | |
2854 causes the "Press ENTER..." prompt. So: read |hit-enter|; | |
2855 I also suggest that you set your |'cmdheight'| to 2 (or more) in | |
2856 your <.vimrc> file. | |
2857 | |
2858 *netrw-p11* | |
2859 P11. I want to have two windows; a thin one on the left and my editing | |
2908 | 2860 window on the right. How may I accomplish this? |
1621 | 2861 |
2862 * Put the following line in your <.vimrc>: | |
2863 let g:netrw_altv = 1 | |
2864 * Edit the current directory: :e . | |
2865 * Select some file, press v | |
2866 * Resize the windows as you wish (see |CTRL-W_<| and | |
2867 |CTRL-W_>|). If you're using gvim, you can drag | |
2868 the separating bar with your mouse. | |
2869 * When you want a new file, use ctrl-w h to go back to the | |
2870 netrw browser, select a file, then press P (see |CTRL-W_h| | |
2871 and |netrw-P|). If you're using gvim, you can press | |
2872 <leftmouse> in the browser window and then press the | |
2873 <middlemouse> to select the file. | |
24 | 2874 |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2875 *netrw-p12* |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2876 P12. My directory isn't sorting correctly, or unwanted letters are |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2877 appearing in the listed filenames, or things aren't lining |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2878 up properly in the wide listing, ... |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2879 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2880 This may be due to an encoding problem. I myself usually use |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2881 utf-8, but really only use ascii (ie. bytes from 32-126). |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2882 Multibyte encodings use two (or more) bytes per character. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2883 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2884 |
2152 | 2885 *netrw-p13* |
2886 P13. I'm a Windows + putty + ssh user, and when I attempt to browse, | |
2887 the directories are missing trailing "/"s so netrw treats them | |
2888 as file transfers instead of as attempts to browse | |
2889 subdirectories. How may I fix this? | |
2890 | |
2891 (mikeyao) If you want to use vim via ssh and putty under Windows, | |
2892 try combining the use of pscp/psftp with plink. pscp/psftp will | |
2893 be used to connect and plink will be used to execute commands on | |
2894 the server, for example: list files and directory using 'ls'. | |
2895 | |
2896 These are the settings I use to do this: | |
2897 > | |
2898 " list files, it's the key setting, if you haven't set, | |
2899 " you will get a blank buffer | |
2900 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa" | |
2901 " if you haven't add putty directory in system path, you should | |
2902 " specify scp/sftp command. For examples: | |
2903 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe" | |
2904 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe" | |
2905 < | |
2908 | 2906 *netrw-p14* |
2907 P14. I'd would like to speed up writes using Nwrite and scp/ssh | |
2908 style connections. How? (Thomer M. Gil) | |
2909 | |
2910 Try using ssh's ControlMaster and ControlPath (see the ssh_config | |
2911 man page) to share multiple ssh connections over a single network | |
2912 connection. That cuts out the cryptographic handshake on each | |
2913 file write, sometimes speeding it up by an order of magnitude. | |
2914 (see http://thomer.com/howtos/netrw_ssh.html) | |
2915 (included by permission) | |
2916 | |
2917 Add the following to your ~/.ssh/config: > | |
2918 | |
2919 # you change "*" to the hostname you care about | |
2920 Host * | |
2921 ControlMaster auto | |
2922 ControlPath /tmp/%r@%h:%p | |
2923 | |
2924 < Then create an ssh connection to the host and leave it running: > | |
2925 | |
2926 ssh -N host.domain.com | |
2927 | |
2928 < Now remotely open a file with Vim's Netrw and enjoy the | |
2929 zippiness: > | |
2930 | |
2931 vim scp://host.domain.com//home/user/.bashrc | |
2932 < | |
2933 *netrw-p15* | |
2934 P15. How may I use a double-click instead of netrw's usual single click | |
2935 to open a file or directory? (Ben Fritz) | |
2936 | |
2937 First, disable netrw's mapping with > | |
2938 let g:netrw_mousemaps= 0 | |
2939 < and then create a netrw buffer only mapping in | |
2940 $HOME/.vim/after/ftplugin/netrw.vim: > | |
2941 nmap <buffer> <2-leftmouse> <CR> | |
2942 < Note that setting g:netrw_mousemaps to zero will turn off | |
2943 all netrw's mouse mappings, not just the <leftmouse> one. | |
2944 (see |g:netrw_mousemaps|) | |
2152 | 2945 |
24 | 2946 ============================================================================== |
1621 | 2947 11. Debugging Netrw Itself *netrw-debug* {{{1 |
7 | 2948 |
2751 | 2949 The <netrw.vim> script is typically available as something like: |
477 | 2950 > |
2751 | 2951 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim |
2952 /usr/local/share/vim/vim7x/autoload/netrw.vim | |
2953 < -or- > | |
1621 | 2954 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim |
2955 /usr/local/share/vim/vim6x/autoload/netrw.vim | |
477 | 2956 < |
7 | 2957 which is loaded automatically at startup (assuming :set nocp). |
2958 | |
2959 1. Get the <Decho.vim> script, available as: | |
2960 | |
3920 | 2961 http://www.drchip.org/astronaut/vim/index.html#DECHO |
7 | 2962 or |
534 | 2963 http://vim.sourceforge.net/scripts/script.php?script_id=120 |
7 | 2964 |
1621 | 2965 It now comes as a "vimball"; if you're using vim 7.0 or earlier, |
2966 you'll need to update vimball, too. See | |
3920 | 2967 http://www.drchip.org/astronaut/vim/index.html#VIMBALL |
1621 | 2968 |
2969 2. Edit the <netrw.vim> file by typing: > | |
22 | 2970 |
2971 vim netrw.vim | |
7 | 2972 :DechoOn |
22 | 2973 :wq |
1621 | 2974 < |
2975 To restore to normal non-debugging behavior, re-edit <netrw.vim> | |
2976 and type > | |
7 | 2977 |
22 | 2978 vim netrw.vim |
2979 :DechoOff | |
2980 :wq | |
1621 | 2981 < |
22 | 2982 This command, provided by <Decho.vim>, will comment out all |
2983 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). | |
2984 | |
1621 | 2985 3. Then bring up vim and attempt to evoke the problem by doing a |
2986 transfer or doing some browsing. A set of messages should appear | |
2987 concerning the steps that <netrw.vim> took in attempting to | |
2988 read/write your file over the network in a separate tab. | |
7 | 2989 |
1121 | 2990 To save the file, use > |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
2991 :tabnext |
1121 | 2992 :set bt= |
2993 :w! DBG | |
2994 < Please send that information to <netrw.vim>'s maintainer, > | |
36 | 2995 NdrOchip at ScampbellPfamily.AbizM - NOSPAM |
1121 | 2996 < |
7 | 2997 ============================================================================== |
1121 | 2998 12. History *netrw-history* {{{1 |
7 | 2999 |
4502
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3000 v149: Apr 18, 2013 * in wide listing format, now have maps for |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3001 w and b to move to next/previous file |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3002 Apr 26, 2013 * one may now copy files in the same |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3003 directory; netrw will issue requests for |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3004 what names the files should be copied under |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3005 Apr 29, 2013 * Trying Benzinger's problem again. Seems |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3006 that commenting out the BufEnter and |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3007 installing VimEnter (only) works. Weird |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3008 problem! (tree listing, vim -O Dir1 Dir2) |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3009 May 01, 2013 * :Explore ftp://... wasn't working. Fixed. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3010 May 02, 2013 * introduced |g:netrw_bannerbackslash| as |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3011 requested by Paul Domaskis. |
605c9ce57ec3
Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents:
4339
diff
changeset
|
3012 May 18, 2013 * More fixes for windows (not cygwin) |
4339 | 3013 v148: Apr 16, 2013 * changed Netrw's Style menu to allow direct |
3014 choice of listing style, hiding style, and | |
3015 sorting style | |
3016 v147: Nov 24, 2012 * (James McCoy) Even with g:netrw_dirhistmax | |
3017 at zero, the .vim/ directory would be | |
3018 created to support history/bookmarks. I've | |
3019 gone over netrw to suppress history and | |
3020 bookmarking when g:netrw_dirhistmax is zero. | |
3021 For instance, the menus will display | |
3022 (disabled) when attempts to use | |
3023 bookmarks/history are made. | |
3024 Nov 29, 2012 * (Kim Jang-hwan) reported that with | |
3025 g:Align_xstrlen set to 3 that the cursor was | |
3026 moved (linewise) after invocation. This | |
3027 problem also afflicted netrw. | |
3028 (see |g:netrw_xstrlen|) Fixed. | |
3029 Jan 21, 2013 * (mattn) provided a patch to insert some | |
3030 endifs needed with the code implementing | |
3031 |netrw-O|. | |
3032 Jan 24, 2013 * (John Szakmeister) found that remote file | |
3033 editing resulted in filetype options being | |
3034 overwritten by NetrwOptionRestore(). I | |
3035 moved filetype detect from NetrwGetFile() | |
3036 to NetrwOptionRestore. | |
3037 Feb 17, 2013 * (Yukhiro Nakadaira) provided a patch | |
3038 correcting some syntax errors. | |
3039 Feb 28, 2013 * (Ingo Karkat) provided a patch preventing | |
3040 receipt of an |E95| when revisiting a | |
3041 file://... style url. | |
3042 Mar 18, 2013 * (Gary Johnson) pointed out that changing | |
3043 cedit to <Esc> caused problems with visincr; | |
3044 the cedit setting is now bypassed in netrw too. | |
3045 Apr 02, 2013 * (Paul Domaskis) reported an undefined | |
3046 variable error (s:didstarstar) was | |
3047 occurring. It is now defined at | |
3048 initialization. | |
3049 * included additional sanity checking for the | |
3050 marked file functions. | |
3051 * included |netrw-qF| and special "j" option | |
3052 handling for |netrw-mg| | |
3053 Apr 12, 2013 * |netrw-u| and |netrw-U| now handle counts | |
3054 * the former mapping for "T" has been removed; | |
3055 in its place are new maps, |netrw-Tb| and |netrw-Th|. | |
3056 * the menu now supports a "Targets" entry for | |
3057 easier target selection. (see |netrw-mt|) | |
3058 * (Paul Domaskis) reported some problems with | |
3059 moving/copying files under Windows' gvim | |
3060 (ie. not cygwin). Fixed. | |
3061 * (Paul Mueller) provided a patch to get | |
3062 start and rundll working via |netrw-gx| | |
3063 by bypassing the user's |'shellslash'| option. | |
3920 | 3064 v146: Oct 20, 2012 * (David Kotchan) reported that under Windows, |
3065 directories named with unusual characters | |
3066 such as "#" or "$" were not being listed | |
3067 properly. | |
3068 * (Kenny Lee) reported that the buffer list | |
3069 was being populated by netrw buffers. | |
3070 Netrw will now |:bwipe| netrw buffers | |
3071 upon editing a file if g:netrw_fastbrowse | |
3072 is zero and its not in tree listing style. | |
4339 | 3073 * fixed a bug with s:NetrwInit() that |
3074 prevented initialization with |Lists| and | |
3075 |Dictionaries|. | |
3076 * |netrw-mu| now unmarks marked-file lists | |
3920 | 3077 v145: Apr 05, 2012 * moved some command from a g:netrw_local_... |
3078 format to g:netwr_local... format | |
3079 * included some NOTE level messages about | |
3080 commands that aren't executable | |
3081 * |g:netrw_errorlvl| (default: NOTE=0) | |
3082 option introduced | |
3083 May 18, 2012 * (Ilya Dogolazky) a scenario where a | |
3084 |g:netrw_fastbrowse| of zero did not | |
3085 have a local directory refreshed fixed. | |
3086 Jul 10, 2012 * (Donatas) |netrw-gb| wasn't working due | |
3087 to an incorrectly used variable. | |
3088 Aug 09, 2012 * (Bart Baker) netrw was doubling | |
3089 of entries after a split. | |
3090 * (code by Takahiro Yoshihara) implemented | |
3091 |g:netrw_dynamic_maxfilenamelen| | |
3092 Aug 31, 2012 * (Andrew Wong) netrw refresh overwriting | |
3093 the yank buffer. | |
3094 v144: Mar 12, 2012 * when |CTRL-W_s| or |CTRL-W_v| are used, | |
3095 or their wincmd equivalents, on a netrw | |
3096 buffer, the netrw's w: variables were | |
3097 not copied over. Fixed. | |
3098 Mar 13, 2012 * nbcd_curpos_{bufnr('%')} was commented | |
3099 out, and was mistakenly used during | |
3100 RestorePosn. Unfortunately, I'm not | |
3101 sure why it was commented out, so this | |
3102 "fix" may re-introduce an earlier problem. | |
3103 Mar 21, 2012 * included s:rexposn internally to make | |
3104 :Rex return the cursor to the same pos'n | |
3105 upon restoration of netrw buffer | |
3106 Mar 27, 2012 * (sjbesse) s:NetrwGetFile() needs to remove | |
3107 "/" from the netrw buffer's usual |'isk'| | |
3108 in order to allow "filetype detect" to work | |
3109 properly for scripts. | |
3110 v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative | |
3111 number; the absolute value of it will then | |
3112 be used to specify lines/columns instead of | |
3113 a percentage. | |
3114 Jul 05, 2011 * the "d" map now supports mkdir via ftp | |
3115 See |netrw-d| and |g:netrw_remote_mkdir| | |
3116 Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore | |
3117 to use a percentage of |winwidth()| instead | |
3118 of a percentage of |winheight()|. | |
3119 Jul 11, 2011 * included support for https://... I'm just | |
3120 beginning to test this, however. | |
3121 Aug 01, 2011 * changed RestoreOptions to also restore | |
3122 cursor position in netrw buffers. | |
3123 Aug 12, 2011 * added a note about "%" to the balloon | |
3124 Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon | |
3125 evaluation is suppressed. | |
3126 Aug 31, 2011 * (Benjamin R Haskell) provided a patch that | |
3127 implements non-standard port handling for | |
3128 files opened via the remote browser. | |
3129 Aug 31, 2011 * Fixed a **//pattern Explorer bug | |
3130 Sep 15, 2011 * (reported by Francesco Campana) netrw | |
3131 now permits the "@" to be part of the | |
3132 user id (if there's an @ that appears | |
3133 to the right). | |
3134 Nov 21, 2011 * New option: |g:netrw_ftp_options| | |
3135 Dec 07, 2011 * (James Sinclair) provided a fix handling | |
3136 attempts to use a uid and password when | |
3137 they weren't defined. This affected | |
3138 NetWrite (NetRead already had that fix). | |
7 | 3139 |
3140 | |
3141 ============================================================================== | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3142 13. Todo *netrw-todo* {{{1 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3143 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3144 07/29/09 : banner :|g:netrw_banner| can be used to suppress the |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3145 suppression banner. This feature is new and experimental, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3146 so its in the process of being debugged. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3147 09/04/09 : "gp" : See if it can be made to work for remote systems. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3148 : See if it can be made to work with marked files. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3149 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3150 ============================================================================== |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
3151 14. Credits *netrw-credits* {{{1 |
7 | 3152 |
3153 Vim editor by Bram Moolenaar (Thanks, Bram!) | |
3154 dav support by C Campbell | |
3155 fetch support by Bram Moolenaar and C Campbell | |
534 | 3156 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> |
7 | 3157 http support by Bram Moolenaar <bram@moolenaar.net> |
3158 rcp | |
3159 rsync support by C Campbell (suggested by Erik Warendorph) | |
3160 scp support by raf <raf@comdyn.com.au> | |
3161 sftp support by C Campbell | |
3162 | |
3163 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell | |
3164 | |
3165 Jérôme Augé -- also using new buffer method with ftp+.netrc | |
534 | 3166 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, |
1209 | 3167 fetch,... |
7 | 3168 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution |
3169 Erik Warendorph -- for several suggestions (g:netrw_..._cmd | |
3170 variables, rsync etc) | |
534 | 3171 Doug Claar -- modifications to test for success with ftp |
1209 | 3172 operation |
7 | 3173 |
3174 ============================================================================== | |
1621 | 3175 Modelines: {{{1 |
459 | 3176 vim:tw=78:ts=8:ft=help:norl:fdm=marker |