Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1 | *pi_netrw.txt* For Vim version 7.0. Last change: Sep 07, 2005 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | VIM REFERENCE MANUAL by Charles E. Campbell, Jr. |
| 5 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 6 | *dav* *http* *network* *rcp* *scp* |
| 7 | *fetch* *netrw* *Nread* *rsync* *sftp* |
| 8 | *ftp* *netrw.vim* *Nwrite* *netrw-file* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 9 | |
| 10 | ============================================================================== |
| 11 | 0. Contents *netrw-contents* |
| 12 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 13 | 1. Netrw Reference......................................|netrw-ref| |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 14 | CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp| |
| 15 | READING............................................|netrw-read| |
| 16 | WRITING............................................|netrw-write| |
| 17 | DIRECTORY LISTING..................................|netrw-dirlist| |
| 18 | CHANGING THE USERID AND PASSWORD...................|netrw-chgup| |
| 19 | VARIABLES..........................................|netrw-variables| |
| 20 | PATHS..............................................|netrw-path| |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 21 | 2. Network-Oriented File Transfer.......................|netrw-xfer| |
| 22 | NETRC..............................................|netrw-netrc| |
| 23 | PASSWORD...........................................|netrw-passwd| |
| 24 | 3. Activation...........................................|netrw-activate| |
| 25 | 4. Transparent File Transfer............................|netrw-transparent| |
| 26 | 5. Ex Commands..........................................|netrw-ex| |
| 27 | 6. Variables and Options................................|netrw-var| |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 28 | 7. Directory Browsing...................................|netrw-browse| {{{1 |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 29 | Maps...............................................|netrw-maps| |
| 30 | Exploring..........................................|netrw-explore-cmds| |
| 31 | Quick Reference Commands Table.....................|netrw-browse-cmds| |
| 32 | Netrw Browser Variables............................|netrw-browse-var| |
| 33 | Introduction To Directory Browsing.................|netrw-browse-intro| |
| 34 | Directory Exploring Commands.......................|netrw-explore| |
| 35 | Refreshing The Listing.............................|netrw-ctrl-l| |
| 36 | Going Up...........................................|netrw--| |
| 37 | Browsing...........................................|netrw-cr| |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 38 | Obtaining A File...................................|netrw-O| |
| 39 | Thin, Long, and Wide Listings......................|netrw-i| |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 40 | Making A New Directory.............................|netrw-d| |
| 41 | Deleting Files Or Directories......................|netrw-delete| |
| 42 | Renaming Files Or Directories......................|netrw-move| |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 43 | Hiding Files Or Directories........................|netrw-a| |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 44 | Edit File Or Directory Hiding List.................|netrw-h| |
| 45 | Browsing With A Horizontally Split Window..........|netrw-o| |
| 46 | Preview Window.....................................|netrw-p| |
| 47 | Selecting Sorting Style............................|netrw-s| |
| 48 | Editing The Sorting Sequence.......................|netrw-S| |
| 49 | Reversing Sorting Order............................|netrw-r| |
| 50 | Changing To A Predecessor Directory................|netrw-u| |
| 51 | Changing To A Successor Directory..................|netrw-U| |
| 52 | Browsing With A Vertically Split Window............|netrw-v| |
| 53 | Customizing Browsing With A User Function..........|netrw-x| |
| 54 | Making The Browsing Directory The Current Directory|netrw-c| |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 55 | Bookmarking A Directory............................|netrw-b| |netrw-Nb| |
| 56 | Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB| |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 57 | Listing Bookmarks And History......................|netrw-q| |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 58 | Improving Directory Browsing.......................|netrw-listhack| }}}1 |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 59 | 8. Problems and Fixes...................................|netrw-problems| |
| 60 | 9. Debugging............................................|netrw-debug| |
| 61 | 10. History..............................................|netrw-history| |
| 62 | 11. Credits..............................................|netrw-credits| |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 63 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 64 | The Netrw plugin is generally sourced automatically as it is a |
| 65 | |standard-plugin|. That said, to make use of netrw, one must |
| 66 | have plugins available which can be done with the following |
| 67 | two lines in your <.vimrc>: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 68 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 69 | set nocp " 'compatible' is not set |
| 70 | filetype plugin on " plugins are enabled |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 71 | |
| 72 | You can avoid loading this plugin by setting the "loaded_netrw" variable |
| 73 | in your <.vimrc> file: > |
| 74 | |
| 75 | :let loaded_netrw = 1 |
| 76 | |
| 77 | {Vi does not have any of this} |
| 78 | |
| 79 | ============================================================================== |
| 80 | 1. Netrw Reference *netrw-ref* |
| 81 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 82 | CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 83 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 84 | Protocol Variable Default Value |
| 85 | -------- ---------------- ------------- |
| 86 | dav: *g:netrw_dav_cmd* = "cadaver" |
| 87 | fetch: *g:netrw_fetch_cmd* = "fetch -o" |
| 88 | ftp: *g:netrw_ftp_cmd* = "ftp" |
| 89 | http: *g:netrw_http_cmd* = "fetch -o" if fetch is available |
| 90 | http: g:netrw_http_cmd = "wget -q -O" If wget is available |
| 91 | rcp: *g:netrw_rcp_cmd* = "rcp" |
| 92 | rsync: *g:netrw_rsync_cmd* = "rsync -a" |
| 93 | scp: *g:netrw_scp_cmd* = "scp -q" |
| 94 | sftp: *g:netrw_sftp_cmd* = "sftp" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 95 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 96 | READING *netrw-read* *netrw-nread* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 97 | :Nread ? give help |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 98 | :Nread "machine:path" uses rcp |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 99 | :Nread "machine path" uses ftp w/ <.netrc> |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 100 | :Nread "machine id password path" uses ftp |
| 101 | :Nread "dav://machine[:port]/path" uses cadaver |
| 102 | :Nread "fetch://[user@]machine/path" uses fetch |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 103 | :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 104 | :Nread "http://[user@]machine/path" uses http uses wget |
| 105 | :Nread "rcp://[user@]machine/path" uses rcp |
| 106 | :Nread "rsync://[user@]machine[:port]/path" uses rsync |
| 107 | :Nread "scp://[user@]machine[[:#]port]/path" uses scp |
| 108 | :Nread "sftp://[user@]machine/path" uses sftp |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 109 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 110 | WRITING *netrw-write* *netrw-nwrite* |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 111 | :Nwrite ? give help |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 112 | :Nwrite "machine:path" uses rcp |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 113 | :Nwrite "machine path" uses ftp w/ <.netrc> |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 114 | :Nwrite "machine id password path" uses ftp |
| 115 | :Nwrite "dav://machine[:port]/path" uses cadaver |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 116 | :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 117 | :Nwrite "rcp://[user@]machine/path" uses rcp |
| 118 | :Nwrite "rsync://[user@]machine[:port]/path" uses rsync |
| 119 | :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp |
| 120 | :Nwrite "sftp://[user@]machine/path" uses sftp |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 121 | http: not supported! |
| 122 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 123 | DIRECTORY LISTING *netrw-dirlist* |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 124 | :Nread [protocol]://[user]@hostname/path/ |
| 125 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 126 | CHANGING USERID AND PASSWORD *netrw-chgup* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 127 | Attempts to use ftp will prompt you for a user-id and a password. |
| 128 | These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses |
| 129 | of ftp will re-use those. If you need to use a different user id |
| 130 | and/or password, you'll want to call NetUserPass() first. |
| 131 | |
| 132 | :NetUserPass [uid [password]] -- prompts as needed |
| 133 | :call NetUserPass() -- prompts for uid and password |
| 134 | :call NetUserPass("uid") -- prompts for password |
| 135 | :call NetUserPass("uid","password") -- sets global uid and password |
| 136 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 137 | VARIABLES *netrw-variables* |
| 138 | *b:netrw_lastfile* last file Network-read/written retained on a per-buffer |
| 139 | basis (supports plain :Nw ) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 140 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 141 | *s:netrw_line* during :Nw/NetWrite, holds current line number |
| 142 | *s:netrw_col* during :Nw/NetWrite, holds current column number |
| 143 | s:netrw_line and s:netrw_col are used to |
| 144 | restore the cursor position on writes |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 145 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 146 | *g:netrw_ftp* if it doesn't exist, use default ftp |
| 147 | =0 use default ftp (uid password) |
| 148 | =1 use alternate ftp method (user uid password) |
| 149 | If you're having trouble with ftp, try changing the |
| 150 | value of this variable to see if the alternate ftp |
| 151 | method works for your setup. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 152 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 153 | *g:netrw_ftpmode* ="binary" (default) |
| 154 | ="ascii" |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 155 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 156 | *g:netrw_ignorenetrc* =0 (default) |
| 157 | =1 If you have a <.netrc> file but it doesn't work and |
| 158 | you want it ignored, then set this variable as shown. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 159 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 160 | *g:netrw_uid* (ftp) user-id, retained on a per-session basis |
| 161 | *g:netrw_passwd* (ftp) password, retained on a per-session basis |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 162 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 163 | *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank |
| 164 | lines that o/s's ftp "provides" on transfers |
| 165 | =0 force normal ftp behavior (no trailing line removal) |
| 166 | |
| 167 | *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also |
| 168 | permits network browsing to use ls with time and |
| 169 | size sorting (default if windows) |
| 170 | =0 assume Windows' scp accepts windows-style paths |
| 171 | Network browsing uses dir instead of ls |
| 172 | This option is ignored if you're using unix |
| 173 | |
| 174 | *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP |
| 175 | =1 use WinNT's rcp in binary mode (default) |
| 176 | |
| 177 | PATHS *netrw-path* |
| 178 | |
| 179 | Paths to files are generally user-directory relative for most protocols. |
| 180 | It is possible that some protocol will make paths relative to some |
| 181 | associated directory, however. |
| 182 | > |
| 183 | example: vim scp://user@host/somefile |
| 184 | example: vim scp://user@host/subdir1/subdir2/somefile |
| 185 | < |
| 186 | where "somefile" is the "user"'s home directory. If you wish to get a |
| 187 | file using root-relative paths, use the full path: |
| 188 | > |
| 189 | example: vim scp://user@host//somefile |
| 190 | example: vim scp://user@host//subdir1/subdir2/somefile |
| 191 | < |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 192 | |
| 193 | ============================================================================== |
| 194 | 2. Network-Oriented File Transfer *netrw-xfer* |
| 195 | |
| 196 | Network-oriented file transfer under Vim is implemented by a VimL-based script |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 197 | (<netrw.vim>) using plugin techniques. It currently supports both reading and |
| 198 | writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch, |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 199 | dav/cadaver, rsync, or sftp. |
| 200 | |
| 201 | http is currently supported read-only via use of wget or fetch. |
| 202 | |
| 203 | <netrw.vim> is a standard plugin which acts as glue between Vim and the |
| 204 | various file transfer programs. It uses autocommand events (BufReadCmd, |
| 205 | FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. > |
| 206 | |
| 207 | ex. vim ftp://hostname/path/to/file |
| 208 | < |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 209 | The characters preceding the colon specify the protocol to use; in the |
| 210 | example, its ftp. The <netrw.vim> script then formulates a command or a |
| 211 | series of commands (typically ftp) which it issues to an external program |
| 212 | (ftp, scp, etc) which does the actual file transfer/protocol. Files are read |
| 213 | from/written to a temporary file (under Unix/Linux, /tmp/...) which the |
| 214 | <netrw.vim> script will clean up. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 215 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 216 | One may modify any protocol's implementing external application by setting a |
| 217 | variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to |
| 218 | "scp -q"). |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 219 | |
| 220 | Ftp, an old protocol, seems to be blessed by numerous implementations. |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 221 | Unfortunately, some implementations are noisy (ie., add junk to the end of the |
| 222 | file). Thus, concerned users may decide to write a NetReadFixup() function |
| 223 | that will clean up after reading with their ftp. Some Unix systems (ie., |
| 224 | FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is |
| 225 | not noisy and more convenient, actually, for <netrw.vim> to use. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 226 | Consequently, if "fetch" is executable, it will be used to do reads for |
| 227 | ftp://... (and http://...) . See |netrw-var| for more about this. |
| 228 | |
| 229 | For rcp, scp, sftp, and http, one may use network-oriented file transfers |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 230 | transparently; ie. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 231 | > |
| 232 | vim rcp://[user@]machine/path |
| 233 | vim scp://[user@]machine/path |
| 234 | < |
| 235 | If your ftp supports <.netrc>, then it too can be just as transparently used |
| 236 | if the needed triad of machine name, user id, and password are present in |
| 237 | that file. Your ftp must be able to use the <.netrc> file on its own, however. |
| 238 | > |
| 239 | vim ftp://[user@]machine[[:#]portnumber]/path |
| 240 | < |
| 241 | However, ftp will often need to query the user for the userid and password. |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 242 | The latter will be done "silently"; ie. asterisks will show up instead of |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 243 | the actually-typed-in password. Netrw will retain the userid and password |
| 244 | for subsequent read/writes from the most recent transfer so subsequent |
| 245 | transfers (read/write) to or from that machine will take place without |
| 246 | additional prompting. |
| 247 | |
| 248 | *netrw-urls* |
| 249 | +=================================+============================+============+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 250 | | Reading | Writing | Uses | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 251 | +=================================+============================+============+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 252 | | DAV: | | | |
| 253 | | dav://host/path | | cadaver | |
| 254 | | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 255 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 256 | | FETCH: | | | |
| 257 | | fetch://[user@]host/path | | | |
| 258 | | fetch://[user@]host:http/path | Not Available | fetch | |
| 259 | | :Nread fetch://[user@]host/path| | | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 260 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 261 | | FILE: | | | |
| 262 | | file:///* | file:///* | | |
| 263 | | file://localhost/* | file://localhost/* | | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 264 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 265 | | FTP: (*3) | (*3) | | |
| 266 | | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | |
| 267 | | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | |
| 268 | | :Nread host path | :Nwrite host path | ftp+.netrc | |
| 269 | | :Nread host uid pass path | :Nwrite host uid pass path | ftp | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 270 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 271 | | HTTP: wget is executable: (*4) | | | |
| 272 | | http://[user@]host/path | Not Available | wget | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 273 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 274 | | HTTP: fetch is executable (*4) | | | |
| 275 | | http://[user@]host/path | Not Available | fetch | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 276 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 277 | | RCP: | | | |
| 278 | | rcp://[user@]host/path | rcp://[user@]host/path | rcp | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 279 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 280 | | RSYNC: | | | |
| 281 | | rsync://[user@]host/path | rsync://[user@]host/path | rsync | |
| 282 | | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | |
| 283 | | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 284 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 285 | | SCP: | | | |
| 286 | | scp://[user@]host/path | scp://[user@]host/path | scp | |
| 287 | | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 288 | +---------------------------------+----------------------------+------------+ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 289 | | SFTP: | | | |
| 290 | | sftp://[user@]host/path | sftp://[user@]host/path | sftp | |
| 291 | | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 292 | +=================================+============================+============+ |
| 293 | |
| 294 | (*1) For an absolute path use scp://machine//path. |
| 295 | |
| 296 | (*2) if <.netrc> is present, it is assumed that it will |
| 297 | work with your ftp client. Otherwise the script will |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 298 | prompt for user-id and pasword. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 299 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 300 | (*3) for ftp, "machine" may be machine#port or machine:port |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 301 | if a different port is needed than the standard ftp port |
| 302 | |
| 303 | (*4) for http:..., if wget is available it will be used. Otherwise, |
| 304 | if fetch is available it will be used. |
| 305 | |
| 306 | Both the :Nread and the :Nwrite ex-commands can accept multiple filenames. |
| 307 | |
| 308 | |
| 309 | NETRC *netrw-netrc* |
| 310 | |
| 311 | The typical syntax for lines in a <.netrc> file is given as shown below. |
| 312 | Ftp under Unix usually support <.netrc>; Windows' ftp usually doesn't. |
| 313 | > |
| 314 | machine {full machine name} login {user-id} password "{password}" |
| 315 | default login {user-id} password "{password}" |
| 316 | |
| 317 | Your ftp client must handle the use of <.netrc> on its own, but if the |
| 318 | <.netrc> file exists, an ftp transfer will not ask for the user-id or |
| 319 | password. |
| 320 | |
| 321 | Note: |
| 322 | Since this file contains passwords, make very sure nobody else can |
| 323 | read this file! Most programs will refuse to use a .netrc that is |
| 324 | readable for others. Don't forget that the system administrator can |
| 325 | still read the file! |
| 326 | |
| 327 | |
| 328 | PASSWORD *netrw-passwd* |
| 329 | |
| 330 | The script attempts to get passwords for ftp invisibly using |inputsecret()|, |
| 331 | a built-in Vim function. See |netrw-uidpass| for how to change the password |
| 332 | after one has set it. |
| 333 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 334 | Unfortunately there doesn't appear to be a way for netrw to feed a password to |
| 335 | scp. Thus every transfer via scp will require re-entry of the password. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 336 | |
| 337 | |
| 338 | ============================================================================== |
| 339 | 3. Activation *netrw-activate* |
| 340 | |
| 341 | Network-oriented file transfers are available by default whenever |
| 342 | |'nocompatible'| mode is enabled. The <netrw.vim> file resides in your |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 343 | system's vim-plugin directory and is sourced automatically whenever you bring |
| 344 | up vim. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 345 | |
| 346 | |
| 347 | ============================================================================== |
| 348 | 4. Transparent File Transfer *netrw-transparent* |
| 349 | |
| 350 | Transparent file transfers occur whenever a regular file read or write |
| 351 | (invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made. |
| 352 | Thus one may use files across networks as if they were local. > |
| 353 | |
| 354 | vim ftp://[user@]machine/path |
| 355 | ... |
| 356 | :wq |
| 357 | |
| 358 | |
| 359 | ============================================================================== |
| 360 | 5. Ex Commands *netrw-ex* |
| 361 | |
| 362 | The usual read/write commands are supported. There are also a couple of |
| 363 | additional commands available. |
| 364 | |
| 365 | :[range]Nw Write the specified lines to the current |
| 366 | file as specified in b:netrw_lastfile. |
| 367 | |
| 368 | :[range]Nw {netfile} [{netfile}]... |
| 369 | Write the specified lines to the {netfile}. |
| 370 | |
| 371 | :Nread |
| 372 | Read the specified lines into the current |
| 373 | buffer from the file specified in |
| 374 | b:netrw_lastfile. |
| 375 | |
| 376 | :Nread {netfile} {netfile}... |
| 377 | Read the {netfile} after the current line. |
| 378 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 379 | *netrw-uidpass* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 380 | :call NetUserPass() |
| 381 | If b:netrw_uid and b:netrw_passwd don't exist, |
| 382 | this function query the user for them. |
| 383 | |
| 384 | :call NetUserPass("userid") |
| 385 | This call will set the b:netrw_uid and, if |
| 386 | the password doesn't exist, will query the user for it. |
| 387 | |
| 388 | :call NetUserPass("userid","passwd") |
| 389 | This call will set both the b:netrw_uid and b:netrw_passwd. |
| 390 | The user-id and password are used by ftp transfers. One may |
| 391 | effectively remove the user-id and password by using "" |
| 392 | strings. |
| 393 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 394 | :NetrwSettings This command is desribed in |netrw-settings| -- used to |
| 395 | display netrw settings and change netrw behavior |
| 396 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 397 | |
| 398 | ============================================================================== |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 399 | 6. Variables and Options *netrw-options* *netrw-var* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 400 | |
| 401 | The script <netrw.vim> uses several variables which can affect <netrw.vim>'s |
| 402 | behavior. These variables typically may be set in the user's <.vimrc> file: |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 403 | > |
| 404 | ------------- |
| 405 | Netrw Options |
| 406 | ------------- |
| 407 | Option Meaning |
| 408 | -------------- ----------------------------------------------- |
| 409 | < |
| 410 | b:netrw_col Holds current cursor position (during NetWrite) |
| 411 | g:netrw_cygwin =1 assume scp under windows is from cygwin |
| 412 | (default/windows) |
| 413 | =0 assume scp under windows accepts windows |
| 414 | style paths (default/else) |
| 415 | g:netrw_ftp =0 use default ftp (uid password) |
| 416 | g:netrw_ftpmode ="binary" (default) |
| 417 | ="ascii" (your choice) |
| 418 | g:netrw_ignorenetrc =1 (default) |
| 419 | if you have a <.netrc> file but you don't |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 420 | want it used, then set this variable. Its |
| 421 | mere existence is enough to cause <.netrc> |
| 422 | to be ignored. |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 423 | b:netrw_lastfile Holds latest method/machine/path. |
| 424 | b:netrw_line Holds current line number (during NetWrite) |
| 425 | g:netrw_passwd Holds current password for ftp. |
| 426 | g:netrw_silent =0 transfers done normally |
| 427 | =1 transfers done silently |
| 428 | g:netrw_uid Holds current user-id for ftp. |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 429 | =1 use alternate ftp (user uid password) |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 430 | (see |netrw-options|) |
| 431 | g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) |
| 432 | =1 use WinNT/2K/XP's rcp, binary mode |
| 433 | g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc |
| 434 | =1 use default method to do ftp > |
| 435 | ----------------------------------------------------------------------- |
| 436 | < |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 437 | The script will also make use of the following variables internally, albeit |
| 438 | temporarily. |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 439 | > |
| 440 | ------------------- |
| 441 | Temporary Variables |
| 442 | ------------------- |
| 443 | Variable Meaning |
| 444 | -------- ------------------------------------ |
| 445 | < |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 446 | g:netrw_method Index indicating rcp/ftp+.netrc/ftp |
| 447 | g:netrw_machine Holds machine name parsed from input |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 448 | g:netrw_fname Holds filename being accessed > |
| 449 | ------------------------------------------------------------ |
| 450 | < |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 451 | *netrw-protocol* |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 452 | |
| 453 | Netrw supports a number of protocols. These protocols are invoked using the |
| 454 | variables listed below, and may be modified by the user. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 455 | > |
| 456 | ------------------------ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 457 | Protocol Control Options |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 458 | ------------------------ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 459 | Option Type Setting Meaning |
| 460 | --------- -------- -------------- --------------------------- |
| 461 | < |
| 462 | netrw_ftp variable =doesn't exist userid set by "user userid" |
| 463 | =0 userid set by "user userid" |
| 464 | =1 userid set by "userid" |
| 465 | NetReadFixup function =doesn't exist no change |
| 466 | =exists Allows user to have files |
| 467 | read via ftp automatically |
| 468 | transformed however they wish |
| 469 | by NetReadFixup() |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 470 | g:netrw_dav_cmd variable ="cadaver" |
| 471 | g:netrw_fetch_cmd variable ="fetch -o" |
| 472 | g:netrw_ftp_cmd variable ="ftp" |
| 473 | g:netrw_http_cmd variable ="fetch -o" else if fetch is executable |
| 474 | g:netrw_http_cmd variable ="wget -O" if wget is executable |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 475 | g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 476 | g:netrw_rcp_cmd variable ="rcp" |
| 477 | g:netrw_rsync_cmd variable ="rsync -a" |
| 478 | g:netrw_scp_cmd variable ="scp -q" |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 479 | g:netrw_sftp_cmd variable ="sftp" > |
| 480 | ------------------------------------------------------------------------- |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 481 | < |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 482 | *netrw-ftp* |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 483 | The first two options both help with certain ftp's that give trouble |
| 484 | otherwise. In order to best understand how to use these options if ftp is |
| 485 | giving you troubles, a bit of discussion follows on how netrw does ftp reads. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 486 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 487 | The g:netrw_..._cmd variables specify the external program to use handle the |
| 488 | associated protocol (rcp, ftp, etc), plus any options. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 489 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 490 | The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with |
| 491 | whatever the current request is for a hostname. |
| 492 | |
| 493 | For ftp, netrw typically builds up lines of one of the following formats in a |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 494 | temporary file: |
| 495 | > |
| 496 | IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 |
| 497 | ---------------------------------- ------------------------------ |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 498 | < |
| 499 | open machine [port] open machine [port] |
| 500 | user userid password userid password |
| 501 | [g:netrw_ftpmode] password |
| 502 | get filename tempfile [g:netrw_ftpmode] |
| 503 | get filename tempfile > |
| 504 | --------------------------------------------------------------------- |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 505 | < |
| 506 | Netrw then executes the lines above by use of a filter: |
| 507 | > |
| 508 | :%! {g:netrw_ftp_cmd} -i [-n] |
| 509 | < |
| 510 | |
| 511 | where |
| 512 | g:netrw_ftp_cmd is usually "ftp", |
| 513 | -i tells ftp not to be interactive |
| 514 | -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>) |
| 515 | |
| 516 | If <.netrc> exists it will be used to avoid having to query the user for |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 517 | userid and password. The transferred file is put into a temporary file. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 518 | The temporary file is then read into the main editing session window that |
| 519 | requested it and the temporary file deleted. |
| 520 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 521 | If your ftp doesn't accept the "user" command and immediately just demands a |
| 522 | userid, then try putting "let netrw_ftp=1" in your <.vimrc>. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 523 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 524 | *netrw-cadaver* |
| 525 | To handle the SSL certificate dialog for untrusted servers, one may pull |
| 526 | down the certificate and place it into /usr/ssl/cert.pem. This operation |
| 527 | renders the server treatment as "trusted". |
| 528 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 529 | *netrw-fixup* *netreadfixup* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 530 | If your ftp for whatever reason generates unwanted lines (such as AUTH |
| 531 | messages) you may write a NetReadFixup(tmpfile) function: |
| 532 | > |
| 533 | function! NetReadFixup(method,line1,line2) |
| 534 | " a:line1: first new line in current file |
| 535 | " a:line2: last new line in current file |
| 536 | if a:method == 1 "rcp |
| 537 | elseif a:method == 2 "ftp + <.netrc> |
| 538 | elseif a:method == 3 "ftp + machine,uid,password,filename |
| 539 | elseif a:method == 4 "scp |
| 540 | elseif a:method == 5 "http/wget |
| 541 | elseif a:method == 6 "dav/cadaver |
| 542 | elseif a:method == 7 "rsync |
| 543 | elseif a:method == 8 "fetch |
| 544 | elseif a:method == 9 "sftp |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 545 | else " complain |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 546 | endif |
| 547 | endfunction |
| 548 | > |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 549 | The NetReadFixup() function will be called if it exists and thus allows you to |
| 550 | customize your reading process. As a further example, <netrw.vim> contains |
| 551 | just such a function to handle Windows 95 ftp. For whatever reason, Windows |
| 552 | 95's ftp dumps four blank lines at the end of a transfer, and so it is |
| 553 | desirable to automate their removal. Here's some code taken from <netrw.vim> |
| 554 | itself: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 555 | > |
| 556 | if has("win95") && g:netrw_win95ftp |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 557 | fun! NetReadFixup(method, line1, line2) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 558 | if method == 3 " ftp (no <.netrc>) |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 559 | let fourblanklines= line2 - 3 |
| 560 | silent fourblanklines.",".line2."g/^\s*/d" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 561 | endif |
| 562 | endfunction |
| 563 | endif |
| 564 | > |
| 565 | |
| 566 | ============================================================================== |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 567 | 7. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help* |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 568 | |
| 569 | MAPS *netrw-maps* |
| 570 | ?................Help.......................................|netrw-help| |
| 571 | <cr>.............Browsing...................................|netrw-cr| |
| 572 | <del>............Deleting Files or Directories..............|netrw-delete| |
| 573 | -................Going Up...................................|netrw--| |
| 574 | a................Hiding Files or Directories................|netrw-a| |
| 575 | b................Bookmarking a Directory....................|netrw-b| |
| 576 | B................Changing to a Bookmarked Directory.........|netrw-B| |
| 577 | c................Make Browsing Directory The Current Dir....|netrw-c| |
| 578 | d................Make A New Directory.......................|netrw-d| |
| 579 | D................Deleting Files or Directories..............|netrw-D| |
| 580 | <c-h>............Edit File/Directory Hiding List............|netrw-h| |
| 581 | i................Long Listing...............................|netrw-i| |
| 582 | <c-l>............Refreshing the Listing.....................|netrw-ctrl-l| |
| 583 | o................Browsing with a Horizontal Split...........|netrw-o| |
| 584 | p................Preview Window.............................|netrw-p| |
| 585 | q................Listing Bookmarks and History..............|netrw-q| |
| 586 | r................Reversing Sorting Order....................|netrw-r| |
| 587 | R................Renaming Files or Directories..............|netrw-R| |
| 588 | s................Selecting Sorting Style....................|netrw-s| |
| 589 | S................Editing the Sorting Sequence...............|netrw-S| |
| 590 | u................Changing to a Predecessor Directory........|netrw-u| |
| 591 | U................Changing to a Successor Directory..........|netrw-U| |
| 592 | v................Browsing with a Vertical Split.............|netrw-v| |
| 593 | x................Customizing Browsing.......................|netrw-x| |
| 594 | |
| 595 | COMMANDS *netrw-explore-cmds* |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 596 | :Explore[!] [dir] Explore directory of current file........|netrw-explore| |
| 597 | :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore| |
| 598 | :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore| |
| 599 | :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| |
| 600 | :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| |
| 601 | :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 602 | :NetrwSettings.............................................|netrw-settings| |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 603 | |
| 604 | QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 605 | > |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 606 | ------- ----------- |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 607 | Command Explanation |
| 608 | ------- ----------- |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 609 | < ? Causes Netrw to issue help |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 610 | <cr> Netrw will enter the directory or read the file |
| 611 | <del> Netrw will attempt to remove the file/directory |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 612 | d Make a directory |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 613 | D Netrw will attempt to remove the file(s)/directory(ies) |
| 614 | R Netrw will attempt to rename the file(s)/directory(ies) |
| 615 | - Makes Netrw go up one directory |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 616 | a Toggles between normal display, |
| 617 | hiding (suppress display of files matching g:netrw_list_hide) |
| 618 | showing (display only files which match g:netrw_list_hide) |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 619 | c Make current browsing directory the current directory |
| 620 | <c-h> Edit file hiding list |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 621 | i Toggles between long and short listing |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 622 | <c-l> Causes Netrw to refresh the directory listing |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 623 | o Enter the file/directory under the cursor in a new browser |
| 624 | window. A horizontal split is used. |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 625 | p Preview the file |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 626 | r Reverse sorting order |
| 627 | s Select sorting style: by name, time, or file size |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 628 | v Enter the file/directory under the cursor in a new browser |
| 629 | window. A vertical split is used. |
| 630 | x Apply a function to a file. |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 631 | |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 632 | NETRW BROWSER VARIABLES *netrw-browse-var* |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 633 | > |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 634 | --- ----------- |
| 635 | Var Explanation |
| 636 | --- ----------- |
| 637 | < *g:netrw_alto* change from above splitting to below splitting |
| 638 | by setting this variable (see |netrw-o|) |
| 639 | default: =0 |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 640 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 641 | *g:netrw_altv* change from left splitting to right splitting |
| 642 | by setting this variable (see |netrw-v|) |
| 643 | default: =0 |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 644 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 645 | *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings |
| 646 | that can show up as "directories" and "files" |
| 647 | in the listing. This pattern is used to |
| 648 | remove such embedded messages. By default its |
| 649 | value is: |
| 650 | '^total\s\+\d\+$\| |
| 651 | ^Trying\s\+\d\+.*$\| |
| 652 | ^KERBEROS_V\d rejected\| |
| 653 | ^Security extensions not\| |
| 654 | No such file\| |
| 655 | : connect to address [0-9a-fA-F:]* |
| 656 | : No route to host$' |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 657 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 658 | *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines, |
| 659 | messages, banners, and whatnot that one doesn't |
| 660 | want masquerading as "directories" and "files". |
| 661 | Use this pattern to remove such embedded |
| 662 | messages. By default its value is: |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 663 | '^total\s\+\d\+$' |
| 664 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 665 | *g:netrw_keepdir* =1 (default) keep current directory immune from |
| 666 | the browsing directory. |
| 667 | =0 keep the current directory the same as the |
| 668 | browsing directory. |
| 669 | The current browsing directory is contained in |
| 670 | b:netrw_curdir |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 671 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 672 | *g:netrw_list_cmd* command for listing remote directories |
| 673 | default: (if ssh is executable) |
| 674 | "ssh HOSTNAME ls -FLa" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 675 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 676 | *g:netrw_longlist* if =1, then long listing will be default |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 677 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 678 | *g:netrw_ftp_list_cmd* options for passing along to ftp for directory |
| 679 | listing. Defaults: |
| 680 | unix or g:netrw_cygwin set: : "ls -lF" |
| 681 | otherwise "dir" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 682 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 683 | *g:netrw_list_hide* comma separated pattern list for hiding files |
| 684 | default: "" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 685 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 686 | *g:netrw_local_mkdir* command for making a local directory |
| 687 | default: "ssh HOSTNAME mkdir" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 688 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 689 | *g:netrw_local_rmdir* remove directory command (rmdir) |
| 690 | default: "rmdir" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 691 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 692 | *g:netrw_maxfilenamelen* =32 by default, selected so as to make long |
| 693 | listings fit on 80 column displays. |
| 694 | If your screen is wider, and you have file |
| 695 | or directory names longer than 32 bytes, |
| 696 | you may set this option to keep listings |
| 697 | columnar. |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 698 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 699 | *g:netrw_mkdir_cmd* command for making a remote directory |
| 700 | default: "ssh HOSTNAME mkdir" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 701 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 702 | *g:netrw_rm_cmd* command for removing files |
| 703 | default: "ssh HOSTNAME rm" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 704 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 705 | *g:netrw_rmdir_cmd* command for removing directories |
| 706 | default: "ssh HOSTNAME rmdir" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 707 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 708 | *g:netrw_rmf_cmd* command for removing softlinks |
| 709 | default: "ssh HOSTNAME rm -f" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 710 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 711 | *g:netrw_hide* if true, the hiding list is used |
| 712 | default: =0 |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 713 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 714 | *g:netrw_sort_by* sort by "name", "time", or "size" |
| 715 | default: "name" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 716 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 717 | *g:netrw_sort_direction* sorting direction: "normal" or "reverse" |
| 718 | default: "normal" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 719 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 720 | *g:netrw_sort_sequence* when sorting by name, first sort by the |
| 721 | comma-separated pattern sequence |
| 722 | default: '[\/]$,*,\.bak$,\.o$,\.h$, |
| 723 | \.info$,\.swp$,\.obj$' |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 724 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 725 | *g:netrw_timefmt* specify format string to strftime() (%c) |
| 726 | default: "%c" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 727 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 728 | *g:netrw_winsize* specify initial size of new o/v windows |
| 729 | default: "" |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 730 | |
| 731 | INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 732 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 733 | Netrw supports the browsing of directories on the local system and on remote |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 734 | hosts, including listing files and directories, entering directories, editing |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 735 | files therein, deleting files/directories, making new directories, and moving |
| 736 | (renaming) files and directories. The Netrw browser generally implements the |
| 737 | previous explorer maps and commands for remote directories, although details |
| 738 | (such as pertinent global variable names) necessarily differ. |
| 739 | |
| 740 | The Netrw remote file and directory browser handles two protocols: ssh and |
| 741 | ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp |
| 742 | in its remote browsing. Any other protocol will be used for file transfers, |
| 743 | but otherwise the ssh protocol will be used to do remote directory browsing. |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 744 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 745 | To use Netrw's remote directory browser, simply attempt to read a "file" with a |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 746 | trailing slash and it will be interpreted as a request to list a directory: |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 747 | |
| 748 | vim [protocol]://[user@]hostname/path/ |
| 749 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 750 | For local directories, the trailing slash is not required. |
| 751 | |
| 752 | If you'd like to avoid entering the password in for remote directory listings |
| 753 | with ssh or scp, see |netrw-listhack|. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 754 | |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 755 | *netrw-explore* *netrw-pexplore* |
| 756 | *netrw-hexplore* *netrw-sexplore* |
| 757 | DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore* |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 758 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 759 | :Explore[!] [dir]... Explore directory of current file *:Explore* |
| 760 | :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore* |
| 761 | :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* |
| 762 | :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 763 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 764 | Used with :Explore **/pattern : |
| 765 | :Nexplore............. go to next matching file *:Nexplore* |
| 766 | :Pexplore............. go to previous matching file *:Pexplore* |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 767 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 768 | :Explore will open the local-directory browser on the current file's |
| 769 | directory (or on directory [dir] if specified). The window will be |
| 770 | split only if the file has been modified, otherwise the browsing |
| 771 | window will take over that window. Normally the splitting is taken |
| 772 | horizontally. |
| 773 | :Explore! is like :Explore, but will use vertical splitting. |
| 774 | :Sexplore will always split the window before invoking the local-directory |
| 775 | browser. As with Explore, the splitting is normally done |
| 776 | horizontally. |
| 777 | :Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. |
| 778 | :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. |
| 779 | :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. |
| 780 | :Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. |
| 781 | :Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 782 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 783 | By default, these commands use the current file's directory. However, one |
| 784 | may explicitly provide a directory (path) to use. |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 785 | |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 786 | (Following needs v7.0 or later) *netrw-starstar* |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 787 | When Explore, Sexplore, Hexplore, or Vexplore are used with a **, |
| 788 | such as: |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 789 | > |
| 790 | :Explore **/filename_pattern |
| 791 | < |
| 792 | netrw will attempt to find a (sub)directory which matches the filename |
| 793 | pattern. Internally, it produces a list of files which match the pattern |
| 794 | and their paths; to that extent it resembles the Unix operation: |
| 795 | > |
| 796 | find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null |
| 797 | < |
| 798 | The directory display is updated to show the subdirectory containing a |
| 799 | matching file. One may then proceed to the next (or previous) matching files' |
| 800 | directories by using Nexplore or Pexplore, respectively. If your console or |
| 801 | gui produces recognizable shift-up or shift-down sequences, then you'll likely |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 802 | find using shift-downarrow and shift-uparrow convenient. They're mapped by |
| 803 | netrw: |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 804 | |
| 805 | <s-down> == Nexplore, and |
| 806 | <s-up> == Pexplore. |
| 807 | |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 808 | As an example, consider |
| 809 | > |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 810 | :Explore **/*.c |
| 811 | :Nexplore |
| 812 | :Nexplore |
| 813 | :Pexplore |
| 814 | < |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 815 | The status line will show, on the right hand side of the status line, a |
| 816 | message like "Match 3 of 20". |
| 817 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 818 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 819 | REFRESHING THE LISTING *netrw-ctrl-l* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 820 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 821 | To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or |
| 822 | hit the <cr> when atop the ./ directory entry in the listing. One may also |
| 823 | refresh a local directory by using ":e .". |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 824 | |
| 825 | |
| 826 | GOING UP *netrw--* |
| 827 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 828 | To go up a directory, press - or press the <cr> when atop the ../ directory |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 829 | entry in the listing. |
| 830 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 831 | Netrw will use the command in |g:netrw_list_cmd| to perform the directory |
| 832 | listing operation after changing HOSTNAME to the host specified by the |
| 833 | user-provided url. By default netrw provides the command as: |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 834 | |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 835 | ssh HOSTNAME ls -FLa |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 836 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 837 | where the HOSTNAME becomes the [user@]hostname as requested by the attempt to |
| 838 | read. Naturally, the user may override this command with whatever is |
| 839 | preferred. The NetList function which implements remote directory browsing |
| 840 | expects that directories will be flagged by a trailing slash. |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 841 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 842 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 843 | BROWSING *netrw-cr* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 844 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 845 | Browsing is simple: move the cursor onto a file or directory of interest. |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 846 | Hitting the <cr> (the return key) will select the file or directory. |
| 847 | Directories will themselves be listed, and files will be opened using the |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 848 | protocol given in the original read request. |
| 849 | |
| 850 | CAVEAT: There are three forms of listing (see |netrw-i|). Netrw assumes |
| 851 | that two or more spaces delimit filenames and directory names for the long |
| 852 | and wide listing formats. Thus, if your filename or directory name has two |
| 853 | or more spaces embedded in it, or any trailing spaces, then you'll need to |
| 854 | use the "thin" format to select it. |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 855 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 856 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 857 | OBTAINING A FILE *netrw-O* |
| 858 | |
| 859 | When browsing a remote directory, one may obtain a file under the cursor (ie. |
| 860 | get a copy on your local machine, but not edit it) by pressing the O key. |
| 861 | Only ftp and scp are supported for this operation (but since these two are |
| 862 | available for browsing, that shouldn't be a problem). |
| 863 | |
| 864 | |
| 865 | THIN, LONG, AND WIDE LISTINGS *netrw-i* |
| 866 | |
| 867 | The "i" map cycles between the thin, long, and wide listing formats. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 868 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 869 | The short listing format gives just the files' and directories' names. |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 870 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 871 | The long listing is either based on the "ls" command via ssh for remote |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 872 | directories or displays the filename, file size (in bytes), and the time and |
| 873 | date of last modification for local directories. With the long listing |
| 874 | format, netrw is not able to recognize filenames which have trailing spaces. |
| 875 | Use the thin listing format for such files. |
| 876 | |
| 877 | The wide listing format has a multi-column display of the various files in the |
| 878 | netrw current directory, rather like the Unix "ls" presents. In this mode the |
| 879 | "b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB |
| 880 | (|netrw-NB|). The wide listing format uses two or more contiguous spaces to |
| 881 | delineate filenames; when using that format, netrw won't be able to recognize |
| 882 | or use filenames which have two or more contiguous spaces embedded in the name |
| 883 | or any trailing spaces. The thin listing format will, however, work with such |
| 884 | files. |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 885 | |
| 886 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 887 | MAKING A NEW DIRECTORY *netrw-d* |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 888 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 889 | With the "d" map one may make a new directory either remotely (which depends |
| 890 | on the global variable g:netrw_mkdir_cmd) or locally (which depends on the |
| 891 | global variable g:netrw_local_mkdir). Netrw will issue a request for the new |
| 892 | directory's name. A bare <CR> at that point will abort the making of the |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 893 | directory. Attempts to make a local directory that already exists (as either |
| 894 | a file or a directory) will be detected, reported on, and ignored. |
| 895 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 896 | |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 897 | DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 898 | |
| 899 | Deleting/removing files and directories involves moving the cursor to the |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 900 | file/directory to be deleted and pressing "D". Directories must be empty |
| 901 | first before they can be successfully removed. If the directory is a softlink |
| 902 | to a directory, then netrw will make two requests to remove the directory |
| 903 | before succeeding. Netrw will ask for confirmation before doing the |
| 904 | removal(s). You may select a range of lines with the "V" command (visual |
| 905 | selection), and then pressing "D". |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 906 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 907 | The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used |
| 908 | to control the attempts to remove files and directories. The g:netrw_rm_cmd |
| 909 | is used with files, and its default value is: |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 910 | |
| 911 | g:netrw_rm_cmd: ssh HOSTNAME rm |
| 912 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 913 | The g:netrw_rmdir_cmd variable is used to support the removal of directories. |
| 914 | Its default value is: |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 915 | |
| 916 | g:netrw_rmdir_cmd: ssh HOSTNAME rmdir |
| 917 | |
| 918 | If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 919 | to remove it again using the g:netrw_rmf_cmd variable. Its default value is: |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 920 | |
| 921 | g:netrw_rmf_cmd: ssh HOSTNAME rm -f |
| 922 | |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 923 | |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 924 | RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 925 | |
| 926 | Renaming/moving files and directories involves moving the cursor to the |
| 927 | file/directory to be moved (renamed) and pressing "R". You will then be |
| 928 | queried for where you want the file/directory to be moved. You may select a |
| 929 | range of lines with the "V" command (visual selection), and then pressing "R". |
| 930 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 931 | The g:netrw_rename_cmd variable is used to implement renaming. By default its |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 932 | value is: |
| 933 | |
| 934 | ssh HOSTNAME mv |
| 935 | |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 936 | One may rename a block of files and directories by selecting them with |
| 937 | the V (|linewise-visual|). |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 938 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 939 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 940 | HIDING FILES OR DIRECTORIES *netrw-a* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 941 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 942 | Netrw's browsing facility allows one to use the hiding list in one of three |
| 943 | ways: ignore it, hide files which match, and show only those files which |
| 944 | match. The "a" map allows the user to cycle about these three ways. |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 945 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 946 | The g:netrw_list_hide variable holds a comma delimited list of patterns (ex. |
| 947 | \.obj) which specify the hiding list. (also see |netrw-h|) To set the hiding |
| 948 | list, use the <c-h> map. As an example, to hide files which begin with a ".", |
| 949 | one may use the <c-h> map to set the hiding list to '^\..*' (or one may put |
| 950 | let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the "a" |
| 951 | key to show all files, hide matching files, or to show only the matching |
| 952 | files. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 953 | |
| 954 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 955 | EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 956 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 957 | The "<ctrl-h>" map brings up a requestor allowing the user to change the |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 958 | file/directory hiding list. The hiding list consists of one or more patterns |
| 959 | delimited by commas. Files and/or directories satisfying these patterns will |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 960 | either be hidden (ie. not shown) or be the only ones displayed (see |
| 961 | |netrw-a|). |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 962 | |
| 963 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 964 | BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 965 | |
Bram Moolenaar | 269ec65 | 2004-07-29 08:43:53 +0000 | [diff] [blame] | 966 | Normally one enters a file or directory using the <cr>. However, the "o" map |
| 967 | allows one to open a new window to hold the new directory listing or file. A |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 968 | horizontal split is used. (for vertical splitting, see |netrw-v|) |
| 969 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 970 | Normally, the o key splits the window horizontally with the new window and |
| 971 | cursor at the top. To change to splitting the window horizontally with the |
| 972 | new window and cursor at the bottom, have |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 973 | |
| 974 | let g:netrw_alto = 1 |
| 975 | |
| 976 | in your <.vimrc>. |
| 977 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 978 | |
| 979 | PREVIEW WINDOW *netrw-p* *netrw-preview* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 980 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 981 | One may use a preview window (currently only for local browsing) by using the |
| 982 | "p" key when the cursor is atop the desired filename to be previewed. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 983 | |
| 984 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 985 | SELECTING SORTING STYLE *netrw-s* *netrw-sort* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 986 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 987 | One may select the sorting style by name, time, or (file) size. The "s" map |
| 988 | allows one to circulate amongst the three choices; the directory listing will |
| 989 | automatically be refreshed to reflect the selected style. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 990 | |
| 991 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 992 | EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 993 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 994 | When "Sorted by" is name, one may specify priority via the sorting sequence |
| 995 | (g:netrw_sort_sequence). The sorting sequence typically prioritizes the |
| 996 | name-listing by suffix, although any pattern will do. Patterns are delimited |
| 997 | by commas. The default sorting sequence is: |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 998 | > |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 999 | [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$ |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1000 | < |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1001 | The lone * is where all filenames not covered by one of the other patterns |
| 1002 | will end up. One may change the sorting sequence by modifying the |
| 1003 | g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by |
| 1004 | using the "S" map. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1005 | |
| 1006 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1007 | REVERSING SORTING ORDER *netrw-r* *netrw-reverse* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1008 | |
| 1009 | One may toggle between normal and reverse sorting order by pressing the |
| 1010 | "r" key. |
| 1011 | |
| 1012 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1013 | CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1014 | |
| 1015 | Every time you change to a new directory (new for the current session), |
| 1016 | netrw will save the directory in a recently-visited directory history |
| 1017 | list (unless g:netrw_dirhistmax is zero; by default, its ten). With the |
| 1018 | "u" map, one can change to an earlier directory (predecessor). To do |
| 1019 | the opposite, see |netrw-U|. |
| 1020 | |
| 1021 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1022 | CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1023 | |
| 1024 | With the "U" map, one can change to a later directory (successor). |
| 1025 | This map is the opposite of the "u" map. (see |netrw-u|) Use the |
| 1026 | q map to list both the bookmarks and history. (see |netrw-q|) |
| 1027 | |
| 1028 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1029 | BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* |
| 1030 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1031 | Normally one enters a file or directory using the <cr>. However, the "v" map |
| 1032 | allows one to open a new window to hold the new directory listing or file. A |
| 1033 | vertical split is used. (for horizontal splitting, see |netrw-o|) |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1034 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1035 | Normally, the v key splits the window vertically with the new window and |
| 1036 | cursor at the left. To change to splitting the window vertically with the new |
| 1037 | window and cursor at the right, have |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1038 | |
| 1039 | let g:netrw_altv = 1 |
| 1040 | |
| 1041 | in your <.vimrc>. |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1042 | |
| 1043 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1044 | CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1045 | |
| 1046 | One may "enter" a file with a special handler, thereby firing up a browser or |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1047 | other application, for example, on a file by hitting the "x" key. The special |
| 1048 | handler varies: |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1049 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1050 | * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. |
| 1051 | * for KDE (with kfmclient): kfmclient is used. |
| 1052 | * for Gnome (with gnome-open): gnome-open is used. |
| 1053 | * otherwise the NetrwFileHandler plugin is used. |
| 1054 | |
| 1055 | The file's suffix is used by these various approaches to determine an |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1056 | appropriate application to use to "handle" these files. Such things as |
| 1057 | OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, |
| 1058 | *.eps) can be handled. |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1059 | |
| 1060 | The NetrwFileHandler applies a user-defined function to a file, based on its |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1061 | extension. Of course, the handler function must exist for it to be called! |
| 1062 | > |
| 1063 | Ex. mypgm.html x -> |
| 1064 | NetrwFileHandler_html("scp://user@host/some/path/mypgm.html") |
| 1065 | < |
| 1066 | See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html |
| 1067 | file with mozilla. |
| 1068 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1069 | One may write custom NetrwFileHandlers; please look at the |
| 1070 | plugin/NetrwFileHandlers.vim script for examples. If its likely to be |
| 1071 | generally useful, please feel free to forward a copy to me for future |
| 1072 | inclusion in the distribution. |
| 1073 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1074 | |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1075 | MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir* |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1076 | |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1077 | By default, g:netrw_keepdir is 1. This setting means that the current |
| 1078 | directory will not track the browsing directory. However, setting |
| 1079 | g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the |
| 1080 | currently browsed directory be the current directory. |
| 1081 | |
| 1082 | With the default setting for g:netrw_keepdir, in order to make the two |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1083 | directories the same, use the "c" map (just type c). That map will set the |
| 1084 | current directory to the current browsing directory. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1085 | |
| 1086 | |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1087 | BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks* |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1088 | *netrw-Nb* |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 1089 | One may easily "bookmark" a directory by using > |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1090 | |
| 1091 | {cnt}b |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 1092 | < |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1093 | Any count may be used. One may use viminfo's "!" option to retain bookmarks |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1094 | between vim sessions. See |netrw-B| for how to return to a bookmark and |
| 1095 | |netrw-q| for how to list them. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1096 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1097 | When wide listing is in use (see |netrw-i|), then the b map is not available; |
| 1098 | instead, use {cnt}Nb. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1099 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1100 | |
| 1101 | CHANGING TO A BOOKMARKED DIRECTORY *netrw-NB* *netrw-B* |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1102 | |
| 1103 | To change directory back to a bookmarked directory, use |
| 1104 | |
| 1105 | {cnt}B |
| 1106 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1107 | Any count may be used to reference any of the bookmarks. See |netrw-b| on |
| 1108 | how to bookmark a directory and |netrw-q| on how to list bookmarks. |
| 1109 | |
| 1110 | When wide listing is in use (see |netrw-i|), then the B map is not available; |
| 1111 | instead, use {cnt}NB. |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1112 | |
| 1113 | |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1114 | LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark* |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1115 | |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1116 | Pressing "q" will list the bookmarked directories and directory traversal |
| 1117 | history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|) |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1118 | |
| 1119 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1120 | IMPROVING DIRECTORY BROWSING *netrw-listhack* |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 1121 | |
| 1122 | Especially with the remote directory browser, constantly entering the password |
| 1123 | is tedious. |
| 1124 | |
Bram Moolenaar | 843ee41 | 2004-06-30 16:16:41 +0000 | [diff] [blame] | 1125 | For Linux/Unix systems, I suggest looking into |
| 1126 | |
| 1127 | http://hacks.oreilly.com/pub/h/66 |
| 1128 | |
| 1129 | It gives a tip for setting up password-less use of ssh and scp, and discusses |
| 1130 | the associated security issues. |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1131 | |
| 1132 | |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1133 | NETRW SETTINGS *netrw-settings* |
| 1134 | |
| 1135 | With the NetrwSettings.vim plugin, > |
| 1136 | :NetrwSettings |
| 1137 | will bring up a window with the many variables that netrw uses for its |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1138 | settings. You may change any of their values; when you save the file, the |
| 1139 | settings therein will be used. One may also press "?" on any of the lines for |
| 1140 | help on what each of the variables do. |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1141 | |
| 1142 | |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1143 | ============================================================================== |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1144 | 8. Problems and Fixes *netrw-problems* |
| 1145 | |
| 1146 | (This section is likely to grow as I get feedback) |
| 1147 | (also see |netrw-debug|) |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1148 | *netrw-p1* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1149 | P1. I use windows 95, and my ftp dumps four blank lines at the |
| 1150 | end of every read. |
| 1151 | |
| 1152 | See |netrw-fixup|, and put the following into your |
| 1153 | <.vimrc> file: |
| 1154 | |
| 1155 | let g:netrw_win95ftp= 1 |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 1156 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1157 | *netrw-p2* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1158 | P2. I use windows, and my network browsing with ftp doesn't sort by |
| 1159 | time or size |
| 1160 | |
| 1161 | Windows' ftp has a minimal support for ls (ie. it doesn't |
| 1162 | accept sorting options). It doesn't support the -F which |
| 1163 | gives an explanatory character (ABC/ for "ABC is a directory"). |
| 1164 | Netrw uses dir to get its short and long listings. If you |
| 1165 | think your ftp does support a full-up ls, put the following |
| 1166 | into your <.vimrc>: |
| 1167 | |
| 1168 | let g:netrw_ftp_list_cmd= "ls -lF" |
| 1169 | |
| 1170 | Alternatively, if you have cygwin on your Windows box, put |
| 1171 | into your <.vimrc>: |
| 1172 | |
| 1173 | let g:netrw_cygwin= 1 |
| 1174 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1175 | *netrw-p3* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1176 | P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw |
| 1177 | used ssh! That wasn't what I asked for... |
| 1178 | |
| 1179 | Netrw has two methods for browsing remote directories: ssh |
| 1180 | and ftp. Unless you specify ftp specifically, ssh is used. |
| 1181 | When it comes time to do download a file (not just a directory |
| 1182 | listing), netrw will use the given protocol to do so. |
| 1183 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1184 | *netrw-p4* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1185 | P4. I would like long listings to be the default. |
| 1186 | |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1187 | let g:netrw_longlist=1 |
| 1188 | |
| 1189 | Check out |netrw-browse-var| for more customizations that |
| 1190 | you can set. |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1191 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1192 | *netrw-p5* |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1193 | P5. My times come up oddly in local browsing |
| 1194 | |
| 1195 | Does your system's strftime() accept the "%c" to yield dates |
| 1196 | such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime" |
| 1197 | and find out what option should be used. Then put it into |
| 1198 | your <.vimrc>: |
| 1199 | let g:netrw_timefmt= "%X" (where X is the option) |
| 1200 | |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1201 | *netrw-p6* |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1202 | P6. I want my current directory to track my browsing. |
| 1203 | How do I do that? |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1204 | |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1205 | let g:netrw_keepdir= 0 |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 1206 | |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1207 | |
| 1208 | ============================================================================== |
| 1209 | 9. Debugging *netrw-debug* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1210 | |
| 1211 | The <netrw.vim> script is typically available as: |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1212 | > |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1213 | /usr/local/share/vim/vim6x/plugin/netrw.vim |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1214 | < -or- > |
| 1215 | /usr/local/share/vim/vim7x/plugin/netrw.vim |
| 1216 | < |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1217 | which is loaded automatically at startup (assuming :set nocp). |
| 1218 | |
| 1219 | 1. Get the <Decho.vim> script, available as: |
| 1220 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1221 | http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts |
| 1222 | as "Decho, a vimL debugging aid" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1223 | or |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1224 | http://vim.sourceforge.net/scripts/script.php?script_id=120 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1225 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1226 | and put it into your local plugin directory. |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 1227 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1228 | 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need |
| 1229 | to put it into your .vim/plugin, too. You may obtain it from: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1230 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1231 | http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs |
| 1232 | as "DrC's Utilities" |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1233 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1234 | 3. Edit the <netrw.vim> file by typing: |
| 1235 | |
| 1236 | vim netrw.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1237 | :DechoOn |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1238 | :wq |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1239 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1240 | To restore to normal non-debugging behavior, edit <netrw.vim> |
| 1241 | by typing |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1242 | |
Bram Moolenaar | d4755bb | 2004-09-02 19:12:26 +0000 | [diff] [blame] | 1243 | vim netrw.vim |
| 1244 | :DechoOff |
| 1245 | :wq |
| 1246 | |
| 1247 | This command, provided by <Decho.vim>, will comment out all |
| 1248 | Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). |
| 1249 | |
| 1250 | 4. Then bring up vim and attempt a transfer. A set of messages |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1251 | should appear concerning the steps that <netrw.vim> took in |
| 1252 | attempting to read/write your file over the network. Please |
| 1253 | send that information to <netrw.vim>'s maintainer, |
| 1254 | |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1255 | NdrOchip at ScampbellPfamily.AbizM - NOSPAM |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1256 | |
| 1257 | ============================================================================== |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1258 | 10. History *netrw-history* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1259 | |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1260 | v69: * Bugfix: win95/98 machines were experiencing a |
| 1261 | "E121: Undefined variable: g:netrw_win95ftp" message |
| 1262 | v68: * double-click-leftmouse selects word under mouse |
| 1263 | v67: * Passwords which contain blanks will now be surrounded by |
| 1264 | double-quotes automatically (Yongwei) |
| 1265 | v66: * Netrw now seems to work with a few more Windows situations |
| 1266 | * O now obtains a file: remote browsing file -> local copy, |
| 1267 | locally browsing file -> current directory (see :pwd) |
| 1268 | * i now cycles between thin, long, and wide listing styles |
| 1269 | * NB and Nb are maps that are always available; corresponding |
| 1270 | B and b maps are only available when not using wide listing |
| 1271 | in order to allow them to be used for motions |
| 1272 | v65: * Browser functions now use NetOptionSave/Restore; in particular, |
Bram Moolenaar | 8aff23a | 2005-08-19 20:40:30 +0000 | [diff] [blame] | 1273 | netrw now works around the report setting |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1274 | v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers |
Bram Moolenaar | 8aff23a | 2005-08-19 20:40:30 +0000 | [diff] [blame] | 1275 | named "[Scratch]" instead of "/" |
| 1276 | * Bugfix - remote browsing with ftp was omitting the ./ and ../ |
Bram Moolenaar | 5b8d8fd | 2005-08-16 23:01:50 +0000 | [diff] [blame] | 1277 | v63: * netrw now takes advantage of autoload (and requires 7.0) |
| 1278 | * Bugfix - using r (to reverse sort) working again |
| 1279 | v62: * Bugfix - spaces allowed again in directory names with |
| 1280 | g:netrw_keepdir=0. In fact, I've tested netrw (again) |
| 1281 | with most ANSI punctuation marks for directory names. |
| 1282 | * Bugfix - NetrwSettings gave errors when g:netrw_silent |
| 1283 | had not be set. |
Bram Moolenaar | 90cfdbe | 2005-08-12 19:59:19 +0000 | [diff] [blame] | 1284 | v61: * document upgrade -- netrw variable-based settings all should |
| 1285 | have tags. Supports NetrwSettings command. |
| 1286 | * several important variables are window-oriented. Netrw has |
| 1287 | to transfer these across a window split. See s:BufWinVars() |
| 1288 | and s:UseBufWinVars(). |
Bram Moolenaar | 488c651 | 2005-08-11 20:09:58 +0000 | [diff] [blame] | 1289 | v60: * when using the i map to switch between long and short listings, |
| 1290 | netrw will now keep cursor on same line |
| 1291 | * "Match # of #" now uses status line |
| 1292 | * :Explore **/*.c will now work from a non-netrw-browser window |
| 1293 | * :Explore **/patterns can now be run in separate browser windows |
| 1294 | * active banner (hit <cr> will cause various things to happen) |
Bram Moolenaar | f6cf987 | 2005-08-08 22:00:59 +0000 | [diff] [blame] | 1295 | v59: * bugfix -- another keepalt work-around installed (for vim6.3) |
| 1296 | * "Match # of #" for Explore **/pattern matches |
Bram Moolenaar | 572cb56 | 2005-08-05 21:35:02 +0000 | [diff] [blame] | 1297 | v58: * Explore and relatives can now handle **/somefilepattern (v7) |
| 1298 | * Nexplore and Pexplore introduced (v7). shift-down and shift-up |
| 1299 | cursor keys will invoke Nexplore and Pexplore, respectively. |
| 1300 | * bug fixed with o and v |
| 1301 | * autochdir only worked around for vim when it has been |
| 1302 | compiled with either |+netbeans_intg| or |+sun_workshop| |
| 1303 | * Under Windows, all directories and files were being preceded |
| 1304 | with a "/" when local browsing. Fixed. |
| 1305 | * When: syntax highlighting is off, laststatus=2, and remote |
| 1306 | browsing is used, sometimes the laststatus highlighting |
| 1307 | bleeds into the entire display. Work around - do an extra |
| 1308 | redraw in that case. |
| 1309 | * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers, |
| 1310 | netrw didn't change the directory when it should've |
| 1311 | * Bugfix: D and R commands work again |
Bram Moolenaar | 1d94f9b | 2005-08-04 21:29:45 +0000 | [diff] [blame] | 1312 | v57: * Explore and relatives can now handle RO files |
| 1313 | * reverse sort restored with vim7's sort command |
| 1314 | * g:netrw_keepdir now being used to keep the current directory |
| 1315 | unchanged as intended (sense change) |
| 1316 | * vim 6.3 still supported |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1317 | v56: * LocalBrowse now saves autochdir setting, unsets it, and |
| 1318 | restores it before returning. |
| 1319 | * using vim's rename() instead of system + local_rename variable |
Bram Moolenaar | 1d94f9b | 2005-08-04 21:29:45 +0000 | [diff] [blame] | 1320 | * avoids changing directory when g:netrw_keepdir is false |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1321 | v55: * -bar used with :Explore :Sexplore etc to allow multiple |
| 1322 | commands to be separated by |s |
| 1323 | * browser listings now use the "nowrap" option |
| 1324 | * browser: some unuseful error messages now suppressed |
| 1325 | v54: * For backwards compatibility, Explore and Sexplore have been |
| 1326 | implemented. In addition, Hexplore and Vexplore commands |
| 1327 | are available, too. |
| 1328 | * <amatch> used instead of <afile> in the transparency |
| 1329 | support (BufReadCmd, FileReadCmd, FileWriteCmd) |
| 1330 | * ***netrw*** prepended to various error messages netrw may emit |
| 1331 | * g:netrw_port used instead of b:netrw_port for scp |
| 1332 | * any leading [:#] is removed from port numbers |
| 1333 | v53: * backslashes as well as slashes placed in various patterns |
| 1334 | (ex. g:netrw_sort_sequence) to better support Windows |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1335 | v52: * nonumber'ing now set for browsing buffers |
| 1336 | * when the hiding list hid all files, error messages ensued. Fixed |
| 1337 | * when browsing, swf is set, but directory is not set, when netrw |
| 1338 | was attempting to restore options, vim wanted to save a swapfile |
| 1339 | to a local directory using an url-style path. Fixed |
| 1340 | v51: * cygwin detection now automated (using windows and &shell is bash) |
| 1341 | * customizable browser "file" rejection patterns |
| 1342 | * directory history |
| 1343 | * :[range]w url now supported (ie. netrw has a FileWriteCmd event) |
| 1344 | * error messages have a "Press <cr> to continue" to allow them |
| 1345 | to be seen |
| 1346 | * directory browser displays no longer bother the swapfile |
| 1347 | * u/U commands to go up and down the history stack |
| 1348 | * history stack may be saved with viminfo with its "!" option |
| 1349 | * bugfixes associated with unwanted [No Files] entries |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1350 | v50: * directories now displayed using buftype=nofile; should keep the |
| 1351 | directory names as-is |
| 1352 | * attempts to remove empty "[No File]" buffers leftover |
| 1353 | from :file ..name.. commands |
| 1354 | * bugfix: a "caps-lock" editing difficulty left in v49 was fixed |
| 1355 | * syntax highlighting for "Showing:" the hiding list included |
| 1356 | * bookmarks can now be retained if "!" is in the viminfo option |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1357 | v49: * will use ftp for http://.../ browsing v48: |
| 1358 | * One may use ftp to do remote host file browsing |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1359 | * (windows and !cygwin) remote browsing with ftp can now use |
| 1360 | the "dir" command internally to provide listings |
| 1361 | * g:netrw_keepdir now allows one to keep the initial current |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1362 | directory as the current directory (normally the local file |
| 1363 | browser makes the currently viewed directory the current |
| 1364 | directory) |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1365 | * g:netrw_alto and g:netrw_altv now support alternate placement |
| 1366 | of windows started with o or v |
| 1367 | * Nread ? and Nwrite ? now uses echomsg (instead of echo) so |
| 1368 | :messages can repeat showing the help |
| 1369 | * bugfix: avoids problems with partial matches of directory names |
| 1370 | to prior buffers with longer names |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1371 | * one can suppress error messages with g:netrw_quiet ctrl-h used |
| 1372 | * instead of <Leader>h for editing hiding list one may edit the |
| 1373 | * sorting sequence with the S map now allows confirmation of |
| 1374 | * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles |
| 1375 | * special file viewing with: |
| 1376 | (windows) rundll32 url.dll (gnome) gnome-open (kde) |
| 1377 | kfmclient If none of these are on the executable path, then |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1378 | NetrwFileHandlers.vim is used. |
| 1379 | * directory bookmarking during both local and remote browsing |
| 1380 | implemented |
| 1381 | * one may view all, use the hiding list to suppress, or use the |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1382 | hiding list to show-only remote and local file/directory |
| 1383 | listings |
| 1384 | * improved unusual file and directory name handling preview |
| 1385 | * window support |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 1386 | v47: * now handles local directory browsing. |
| 1387 | v46: * now handles remote directory browsing |
| 1388 | * g:netrw_silent (if 1) will cause all transfers to be silent |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1389 | v45: * made the [user@]hostname:path form a bit more restrictive to |
| 1390 | better handle errors in using protocols (e.g. scp:usr@host:file |
| 1391 | was being recognized as an rcp request) v44: * changed from |
| 1392 | "rsync -a" to just "rsync" |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1393 | * somehow an editing error messed up the test to recognize |
| 1394 | use of the fetch method for NetRead. |
| 1395 | * more debugging statements included |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1396 | v43: * moved "Explanation" comments to <pi_netrw.txt> help file as |
| 1397 | "Network Reference" (|netrw-ref|) |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1398 | * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging |
| 1399 | * removed superfluous NetRestorePosn() calls |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1400 | v42: * now does BufReadPre and BufReadPost events on file:///* and |
| 1401 | file://localhost/* v41: * installed file:///* and |
| 1402 | file://localhost/* handling v40: * prevents redraw when a |
| 1403 | protocol error occurs so that the user may see it v39: * sftp |
| 1404 | support v38: * Now uses NetRestorePosn() calls with |
| 1405 | Nread/Nwrite commands |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1406 | * Temporary files now removed via bwipe! instead of bwipe |
Bram Moolenaar | 3fdfa4a | 2004-10-07 21:02:47 +0000 | [diff] [blame] | 1407 | (thanks to Dave Roberts) v37: * Claar's modifications which |
| 1408 | test if ftp is successful, otherwise give an error message |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 1409 | * After a read, the alternate file was pointing to the temp file. |
| 1410 | The temp file buffer is now wiped out. |
| 1411 | * removed silent from transfer methods so user can see what's |
| 1412 | happening |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1413 | |
| 1414 | |
| 1415 | ============================================================================== |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1416 | 11. Credits *netrw-credits* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1417 | |
| 1418 | Vim editor by Bram Moolenaar (Thanks, Bram!) |
| 1419 | dav support by C Campbell |
| 1420 | fetch support by Bram Moolenaar and C Campbell |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1421 | ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1422 | http support by Bram Moolenaar <bram@moolenaar.net> |
| 1423 | rcp |
| 1424 | rsync support by C Campbell (suggested by Erik Warendorph) |
| 1425 | scp support by raf <raf@comdyn.com.au> |
| 1426 | sftp support by C Campbell |
| 1427 | |
| 1428 | inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell |
| 1429 | |
| 1430 | Jérôme Augé -- also using new buffer method with ftp+.netrc |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1431 | Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, |
| 1432 | fetch,... |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1433 | Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution |
| 1434 | Erik Warendorph -- for several suggestions (g:netrw_..._cmd |
| 1435 | variables, rsync etc) |
Bram Moolenaar | 578b49e | 2005-09-10 19:22:57 +0000 | [diff] [blame^] | 1436 | Doug Claar -- modifications to test for success with ftp |
| 1437 | operation |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1438 | |
| 1439 | ============================================================================== |
Bram Moolenaar | 83bab71 | 2005-08-01 21:58:57 +0000 | [diff] [blame] | 1440 | vim:tw=78:ts=8:ft=help:norl:fdm=marker |