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