~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to runtime/doc/pi_netrw.txt

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
*pi_netrw.txt*  For Vim version 7.2.  Last change: 2008 Aug 08
 
1
*pi_netrw.txt*  For Vim version 7.2.  Last change: 2009 Jan 15
2
2
 
3
3
            -----------------------------------------------------
4
4
            NETRW REFERENCE MANUAL    by Charles E. Campbell, Jr.
43
43
      Changing To A Predecessor Directory................|netrw-u|
44
44
      Changing To A Successor Directory..................|netrw-U|
45
45
      Customizing Browsing With A User Function..........|netrw-x|
 
46
      Deleting Bookmarks.................................|netrw-mB|
46
47
      Deleting Files Or Directories......................|netrw-D|
47
48
      Directory Exploring Commands.......................|netrw-explore|
48
49
      Exploring With Stars and Patterns..................|netrw-star|
80
81
      Renaming Files Or Directories......................|netrw-move|
81
82
      Reversing Sorting Order............................|netrw-r|
82
83
      Selecting Sorting Style............................|netrw-s|
 
84
      Setting Editing Window.............................|netrw-C|
83
85
10. Problems and Fixes...................................|netrw-problems|
84
86
11. Debugging Netrw Itself...............................|netrw-debug|
85
87
12. History..............................................|netrw-history|
159
161
 
160
162
        Protocol  Variable          Default Value
161
163
        --------  ----------------  -------------
162
 
           dav:    *g:netrw_dav_cmd*  = "cadaver"
163
 
         fetch:  *g:netrw_fetch_cmd*  = "fetch -o"    if fetch is available
164
 
           ftp:    *g:netrw_ftp_cmd*  = "ftp"
165
 
          http:   *g:netrw_http_cmd*  = "curl -o"     if     curl  is available
166
 
          http:    g:netrw_http_cmd   = "wget -q -O"  elseif wget  is available
167
 
          http:    g:netrw_http_cmd   = "fetch -o"    elseif fetch is available
168
 
           rcp:    *g:netrw_rcp_cmd*  = "rcp"
169
 
         rsync:  *g:netrw_rsync_cmd*  = "rsync -a"
170
 
           scp:    *g:netrw_scp_cmd*  = "scp -q"
171
 
          sftp:   *g:netrw_sftp_cmd*  = "sftp"
 
164
           dav:  *g:netrw_dav_cmd*   = "cadaver"     if cadaver is executable
 
165
           dav:   g:netrw_dav_cmd    = "curl -o"     elseif curl is available
 
166
         fetch:  *g:netrw_fetch_cmd* = "fetch -o"    if fetch is available
 
167
           ftp:  *g:netrw_ftp_cmd*   = "ftp"
 
168
          http:  *g:netrw_http_cmd*  = "elinks"     if   elinks  is available
 
169
          http:   g:netrw_http_cmd   = "links"      elseif links is available
 
170
          http:   g:netrw_http_cmd   = "curl"       elseif curl  is available
 
171
          http:   g:netrw_http_cmd   = "wget"       elseif wget  is available
 
172
          http:   g:netrw_http_cmd   = "fetch"      elseif fetch is available
 
173
           rcp:  *g:netrw_rcp_cmd*   = "rcp"
 
174
         rsync:  *g:netrw_rsync_cmd* = "rsync -a"
 
175
           scp:  *g:netrw_scp_cmd*   = "scp -q"
 
176
          sftp:  *g:netrw_sftp_cmd*  = "sftp"
 
177
 
 
178
        *g:netrw_http_xcmd* : the option string for http://... protocols are
 
179
        specified via this variable and may be independently oveerridden.
 
180
 
 
181
                    elinks : "-dump >"
 
182
                    links  : "-dump >"
 
183
                    curl   : "-o"
 
184
                    wget   : "-q -O"
 
185
                    fetch  : "-o"
 
186
 
 
187
        For example, if your system has elinks but you want to see the html
 
188
        source in detail rather than a text rendering thereof, you may wish
 
189
        to have  let g:netrw_http_xcmd= "-source >" in your .vimrc.
 
190
 
172
191
 
173
192
READING                                         *netrw-read* *netrw-nread* {{{2
174
193
 
278
297
 *b:netrw_lastfile*     last file Network-read/written retained on a per-buffer
279
298
                        basis           (supports plain :Nw )
280
299
 
 
300
 *g:netrw_chgwin*       specifies a window number where file edits will take
 
301
                        place.  (also see |netrw-C|)
 
302
                        (default) not defined
 
303
 
 
304
 *g:Netrw_funcref*      specifies a function to be called when netrw edits
 
305
                        a file.  The file is first edited, and then the
 
306
                        function reference (|Funcref|) is called.
 
307
                        (default) not defined
 
308
 
281
309
 *g:netrw_ftp*          if it doesn't exist, use default ftp
282
310
                        =0 use default ftp                     (uid password)
283
311
                        =1 use alternate ftp method       (user uid password)
317
345
 *g:netrw_scpport*      = "-P" : option to use to set port for scp
318
346
 *g:netrw_sshport*      = "-p" : option to use to set port for ssh
319
347
 
 
348
 *g:netrw_sepchr*       =\0xff
 
349
                        =\0x01 for enc == euc-jp (and perhaps it should be for
 
350
                                                  others, too, please let me
 
351
                                                  know)
 
352
                        Separates priority codes from filenames internally.
 
353
                        See |netrw-p12|.
 
354
 
320
355
  *g:netrw_silent*      =0 : transfers done normally
321
356
                        =1 : transfers done silently
322
357
 
678
713
                                                  read via ftp automatically
679
714
                                                  transformed however they wish
680
715
                                                  by NetReadFixup()
681
 
    g:netrw_dav_cmd    variable   ="cadaver"
 
716
    g:netrw_dav_cmd    variable   ="cadaver"      if cadaver  is executable
 
717
    g:netrw_dav_cmd    variable   ="curl -o"      elseif curl is executable
682
718
    g:netrw_fetch_cmd  variable   ="fetch -o"     if fetch is available
683
719
    g:netrw_ftp_cmd    variable   ="ftp"
684
720
    g:netrw_http_cmd   variable   ="fetch -o"     if      fetch is available
782
818
 
783
819
==============================================================================
784
820
9. Browsing             *netrw-browsing* *netrw-browse* *netrw-help* {{{1
785
 
                        *netrw-browser*  *netrw-dir*    *netrw-list*
 
821
                        *netrw-browser*  *netrw-dir*    *netrw-list*
786
822
 
787
823
INTRODUCTION TO BROWSING                        *netrw-intro-browse* {{{2
788
824
        (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
838
874
 
839
875
See |netrw-browse-cmds| for all the things you can do with netrw!
840
876
 
 
877
                        *netrw-getftype* *netrw-filigree* *netrw-ftype*
 
878
The |getftype()| function is used to append a bit of filigree to indicate
 
879
filetype to locally listed files:
 
880
 
 
881
        directory  : /
 
882
        executable : *
 
883
        fifo       : |
 
884
        links      : @
 
885
        sockets    : =
 
886
 
 
887
The filigree also affects the |g:netrw_sort_sequence|.
 
888
 
841
889
 
842
890
QUICK HELP                                              *netrw-quickhelp* {{{2
843
891
                       (Use ctrl-] to select a topic)~
876
924
                hiding (suppress display of files matching g:netrw_list_hide)
877
925
                showing (display only files which match g:netrw_list_hide)
878
926
           c    Make browsing directory the current directory        |netrw-c|
 
927
           C    Setting the editing window                           |netrw-C|
879
928
           d    Make a directory                                     |netrw-d|
880
929
           D    Attempt to remove the file(s)/directory(ies)         |netrw-D|
881
930
           gb   Go to previous bookmarked directory                  |netrw-gb|
899
948
           mx   Apply arbitrary shell command to marked files        |netrw-mx|
900
949
           mz   Compress/decompress marked files                     |netrw-mz|
901
950
           o    Enter the file/directory under the cursor in a new   |netrw-o|
902
 
                browser window.  A horizontal split is used.
 
951
                browser window.  A horizontal split is used.
903
952
           O    Obtain a file specified by cursor                    |netrw-O|
904
953
           p    Preview the file                                     |netrw-p|
905
954
           P    Browse in the previously used window                 |netrw-P|
912
961
           u    Change to recently-visited directory                 |netrw-u|
913
962
           U    Change to subsequently-visited directory             |netrw-U|
914
963
           v    Enter the file/directory under the cursor in a new   |netrw-v|
915
 
                browser window.  A vertical split is used.
 
964
                browser window.  A vertical split is used.
916
965
           x    View file with an associated program                 |netrw-x|
917
966
 
918
967
           %    Open a new file in netrw's current directory         |netrw-%|
929
978
                         * the user doesn't already have a <2-leftmouse> mapping
930
979
                           defined before netrw is autoloaded,
931
980
                        then a double clicked leftmouse button will return
932
 
                        to the netrw browser window.
 
981
                        to the netrw browser window.  See |g:netrw_retmap|.
933
982
        <s-leftmouse>   (gvim only) like mf, will mark files
934
983
 
935
984
                                *netrw-quickcom* *netrw-quickcoms*
946
995
     :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
947
996
 
948
997
BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
 
998
 
949
999
One may easily "bookmark" a directory by using >
950
1000
 
951
 
        {cnt}mb
 
1001
        mb
952
1002
<
953
 
Any count may be used.  One may use viminfo's "!" option (|'viminfo'|) to
954
 
retain bookmarks between vim sessions.  See |netrw-gb| for how to return
955
 
to a bookmark and |netrw-qb| for how to list them.
 
1003
Bookmarks are retained in between sesions in a $HOME/.netrwbook file, and are
 
1004
kept in sorted order.
 
1005
 
 
1006
Related Topics:
 
1007
        |netrw-gb| how to return (go) to a bookmark
 
1008
        |netrw-mB| how to delete bookmarks
 
1009
        |netrw-qb| how to list bookmarks
956
1010
 
957
1011
 
958
1012
BROWSING                                                *netrw-cr* {{{2
960
1014
Browsing is simple: move the cursor onto a file or directory of interest.
961
1015
Hitting the <cr> (the return key) will select the file or directory.
962
1016
Directories will themselves be listed, and files will be opened using the
963
 
protocol given in the original read request.  
 
1017
protocol given in the original read request.
964
1018
 
965
1019
  CAVEAT: There are four forms of listing (see |netrw-i|).  Netrw assumes that
966
1020
  two or more spaces delimit filenames and directory names for the long and
1019
1073
 
1020
1074
in your <.vimrc>.  (also see |netrw-t| |netrw-v|)
1021
1075
 
1022
 
There is only one tree listing buffer; using "o" on a displayed subdirectory 
 
1076
There is only one tree listing buffer; using "o" on a displayed subdirectory
1023
1077
will split the screen, but the same buffer will be shown twice.
1024
1078
 
1025
1079
Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1046
1100
 
1047
1101
in your <.vimrc>.  (also see: |netrw-o| |netrw-t|)
1048
1102
 
1049
 
There is only one tree listing buffer; using "v" on a displayed subdirectory 
 
1103
There is only one tree listing buffer; using "v" on a displayed subdirectory
1050
1104
will split the screen, but the same buffer will be shown twice.
1051
1105
 
1052
1106
Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1085
1139
 
1086
1140
        {cnt}gb
1087
1141
 
1088
 
Any count may be used to reference any of the bookmarks.  See |netrw-mb| on
1089
 
how to bookmark a directory and |netrw-qb| on how to list bookmarks.
 
1142
Any count may be used to reference any of the bookmarks.
 
1143
 
 
1144
Related Topics:
 
1145
        |netrw-mB| how to delete bookmarks
 
1146
        |netrw-mb| how to return to a bookmark
 
1147
        |netrw-qb| how to list bookmarks
1090
1148
 
1091
1149
 
1092
1150
CHANGING TO A PREDECESSOR DIRECTORY     *netrw-u* *netrw-updir* {{{2
1141
1199
    If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1142
1200
    invoked first (see |netrw_filehandler|).
1143
1201
 
1144
 
  * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.  
 
1202
  * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
1145
1203
  * for Gnome (with gnome-open): gnome-open is used.
1146
1204
  * for KDE (with kfmclient)   : kfmclient is used.
1147
1205
  * for Mac OS X               : open is used.
1175
1233
contain such characters, netrw will first convert the suffix using the
1176
1234
following table: >
1177
1235
 
1178
 
    @ -> AT       ! -> EXCLAMATION    % -> PERCENT  
1179
 
    : -> COLON    = -> EQUAL          ? -> QUESTION 
 
1236
    @ -> AT       ! -> EXCLAMATION    % -> PERCENT
 
1237
    : -> COLON    = -> EQUAL          ? -> QUESTION
1180
1238
    , -> COMMA    - -> MINUS          ; -> SEMICOLON
1181
 
    $ -> DOLLAR   + -> PLUS           ~ -> TILDE    
1182
 
<    
 
1239
    $ -> DOLLAR   + -> PLUS           ~ -> TILDE
 
1240
<
1183
1241
So, for example: >
1184
1242
 
1185
1243
        file.rcs,v  ->  NFH_rcsCOMMAv()
1191
1249
Associated setting variable: |g:netrw_browsex_viewer|
1192
1250
 
1193
1251
                                                        *netrw-curdir*
 
1252
DELETING BOOKMARKS                                      *netrw-mB* {{{2
 
1253
 
 
1254
To delete a bookmark, use >
 
1255
 
 
1256
        {cnt}mB
 
1257
<
 
1258
Related Topics:
 
1259
        |netrw-gb| how to return (go) to a bookmark
 
1260
        |netrw-mb| how to make a bookmark
 
1261
        |netrw-qb| how to list bookmarks
 
1262
 
 
1263
 
1194
1264
DELETING FILES OR DIRECTORIES   *netrw-delete* *netrw-D* *netrw-del* {{{2
1195
1265
 
1196
1266
If files have not been marked with |netrw-mf|:   (local marked file list)
1232
1302
*netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1233
1303
DIRECTORY EXPLORATION COMMANDS  {{{2
1234
1304
 
1235
 
     :Explore[!]   [dir]... Explore directory of current file       *:Explore*
1236
 
     :Hexplore[!]  [dir]... Horizontal Split & Explore              *:Hexplore*
1237
 
     :Rexplore          ... Return to Explorer                      *:Rexplore*
1238
 
     :Sexplore[!]  [dir]... Split&Explore directory of current file *:Sexplore*
1239
 
     :Texplore     [dir]... Tab              & Explore              *:Texplore*
1240
 
     :Vexplore[!]  [dir]... Vertical   Split & Explore              *:Vexplore*
 
1305
     :[N]Explore[!]   [dir]... Explore directory of current file     *:Explore*
 
1306
     :[N]Hexplore[!]  [dir]... Horizontal Split & Explore            *:Hexplore*
 
1307
     :Rexplore             ... Return to Explorer                    *:Rexplore*
 
1308
     :[N]Sexplore[!]  [dir]... Split&Explore current file's directory*:Sexplore*
 
1309
     :Texplore        [dir]... Tab              & Explore            *:Texplore*
 
1310
     :[N]Vexplore[!]  [dir]... Vertical   Split & Explore            *:Vexplore*
1241
1311
 
1242
1312
     Used with :Explore **/pattern : (also see |netrw-starstar|)
1243
1313
     :Nexplore............. go to next matching file                *:Nexplore*
1259
1329
:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1260
1330
:Texplore  [dir] does a tabnew before generating the browser window
1261
1331
 
1262
 
By default, these commands use the current file's directory.  However, one
1263
 
may explicitly provide a directory (path) to use.
1264
 
 
1265
 
The |g:netrw_winsize| variable also is used, if specified by the user, to
1266
 
size Hexplore and Vexplore windows.
 
1332
By default, these commands use the current file's directory.  However, one may
 
1333
explicitly provide a directory (path) to use.
 
1334
 
 
1335
The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
 
1336
columns the new explorer window should have.
 
1337
 
 
1338
Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
 
1339
user, is used to control the quantity of rows and/or columns new explorer
 
1340
windows should have.
1267
1341
 
1268
1342
:Rexplore  This command is a little different from the others.  When one
1269
1343
           edits a file, for example by pressing <cr> when atop a file in
1282
1356
 
1283
1357
    */filepat   files in current directory which satisfy filepat
1284
1358
    **/filepat  files in current directory or below which satisfy the
1285
 
                file pattern
 
1359
                file pattern
1286
1360
    *//pattern  files in the current directory which contain the
1287
 
                pattern (vimgrep is used)
 
1361
                pattern (vimgrep is used)
1288
1362
    **//pattern files in the current directory or below which contain
1289
 
                the pattern (vimgrep is used)
 
1363
                the pattern (vimgrep is used)
1290
1364
<
1291
1365
The cursor will be placed on the first file in the list.  One may then
1292
1366
continue to go to subsequent files on that list via |:Nexplore| or to
1349
1423
(g:netrw_sort_sequence).  The sorting sequence typically prioritizes the
1350
1424
name-listing by suffix, although any pattern will do.  Patterns are delimited
1351
1425
by commas.  The default sorting sequence is (all one line):
1352
 
>
 
1426
 
 
1427
For Unix: >
 
1428
        '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
 
1429
        \.info$,\.swp$,\.bak$,\~$'
 
1430
<
 
1431
Otherwise: >
1353
1432
        '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1354
1433
        \.swp$,\.bak$,\~$'
1355
1434
<
1508
1587
 
1509
1588
LISTING BOOKMARKS AND HISTORY           *netrw-qb* *netrw-listbookmark* {{{2
1510
1589
 
1511
 
Pressing "qb" (query bookmarks) will list the bookmarked directories and
1512
 
directory traversal history (query).
1513
 
 
1514
 
(see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|)
1515
 
 
 
1590
Pressing "qb" (query bookmarks) will list both the bookmarked directories and
 
1591
directory traversal history.
 
1592
 
 
1593
Related Topics:
 
1594
        |netrw-gb| how to return (go) to a bookmark
 
1595
        |netrw-mb| how to make a bookmark
 
1596
        |netrw-mB| how to delete bookmarks
 
1597
        |netrw-u|  change to a predecessor directory via the history stack
 
1598
        |netrw-U|  change to a successor   directory via the history stack
1516
1599
 
1517
1600
MAKING A NEW DIRECTORY                                  *netrw-d* {{{2
1518
1601
 
1762
1845
 
1763
1846
  *g:netrw_browse_split*        when browsing, <cr> will open the file by:
1764
1847
                                =0: re-using the same window
1765
 
                                =1: horizontally splitting the window first  
1766
 
                                =2: vertically   splitting the window first  
 
1848
                                =1: horizontally splitting the window first
 
1849
                                =2: vertically   splitting the window first
1767
1850
                                =3: open file in new tab
1768
1851
                                =4: act like "P" (ie. open previous window)
1769
1852
 
1783
1866
  *g:netrw_ctags*               ="ctags"
1784
1867
                                The default external program used to create tags
1785
1868
 
 
1869
  *g:netrw_cursorline*          = 1 (default)
 
1870
                                will use the |'cursorline'| local setting when
 
1871
                                |g:netrw_liststyle| ==0 (thin listing) or
 
1872
                                |g:netrw_liststyle| ==1 (long listing) or
 
1873
                                |g:netrw_liststyle| ==3 (tree listing)
 
1874
                                =0: off
 
1875
                                =2: like ==1, but the wide listing gets both
 
1876
                                cursorline and |'cursorcolumn'|locally set
 
1877
                                (ie. doesn't affect the wide listing)
 
1878
 
1786
1879
  *g:netrw_decompress*          = { ".gz" : "gunzip" ,
1787
1880
                                    ".bz2" : "bunzip2" ,
1788
1881
                                    ".zip" : "unzip" ,
1815
1908
                                versus speed.
1816
1909
 
1817
1910
  *g:netrw_fname_escape*        =' ?&;%'
1818
 
                                Used on filenames before remote reading/writing
 
1911
                                Used on filenames before remote reading/writing
1819
1912
 
1820
1913
  *g:netrw_ftp_browse_reject*   ftp can produce a number of errors and warnings
1821
1914
                                that can show up as "directories" and "files"
1849
1942
                                 otherwise                     "dir"
1850
1943
 
1851
1944
  *g:netrw_glob_escape*         ='[]*?`{~$'
1852
 
                                These characters in directory names are
 
1945
                                These characters in directory names are
1853
1946
                                escaped before applying glob()
1854
1947
 
1855
1948
  *g:netrw_hide*                if true, the hiding list is used
1856
1949
                                 default: =0
1857
1950
 
 
1951
  *g:netrw_home*                The home directory for where bookmarks and
 
1952
                                history are saved (as .netrwbook and
 
1953
                                .netrwhist).
 
1954
                                 default: the first directory on the
 
1955
                                         |'runtimepath'|
 
1956
 
1858
1957
  *g:netrw_keepdir*             =1 (default) keep current directory immune from
1859
1958
                                   the browsing directory.
1860
1959
                                =0 keep the current directory the same as the
1878
1977
                                 default: ""
1879
1978
 
1880
1979
  *g:netrw_localcopycmd*        ="cp" Linux/Unix/MacOS/Cygwin
1881
 
                                ="copy" Windows
 
1980
                                ="copy" Windows
1882
1981
                                Copies marked files (|netrw-mf|) to target
1883
1982
                                directory (|netrw-mt|, |netrw-mc|)
1884
1983
 
1885
1984
  *g:netrw_localmovecmd*        ="mv" Linux/Unix/MacOS/Cygwin
1886
 
                                ="move" Windows
 
1985
                                ="move" Windows
1887
1986
                                Moves marked files (|netrw-mf|) to target
1888
1987
                                directory (|netrw-mt|, |netrw-mm|)
1889
1988
 
1903
2002
  *g:netrw_mkdir_cmd*           command for making a remote directory
1904
2003
                                 default: "ssh USEPORT HOSTNAME mkdir"
1905
2004
 
1906
 
  *g:netrw_retmap*              if it exists and is set to one, then
1907
 
                                <2-leftmouse> will be mapped for easy
 
2005
  *g:netrw_retmap*              if it exists and is set to one, then:
 
2006
                                 * if in a netrw-selected file, AND
 
2007
                                 * no normal-mode <2-leftmouse> mapping exists,
 
2008
                                then the <2-leftmouse> will be mapped for easy
1908
2009
                                return to the netrw browser window.
1909
 
                                (example: click once to select and open
1910
 
                                a file, double-click to return)
 
2010
                                 example: click once to select and open a file,
 
2011
                                          double-click to return.
 
2012
 
 
2013
                                Note that one may instead choose to:
 
2014
                                 * let g:netrw_retmap= 1, AND
 
2015
                                 * nmap <silent> YourChoice <Plug>NetrwReturn
 
2016
                                and have another mapping instead of
 
2017
                                <2-leftmouse> to invoke the return.
 
2018
 
 
2019
                                You may also use the |:Rexplore| command to do
 
2020
                                the same thing.
 
2021
 
1911
2022
                                  default: =0
1912
2023
 
1913
2024
  *g:netrw_rm_cmd*              command for removing files
1934
2045
<                                default: ""
1935
2046
 
1936
2047
  *g:netrw_sort_sequence*       when sorting by name, first sort by the
1937
 
                                comma-separated pattern sequence
 
2048
                                comma-separated pattern sequence.  Note that
 
2049
                                the filigree added to indicate filetypes
 
2050
                                should be accounted for in your pattern.
1938
2051
                                 default: '[\/]$,*,\.bak$,\.o$,\.h$,
1939
2052
                                           \.info$,\.swp$,\.obj$'
1940
2053
 
1941
2054
  *g:netrw_special_syntax*      If true, then certain files will be shown
1942
 
                                in special syntax in the browser:
 
2055
                                in special syntax in the browser:
1943
2056
 
1944
2057
                                        netrwBak     : *.bak
1945
2058
                                        netrwCompress: *.gz *.bz2 *.Z *.zip
1974
2087
 
1975
2088
 
1976
2089
  *g:netrw_tmpfile_escape*      =' &;'
1977
 
                                escape() is applied to all temporary files
 
2090
                                escape() is applied to all temporary files
1978
2091
                                to escape these characters.
1979
2092
 
1980
2093
  *g:netrw_timefmt*             specify format string to vim's strftime().
1988
2101
                                 default: "%c"
1989
2102
 
1990
2103
  *g:netrw_use_noswf*           netrw normally avoids writing swapfiles
1991
 
                                for browser buffers.  However, under some
 
2104
                                for browser buffers.  However, under some
1992
2105
                                systems this apparently is causing nasty
1993
2106
                                ml_get errors to appear; if you're getting
1994
2107
                                ml_get errors, try putting
2000
2113
                                |:Hexplore| or |:Vexplore|.
2001
2114
                                 default: ""
2002
2115
 
2003
 
  *g:netrw_xstrlen*             Controls how netrw computes a string
2004
 
                                including multi-byte characters' string
 
2116
  *g:netrw_xstrlen*             Controls how netrw computes string lengths,
 
2117
                                including multi-byte characters' string
2005
2118
                                length. (thanks to N Weibull, T Mechelynck)
2006
2119
                                =0: uses Vim's built-in strlen()
2007
2120
                                =1: number of codepoints (Latin + a combining
2008
2121
                                    circumflex is two codepoints)  (DEFAULT)
2009
2122
                                =2: number of spacing codepoints (Latin a +
2010
 
                                    combining circumflex is one spacing 
 
2123
                                    combining circumflex is one spacing
2011
2124
                                    codepoint; a hard tab is one; wide and
2012
2125
                                    narrow CJK are one each; etc.)
2013
2126
                                =3: virtual length (counting tabs as anything
2162
2275
Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2163
2276
 
2164
2277
 
 
2278
SETTING EDITING WINDOW                                  *netrw-C* {{{2
 
2279
 
 
2280
One may select a netrw window for editing with the "C" mapping, or by setting
 
2281
g:netrw_chgwin to the selected window number.  Subsequent selection of a file
 
2282
to edit (|netrw-cr|) will use that window.
 
2283
 
 
2284
Related topics:                 |netrw-cr|
 
2285
Associated setting variables:   |g:netrw_chgwin|
 
2286
 
 
2287
 
2165
2288
10. Problems and Fixes                                  *netrw-problems* {{{1
2166
2289
 
2167
2290
        (This section is likely to grow as I get feedback)
2238
2361
            Put the following line in your |.vimrc|:
2239
2362
>
2240
2363
                let g:netrw_keepdir= 0
2241
 
<       
 
2364
<
2242
2365
                                                                *netrw-p7*
2243
2366
        P7. I use Chinese (or other non-ascii) characters in my filenames, and
2244
2367
            netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
2266
2389
 
2267
2390
                (Marlin Unruh) This program also works for me. It's a single
2268
2391
                executable, so he/she can copy it into the Windows\System32
2269
 
                folder and create a shortcut to it. 
 
2392
                folder and create a shortcut to it.
2270
2393
 
2271
2394
                (Dudley Fox) You might also wish to consider plink, as it
2272
2395
                sounds most similar to what you are looking for. plink is an
2274
2397
 
2275
2398
           http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2276
2399
 
2277
 
                (Vissale Neang) Maybe you can try OpenSSH for windows, which
 
2400
                (Vissale Neang) Maybe you can try OpenSSH for windows, which
2278
2401
                can be obtained from:
2279
2402
 
2280
2403
                http://sshwindows.sourceforge.net/
2281
2404
 
2282
 
                It doesn't need the full Cygwin package. 
 
2405
                It doesn't need the full Cygwin package.
2283
2406
 
2284
2407
                (Antoine Mechelynck) For individual Unix-like programs needed
2285
2408
                for work in a native-Windows environment, I recommend getting
2290
2413
                Unlike Cygwin, which sets up a Unix-like virtual machine on
2291
2414
                top of Windows, GnuWin32 is a rewrite of Unix utilities with
2292
2415
                Windows system calls, and its programs works quite well in the
2293
 
                cmd.exe "Dos box". 
 
2416
                cmd.exe "Dos box".
2294
2417
 
2295
2418
                (dave) Download WinSCP and use that to connect to the server.
2296
2419
                In Preferences > Editors, set gvim as your editor:
2317
2440
                How to use a private key with 'pscp': >
2318
2441
 
2319
2442
                        http://www.tartarus.org/~simon/puttydoc/Chapter5.html
2320
 
                        5.2.4 Using public key authentication with PSCP 
 
2443
                        5.2.4 Using public key authentication with PSCP
2321
2444
<
2322
2445
                (Ben Schmidt) I find the ssh included with cwRsync is
2323
2446
                brilliant, and install cwRsync or cwRsyncServer on most
2375
2498
                  <leftmouse> in the browser window and then press the
2376
2499
                  <middlemouse> to select the file.
2377
2500
 
 
2501
                                                                *netrw-p12*
 
2502
        P12. My directory isn't sorting correctly, or unwanted letters are
 
2503
             appearing in the listed filenames, or things aren't lining
 
2504
             up properly in the wide listing, ...
 
2505
 
 
2506
             This may be due to an encoding problem.  I myself usually use
 
2507
             utf-8, but really only use ascii (ie. bytes from 32-126).
 
2508
             Multibyte encodings use two (or more) bytes per character.
 
2509
             You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
 
2510
 
2378
2511
==============================================================================
2379
2512
11. Debugging Netrw Itself                              *netrw-debug* {{{1
2380
2513
 
2429
2562
==============================================================================
2430
2563
12. History                                             *netrw-history* {{{1
2431
2564
 
 
2565
        v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
 
2566
                             of function references
 
2567
              Jan 14, 2009 * (reported by Marvin Renich) with spell check
 
2568
                             enabled, some filenamess will still being
 
2569
                             displayed as spelling errors.
 
2570
        v135: Oct 29, 2008 * using |simplify()| on directory names
 
2571
                             (supporting handling ".."s in directory names)
 
2572
              Oct 31, 2008 * added special file highlighting for core dumps
 
2573
                             under Unix/Linux.  The default sorting sequence
 
2574
                             now also gives core dumps priority.
 
2575
              Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
 
2576
                             to avoid having to use fnameescape()
 
2577
                           * fixed a tree redrawing problem (open directory,
 
2578
                             open subdir, close subdir, close dir)
 
2579
              Nov 19, 2008 * sprinked some histdel("/",-1)s through the code
 
2580
                             in an attempt to prevent netrw from changing
 
2581
                             the search history.
 
2582
              Jan 02, 2009 * |g:Netrw_funcref| included
 
2583
              Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
 
2584
                             variables
 
2585
              Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
 
2586
                             to remove cygdrive from non-cygwin Windows
 
2587
                             paths.  Improved the determination as to
 
2588
                             whether or not to do so.
 
2589
              Jan 13, 2009 * included contains=@NoSpell in every syntax
 
2590
                             group for syntax/netrw.vim .
 
2591
        v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
 
2592
                             the use of the |netrw-t| command with a remote
 
2593
                             directory.
 
2594
              Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
 
2595
              Oct 03, 2008 * bookmarks now go on a list and are stored to
 
2596
                             the first directory on the |'runtimepath'| in
 
2597
                             the hopes of making their retention reliable.
 
2598
                             History now also goes to that directory.
 
2599
              Oct 07, 2008 * Included check that vim 7.0 or later is in use.
 
2600
              Oct 07, 2008 * Improved |g:netrw_retmap| handling.
 
2601
              Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
 
2602
                             cadaver isn't available then netrw will try to
 
2603
                             use curl for the dav://... protocol.
 
2604
              Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
 
2605
                             This lets mf (|netrw-mf|) mark directories, links
 
2606
                             and executables.
 
2607
              Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
 
2608
                             g:netrw_fastbrowse is <= 1 (slow, medium speed)
 
2609
              Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
 
2610
                             independently of |g:netrw_http_cmd|.
 
2611
              Oct 23, 2008 * [N] added to the various Explore commands to
 
2612
                             let users specify the width/height of new
 
2613
                             explorer windows, overriding |g:netrw_winsize|.
 
2614
        v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
 
2615
              Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
 
2616
                             wasn't being used, resulting in "b:netrw_fname
 
2617
                             undefined" errors
 
2618
              Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
 
2619
                             changed to hi default link in the netrw syntax
 
2620
                             files.
 
2621
              Aug 12, 2008 * using s:NetrwUnmarkList() more often.  Filenames
 
2622
                             were being left on the global list when removed
 
2623
                             from the buffer-local lists.
 
2624
              Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
 
2625
                             the rcp-handling portion of NetRead().
 
2626
              Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
 
2627
                             and tree displays.
2432
2628
        v132: Aug 06, 2008 * Fixed marked file-based obtain
2433
2629
              Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
2434
2630
                             buffer (or any buffer with |'nobl'|) left an
2668
2864
                             decipher the name.
2669
2865
              May 07, 2007 * g:netrw_use_errorwindow now allows one to
2670
2866
                             have error messages go to a reliable window
2671
 
                             or to use a less reliable but recallable 
 
2867
                             or to use a less reliable but recallable
2672
2868
                             echoerr method
2673
2869
              May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
2674
2870
                             use of -P and -p, respectively, to set port