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
|
vifm(1) Vifm vifm(1)
NAME
vifm - vi file manager
SYNOPSIS
vifm [OPTION]...
vifm [OPTION]... LWIN_DIR
vifm [OPTION]... LWIN_DIR RWIN_DIR
DESCRIPTION
Vifm is a ncurses based file manager with vi like keybindings. If you
use vi, vifm gives you complete keyboard control over your files with‐
out having to learn a new set of commands.
OPTIONS
The vifm executable will start vifm in the current directory unless it
is given a different directory on the command line.
<lwinpath>
Starts Vifm in the specified path.
<lwinpath> <rwinpath>
Starts Vifm in the specified paths.
Specifying two directories triggers split view even when vifm was in
single-view mode on finishing previous session. To suppress this be‐
haviour :only command can be put in the vifmrc file.
When only one path argument is found on command-line, the left/top pane
is automatically set as the current view.
Paths to files are also allowed in case you want vifm to start with
some archive opened. If you want to select file, prepend its path with
--select.
-f only used from the vifm.vim script. The selected files are
written to $VIFM/vimfiles and vifm exits.
--logging
Log some errors to $VIFM/log. Also /var/log/vifm-startup-log
(on *nix) and startup-log in the directory of executable (on
Windows) is used to log startup process (when configuration
directory isn't determined).
--remote
Sends the rest of command line to the active vifm server (one of
already running instances if any). When there is no server,
quits silently. There is no limit on how many arguments can be
processed. One can combine --remote with -c <command> or +<com‐
mand> to execute command in already running instance of vifm.
See also "Client-Server" section below.
-c <command> or +<command>
Run command-line mode <command> on startup. Commands in such
arguments are executed in the order they appear in command line.
Commands with spaces or special symbols must be enclosed in dou‐
ble or single quotes or all special symbols should be escaped
(the exact syntax strongly depends on shell).
--help, -h
Show an overview of the commandline options.
--version, -v
Show version information and quit.
--no-configs
Don't read vifmrc and vifminfo.
See Startup section below for the explanations on $VIFM.
General keys
Ctrl-C or Escape
cancel most operations.
Ctrl-C or Escape
clear all selected files.
Ctrl-L clear and redraw the screen.
Basic Movement
The basic vi key bindings are used to move through the files and popup
windows.
k, gk, or Ctrl-P
moves cursor up one line.
j, gj or Ctrl-N
moves cursor down one line.
h when 'lsview' is off moves up one directory, otherwise moves
left one file.
l when 'lsview' is off moves into a directory or launches a file,
otherwise moves left one file.
gg move to the top of the file list.
gh moves up one directory.
gl or Enter
moves into a directory or launches a file.
G move to the bottom of the file list.
H move to the first file in the window.
M move to the file in the middle of the window.
L move to the last file in the window.
Ctrl-F or Page Down
move forward one page.
Ctrl-B or Page Up
move back one page.
Ctrl-D jump back one half page.
Ctrl-U jump forward one half page.
n% move to the file that is n percent from the top of the list (for
example 25%).
0 or ^ move cursor to the first column. See 'lsview' option descrip‐
tion.
$ move cursor to the last column. See 'lsview' option descrip‐
tion.
Space Bar
toggles between the two file lists.
Movement with Count
Most movement commands also accept a count, 12j would move down 12
files.
[count]%
move to percent of the file list.
[count]j
move down count files.
[count]k
move up count files.
[count]G or [count]gg
move to list position count.
Scrolling panes
zt redraw pane with file in top of list.
zz redraw pane with file in center of list.
zb redraw pane with file in bottom of list.
Ctrl-E scroll pane one line down.
Ctrl-Y scroll pane one line up.
Pane manipulation
Second character can be entered with or without Control key.
Ctrl-W H
move the pane to the far left.
Ctrl-W J
move the pane to the very bottom.
Ctrl-W K
move the pane to the very top.
Ctrl-W L
move the pane to the far right.
Ctrl-W b
switch to bottom-right window.
Ctrl-W h
switch to the left pane.
Ctrl-W j
switch to the pane below.
Ctrl-W k
switch to the pane above.
Ctrl-W l
switch to the right pane.
Ctrl-W o
shortcut for :only
Ctrl-W p
switch to previous window.
Ctrl-W s
shortcut for :split
Ctrl-W t
switch to top-left window.
Ctrl-W v
shortcut for :vsplit
Ctrl-W w
switch to other pane.
Ctrl-W x
exchange panes.
[count1]Ctrl-W[count2]+
increase size of the view by count1*count2.
[count1]Ctrl-W[count2]-
decrease size of the view by count1*count2..
[count1]Ctrl-W[count2]<
increase size of the view by count1*count2..
[count1]Ctrl-W[count2]>
decrease size of the view by count1*count2..
Ctrl-W |
maximize current view.
Ctrl-W _
maximize current view.
Ctrl-W =
make size of two views equal.
Marks
Marks are set the same way as they are in vi.
You can use this characters for marks [a-z][A-Z][0-9].
m[a-z][A-Z][0-9]
to set a mark for the current file.
'[a-z][A-Z][0-9]
moves to the file set for the mark.
Searching
/regular expression pattern[Return]
will highlight all files matching the pattern and go to the next
match.
?regular expression pattern[Return]
will highlight all files matching the pattern and go to the pre‐
vious match.
[count]n
find the next match of / or ?.
[count]N
find the previous match of / or ?.
If 'hlsearch' option is set, hitting n/N to perform search and go to
the first matching item resets current selection in normal mode. It is
not the case if search was already performed on files in the directory,
thus selection is not reset after clearing selection with escape key
and hitting n/N key again.
[count]f[character]
search forward for file with [character] as first character in
name. Search wraps around the end of the list.
[count]F[character]
search backward for file with [character] as first character in
name. Search wraps around the end of the list.
[count];
find the next match of f or F.
[count],
find the previous match of f or F.
Note: f, F, ; and , wrap around list beginning and end when they are
used alone and they don't wrap when they are used as selectors.
File Filters
There are three basic file filters:
- dot files filter (excluding "." and ".." special directories, which
appearance is controlled by the 'dotdirs' option)
- manual filter for file names
- automatic filter for file names
- local filter for file names (see description of the "=" normal mode
command)
Performing operations on manual filter for file names automatically
does the same on automatic one. The file name filter is separated
mainly for convenience purpose and to get more deterministic behaviour.
The basic vim folding key bindings are used for filtering files.
Each file list has its own copy of each filter.
Filtered files are not checked in / search or :commands.
Files and directories are filtered separately. For this a slash is
appended to a directory name before testing whether it matches the fil‐
ter. Examples:
" filter directories which names end with '.files'
:filter /^.*\.files\/$/
" filter files which names end with '.d'
:filter /^.*\.d$/
" filter files and directories which names end with '.o'
:filter /^.*\.o\/?$/
zo Show all of the dot files.
zf Filter all of the selected files.
za Toggle the showing and hiding of dot files.
zm Filter all of the dot files.
zO Show the files filtered out by filename filter.
zM Filter the files matching the filename filter.
zR Remove all filters.
=regular expression pattern[Return]
filter out files that don't match regular expression. This kind
of filter is automatically reset when directory is changed.
Other Normal Mode Keys
[count]:
enter command line mode. Count will add range.
q: open external editor to prompt for command-line command. See
"Command line editing" section for details.
q/ open external editor to prompt for search pattern to be searched
in forward direction. See "Command line editing" section for
details.
q? open external editor to prompt for search pattern to be searched
in backward direction. See "Command line editing" section for
details.
q= open external editor to prompt for filter pattern. See "Command
line editing" section for details. Unlike other q{x} commands
this one doesn't work in Visual mode.
[count]!! and [count]!<selector>
enter command line mode with entered ! command. Count will mod‐
ify range.
Ctrl-O go backward through history.
Ctrl-I if 'cpoptions' contains "t" flag, <tab> and <c-i> switch active
pane just like <space> does, otherwise it goes forward through
directory history of the current view.
Ctrl-G creates a window showing detailed information about the current
file.
Shift-Tab
enters view mode (works only after activating view pane with
:view command).
ga calculate directory size.
gA like ga, but force update.
gf find link destination (like l with 'followlinks' off, but also
finds directories).
gr only for MS-Windows
same as l key, but tries to run program with administrative
privileges.
gv go to visual mode restoring last selection.
gs restore last t selection, like gv for visual mode selection.
gu<selector>
make names of selected files lowercase.
[count]guu and [count]gugu
make names of [count] files starting from the current one lower‐
case. Without [count] only current file is affected.
gU<selector>
make names of selected files uppercase.
[count]gUU and [count]gUgU
make names of [count] files starting from the current one upper‐
case. Without [count] only current file is affected.
e explore file in the current pane.
i opens file with associated program even if it's an executable.
cw rename a file or files.
cW change only name of file (without extension).
cl change link target.
co only for *nix
change file owner.
cg only for *nix
change file group.
cp change file attributes (permission on *nix and properties on
Windows).
[count]C
clone file [count] times.
[count]dd or d[count]selector
moves the selected files to trash directory (if 'trash' option
is set, otherwise delete). See "Trash directory" section below.
[count]DD or D[count]selector
removes the selected files.
Y, [count]yy or y[count]selector
yanks the selected files.
Y same as yy.
p will copy the yanked files to the current directory or move the
files to the current directory if they were deleted with dd or
:d[elete] or if the files were yanked from trash directory. See
"Trash directory" section below.
P moves the last yanked files. The advantage of using P instead
of d followed by p is that P moves files only once. This isn't
important in case you're moving files in the same file system
where your home directory is, but using P to move files on some
other file system (or file systems, in case you want to move
files from fs1 to fs2 and your home is on fs3) can save your
time.
al puts symbolic links with absolute paths.
rl puts symbolic links with relative paths.
t select or unselect (tag) the current file.
u undo last change.
Ctrl-R redo last change.
v enter visual mode.
V enter visual mode.
[count]Ctrl-A
increment first number in file name by count (1 by default).
[count]Ctrl-X
decrement first number in file name by count (1 by default).
ZQ same as :quit!
ZZ same as :quit
. repeat last command line command (not normal mode command) of
this session (does nothing right after startup or :restart com‐
mand). The command doesn't depend on command-line history and
can be used with completely disabled history.
( goto previous group. Groups are defined by primary sorting key.
For name and iname members of each group have same first letter,
for all other sorting keys vifm uses size, uid, ...
) goto next group. See ( key description above.
Using Count
You can use count with commands like yy.
[count]yy
yank count files starting from current cursor position downward.
Or you can use count with motions passed to y, d or D.
d[count]j
delete (count + 1) files starting from current cursor position
upward.
Registers
vifm supports multiple registers for temporary storing list of yanked
or deleted files.
Registers should be specified with hitting double quite key followed by
a register name. Count is specified after register name. By default
commands use unnamed register, which has double quote as its name.
Though all commands accept registers, most of commands ignores them
(for example H or Ctrl-U). Other commands can fill register or append
new files to it.
Presently vifm supports ", _, a-z and A-Z characters as register names.
As mentioned above " is unnamed register and has special meaning of the
default register. Every time when you use named registers (a-z and A-
Z) unnamed register is updated to contain same list of files as the
last used register.
_ is black hole register. It can be used for writing, but its list is
always empty.
Registers with names from a to z and from A to Z are named ones. Low‐
ercase registers are cleared before adding new files, while uppercase
aren't and should be used to append new files to the existing file list
of appropriate lowercase register (A for a, B for b, ...).
Registers can be changed on :empty command if they contain files under
trash directory (see "Trash directory" section below).
Registers do not contain one file more than once.
Example:
"a2yy
will put names of two files to register a (and to the unnamed regis‐
ter),
"Ad
will remove one file and append its name to register a (and to the
unnamed register),
p or "ap or "Ap
will insert previously yanked and deleted files into current directory.
Selectors
y, d, D, !, gu and gU commands accept selectors. You can combine them
with any of selectors below to quickly remove or yank several files.
Most of selectors are like vi motions: j, k, gg, G, H, L, M, %, f, F,
;, comma, ', ^, 0 and $. But there are some additional ones.
a all files in current view.
s selected files.
S all files except selected.
Examples:
dj - delete file under cursor and one below.
d2j - delete file under cursor and two below.
y6gg - yank all files from cursor position to 6th file in the list.
When you pass a count to whole command and its selector they are multi‐
plied. So:
2d2j - delete file under cursor and four below.
2dj - delete file under cursor and two below.
2y6gg - yank all files from cursor position to 12th file in the list.
Visual Mode
In visual mode work almost all normal mode keys, but they do not accept
selectors.
Enter save selection and go back to normal mode.
gv restore previous visual selection.
v leave visual mode.
V leave visual mode.
: enter command line mode. When you leave it selection will be
cleared.
o switch active selection bound.
O switch active selection bound.
gu, u make names of selected files lowercase.
gU, U make names of selected files uppercase.
View Mode
This mode tries to imitate the less program. List of builtin shortcuts
can be found below. Shortcuts can be customized using :qmap, :qnoremap
and :qunmap command-line commands.
Shift-Tab, Tab, q, Q, ZZ
go back to normal mode.
[count]e, [count]Ctrl-E, [count]j, [count]Ctrl-N, [count]Enter
forward one line (or [count] lines).
[count]y, [count]Ctrl-Y, [count]k, [count]Ctrl-K, [count]Ctrl-P
backward one line (or [count] lines).
[count]f, [count]Ctrl-F, [count]Ctrl-V, [count]Space Bar
forward one window (or [count] lines).
[count]b, [count]Ctrl-B, [count]Alt-V
backward one window (or [count] lines).
[count]z
forward one window (and set window to [count]).
[count]w
backward one window (and set window to [count]).
[count]Alt-Space
forward one window, but don't stop at end-of-file.
[count]d, [count]Ctrl-D
forward one half-window (and set half-window to [count]).
[count]u, [count]Ctrl-U
backward one half-window (and set half-window to [count]).
r, Ctrl-R, Ctrl-L
repaint screen.
R reload view preserving scroll position.
[count]/pattern
search forward for ([count]‐th) matching line.
[count]?pattern
search backward for ([count]‐th) matching line.
[count]n
repeat previous search (for [count]‐th occurrence).
[count]N
repeat previous search in reverse direction.
[count]g, [count]<, [count]Alt-<
go to first line in file (or line [count]).
[count]G, [count]>, [count]Alt->
go to last line in file (or line [count]).
[count]p, [count]%
go to beginning of file (or N percent into file).
v edit the current file with vim.
Ctrl-W H
move the pane to the far left.
Ctrl-W J
move the pane to the very bottom.
Ctrl-W K
move the pane to the very top.
Ctrl-W L
move the pane to the far right.
Ctrl-W h
switch to left pane.
Ctrl-W j
switch to pane below.
Ctrl-W k
switch to pane above.
Ctrl-W l
switch to right pane.
Ctrl-W b
switch to bottom-right window.
Ctrl-W t
switch to top-left window.
Ctrl-W p
switch to previous window.
Ctrl-W w
switch to other pane.
Ctrl-W o
leave only one pane.
Ctrl-W s
split window horizontally.
Ctrl-W v
split window vertically.
Ctrl-W x
exchange panes.
Ctrl-W +
increase size of the view.
Ctrl-W -
decrease size of the view.
Ctrl-W <
increase size of the view.
Ctrl-W >
decrease size of the view.
Ctrl-W |
maximize current view.
Ctrl-W _
maximize current view.
Ctrl-W =
make size of two views equal.
In general, all "Ctrl-W x" keys above work the same was as in Normal
mode. Active mode is automatically changed on navigating among win‐
dows. When less-like mode activated on file preview is left using one
by "Ctrl-W x" keys, its state is stored until another file is showed
using preview (it's possible to leave the mode, hide preview pane, do
something else, then get back to the file and show preview pane again
with previously stored state in it).
Command line Mode
This keys apply to all submodes of the command line mode: command,
prompt and search.
Down, Up, Left, Right, Home, End and Delete are extended keys and they
are not available if vifm is compiled with --disable-extended-keys
option.
Esc, Ctrl-C
leave command line mode, cancels input. Cancelled input is
saved into appropriate history and can be recalled later.
Ctrl-M, Enter
execute command and leave command line mode.
Ctrl-I, Tab
complete command or its argument.
Shift-Tab
complete in reverse order.
Ctrl-_ stop completion and return original input.
Ctrl-K remove characters from cursor position till the end of line.
Ctrl-U remove characters from cursor position till the beginning of
line.
Ctrl-H, Backspace
remove character before the cursor.
Ctrl-D, Delete
remove character under the cursor.
Ctrl-B, Left
move cursor to the left.
Ctrl-F, Right
move cursor to the right.
Ctrl-A, Home
go to line beginning.
Ctrl-E, End
go to line end
Alt-B go to the beginning of previous word.
Alt-F go to the end of next word.
Ctrl-W remove characters from cursor position till the beginning of
previous word.
Alt-D remove characters from cursor position till the beginning of
next word.
Ctrl-T swap the order of current and previous character and move cursor
forward or, if cursor past the end of line, swap the order of
two last characters in the line.
Alt-. insert last part of previous command to current cursor position.
Each next call will insert last part of older command.
Ctrl-G edit command-line content in external editor. See "Command line
editing" section for details.
Ctrl-N recall more recent command-line from history.
Ctrl-P recall older command-line from history.
Up recall more recent command-line from history, that begins as the
current command-line.
Down recall older command-line from history, that begins as the cur‐
rent command-line.
Command line editing
vifm provides a facility to edit several kinds of data, that is usually
edited in command-line mode, in external editor (using command speci‐
fied by ´vicmd' or 'vixcmd' option). This has at least two advantages
over built-in command-line mode:
- one can use full power of Vim to edit text;
- finding and reusing history entries becomes possible.
The facility is supported by four input submodes of the command-line:
- command;
- forward search;
- backward search;
- file rename (see description of cw and cW normal mode keys).
Editing command-line using external editor is activated by the c_CTRL-G
shortcut. It's also possible to do almost the same from Normal and
Visual modes using q:, q/ and q? commands.
Temporary file created for the purpose of editing the line has the fol‐
lowing structure:
1. First line, which is either empty or contains text already entered
in command-line.
2. 2nd and all other lines with history items starting with the most
recent one. Altering this lines in any way won't change history
items stored by vifm.
After editing application is finished the first line of the file is
taken as the result of operation, when the application returns zero
exit code. If the application returns an error (see :cquit command in
Vim), all the edits made to the file are ignored, but the initial value
of the first line is saved in appropriate history.
Commands
Commands are executed with :command_name<Return>
Commented out lines should start with the double quote symbol, which
may be preceded by whitespace characters.
´|' can be used to separate commands, so you can give multiple commands
in one line. If you want to use '|' in an argument, precede it with
'\'.
These commands see '|' as part of their arguments even when it's
escaped:
:[range]!
:cmap
:cnoremap
:command
:filetype
:fileviewer
:filextype
:map
:mmap
:mnoremap
:nmap
:nnoremap
:noremap
:normal
:qmap
:qnoremap
:vmap
:vnoremap
:windo
:winrun
To be able to use another command after one of these, wrap it with the
:execute command. An example:
if filetype('.') == 'reg' | execute '!!echo regular file' | endif
:[count]
:number
move to the file number.
:12 would move to the 12th file in the list.
:0 move to the top of the list.
:$ move to the bottom of the list.
:[count]command
The only builtin :[count]command are :[count]d[elete] and
:[count]y[ank].
:d3 would delete three files starting at the current file position
moving down.
:3d would delete one file at the third line in the list.
:command [args]
:[range]!program
will execute the program in a shell
:[range]!command &
will run the process in the background using vifm's means.
Programs that write to stdout like ls will create an error message
showing partial output of the command.
Take note of the space before ampersand symbol, if you omit it, command
will be run in the background using job control of your shell.
Accepts macros.
:[range]!! <program>
is the same as :! but will pause the screen before returning to
Vifm.
:!! will execute the last command.
:[range]alink[!?]
creates absolute symbolic links of files in directory of other
view. With "?" vifm will open vi to edit filenames. "!"
forces overwrite.
:[range]alink[!] path
creates absolute symbolic links of files in directory specified
with the path (absolute or relative to directory of other view).
"!" forces overwrite.
:[range]alink[!] name1 name2...
creates absolute symbolic links of files in directory of other
view giving each next link a corresponding name from the argu‐
ment list. "!" forces overwrite.
:apropos manpage
will create a menu of items returned by the apropos command.
Selecting an item in the menu will open the corresponding man‐
page. By default the command relies on the external "apropos"
utility, which can be customized by altering value of the 'apro‐
posprg' option.
:apropos
repeats last :apropos command.
:cd or :cd ~ or :cd $HOME
change to your home directory.
:cd - go to previous directory.
:cd ~/dir
change directory to ~/dir.
:cd /curr/dir /other/dir
change directory of the current pane to /curr/dir and directory
of the other pane to /other/dir. When using relative paths vifm
assumes that both of them are relative to current directory of
current view. Command will not fail if one of directories is
invalid. Accepts macros.
:cd! /dir
same as :cd /dir /dir.
:c[hange]
create a menu window to alter a files properties.
:[range]chmod
shows file attributes (permission on *nix and properties on Win‐
dows) change dialog.
:[range]chmod[!] arg...
only for *nix
changes permissions for files. See 'man chmod' for arg format.
"!" means set permissions recursively.
:[range]chown
only for *nix
same as co key in normal mode.
:[range]chown [user][:][group]
only for *nix
changes owner and/or group of files. Operates on directories
recursively.
:[range]clone[!?]
clones files in current directory. With "?" vifm will open vi
to edit filenames. "!" forces overwrite. Macros are expanded.
:[range]clone[!] path
clones files to directory specified with the path (absolute or
relative to current directory). "!" forces overwrite. Macros
are expanded.
:[range]clone[!] name1 name2...
clones files in current directory giving each next clone a cor‐
responding name from the argument list. "!" forces overwrite.
Macros are expanded.
:colo[rscheme]?
prints current color scheme name in the status bar.
:colo[rscheme]
gives a menu with a list of available color schemes. You can
choose default color scheme here. It will be used for view if
no DIRECTORY in colorscheme file fits current path. It's also
used to set border color (except view titles) and colors in the
menus and dialogs.
:colo[rscheme] color_scheme_name
changes default color scheme to color_scheme_name.
:colo[rscheme] color_scheme_name directory
associates directory with the color scheme. The directory argu‐
ment can be both absolute or relative path when :colorscheme
command is executed from command line, but mandatory should be
an absolute path when the command is executed in scripts loaded
at startup (until vifm is completely loaded).
:comc[lear]
removes all user defined commands.
:com[mand]
gives a menu of user commands.
:com[mand] beginning
shows user defined commands that start with the beginning.
:com[mand] name action
sets a new user command.
Trying to use a reserved command name will result in an error
message.
Use :com[mand]! to overwrite a previously set command.
Unlike vim user commands do not have to start with a capital
letter. User commands are run in a shell by default. To run a
command in the background you must set it as a background com‐
mand with & at the end of the commands action (:com rm rm %f &).
Command name cannot contain numbers or special symbols (except
'?' and '!').
:com[mand] name /pattern
will set search pattern.
:com[mand] name filter pattern
will set file name filter.
:com[mand] cmd :commands
will set kind of alias for internal command (like in a shell).
Will pass range given to alias to an aliased command, so running
:%cp after
:command cp :copy %a
equals
:%copy
:[range]co[py][!?][ &]
copies files to directory of other view. With "?" vifm will
open vi to edit filenames. "!" forces overwrite.
:[range]co[py][!] path[ &]
copies files to directory specified with the path (absolute or
relative to directory of other view). "!" forces overwrite.
:[range]co[py][!] name1 name2...[ &]
copies files to directory of other view giving each next file a
corresponding name from the argument list. "!" forces over‐
write.
:[range]d[elete][!][ &]
delete selected file or files. "!" means completely remove
file.
:[range]d[elete][!] [reg] [count][ &]
will delete files to the reg register. "!" means completely
remove file.
:delc[ommand] command_name
will remove the command_name user command.
:delm[arks]!
will delete all marks.
:delm[arks] marks ...
will delete specified marks, each argument is treated as a set
of marks.
:di[splay]
popup menu with registers content.
:di[splay] list ...
display the contents of the numbered and named registers that
are mentioned in list (for example "az to display "", "a and "z
content).
:dirs display directory stack.
:ec[ho] [<expr>...]
evaluates each argument as an expression and outputs them sepa‐
rated by a space. See help on :let command for a definition of
<expr>.
:[range]e[dit] [file...]
will load the selected or passed file or files into vi. Accepts
macros.
:el[se]
executes commands until next matching :endif if they previously
were not being executed. See also help on :if and :endif com‐
mands.
:empty will permanently remove 'rm -fr' files from trash directory. It
will also remove all operations from undolist that have no sense
after :empty and remove all records about files in trash direc‐
tory from all registers. See "Trash directory" section below.
:en[dif]
ends conditional block. See also help on :if and :else com‐
mands.
:exe[cute] [<expr>...]
evaluates each argument as an expression and joins results sepa‐
rated by a space to get a single string, which is then executed
as a command-line command. See help on :let command for a defi‐
nition of <expr>.
:exi[t][!]
same as :quit.
:f[ile]
popup menu of programs set for the file type of the current
file. Add ' &' at the end of command to run program in back‐
ground.
:f[ile] arg
run associated command that begins with the arg without opening
menu.
:filet[ype] pat1,pat2,... [{descr}]def_prog[ &],[{descr}]prog2[ &],...
will associate given program list to each of the patterns.
Associated program (command) is used by handlers of l and Enter
keys (and also in the :file menu). If you need to insert comma
into command just double it (",,"). Space followed by an amper‐
sand as two last characters of a command means running of the
command in the background. Optional description can be given to
each command to ease understanding of what command will do in
the :file menu. Vifm will try the rest of the programs for an
association when the default isn't found. When program entry
doesn't contain any of vifm macros, name of current file is
appended as if program entry ended with %c macro. On Windows
path to executables containing spaces can (and should be for
correct work with such paths) be double quoted. See "Globs"
section below for pattern definition. See also "Automatic FUSE
mounts" section below. Example for zip archives and several
actions:
filetype *.zip,*.jar,*.war,*.ear
\ {Mount with fuse-zip}
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
\ {View contents}
\ zip -sf %c | less,
\ {Extract here}
\ tar -xf %c,
:filex[type] pat1,pat2,... [{ description }] def_program,program2,...
same as :filetype, but vifm will ignore this command if it's not running in X.
In X :filextype is equal to :filetype. See "Globs" section below for pattern
definition. See also "Automatic FUSE mounts" section below.
:filev[iewer] pat1,pat2,... command
will associate given command as a viewer to each of the patterns. Viewer is a
command which output is captured and showed in the second pane of vifm after
running :view command. When the command doesn't contain any of vifm macros,
name of current file is appended as if command ended with %c macro. See
"Globs" section below for pattern definition. Example for zip archives:
fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c
:filter[!] regular_expression_pattern
:filter[!] /regular_expression_pattern/
will filter all the files out of the directory listing that match the regular
expression. Using second variant you can use the bar ('|') symbol without
escaping. Empty regular expression (specified by //, "" or '') means using of
the last search pattern. Use '!' to control state of filter inversion after
updating filter value (also see 'cpoptions' description). Filter is matched
case sensitively on *nix and case insensitively on Windows.
:filter /.o$ would filter all files ending in .o from the filelist.
Note: vifm uses extended regular expressions.
:filter
reset filter (set it to empty string) and show all files.
:filter!
same as :invert.
:filter?
show current value of name and auto filters.
:[range]fin[d] pattern
will show results of find command in the menu. Searches among selected files if
any. Accepts macros. By default the command relies on the external "find"
utility, which can be customized by altering value of the 'findprg' option.
:[range]fin[d] -opt...
same as :find above, but user defines all find arguments. Searches among
selected files if any.
:[range]fin[d] path -opt...
same as :find above, but user defines all find arguments. Ignores selection and
range.
:[range]fin[d]
repeats last :find command.
:fini[sh]
Stop sourcing a script. Can only be used in a vifm script file. This is a quick
way to skip the rest of the file.
:[range]gr[ep][!] pattern
will show results of grep command in the menu. Add "!" to request inversion of
search (look for lines that do not match pattern). Searches among selected
files if any and no range given. Ignores binary files by default. By default
the command relies on the external "grep" utility, which can be customized by
altering value of the 'grepprg' option.
:[range]gr[ep][!] -opt...
same as :grep above, but user defines all find arguments, which are not escaped.
Searches among selected files if any.
:[range]gr[ep][!]
repeats last :grep command. "!" of this command inverts "!" in repeated
command.
:h[elp]
show the help file.
:h[elp] argument
is the same as using ':h argument' in vim. Use vifm-<something> to get help
on vifm (tab completion works). This form of the command doesn't work when
´vimhelp' option is off.
:hi[ghlight]
will show information about all highlight groups in the current directory.
:hi[ghlight] group-name
will show information on given highlight group of the default color scheme.
:hi[ghlight] group-name cterm=style | ctermfg=color | ctermbg=color
sets style (cterm), foreground (ctermfg) or/and background (ctermbg) parameters
of highlight groups of the current default color scheme.
Available style values (some of them can be combined):
- bold
- underline
- reverse or inverse
- standout
- none
Available group-name values:
- Win - color of all windows (views, dialogs, menus)
- Border - color of vertical parts of the border
- TopLineSel - top line color of the current pane
- TopLine - top line color of the other pane
- CmdLine - the command line/status bar color
- ErrorMsg - color of error messages in the status bar
- StatusLine - color of the line above the status bar
- WildMenu - color of the wild menu items
- CurrLine - line at cursor position in the view
- Selected - color of selected files
- Directory - color of directories
- Link - color of symbolic links in the views
- BrokenLink - color of broken symbolic links
- Socket - color of sockets
- Device - color of block and character devices
- Executable - color of executable files
- Fifo - color of fifo pipes
Available colors:
- -1 or default or none - default or transparent
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
Light versions of colors are regular colors with bold attribute set. So order
of arguments of :highlight command is important and it's better to put "cterm"
in front of others to prevent it from overwriting attributes set by "ctermfg" or
"ctermbg" arguments.
Since there are two colors and only one bold attribute it affects both colors
when "reverse" attribute is used when running vifm in terminal emulator. While
linux native console can handle boldness of foreground and background colors
independently, which is for consistency with terminal emulators accessible from
vifm only implicitly by using light versions of colors.
Here is the hierarchy of highlight groups, which you need to know for using
transparency:
StatusLine
WildMenu
Border
CmdLine
ErrorMsg
Win
Directory
Link
BrokenLink
Socket
Device
Fifo
Executable
Selected
CurrLine
TopLine
TopLineSel
"none" means default terminal color for highlight groups at the first level of
the hierarchy and transparency for all others.
:his[tory]
creates a popup menu of directories visited.
:his[tory] x
x can be:
d[ir] or . show directory history.
c[md] or : show command line history.
s[earch] or / show search history and search forward on l key.
f[search] or / show search history and search forward on l key.
b[search] or ? show search history and search backward on l key.
i[nput] or @ show prompt history (e.g. on one file renaming).
fi[lter] or = show filter history (see description of the "=" normal mode command).
:if {expr1}
starts conditional block. Commands are executed until next matching :else of
:endif command if {expr1} evaluates to non-zero, otherwise they are ignored.
See also help on :else and :endif commands.
:invert [f]
invert file name filter.
:invert? [f]
show current filter state.
:invert s
invert selection.
:invert o
invert sorting order of the primary sorting key.
:invert? o
show sorting order of the primary sorting key.
:jobs shows menu of current backgrounded processes.
:let $ENV_VAR = <expr>
sets environment variable. Warning: setting environment variable to an empty
string on Windows removes it.
:let $ENV_VAR .= <expr>
append value to environment variable.
Where <expr> could be a single-quoted string, double-quoted string, an environment variable, function call or a concatanation of any of them in any order using the '.' operator. Any whitespace is ignored.
:locate filename
uses the locate command to create a menu of filenames
Selecting a file from the menu will reload the current file list in vifm
to show the selected file. By default the command relies on the external
"locate" utility (it's assumed that its database is already built), which can be
customized by altering value of the 'locateprg' option.
:locate
repeats last :locate command.
:[range]ma[rk][?] x [/full/path] [filename]
Set mark x (a-zA-Z0-9) at /full/path and filename. By default current directory
is being used. If no filename was given and /full/path is current directory
then last file in [range] is used. Using of macros is allowed. Question mark
will stop command from overwriting existing marks.
:marks create a popup menu of bookmarks.
:marks list ...
display the contents of the marks that are mentioned in list.
:mes[sages]
shows previously given messages (up to 50).
:mkdir[!] dir ...
creates directories with given names. "!" means make parent directories as
needed. Macros are expanded.
:[range]m[ove][!?][ &]
moves files to directory of other view. With "?" vifm will open vi to edit
filenames. "!" forces overwrite.
:[range]m[ove][!] path[ &]
moves files to directory specified with the path (absolute or relative to
directory of other view). "!" forces overwrite.
:[range]m[ove][!] name1 name2...[ &]
moves files to directory of other view giving each next file a corresponding
name from the argument list. "!" forces overwrite.
:noh[lsearch]
clear selection in current pane.
:norm[al][!] commands
executes normal mode commands. If "!" is used, mappings will not be used. If
the last command is unfinished it will be aborted as if <esc> or <c-c> was
typed. A ":" should be completed as well. Commands can't start with a space,
so put a count of 1 (one) before it.
:on[ly]
changes the window to show only the current file directory.
:popd remove pane directories from stack.
:pushd[!] /curr/dir [/other/dir]
add pane directories to stack and process arguments like :cd command.
:pushd exchanges the top two items of the directory stack.
:pw[d] show the present working directory.
:q[uit][!]
will exit vifm (add ! if you don't want to save changes or check if there are
any of backgrounded commands still running).
:[range]y[ank] [reg] [count]
will yank files to the reg register.
:ls lists windows of active terminal multiplexer (only when terminal multiplexer is
used). This is achieved by issuing proper command for active terminal
multiplexer, thus the list is not handled by vifm.
:reg[isters]
popup menu with registers content.
:reg[isters] list ...
display the contents of the numbered and named registers that are mentioned in
list (for example "az to display "", "a and "z content).
:[range]rename[!]
rename files using vi to edit names. ! means go recursively through directories.
:[range]rename name1 name2...
rename each of selected files to a corresponding name.
:restart
will free a lot of things (histories, commands, etc.), reread vifminfo and
vifmrc files and run startup commands passed in the argument list, thus losing
all unsaved changes (e.g. recent history or keys mapped in current session).
:[range]restore
will restore file from trash directory, doesn't work in any other directory.
See "Trash directory" section below.
:[range]rlink[!?]
creates relative symbolic links of files in directory of other view. With "?"
vifm will open vi to edit filenames. "!" forces overwrite.
:[range]rlink[!] path
creates relative symbolic links of files in directory specified with the path
(absolute or relative to directory of other view). "!" forces overwrite.
:[range]rlink[!] name1 name2...
creates relative symbolic links of files in directory of other view giving each
next link a corresponding name from the argument list. "!" forces overwrite.
:screen
toggles whether to use the terminal multiplexer or not.
A terminal multiplexer uses pseudo terminals to allow multiple windows to be
used in the console or in a single xterm. Starting vifm from terminal
multiplexer with appropriate support turned on will cause vifm to open a new
terminal multiplexer window for each new file edited or program launched from
vifm.
This requires screen version 3.9.9 or newer for the screen -X argument or tmux
(version or newer 1.8 is recommented).
:screen?
shows whether integration with terminal multiplexers is enabled.
Note: the command is called screen for historical reasons (when tmux wasn't yet
supported) and might be changed in future releases, or get an alias.
:se[t] shows all options that differ from their default value.
:se[t] all
shows all options.
:se[t] opt1=val1 opt2='val2' opt3="val3" ...
will set options to given values.
You can use following syntax:
- for all options - option, option? and option&
- for boolean options - nooption, invoption and option!
- for integer options - option=x, option+=x and option-=x
- for string options - option=x
- for string list options - option=x, option+=x and option-=x
- for enumeration options - option=x, option+=x and option-=x
- for enumeration options - option=x
- for set options - option=x, option+=x and option-=x
- for charset options - option=x, option+=x and option-=x
the meaning:
- option - turn option on (for boolean) or print its value (for all others)
- nooption - turn option off
- invoption - invert option state
- option! - invert option state
- option? - print option value
- option& - reset option to its default value
- option=x or option:x - set option to x
- option+=x - add x to option
- option-=x - remove (or subtract) x from option
Option name can be prepended and appended by any number of whitespace
characters.
:sh[ell]
will start a shell.
:sor[t]
creates a popup menu of different sorting methods, when one can select primary
sorting key. When 'viewcolumns' options is empty and 'lsview' is off, changing
primary sorting key will also affect view look (in particular the second column
of the view will be changed).
:so[urce] file
reads command-line commands from the file.
:sp[lit]
switch to a two window horizontal view.
:sp[lit]!
toggles window horizontal splitting.
:sp[lit] path
splits the window horizontally to show both file directories. And changes other
pane to path (absolute or relative to current directory of active pane).
:[range]s[ubstitite]/pattern/string/[flags]
for each file in range replace a match of pattern with string.
String can contain \0...\9 to link to capture groups (\0 - all match, \1 -
first group, etc.).
Available flags:
- i - ignore case (the 'ignorecase' and 'smartcase' options are not used)
- I - don't ignore case (the 'ignorecase' and 'smartcase' options are not used)
- g - substitute all matches in each file name (each g toggles this)
:[range]s[ubstitute]//string/[flags]
will use previous pattern.
:[range]s[ubstitute]
will repeat previous substitution command.
:sync [relative path]
change the other panel to the current panel directory or to some path relative
to the current directory. Using macros is allowed.
:sync!
change the other panel to the current panel directory and synchronize cursor
position.
:touch file...
will create files. Aborts on errors and won't update time of existing files.
Macros are expanded.
:[range]tr/pattern/string/
for each file in range transliterate the characters which appear in pattern to
the corresponding character in string. When string is shorter than pattern,
it's padded with its last character.
String can contain ...9 to link to capture groups (0 - all match, 1 - first
group, etc.).
:undol[ist]
show list of latest changes. Add ! to see commands.
:unl[et][!] $ENV_VAR1 $ENV_VAR2 ...
remove environment variables. Add ! to omit displaying of warnings about
nonexistent variables.
:ve[rsion]
show menu with version information.
:vifm same as :version.
:vie[w]
toggle on and off the quick file view.
:vie[w]!
turns on quick file view if it's off.
:volumes
only for MS-Windows
will popup menu with volume list. Hitting l (or Enter) key will open
appropriate volume in the current pane.
:vs[plit]
switch to a two window vertical view.
:vs[plit]!
toggles window vertical splitting.
:vs[plit] path
splits the window vertically to show both file directories. And changes other
pane to path (absolute or relative to current directory of active pane).
:windo [command...]
Execute command for each pane (same as :winrun % command).
:winrun type [command...]
Execute command for pane(s), which is determined by type argument:
- ^ - top-left pane
- $ - bottom-right pane
- % - all panes
- . - current pane
- , - other pane
:w[rite]
write vifminfo file (add ! to force write even if settings weren't changed).
:wq[!] same as :quit, but ! only disables check of backgrounded commands.
:x[it][!]
will exit Vifm (add ! if you don't want to save changes).
:map lhs rhs
map lhs key sequence to rhs in normal and visual modes.
:map! lhs rhs
map lhs key sequence to rhs in command line mode.
:cm[ap] lhs rhs
map lhs to rhs in command line mode.
:mm[ap] lhs rhs
map lhs to rhs in menu mode.
:nm[ap] lhs rhs
map lhs to rhs in normal mode.
:qm[ap] lhs rhs
map lhs to rhs in view mode.
:vm[ap] lhs rhs
map lhs to rhs in visual mode.
:cm[ap]
lists all maps in command line mode.
:mm[ap]
lists all maps in menu mode.
:nm[ap]
lists all maps in normal mode.
:qm[ap]
lists all maps in view mode.
:vm[ap]
lists all maps in visual mode.
:cm[ap] beginning
lists all maps in command line mode that start with the beginning.
:mm[ap] beginning
lists all maps in menu mode that start with the beginning.
:nm[ap] beginning
lists all maps in normal mode that start with the beginning.
:qm[ap] beginning
lists all maps in view mode that start with the beginning.
:vm[ap] beginning
lists all maps in visual mode that start with the beginning.
:no[remap] lhs rhs
map the key sequence lhs to {rhs} for normal and visual modes, but disallow
mapping of rhs.
:no[remap]! lhs rhs
map the key sequence lhs to {rhs} for command line mode, but disallow mapping of
rhs.
:cno[remap] lhs rhs
map the key sequence lhs to {rhs} for command line mode, but disallow mapping of
rhs.
:mn[oremap] lhs rhs
map the key sequence lhs to {rhs} for menu mode, but disallow mapping of rhs.
:nn[oremap] lhs rhs
map the key sequence lhs to {rhs} for normal mode, but disallow mapping of rhs.
:qn[oremap] lhs rhs
map the key sequence lhs to {rhs} for view mode, but disallow mapping of rhs.
:vn[oremap] lhs rhs
map the key sequence lhs to {rhs} for visual mode, but disallow mapping of rhs.
:unm[ap] lhs
remove the mapping of lhs from normal and visual modes.
:unm[ap]! lhs
remove the mapping of lhs from command line mode.
:cu[nmap] lhs
remove the mapping of lhs from command line mode.
:mu[nmap] lhs
remove the mapping of lhs from menu mode.
:nun[map] lhs
remove the mapping of lhs from normal mode.
:qun[map] lhs
remove the mapping of lhs from view mode.
:vu[nmap] lhs
remove the mapping of lhs from visual mode.
Ranges
The ranges implemented include:
2,3 - from second to third file in the list (including it)
% - the entire directory.
. - the current position in the filelist.
$ - the end of the filelist.
't - the mark position t.
Examples:
:%delete
would delete all files in the directory.
:2,4delete
would delete the files in the list positions 2 through 4.
:.,$delete
would delete the files from the current position to the end of the
filelist.
:3delete4
would delete the files in the list positions 3, 4, 5, 6.
If a backward range is given :4,2delete - an query message is given and
user can chose what to do next.
The builtin commands that accept a range are :d[elete] and :y[ank].
Command macros
The command macros may be used in user commands.
%a User arguments. When user arguments contain macros, they are
expanded before preforming substitution of %a.
%c %"c The current file under the cursor.
%C %"C The current file under the cursor in the other directory.
%f %"f All of the selected files.
%F %"F All of the selected files in the other directory list.
%b %"b Same as %f %F.
%d %"d Full path to current directory.
%D %"D Full path to other file list directory.
%rx %"rx
Full paths to files in the register {x}. In case of invalid
symbol in place of {x}, it's processed with the rest of the line
and default register is used.
%m Show command output in a menu.
%M Same as %m, but l (or Enter) key is handled like for :locate and
:find commands.
%S Show command output in the status bar.
%s Execute command in split window of active terminal multiplexer
(ignored if not running inside one).
%i Completely ignore command output.
Use %% if you need to put a percent sign in your command.
Note that %m, %M, %s, %S and %i macros are mutually exclusive. Only the
last one of them in the command will take effect.
You can use filename modifiers after %c, %C, %f, %F, %b, %d and %D
macros. Supported modifiers are:
- :p - full path
- :u - UNC name of path (e.g. "\\server" in
"\\server\share"), Windows only. Expands to current computer name
for not UNC paths.
- :~ - relative to the home directory
- :. - relative to current directory
- :h - head of the filename
- :t - tail of the filename
- :r - root of the filename (without last extension)
- :e - extension of the filename (last one)
- :s?pat?sub? - substitute the first occurrence of pat with sub. You
can use any character for '?', but it must not occur in pat or sub.
- :gs?pat?sub? - like :s, but substitutes all occurrences of pat with
sub.
See ':h filename-modifiers' in Vim's documentation for the detailed
description.
Using %x means expand corresponding macro escaping all characters
that have special meaning. And %"x means using of double quotes and
escape only backslash and double quote characters, which is more use‐
ful on Windows systems.
Position and quantity (if there is any) of %m, %M, %S or %s macros in
the command is unimportant. All their occurrences will be removed
from the resulting command.
%c and %f macros are expanded to file names only, when %C and %F are
expanded to full paths. %f and %F follow this in %b too.
:com move mv %f %D
would set the :move command to move all of the files selected in the
current directory to the other directory.
The %a macro will substitute any arguments given in a command into the
command. All arguments are considered optional. ":com lsl !!ls -l %a"
will set the lsl command to execute ls -l with or without an argument.
:lsl<Return>
will list the directory contents of the current directory.
:lsl filename<Return>
will list only the given filename.
The macros can also be used in directly executing commands. ":!mv %f
%D" would move the current directory selected files to the other direc‐
tory.
Appending & to the end of a command will cause it to be executed in the
background.Typically you want to run two kinds of external commands in
thebackground:
- GUI applications that doesn't fork thus block vifm (:!sxiv %f &);
- console tools that do not work with terminal (:!mv %f %D &).
You don't want to run terminal commands, which require terminal input
oroutput something because they will mess up vifm's TUI. Anyway, if you
did runsuch a command, you can use Ctrl-L key to update vifm's TUI.
Rewriting the example command with macros given above with background‐
ing:
:!mv %f %D &
Note that %m, %M, %s, %S and %i macros have bigger priority than &. So
command containing at least one of them can't be backgrounded and " &"
at the end will be just silently ignored.
Command backgrounding
Copy and move operation can take a lot of time to proceed. That's why
vifm supports backgrounding of this two operations. To run :copy,
:move or :delete command in the background just add " &" at the end of
a command.
For each background operation a new thread will be created. Currently
job cannot be stopped or paused.
You can see if command is still running in the :jobs menu. Back‐
grounded commands have progress instead of process id at the line
beginning.
Background operations cannot be undone.
Globs
:filetype, :filextype and :fileviewer commands support globs to match
file names. Here is a short overview of globs and some important
points that one needs to know about them.
Only names of files are matched by the globs, not full paths. E.g.
:filetype Makefile make %c
will match files with name "Makefile" regardless whether it's in root
or home directory.
*, ?, [ and ] are treated as special symbols in the pattern. E.g.
:filetype * less %c
matches all files. One can use character classes for escaping, so
:filetype [*] less %c
matches only one file name, the one which contains only asterisk sym‐
bol.
* means any number of any characters (possibly an empty substring),
with one exception: asterisk at the pattern beginning doesn't match dot
in the first position. E.g.
:fileviewer *.zip,*.jar zip -sf %c
associates using of zip program to preview all files with zip or jar
extensions as listing of their content.
? means any character at this position. E.g.
:fileviewer ?.out file %c
calls file tool for all files which has exactly one character before
their extension (e.g. a.out, b.out).
Square brackets designate character class, which means that whole char‐
acter class matches against any of characters listed in it. For exam‐
ple
:fileviewer *.[ch] highlight -O xterm256 -s dante --syntax c %c
makes vifm call highlight program to colorize source and header files
in C language for a 256-color terminal. Equal command would be
:fileviewer *.c,*.h highlight -O xterm256 -s dante --syntax c %c
Inside square brackets ^ or ! can be used for symbol class negotiation
and the - symbol to set a range. ^ and ! should appear right after the
opening square bracket. For example
:filetype *.[!d]/ inspect_dir
associates inspect_dir as additional handler for all directories that
have one character extension unless it's "d" letter. And
:filetype [0-9].jpg sxiv
associates sxiv picture viewer only for JPEG-files that contain single
digit in their name.
:set options
Local options
These are kind of options that are local to a specific view. So
you can set ascending sorting order for left pane and descending
order for right pane.
aproposprg
type: string
default: "apropos %a"
Specifies format for an external command to be invoked by the
:apropos command. The format supports expanding of macros, spe‐
cific for a particular *prg option, and %% sequence for insert‐
ing percent sign literally. This option should include the %a
macro to specify placement of arguments passed to the :apropos
command. If the macro is not used, it will be implicitly added
after a space to the value of this option.
autochpos
type: boolean
default: true
When disabled vifm will set cursor to the first line in the view
after :cd and :pushd commands instead of saved cursor position.
Disabling this will also make vifm clear information about cur‐
sor position in the view history on :cd and :pushd commands (and
on startup if autochpos is disabled in the vifmrc). l key in
the :history . menu is treated like :cd command. This option
affects bookmarks, file position will not preserved.
columns co
type: int
default: terminal width on startup
Terminal width in characters.
classify
type: string list
default: ":dir:/"
Specifies file name prefixes and suffixes depending on file
types. The format is: [{prefix}]:{filetype}:[{suffix}]. Either
{prefix} or {suffix} or both of them can be omitted (which is
the default for all unspecified file types), this means empty
{prefix} and/or {suffix}. {prefix} and {suffix} should consist
exactly of one character. Elements are separated by commas.
Neither prefixes nor suffixes are part of file names, so they
don't affect commands which operate on file names in any way.
Comma (',') character should not be used. List of file type
names can be found in the description of filetype() function.
confirm cf
type: boolean
default: true
Ask about permanent deletion of files (on D or :delete! command
or on undo/redo operation).
cpoptions cpo
type: charset
default: "fst"
Contains a sequence of single-character flags. Each flag
enables behaviour of older versions of vifm. Flags:
f - when included, running :filter command results in not
inverted (matching files are filtered out) and :filter! in
inverted (matching files are left) filter, when omitted, meaning
of the exclamation mark changes to the opposite;
s - when included, yy, dd and DD normal mode commands act on
selection, otherwise they operate on current file only;
t - when included, <tab> (thus <c-i>) behave as <space> and
switch active pane, otherwise <tab> and <c-i> go forward in the
view history.
dotdirs
type: set
default: nonrootparent
Controls displaying of dot directories. The following values
are possible:
- rootparent - show "../" in root directory of file system
- nonrootparent - show "../" in non-root directories of file
system
Note that empty directories will always contain "../" entry
regardless of value of this option. "../" will disappear at the
moment at least one file is created inside the directory.
fastrun
type: boolean
default: false
With this option turned on you can run partially entered com‐
mands with unambiguous beginning using :! (e.g. :!Te instead of
:!Terminal or :!Te<tab>).
findprg
type: string
default: "find %s %a -print , -type d \( ! -readable -o ! -exe‐
cutable \) -prune"
Specifies format for an external command to be invoked by the
:find command. The format supports expanding of macros, spe‐
cific for a particular *prg option, and %% sequence for insert‐
ing percent sign literally. This option should include the %s
macro to specify placement of list of paths to search in and the
%a macro to specify placement of arguments passed to the :find
command. If some of the macros are not used, they will be
implicitly added after a space to the value of the option in the
following order: %s, %a.
%s and %a macro can slightly change their meaning depending on
:find command arguments. When the first argument points to an
existing directory, %s is assigned all arguments and %a is left
empty. Otherwise, %s is assigned a dot (".") meaning current
directory or list of selected filenames if any. %a is assigned
arguments when first argument starts with a dash ("-"), other‐
wise an escaped version of arguments, prepended by "-name" (on
*nix) or "-iname" (on Windows) predicate.
followlinks
type: boolean
default: true
Follow links on l or Enter.
fusehome
type: string
default: "($TMPDIR | $TEMP | $TEMPDIR | $TMP)/vifm_FUSE/"
Directory to be used as a root dir for FUSE mounts. Value of
the option can contain environment variables (in form
"$envname"), which will be expanded (prepend it with a slash to
prevent expansion). The value should expand to an absolute
path.
If you change this option, vifm won't remount anything. It
affects future mounts only. See "Automatic FUSE mounts" section
below for more information.
gdefault gd
type: boolean
default: false
When on, 'g' flag is on for :substitute by default.
grepprg
type: string
default: "grep -n -H -I -r %i %a %s"
Specifies format for an external command to be invoked by the
:grep command. The format supports expanding of macros, spe‐
cific for a particular *prg option, and %% sequence for insert‐
ing percent sign literally. This option should include the %i
macro to specify placement of "-v" string when inversion of
results is requested, the %a macro to specify placement of argu‐
ments passed to the :grep command and the %s macro to specify
placement of list of files to search in. If some of the macros
are not used, they will be implicitly added after a space to the
value of the 'grepprg' option in the following order: %i, %a,
%s.
Example of setup to use ack (http://beyondgrep.com/) instead of
grep:
set grepprg=ack\ -H\ -r\ %i\ %a\ %s
or The Silver Searcher (https://github.com/ggreer/the_sil‐
ver_searcher):
set grepprg=ag\ --line-numbers\ %i\ %a\ %s
history hi
type: integer
default: 15
Maximum number of directories in the view history and lines in
the prompt, command line and search histories.
hlsearch hls
type: bool
default: true
Highlight all matches of search pattern.
iec type: boolean
default: false
Use KiB, MiB, ... instead of KB, MB, ...
ignorecase ic
type: boolean
default: false
Ignore case in search patterns (:substitute, / and ? commands)
and characters after f and F commands. It doesn't affect file
filtering.
incsearch is
type: boolean
default: false
When this option is set, search will be performed starting from
initial cursor position each time search pattern is changed.
laststatus ls
type: boolean
default: true
Controls if status bar is visible.
lines type: int
default: terminal height on startup
Terminal height in lines.
locateprg
type: string
default: "locate %a"
Specifies format for an external command to be invoked by the
:locate command. The format supports expanding of macros, spe‐
cific for a particular *prg option, and %% sequence for insert‐
ing percent sign literally. This option should include the %a
macro to specify placement of arguments passed to the :locate
command. If the macro is not used, it will be implicitly added
after a space to the value of this option.
lsview type: boolean
default: false
type: local
When this option is set, directory view will be displayed in
multiple columns with filenames similar to output of `ls -x`
command. See ls-like view section below for format description.
rulerformat ruf
type: string
default: "%=%l-%S "
Determines the content of the ruler. Its width is 13 characters
and it's right aligned. Following macros are supported:
%l - file number
%L - total number of files in view (including filtered)
%- - number of filtered files
%S - number of showed files
%= - separation point between left and right align items
%% - percent sign
Percent sign can be followed by optional minimum field width.
Add '-' before minimum field width if you want field to be right
aligned. Example:
set rulerformat="%=%2l-%S [%L] "
runexec
type: boolean
default: false
Run executable file on Enter or l.
scrollbind scb
type: boolean
default: false
When this option is set, vifm will try to keep difference of
scrolling positions of two windows constant.
scrolloff so
type: int
default: 0
Minimal number of screen lines to keep above and below the cur‐
sor. If you want cursor line to always be in the middle of the
view (except at the beginning or end of the file list), set this
option to some large value (e.g. 999).
shell sh
type: string
default: $SHELL or "sh" or "cmd" (on MS-Windows)
Full path to the shell to use to run external commands.
shortmess shm
type: charset
default: ""
Contains a sequence of single-character flags. Each flag
enables shortening of some message displayed by vifm in the TUI.
Flags:
T - truncate status-bar messages in the middle if they are too
long to fit on the command line. "..." will appear in the mid‐
dle.
slowfs type: string list
default: ""
only for *nix
A list of mounter fs name beginnings (first column in /etc/mtab
or /proc/mounts) that work too slow for you. This option can be
used to stop vifm from making some requests to particular kinds
of file systems that can slow down file browsing. Currently
this means don't check if directory has changed and do not check
if target of symbolic links exists.
smartcase scs
type: boolean
default: false
Overrides the ignorecase option if the search pattern contains
at least one upper case character. Only used when ignorecase
option is enabled. It doesn't affect file filtering.
sort type: string list
default: +name on *nix and +iname on Windows
type: local
Sets list of sorting keys (first item is primary key, second is
secondary key, etc.):
[+-]ext - sort by extension
[+-]name - sort by name (including extension)
[+-]iname - sort by name (including extension, ignores case)
[+-]gid - sort by group id (*nix only)
[+-]gname - sort by group name (*nix only)
[+-]mode - sort by mode (*nix only)
[+-]perms - sort by permissions string (*nix only)
[+-]uid - sort by owner id (*nix only)
[+-]uname - sort by owner name (*nix only)
[+-]size - sort by size
[+-]atime - sort by time accessed
[+-]ctime - sort by time changed
[+-]mtime - sort by time modified
´+' means ascending sort for this key, and '-' means descending sort.
In case name (iname on Windoes) is skipped, it will be added at the end
automatically.
This option also changes view columns according to primary sorting key
set, unless 'viewcolumns' option is not empty.
sortnumbers
type: boolean
default: false
type: local
Natural sort of (version) numbers within text.
statusline stl
type: string
default: ""
Determines the content of the status line (the line right above
command-line). Empty string means use same format like in pre‐
vious versions. Following macros are supported:
- %t - file name (considering value of the 'classify' option)
- %A - file attributes (permissions on *nix or properties on
Windows)
- %u - user name or uid (if it cannot be resolved)
- %g - group name or gid (if it cannot be resolved)
- %s - file size in human readable format
- %E - size of selected files in human readable format, same as
%s when no files are selected, except that it will never
show size of ../ in visual mode, since it cannot be
selected
- %d - file modification date (uses 'timefmt' option)
- all 'rulerformat' macros
Percent sign can be followed by optional minimum field width.
Add '-' before minimum field width if you want field to be right
aligned. Example:
set statusline=" %t%= %A %10u:%-7g %15s %20d "
On Windows file properties include next flags (upper case means
flag is on):
A - archive
H - hidden
I - content isn't indexed
R - readonly
S - system
C - compressed
D - directory
E - encrypted
P - reparse point (e.g. symbolic link)
Z - sparse file
sortorder
type: enumeration
default: ascending
Sets sort order for primary key: ascending, descending.
tabstop ts
type: integer
default: value from curses library
Number of spaces that a Tab in the file counts for.
timefmt
type: string
default: " %m/%d %H:%M"
Format of time in file list. See man date or man strf‐
time for details.
timeoutlen tm
type: integer
default: 1000
The time in milliseconds that is waited for a mapped key
in case of already typed key sequence is ambiguous.
trash type: boolean
default: true
Use trash directory. See "Trash directory" section
below.
trashdir
type: string
default: "$HOME/.vifm/Trash"
Sets path to trash directory. Value of the option can
contain environment variables (in form "$envname"), which
will be expanded (prepend it with a slash to prevent
expansion). The value should expand to an absolute path.
Will attempt to create the directory if it does not
exist. See "Trash directory" section below.
undolevels ul
type: integer
default: 100
Maximum number of changes that can be undone.
vicmd type: string
default: "vim"
The actual command used to start vi. Ampersand sign at
the end (regardless whether it's preceded by space or
not) means backgrounding of command.
viewcolumns
type: string
default: ""
type: local
Format string containing list of columns in the view.
When this option is empty view columns to show are chosen
automatically using sorting keys (see 'sort') as a base.
Value of this option is ignored if 'lsview' is set. See
Column view section below for format description.
An example of setting the options for both panes (note
vifm-windo command):
windo set viewcolumns=-{name}..,6{size},11{perms}
vixcmd type: string
default: value of vicmd
The command used to start vi when in X. Ampersand sign
at the end (regardless whether it's preceded by space or
not) means backgrounding of command.
vifminfo
type: set
default: bookmarks
Controls what will be saved in the $VIFM/vifminfo file.
options - all options that can be set with the :set command
filetypes - associated programs and viewers
commands - user defined commands (see :command description)
bookmarks - bookmarks, except special ones like '< and '>
tui - state of the user interface (sorting, number of
windows, quick
view state, active view)
dhistory - directory history
state - file name and dot filters and terminal multiplex‐
ers integration
state
cs - default color scheme
savedirs - save last visited directory (needs dhistory)
chistory - command line history
shistory - search history (/ and ? commands)
phistory - prompt history
fhistory - filter history (see description of the "=" normal
mode command)
dirstack - directory stack overwrites previous stack, unless
stack of
current session is empty
registers - registers content
vimhelp
type: boolean
default: false
Use vim help format.
wildmenu wmnu
type: boolean
default: false
Controls whether possible matches of completion will be
shown above the command line.
wrap type: boolean
default: true
Controls whether to wrap text in quick view.
wrapscan ws
type: boolean
default: true
Searches wrap around end of the list.
Mappings
Since it's not easy to enter special characters there are several spe‐
cial sequences that can be used in place of them. They are:
<cr> Enter key
<bs> Backspace key
<tab> <s-tab>
Tabulation and Shift+Tabulation keys
<esc> <space> <home> <end> <left> <right> <up> <down> <pageup> <page‐
down>
Keys with obvious names.
<del> <delete>
Delete key. <del> and <delete> mean different codes, but
<delete> is more common.
<c-a>,<c-b>,...,<c-z>,<c-[>,<c->,<c-]>,<c-^>,<c-_>
Control + some key.
<a-a>,<a-b>,...,<a-z>
<m-a>,<m-b>,...,<m-z> Alt + some key.
<a-c-a>,<a-c-b>,...,<a-c-z>
<m-c-a>,<m-c-b>,...,<m-c-z> only for *nix
Alt + Ctrl + some key.
<f0> - <f63>
Functional keys
<c-f1> - <c-f12>
only for MS-Windows
Functional keys with Control key pressed.
<a-f1> - <a-f12>
only for MS-Windows
Functional keys with Alt key pressed.
<s-f1> - <s-f12>
only for MS-Windows
Functional keys with Shift key pressed.
vifm removes whitespace characters at the beginning and end of com‐
mands. That's why you may want to use <space> at the end of rhs in
mappings. For example:
cmap <f1> man<space>
will put "man " in line when you hit the <f1> key in the command line
mode.
Expression syntax
Supported expressions is a subset of what VimL provides.
Expression syntax summary, from least to most significant:
vifm-expr1 expr2 == expr2 equal
expr2 != expr2 not equal
vifm-expr2 expr3 . expr3 .. string concatenation
vifm-expr3 "string" string constant, \ is special
'string' string constant, ' is doubled
$VAR environment variable
function(expr1, ...) function call
".." indicates that the operations in this level can be concatenated.
expr1
-----
expr2 {cmp} expr2
Compare two expr2 expressions, resulting in a 0 if it evaluates to
false or 1 if it evaluates to true.
equal ==
notequal !=
Examples:
'a' == 'a' evaluates to 1
'a' == 'b' evaluates to 0
expr2
-----
expr3 . expr3 .. string concatenation
Examples:
'a' . 'b' = 'ab'
'aaa' . '' . 'c' = 'aaac'
expr3
-----
string
------
"string" string constant
Note that double quotes are used.
A string constant accepts these special characters:
\b backspace <bs>
\e escape <esc>
\n newline
\r return <cr>
\t tab <tab>
\\ backslash
\" double quote
Examples:
"\"Hello,\tWorld!\""
"Hi,\nthere!"
literal-string
--------------
´string' string constant
Note that single quotes are used.
This string is taken as it is. No backslashes are removed or have a
special meaning. The only exception is that two quotes stand for one
quote.
Examples:
'All\slashes\are\saved.'
'This string contains doubled single quotes ''here'''
environment variable
--------------------
$VAR environment variable
The String value of any environment variable. When it is not defined,
the result is an empty string.
Examples:
'This is my $PATH env: ' . $PATH
'vifmrc at ' . $MYVIFMRC . ' is used.'
function call
-------------
function(expr1, ...) function call
See Functions section below.
Examples:
"'" . filetype('.') . "'"
filetype('.') == 'reg'
Functions
USAGE RESULT DESCRIPTION
expand({expr}) String Expand macros in {expr}.
filetype({fnum}) String Returns file type from position.
expand({expr})
Expands macros in {expr} just like it's done for command-line commands.
Returns a string. See "Command macros" section above. Examples:
" percent sign
:echo expand('%%')
" the last part of directory name of the other pane
:echo expand('%D:t')
filetype({fnum})
The result is a string, which represents file type and is one of the
list:
exe executables
reg regular files
link symbolic links
dir directories
char character devices
block block devices
fifo pipes
sock *nix domain sockets
? unknown file type (should never appear)
Parameter {fnum} can have following values:
- '.' to get type of file under the cursor in the active pane
Menus and dialogs
General
j, k - move.
<Escape>, Ctrl-C, ZZ, ZQ - quit.
<Return>, l - select and exit the menu.
Ctrl-L - redraw the menu.
Escape, Ctrl-C, ZZ, ZQ, q - quit.
In all menus
Ctrl-B/Ctrl-F
Ctrl-D/Ctrl-U
Ctrl-E/Ctrl-Y
/ and ?, n/N
[num]G/[num]gg
H/M/L
zb/zt/zz
zh - scroll menu items [count] characters to the right.
zl - scroll menu items [count] characters to the left.
zH - scroll menu items half of screen width characters to the right.
zL - scroll menu items half of screen width characters to the left.
All these keys have the same meaning as in normal mode (but not L in
filetype menu).
: - enter command line mode for menus (currently only :exi[t], :q[uit],
:x[it] and :{range} are supported).
Apropos menu
l key won't close the menu allowing user to pick another man page, use
:q to close the menu.
Commands menu
dd on a command to remove.
Bookmarks menu
Escape or Ctrl-C to abort j and k to move through.
dd on a bookmark to remove.
Directory stack menu
Pressing l or Enter on directory name will rotate stack to place
selected directory pair at the top of the stack.
Filetype menu
Commands from vifmrc or typed in command-line are displayed above empty
line. All commands below empty line are from .desktop files.
Fileinfo dialog
Enter - close dialog
q - close dialog
Sort dialog
h - switch ascending/descending.
Space - switch ascending/descending.
q - close dialog
Attributes (permissions or properties) dialog
h - check/uncheck.
Space - check/uncheck.
q - close dialog
Item states:
- * - checked flag.
- X - means that it has different value for files in selection.
- d (*nix only) - (only for execute flags) means u-x+X, g-x+X or o-x+X
argument for the chmod program. If you want to remove execute right
from all files, but preserve it for directories, set all execute
flags to 'd' and check ´Set Recursively' flag.
Startup
On startup vifm determines several variables that are used during the
session. They are determined in the order they appear below.
On *nix systems $HOME is normally present and used as is. On Windows
systems vifm tries to find correct home directory in the following
order:
- $HOME variable;
- $USERPROFILE variable;
- a combination of $HOMEDRIVE and $HOMEPATH variables.
vifm tries to find correct configuration directory by checking the fol‐
lowing places:
- $VIFM variable;
- parent directory of the executable file (on Windows only);
- $HOME/.vifm directory;
- $APPDATA/Vifm directory (on Windows only).
vifm tries to find correct configuration file by checking the following
places:
- $MYVIFMRC variable;
- vifmrc in parent directory of the executable file (on Windows only);
- $VIFM/vifmrc file.
Configure
See Startup section above for the explanations on $VIFM and $MYVIFMRC.
The vifmrc file contains commands that will be executed on vifm
startup. See $MYVIFMRC variable description for search algorithm used
to find vifmrc. Use it to set settings, mappings, filetypes etc. To
use multi line commands precede each next line with a slash (whitespace
before slash is ignored, but all spaces at the end of the lines are
saved). For example:
set
\smartcase
equals "setsmartcase". When
set<space here>
\ smartcase
equals "set smartcase".
The $VIFM/vifminfo file contains session settings. You may edit it by
hand to change the settings, but it's not recommended to do that, edit
vifmrc instead. You can control what settings will be saved in
vifminfo by setting ´vifminfo' option. Vifm always writes this file on
exit unless 'vifminfo' option is empty. Bookmarks, commands, directory
history, filetypes, fileviewers and registers in the file are merged
with vifm configuration (which has bigger priority).
The $VIFM/scripts directory can contain shell scripts. vifm modifies
it's PATH environment variable to let user run those scripts without
specifying full path. All subdirectories of the $VIFM/scripts will be
added to PATH too. Script in a subdirectory overlaps script with the
same name in all its parent directories.
The $VIFM/colors directory contains color schemes.
Automatic FUSE mounts
vifm has a builtin support of automated FUSE file system mounts. It is
implemented using file associations mechanism. To enable automated
mounts, one needs to use a specially formated program line in filetype
or filextype commands. Currently two formats are supported:
1) FUSE_MOUNT This format should be used in case when all information
needed for mounting all files of a particular type is the same. E.g.
mounting of tar files don't require any file specific options.
Format line:
FUSE_MOUNT|mounter %SOURCE_FILE %DESTINATION_DIR [%CLEAR]
Example filetype command:
:filetype FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
2) FUSE_MOUNT2 This format allows one to use specially formatted files
to perform mounting and is useful for mounting remotes, for example
remote file systems over ftp or ssh.
Format line:
FUSE_MOUNT2|mounter %PARAM %DESTINATION_DIR [%CLEAR]
Example filetype command:
:filetype FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
Example file content:
root@127.0.0.1:/
All % macros are expanded by vifm at runtime and have the following
meaning:
- %SOURCE_FILE is replaced by full path to selected file
- %DESTINATION_DIR is replaced by full path to mount directory, which
is created by vifm basing on the value of 'fusehome' option.
- %PARAM value is filled from the first line of file (whole line),
though in the future it can be changed to whole file content
- %CLEAR means that you want to clear screen before running mount
command.
%CLEAR is an optional macro. Other macros are not mandatory, but mount
commands likely won't work without them.
The mounted FUSE file systems will be automatically unmounted in two
cases:
- when vifm quits (with ZZ, :q, etc. or when killed by signal)
- when you explicitly leave mount point going up to its parent direc‐
tory (with h, Enter on "../" or ":cd ..") and other pane is not in
the same directory or its child directories.
View look
vifm supports displaying of file list view in two different ways:
- in a table mode, when multiple columns can be set using 'viewcolumns'
option (see Column view section below for details);
- in a multicolumn list manner which looks almost like `ls -x` command
output (see ls-like view section below for details).
The look is local for each view and can be chosen by changing value of
the ´lsview' boolean option.
Depending on view look some of keys change their meaning to allow more
natural cursor moving. This concerns mainly h, j, k, l and other simi‐
lar navigation keys.
Also some of options can be ignored if they don't affect view display‐
ing in selected look. For example value of 'viewcolumns' when 'lsview'
is set.
ls-like view
When this view look is enabled by setting 'lsview' option on, vifm will
display files in multiple columns. Number of columns depends on the
length of the longest file name present in current directory of the
view. Whole file list is automatically reflowed on directory change,
terminal or view resize.
View looks close to output of `ls -x` command, so files are listed left
to right in rows.
In this mode file manipulation commands (e.g. d) don't work line-wise
like they do in Vim, since such operations would be uncommon for file
manipulating tasks. Thus, for example, dd will remove only current
file.
Column view
View columns are described by a comma-separated list of column descrip‐
tions, each of which has the following format
[ '-' ] [ fw ( [ '.' tw ] | '%' ) ] '{' type '}' '.'{0,3}
where fw stands for full width and tw stands for text width.
So it basically consists of four parts:
1. Optional alignment specifier
2. Optional width specifier
3. Mandatory column name
4. Optional cropping specifier
Alignment specifier
It's an optional minus sign as the first symbol of the string.
Specifies type of text alignment within a column. Two types are sup‐
ported:
- left align
set viewcolumns=-{name}
- right align (default)
set viewcolumns={name}
Width specifier
It's a number followed by a percent sign, two numbers (second one
should be less than or equal to the first one) separated with a dot or
a single number.
Specifies column width and its units. There are tree size types:
- absolute size - column width is specified in characters
set viewcolumns=-100{name},20.15{ext}
results in two columns with lengths of 100 and 20 and a reserved
space of five characters on the left of second column.
- relative (percent) size - column width is specified in percents of
view width
set viewcolumns=-80%{name},15%{ext},5%{mtime}
results in three columns with lengths of 80/100, 15/100 and 5/100 of
view width.
- auto size (default) - column width is automatically determined
set viewcolumns=-{name},{ext},{mtime}
results in three columns with length of one third of view width.
There is no size adjustment to content, since it will slow down ren‐
dering.
Columns of different sizing types can be freely mixed in one view.
Though sometimes some of columns can be seen partly or be completely
invisible if there is not enough space to display them.
Column name
This is just a sort key surrounded with curly braces, e.g.
{name},{ext},{mtime}
{name} and {iname} keys are the same and present both for consistency
with ´sort' option.
Empty curly braces ({}) are replaced with the default secondary column
for primary sort key. So after the next command view will be displayed
almost as if 'viewcolumns' is empty, but adding ellipsis for long file
names:
set viewcolumns=-{name}..,6{}.
Cropping specifier
It's from one to three dots after closing curly brace in column format.
Specifies type of text truncation if it doesn't fix in the column. Cur‐
rently tree types are supported:
- truncation - text is truncated
set viewcolumns=-{name}.
results in truncation of names that are too long too fit in the view.
- adding of ellipsis - ellipsis on the left or right are added when
needed
set viewcolumns=-{name}..
results in that ellipsis are added at the end of too long file names.
- none (default) - text can pass column boundaries
set viewcolumns=-{name}...,{ext}
results in that long file names can partially be written on the ext
column.
Color schemes
The color schemes in vifm can be applied in two different ways:
- as the default (or main) color scheme
- as local to a panel color scheme
Both types are set using |vifm-:colorscheme| command, but of different
forms:
- :colorscheme color_scheme_name - for the default color scheme
- :colorscheme color_scheme_name directory - for local color schemes
Look of different parts of the TUI (Text User Interface) is determined
in this way:
- Border, TopLineSel, TopLine, CmdLine, ErrorMsg, StatusLine and Wild‐
Menu are always determined by the default color scheme
- CurrLine, Selected, Directory, Link, BrokenLink, Socket, Device, Exe‐
cutable, Fifo and Win are determined by default color scheme and a
set of local colorschemes, which can be empty
There might be a set of local color schemes because they are structured
hierarchically according to file system structure. For example, having
the following piece of file system:
~
`-- bin
|
`-- my
Two color schemes:
# ~/.vifm/colors/for_bin
highlight Win cterm=none ctermfg=white ctermbg=red
highlight CurrLine cterm=none ctermfg=red ctermbg=black
# ~/.vifm/colors/for_bin_my
highlight CurrLine cterm=none ctermfg=green ctermbg=black
And these three commands in the vifmrc file:
colorscheme Default
colorscheme for_bin ~/bin
colorscheme for_bin_my ~/bin/my
File list will look in the following way for each level:
- ~/ - Default color scheme
black background
cursor with blue background
- ~/bin/ - mix of Default and for_bin color schemes
red background
cursor with black background and red foreground
- ~/bin/my/ - mix of Default, for_bin and for_bin_my color schemes
red background
cursor with black background and green foreground
Trash directory
vifm has support of trash directory, which is used as temporary storage
for deleted files or files that were cut. Using trash is controlled by
the ´trash' option, and exact path to the trash can be set with
'trashdir' option. Trash directory in vifm differs from the system-
wide one by default, because of possible incompatibilities of storing
deleted files among different file managers. But one can set
'trashdir' to "~/.local/share/Trash" to use a "standard" trash direc‐
tory.
There are two scenarios of using trash in vifm:
1. As a place for storing files that were cut by "d" and may be
inserted to some other place in file system.
2. As a storage of files, that are deleted but not purged yet.
The first scenario uses deletion ("d") operations to put files to trash
and put ("p") operations to restore files from trash directory. Note
that such operations move files to and from trash directory, which can
be long term operations in case of different partitions or remote
drives mounted locally.
The second scenario uses deletion ("d") operations for moving files to
trash directory and :empty command-line command to purge all previously
deleted files.
Deletion and put operations depend on registers, which can point to
files in trash directory. Normally, there are no nonexistent files in
registers, but vifm doesn't keep track of modifications under trash
directory, so one shouldn't expect value of registers to be absolutely
correct if trash directory was modified not by operation that are meant
for it. But this won't lead to any issues with operations, since they
ignore nonexistent files.
Client-Server
vifm supports remote execution of command-line mode commands as well as
remote changing of directories. This is possible using --remote com‐
mand-line argument.
To execute a command remotely combine --remote argument with -c <com‐
mand> or +<command>. For example:
vifm --remote -c 'cd /'
vifm --remote '+cd /'
To change directory not using command-line mode commands one can spec‐
ify paths right after --remote argument, like this:
vifm --remote /
vifm --remote ~
vifm --remote /usr/bin /tmp
At the moment there is no way of specifying, which instance of vifm
should arguments be sent. The main purpose of --remote argument is to
provide support of using vifm as a single-instance application.
Plugin
Plugin for using vifm in vim as a file selector.
Commands:
:EditVifm select a file or files to open in the current buffer.
:SplitVifm split buffer and select a file or files to open.
:VsplitVifm vertically split buffer and select a file or files to
open.
:DiffVifm select a file or files to compare to the current file
with
:vert diffsplit.
:TabVifm select a file or files to open in tabs.
Each command accepts up to two arguments: left pane directory and right
pane directory. After arguments are checked, vifm process is spawned
in a special "file-picker" mode. To pick files just open them either
by pressing l, i or Enter keys, or by running :edit command. If no
files are selected, file under the cursor is opened, otherwise whole
selection is passed to the plugin and opened in vim.
The plugin have only two settings. It's a string variable named
g:vifm_term to let user specify command to run gui terminal. By
default it's equal to ´xterm -e'. And another string variable named
g:vifm_exec, which equals "vifm" by default and specifies path to
vifm's executable. To pass arguments to vifm use g:vifm_exec_args,
which is empty by default.
To use the plugin copy the vifm.vim file to either the system wide
vim/plugin directory or into ~/.vim/plugin.
If you would prefer not to use the plugin and it is in the system wide
plugin directory add
let loaded_vifm=1
to your ~/.vimrc file.
Reserved
The following command names are reserved and shouldn't be used for user
commands.
g[lobal]
v[global]
SEE ALSO
Website: http://vifm.sourceforge.net/
Esperanto translation of the documentation by Sebastian Cyprych:
http://cyprych.neostrada.pl/tekstoj/komputiloj/vifm-help.eo.html
AUTHOR
Vifm was written by ksteen <ksteen@users.sourceforge.net>
And currently is developed by xaizek <xaizek@openmailbox.org>
Oct 19, 2013 vifm(1)
|