1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
|
*vimwiki.txt* A Personal Wiki for Vim
__ __ ___ __ __ _ _ ___ ___ _ ___ ~
| | | || | | |_| || | _ | || | | | | || | ~
| |_| || | | || || || || | | |_| || | ~
| || | | || || | | _|| | ~
| || | | || || | | |_ | | ~
| | | | | ||_|| || _ || | | _ || | ~
|___| |___| |_| |_||__| |__||___| |___| |_||___| ~
Version: 2.3
==============================================================================
CONTENTS *vimwiki*
1. Intro |vimwiki-intro|
2. Prerequisites |vimwiki-prerequisites|
3. Mappings |vimwiki-mappings|
3.1. Global mappings |vimwiki-global-mappings|
3.2. Local mappings |vimwiki-local-mappings|
3.3. Text objects |vimwiki-text-objects|
4. Commands |vimwiki-commands|
4.1. Global commands |vimwiki-global-commands|
4.2. Local commands |vimwiki-local-commands|
5. Wiki syntax |vimwiki-syntax|
5.1. Typefaces |vimwiki-syntax-typefaces|
5.2. Links |vimwiki-syntax-links|
5.3. Headers |vimwiki-syntax-headers|
5.4. Paragraphs |vimwiki-syntax-paragraphs|
5.5. Lists |vimwiki-syntax-lists|
5.6. Tables |vimwiki-syntax-tables|
5.7. Preformatted text |vimwiki-syntax-preformatted|
5.8. Mathematical formulae |vimwiki-syntax-math|
5.9. Blockquotes |vimwiki-syntax-blockquotes|
5.10. Comments |vimwiki-syntax-comments|
5.11. Horizontal line |vimwiki-syntax-hr|
5.12. Tags |vimwiki-syntax-tags|
6. Folding/Outline |vimwiki-folding|
7. Placeholders |vimwiki-placeholders|
8. Lists |vimwiki-lists|
9. Tables |vimwiki-tables|
10. Diary |vimwiki-diary|
11. Anchors |vimwiki-anchors|
12. Options |vimwiki-options|
12.1. Registered Wiki |vimwiki-register-wiki|
12.2. Temporary Wiki |vimwiki-temporary-wiki|
12.3. Per-Wiki Options |vimwiki-local-options|
12.4. Global Options |vimwiki-global-options|
13. Getting help |vimwiki-help|
14. Contributing & Bug reports |vimwiki-contributing|
15. Development |vimwiki-development|
16. Changelog |vimwiki-changelog|
17. License |vimwiki-license|
==============================================================================
1. Intro *vimwiki-intro*
Vimwiki is a personal wiki for Vim -- a number of linked text files that have
their own syntax highlighting.
With Vimwiki you can:
- organize notes and ideas
- manage todo-lists
- write documentation
- maintain a diary
- export everything to HTML
To do a quick start press <Leader>ww (this is usually \ww) to go to your index
wiki file. By default it is located in ~/vimwiki/index.wiki
Feed it with the following example:
= My knowledge base =
* Tasks -- things to be done _yesterday_!!!
* Project Gutenberg -- good books are power.
* Scratchpad -- various temporary stuff.
Place your cursor on 'Tasks' and press Enter to create a link. Once pressed,
'Tasks' will become '[[Tasks]]' -- a Vimwiki link. Press Enter again to
open it. Edit the file, save it, and then press Backspace to jump back to
your index.
A Vimwiki link can be constructed from more than one word. Just visually
select the words to be linked and press Enter. Try it with 'Project
Gutenberg'. The result should look something like:
= My knowledge base =
* [[Tasks]] -- things to be done _yesterday_!!!
* [[Project Gutenberg]] -- good books are power.
* Scratchpad -- various temporary stuff.
==============================================================================
2. Prerequisites *vimwiki-prerequisites*
Make sure you have these settings in your vimrc file: >
set nocompatible
filetype plugin on
syntax on
Without them Vimwiki will not work properly.
==============================================================================
3. Mappings *vimwiki-mappings*
There are global and local mappings in Vimwiki.
------------------------------------------------------------------------------
3.1. Global mappings *vimwiki-global-mappings*
[count]<Leader>ww or <Plug>VimwikiIndex
Open index file of the [count]'s wiki.
<Leader>ww opens the first wiki from |g:vimwiki_list|.
1<Leader>ww as above, opens the first wiki from |g:vimwiki_list|.
2<Leader>ww opens the second wiki from |g:vimwiki_list|.
3<Leader>ww opens the third wiki from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>w <Plug>VimwikiIndex
<
See also |:VimwikiIndex|
[count]<Leader>wt or <Plug>VimwikiTabIndex
Open index file of the [count]'s wiki in a new tab.
<Leader>wt tabopens the first wiki from |g:vimwiki_list|.
1<Leader>wt as above tabopens the first wiki from |g:vimwiki_list|.
2<Leader>wt tabopens the second wiki from |g:vimwiki_list|.
3<Leader>wt tabopens the third wiki from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>t <Plug>VimwikiTabIndex
<
See also |:VimwikiTabIndex|
<Leader>ws or <Plug>VimwikiUISelect
List and select available wikis.
To remap: >
:nmap <Leader>wq <Plug>VimwikiUISelect
<
See also |:VimwikiUISelect|
[count]<Leader>wi or <Plug>VimwikiDiaryIndex
Open diary index file of the [count]'s wiki.
<Leader>wi opens diary index file of the first wiki from
|g:vimwiki_list|.
1<Leader>wi the same as above.
2<Leader>wi opens diary index file of the second wiki from
|g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>i <Plug>VimwikiDiaryIndex
See also |:VimwikiDiaryIndex|
[count]<Leader>w<Leader>w or <Plug>VimwikiMakeDiaryNote
Open diary wiki-file for today of the [count]'s wiki.
<Leader>w<Leader>w opens diary wiki-file for today in the first wiki
from |g:vimwiki_list|.
1<Leader>w<Leader>w as above opens diary wiki-file for today in the
first wiki from |g:vimwiki_list|.
2<Leader>w<Leader>w opens diary wiki-file for today in the second wiki
from |g:vimwiki_list|.
3<Leader>w<Leader>w opens diary wiki-file for today in the third wiki
from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>d <Plug>VimwikiMakeDiaryNote
<
See also |:VimwikiMakeDiaryNote|
[count]<Leader>w<Leader>t or <Plug>VimwikiTabMakeDiaryNote
Open diary wiki-file for today of the [count]'s wiki in a new tab.
<Leader>w<Leader>t tabopens diary wiki-file for today in the first
wiki from |g:vimwiki_list|.
1<Leader>w<Leader>t as above tabopens diary wiki-file for today in the
first wiki from |g:vimwiki_list|.
2<Leader>w<Leader>t tabopens diary wiki-file for today in the second
wiki from |g:vimwiki_list|.
3<Leader>w<Leader>t tabopens diary wiki-file for today in the third
wiki from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>dt <Plug>VimwikiTabMakeDiaryNote
<
See also |:VimwikiTabMakeDiaryNote|
[count]<Leader>w<Leader>y or <Plug>VimwikiMakeYesterdayDiaryNote
Open diary wiki-file for yesterday of the [count]'s wiki.
<Leader>w<Leader>y opens diary wiki-file for yesterday in the first
wiki from |g:vimwiki_list|.
1<Leader>w<Leader>y as above opens diary wiki-file for yesterday in
the first wiki from |g:vimwiki_list|.
2<Leader>w<Leader>y opens diary wiki-file for yesterday in the second
wiki from |g:vimwiki_list|.
3<Leader>w<Leader>y opens diary wiki-file for yesterday in the third
wiki from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>dy <Plug>VimwikiMakeYesterdayDiaryNote
<
See also |:VimwikiMakeYesterdayDiaryNote|
[count]<Leader>w<Leader>m or <Plug>VimwikiMakeTomorrowDiaryNote
Open diary wiki-file for tomorrow of the [count]'s wiki.
<Leader>w<Leader>m opens diary wiki-file for tomorrow in the first
wiki from |g:vimwiki_list|.
1<Leader>w<Leader>m as above opens diary wiki-file for tomorrow in
the first wiki from |g:vimwiki_list|.
2<Leader>w<Leader>m opens diary wiki-file for tomorrow in the second
wiki from |g:vimwiki_list|.
3<Leader>w<Leader>m opens diary wiki-file for tomorrow in the third
wiki from |g:vimwiki_list|.
etc.
To remap: >
:nmap <Leader>dm <Plug>VimwikiMakeTomorrowDiaryNote
<
See also |:VimwikiMakeTomorrowDiaryNote|
------------------------------------------------------------------------------
3.2. Local mappings
To remap one of these keys, either put it in your .vimrc like this >
:nmap <Leader>wc <Plug>Vimwiki2HTML
or, the better way, put it in a file .vim/ftplugin/vimwiki.vim like this >
:nmap <silent><buffer> <Leader>wc <Plug>Vimwiki2HTML
The latter has the advantage that the mapping is local to Vimwiki buffers in
every case.
Also note that some keys work in normal mode as well as in visual mode. If you
remap them using :map, they will also run in operator-pending mode. If you
don't want that, use >
:nmap <Leader>tt <Plug>VimwikiToggleListItem
:vmap <Leader>tt <Plug>VimwikiToggleListItem
NORMAL MODE *vimwiki-local-mappings*
*vimwiki_<Leader>wh*
<Leader>wh Convert current wiki page to HTML.
Maps to |:Vimwiki2HTML|
To remap: >
:nmap <Leader>wc <Plug>Vimwiki2HTML
<
*vimwiki_<Leader>whh*
<Leader>whh Convert current wiki page to HTML and open it in the
webbrowser.
Maps to |:Vimwiki2HTMLBrowse|
To remap: >
:nmap <Leader>wcc <Plug>Vimwiki2HTMLBrowse
<
*vimwiki_<Leader>w<Leader>i*
<Leader>w<Leader>i Update diary section (delete old, insert new)
Only works from the diary index.
Maps to |:VimwikiDiaryGenerateLinks|
To remap: >
:nmap <Leader>wcr <Plug>VimwikiDiaryGenerateLinks
<
*vimwiki_<CR>*
<CR> Follow/create wiki link (create target wiki page if
needed).
Maps to |:VimwikiFollowLink|.
To remap: >
:nmap <Leader>wf <Plug>VimwikiFollowLink
<
*vimwiki_<S-CR>*
<S-CR> Split and follow (create target wiki page if needed).
May not work in some terminals. Remapping could help.
Maps to |:VimwikiSplitLink|.
To remap: >
:nmap <Leader>we <Plug>VimwikiSplitLink
<
*vimwiki_<C-CR>*
<C-CR> Vertical split and follow (create target wiki page if
needed).
May not work in some terminals. Remapping could help.
Maps to |:VimwikiVSplitLink|.
To remap: >
:nmap <Leader>wq <Plug>VimwikiVSplitLink
<
*vimwiki_<C-S-CR>* *vimwiki_<D-CR>*
<C-S-CR>, <D-CR> Follow wiki link (create target wiki page if needed),
opening in a new tab.
May not work in some terminals. Remapping could help.
Maps to |:VimwikiTabnewLink|.
To remap: >
:nmap <Leader>wt <Plug>VimwikiTabnewLink
<
*vimwiki_<Backspace>*
<Backspace> Go back to previously visited wiki page.
Maps to |:VimwikiGoBackLink|.
To remap: >
:nmap <Leader>wb <Plug>VimwikiGoBackLink
<
*vimwiki_<Tab>*
<Tab> Find next link in the current page.
Maps to |:VimwikiNextLink|.
To remap: >
:nmap <Leader>wn <Plug>VimwikiNextLink
<
*vimwiki_<S-Tab>*
<S-Tab> Find previous link in the current page.
Maps to |:VimwikiPrevLink|.
To remap: >
:nmap <Leader>wp <Plug>VimwikiPrevLink
<
*vimwiki_<Leader>wd*
<Leader>wd Delete wiki page you are in.
Maps to |:VimwikiDeleteLink|.
To remap: >
:nmap <Leader>dd <Plug>VimwikiDeleteLink
<
*vimwiki_<Leader>wr*
<Leader>wr Rename wiki page you are in.
Maps to |:VimwikiRenameLink|.
To remap: >
:nmap <Leader>rr <Plug>VimwikiRenameLink
<
*vimwiki_=*
= Add header level. Create if needed.
There is nothing to indent with '==' command in
Vimwiki, so it should be ok to use '=' here.
To remap: >
:nmap == <Plug>VimwikiAddHeaderLevel
<
*vimwiki_-*
- Remove header level.
To remap: >
:nmap -- <Plug>VimwikiRemoveHeaderLevel
<
*vimwiki_[[*
[[ Go to the previous header in the buffer.
To remap: >
:nmap <- <Plug>VimwikiGoToPrevHeader
<
*vimwiki_]]*
]] Go to the next header in the buffer.
To remap: >
:nmap -> <Plug>VimwikiGoToNextHeader
<
*vimwiki_[=*
[= Go to the previous header which has the same level as
the header the cursor is currently under.
To remap: >
:nmap <= <Plug>VimwikiGoToPrevSiblingHeader
<
*vimwiki_]=*
]= Go to the next header which has the same level as the
header the cursor is currently under.
To remap: >
:nmap => <Plug>VimwikiGoToNextSiblingHeader
<
*vimwiki_]u* *vimwiki_[u*
]u [u Go one level up -- that is, to the parent header of
the header the cursor is currently under.
To remap: >
:nmap -^ <Plug>VimwikiGoToParentHeader
<
*vimwiki_+*
+ Create and/or decorate links. Depending on the
context, this command will: convert words into
wikilinks; convert raw URLs into wikilinks; and add
placeholder description text to wiki- or weblinks that
are missing descriptions. Can be activated in normal
mode with the cursor over a word or link, or in visual
mode with the selected text.
To remap: >
:nmap ++ <Plug>VimwikiNormalizeLink
:vmap ++ <Plug>VimwikiNormalizeLinkVisual
<
*vimwiki_<C-Space>*
<C-Space> Toggle checkbox of a list item on/off.
Maps to |:VimwikiToggleListItem|.
See |vimwiki-todo-lists|.
To remap: >
:map <Leader>tt <Plug>VimwikiToggleListItem
<
*vimwiki_gl<Space>* *vimwiki_gL<Space>*
gl<Space> Remove checkbox from list item.
gL<Space> Remove checkboxes from all sibling list items.
To remap: >
:map <Leader><Space> <Plug>VimwikiRemoveSingleCB
:map <Leader><Space> <Plug>VimwikiRemoveCBInList
<
*vimwiki_gln* *vimwiki_glp*
gln Increase the "done" status of a list checkbox, i.e.
from [ ] to [.] to [o] etc. See |vimwiki-todo-lists|.
glp Decrease the "done" status.
To remap: >
:nmap <M-+> <Plug>VimwikiIncrementListItem
:vmap <M-+> <Plug>VimwikiIncrementListItem
:nmap <M--> <Plug>VimwikiDecrementListItem
:vmap <M--> <Plug>VimwikiDecrementListItem
*vimwiki_gll* *vimwiki_gLl*
gll Increase the level of a list item.
gLl Increase the level of a list item and all child items.
To remap: >
:map >> <Plug>VimwikiIncreaseLvlSingleItem
:map >>> <Plug>VimwikiIncreaseLvlWholeItem
<
*vimwiki_glh* *vimwiki_gLh*
glh Decrease the level of a list item.
gLh Decrease the level of a list item and all child items.
To remap: >
:map << <Plug>VimwikiDecreaseLvlSingleItem
:map <<< <Plug>VimwikiDecreaseLvlWholeItem
<
*vimwiki_glr* *vimwiki_gLr*
glr Renumber list items if the cursor is on a numbered
list item.
gLr Renumber list items in all numbered lists in the whole
file.
Also readjust checkboxes.
To remap: >
:nmap <c-r> <Plug>VimwikiRenumberList
:nmap <c-r> <Plug>VimwikiRenumberAllLists
<
*vimwiki_glstar* *vimwiki_gLstar*
gl* Make a list item out of a normal line or change the
symbol of the current item to *.
gL* Change the symbol of the current list to *.
To remap: >
noremap glo :VimwikiChangeSymbolTo *<CR>
noremap glO :VimwikiChangeSymbolInListTo *<CR>
<
*vimwiki_gl#* *vimwiki_gL#*
gl# Make a list item out of a normal line or change the
symbol of the current item to #.
gL# Change the symbol of the current list to #.
To remap: >
noremap glo :VimwikiChangeSymbolTo #<CR>
noremap glO :VimwikiChangeSymbolInListTo #<CR>
<
*vimwiki_gl-* *vimwiki_gL-*
gl- Make a list item out of a normal line or change the
symbol of the current item to -.
gL- Change the symbol of the current list to -.
To remap: >
noremap glo :VimwikiChangeSymbolTo -<CR>
noremap glO :VimwikiChangeSymbolInListTo -<CR>
<
*vimwiki_gl1* *vimwiki_gL1*
gl1 Make a list item out of a normal line or change the
symbol of the current item to 1., the numbering is
adjusted according to the surrounding list items.
gL1 Change the symbol of the current list to 1. 2. 3. ...
To remap: >
noremap glo :VimwikiChangeSymbolTo 1.<CR>
noremap glO :VimwikiChangeSymbolInListTo 1.<CR>
<
*vimwiki_gla* *vimwiki_gLa*
gla Make a list item out of a normal line or change the
symbol of the current item to a), the numbering is
adjusted according to the surrounding list items.
gLa Change the symbol of the current list to a) b) c) ...
To remap: >
noremap glo :VimwikiChangeSymbolTo a)<CR>
noremap glO :VimwikiChangeSymbolInListTo a)<CR>
<
*vimwiki_glA* *vimwiki_gLA*
glA Make a list item out of a normal line or change the
symbol of the current item to A), the numbering is
adjusted according to the surrounding list items.
gLA Change the symbol of the current list to A) B) C) ...
To remap: >
noremap glo :VimwikiChangeSymbolTo A)<CR>
noremap glO :VimwikiChangeSymbolInListTo A)<CR>
<
*vimwiki_gli* *vimwiki_gLi*
gli Make a list item out of a normal line or change the
symbol of the current item to i), the numbering is
adjusted according to the surrounding list items.
gLi Change the symbol of the current list to
i) ii) iii) ...
To remap: >
noremap glo :VimwikiChangeSymbolTo i)<CR>
noremap glO :VimwikiChangeSymbolInListTo i)<CR>
<
*vimwiki_glI* *vimwiki_gLI*
glI Make a list item out of a normal line or change the
symbol of the current item to I), the numbering is
adjusted according to the surrounding list items.
gLI Change the symbol of the current list to
I) II) III) ...
To remap: >
noremap glo :VimwikiChangeSymbolTo I)<CR>
noremap glO :VimwikiChangeSymbolInListTo I)<CR>
<
*vimwiki_glx*
glx Toggle checkbox of a list item disabled/off.
Maps to |:VimwikiToggleRejectedListItem|.
See |vimwiki-todo-lists|.
To remap: >
:map <Leader>tx <Plug>VimwikiToggleRejectedListItem
<
*vimwiki_gqq* *vimwiki_gww*
gqq Format table. If you made some changes to a table
or without swapping insert/normal modes this command
gww will reformat it.
*vimwiki_<A-Left>*
<A-Left> Move current table column to the left.
See |:VimwikiTableMoveColumnLeft|
To remap: >
:nmap <Leader>wtl <Plug>VimwikiTableMoveColumnLeft
<
*vimwiki_<A-Right>*
<A-Right> Move current table column to the right.
See |:VimwikiTableMoveColumnRight|
To remap: >
:nmap <Leader>wtr <Plug>VimwikiTableMoveColumnRight
<
*vimwiki_<C-Up>*
<C-Up> Open the previous day's diary link if available.
See |:VimwikiDiaryPrevDay|
To remap: >
:nmap <Leader>k <Plug>VimwikiDiaryPrevDay
<
*vimwiki_<C-Down>*
<C-Down> Open the next day's diary link if available.
See |:VimwikiDiaryNextDay|
To remap: >
:nmap <Leader>j <Plug>VimwikiDiaryNextDay
<
Works only if |g:vimwiki_use_mouse| is set to 1.
<2-LeftMouse> Follow wiki link (create target wiki page if needed).
<S-2-LeftMouse> Split and follow wiki link (create target wiki page if
needed).
<C-2-LeftMouse> Vertical split and follow wiki link (create target
wiki page if needed).
<RightMouse><LeftMouse> Go back to previous wiki page.
Note: <2-LeftMouse> is just left double click.
INSERT MODE *vimwiki-table-mappings*
*vimwiki_i_<CR>_table*
<CR> Go to the table cell beneath the current one, create
a new row if on the last one.
*vimwiki_i_<Tab>_table*
<Tab> Go to the next table cell, create a new row if on the
last cell.
See |g:vimwiki_table_mappings| to turn them off.
INSERT MODE *vimwiki-list-mappings*
*vimwiki_i_<CR>*
<CR> In a list item, insert a new bullet or number in the
next line, numbers are incremented.
In an empty list item, delete the item symbol. This is
useful to end a list, simply press <CR> twice.
See |vimwiki-lists| for details and for how to
configure the behavior.
*vimwiki_i_<S-CR>*
<S-CR> Does not insert a new list item, useful to create
multilined list items.
See |vimwiki-lists| for details and for how to
configure the behavior.
*vimwiki_i_<C-T>*
<C-T> Increase the level of a list item.
To remap: >
:imap <C-E> <Plug>VimwikiIncreaseLvlSingleItem
<
*vimwiki_i_<C-D>*
<C-D> Decrease the level of a list item.
To remap: >
:imap <C-E> <Plug>VimwikiDecreaseLvlSingleItem
<
*vimwiki_i_<C-L>_<C-J>*
<C-L><C-J> Change the symbol of the current list item to the next
available. From - to 1. to * to I) to a).
To remap: >
:imap <C-A> <Plug>VimwikiListNextSymbol
<
*vimwiki_i_<C-L>_<C-K>*
<C-L><C-K> Change the symbol of the current list item to the prev
available. From - to a) to I) to * to 1.
To remap: >
:imap <C-S> <Plug>VimwikiListPrevSymbol
<
*vimwiki_i_<C-L>_<C-M>*
<C-L><C-M> Create/remove a symbol from a list item.
To remap: >
:imap <C-K> <Plug>VimwikiListToggle
<
------------------------------------------------------------------------------
3.3. Text objects *vimwiki-text-objects*
ah A header including its content up to the next header.
ih The content under a header (like 'ah', but excluding
the header itself and trailing empty lines).
aH A header including all of its subheaders. When [count]
is 2, include the parent header, when [count] is 3,
the grandparent and so on.
iH Like 'aH', but excluding the header itself and
trailing empty lines.
Examples:
- type 'cih' to change the content under the current header
- 'daH' deletes an entire header plus its content including the content of all
of its subheaders
- 'v2aH' selects the parent header of the header the cursor is under plus all
of the content of all of its subheaders
a\ A cell in a table.
i\ An inner cell in a table.
ac A column in a table.
ic An inner column in a table.
al A list item plus its children.
il A single list item.
==============================================================================
4. Commands *vimwiki-commands*
------------------------------------------------------------------------------
4.1. Global Commands *vimwiki-global-commands*
*:VimwikiIndex*
Open index file of the current wiki.
*:VimwikiTabIndex*
Open index file of the current wiki in a new tab.
*:VimwikiUISelect*
Open index file of the selected wiki.
*:VimwikiDiaryIndex*
Open diary index file of the current wiki.
*:VimwikiMakeDiaryNote*
Open diary wiki-file for today of the current wiki.
*:VimwikiTabMakeDiaryNote*
Open diary wiki-file for today of the current wiki in a new tab.
*:VimwikiMakeYesterdayDiaryNote*
Open diary wiki-file for yesterday of the current wiki.
*:VimwikiMakeTomorrowDiaryNote*
Open diary wiki-file for tomorrow of the current wiki.
------------------------------------------------------------------------------
4.2. Local commands *vimwiki-local-commands*
These commands are only available (and meaningful) when you are currently in a
Vimwiki file.
*:VimwikiFollowLink*
Follow wiki link (or create target wiki page if needed).
*:VimwikiGoBackLink*
Go back to the wiki page you came from.
*:VimwikiSplitLink*
Split and follow wiki link (create target wiki page if needed).
*:VimwikiVSplitLink*
Vertical split and follow wiki link (create target wiki page if needed).
*:VimwikiTabnewLink*
Follow wiki link in a new tab (create target wiki page if needed).
*:VimwikiNextLink*
Find next link on the current page.
*:VimwikiPrevLink*
Find previous link on the current page.
*:VimwikiGoto*
Goto link provided by an argument. For example: >
:VimwikiGoto HelloWorld
< opens/creates HelloWorld wiki page.
Supports |cmdline-completion| for link name.
*:VimwikiDeleteLink*
Delete the wiki page you are in.
*:VimwikiRenameLink*
Rename the wiki page you are in.
*:Vimwiki2HTML*
Convert current wiki page to HTML using Vimwiki's own converter or a
user-supplied script (see |vimwiki-option-custom_wiki2html|).
*:Vimwiki2HTMLBrowse*
Convert current wiki page to HTML and open it in the webbrowser.
*:VimwikiAll2HTML*
Convert all wiki pages to HTML.
Default CSS file (style.css) is created if there is no one.
*:VimwikiToggleListItem*
Toggle checkbox of a list item on/off.
See |vimwiki-todo-lists|.
*:VimwikiToggleRejectedListItem*
Toggle checkbox of a list item disabled/off.
See |vimwiki-todo-lists|.
*:VimwikiListChangeLevel* CMD
Change the nesting level, or symbol, for a single-line list item.
CMD may be ">>" or "<<" to change the indentation of the item, or
one of the syntax-specific bullets: "*", "#", "1.", "-".
See |vimwiki-todo-lists|.
*:VimwikiSearch* /pattern/
*:VWS* /pattern/
Search for /pattern/ in all files of current wiki.
To display all matches use |:lopen| command.
To display next match use |:lnext| command.
To display previous match use |:lprevious| command.
Hint: this feature is simply a wrapper around |:lvimgrep|. For a
description of how the pattern can look like, see |:vimgrep|. For example,
to do a case insensitive search, use >
:VWS /\cpattern/
*:VimwikiBacklinks*
*:VWB*
Search for wikilinks to the current wiki page in all files of current
wiki.
To display all matches use |:lopen| command.
To display next match use |:lnext| command.
To display previous match use |:lprevious| command.
*:VimwikiTable*
Create a table with 5 cols and 2 rows.
:VimwikiTable cols rows
Create a table with the given cols and rows
:VimwikiTable cols
Create a table with the given cols and 2 rows
*:VimwikiTableMoveColumnLeft* , *:VimwikiTableMoveColumnRight*
Move current column to the left or to the right:
Example: >
| head1 | head2 | head3 | head4 | head5 |
|--------|--------|--------|--------|--------|
| value1 | value2 | value3 | value4 | value5 |
Cursor is on 'head1'.
:VimwikiTableMoveColumnRight
| head2 | head1 | head3 | head4 | head5 |
|--------|--------|--------|--------|--------|
| value2 | value1 | value3 | value4 | value5 |
Cursor is on 'head3'.
:VimwikiTableMoveColumnLeft
| head2 | head3 | head1 | head4 | head5 |
|--------|--------|--------|--------|--------|
| value2 | value3 | value1 | value4 | value5 |
<
Commands are mapped to <A-Left> and <A-Right> respectively.
*:VimwikiGenerateLinks*
Insert the links of all available wiki files into the current buffer.
*:VimwikiDiaryGenerateLinks*
Delete old, insert new diary section into diary index file.
*:VimwikiDiaryNextDay*
Open next day diary link if available.
Mapped to <C-Down>.
*:VimwikiDiaryPrevDay*
Open previous day diary link if available.
Mapped to <C-Up>.
*:VimwikiTOC*
Create or update the Table of Contents for the current wiki file.
See |vimwiki-toc|.
*:VimwikiCheckLinks*
Search through all wiki files and check if the targets of all wiki links
and links to external files actually exist. Check also if all wiki files
are reachable from the index file. The results are shown in the quickfix
window.
*:VimwikiRebuildTags*
Rebuilds the tags metadata file for all wiki files newer than the metadata
file.
Necessary for all tags related commands: |vimwiki-syntax-tags|.
:VimwikiRebuildTags! does the same for all files.
*:VimwikiSearchTags*
Searches over the pages in current wiki and finds all locations of a given
tag. Supports |cmdline-completion|.
*:VimwikiGenerateTags* tagname1 tagname2 ...
Creates or updates an overview on all tags of the wiki with links to all
their instances. Supports |cmdline-completion|. If no arguments (tags)
are specified, outputs all tags. To make this command work properly, make
sure the tags have been built (see |vimwiki-build-tags|).
------------------------------------------------------------------------------
4.3. Functions *vimwiki-functions*
Functions to interact with Vimwiki. (It's intended that most commands will be
replaced with corresponding function calls in the future.)
Warning: this is currently unstable and likely to change.
To map them to a key, use >
nnoremap <C-K> :call vimwiki#base#function_name(arg1, arg2)<CR>
<
*vimwiki-follow_link*
vimwiki#base#follow_link({split}, {reuse}, {move_cursor})
Open the link under the cursor. {split} can have the following values:
'nosplit' open the link in the current window
'vsplit' open in a vertically split window
'hsplit' open in a horizontally split window
'tab' open in a new tab
If {reuse} is 1 and {split} one of 'vsplit' or 'hsplit', open the link in
a possibly existing split window instead of making a new split.
If {move_cursor} is 1 the cursor moves to the window or tab with the
opened link, otherwise, it stays in the window or tab with the link.
For example, <CR> is per default mapped to
vimwiki#base#follow_link('nosplit', 0, 1)
==============================================================================
5. Wiki syntax *vimwiki-syntax*
There are a lot of different wikis out there. Most of them have their own
syntax and Vimwiki is not an exception here.
Vimwiki has evolved its own syntax that closely resembles Google's wiki
markup. This syntax is described in detail below.
Vimwiki also supports alternative syntaxes, like Markdown and MediaWiki, to
varying degrees; see |vimwiki-option-syntax|. Static elements like headers,
quotations, and lists are customized in syntax/vimwiki_xxx.vim, where xxx
stands for the chosen syntax.
Interactive elements such as links and Vimwiki commands are supported by
definitions and routines in syntax/vimwiki_xxx_custom.vim and
autoload/vimwiki/xxx_base.vim. Currently, only Markdown includes this level
of support.
Vimwiki2HTML is currently functional only for the default syntax.
------------------------------------------------------------------------------
5.1. Typefaces *vimwiki-syntax-typefaces*
There are a few typefaces that give you a bit of control over how your text
is decorated: >
*bold text*
_italic text_
~~strikeout text~~
`code (no syntax) text`
super^script^
sub,,script,,
------------------------------------------------------------------------------
5.2. Links *vimwiki-syntax-links*
Wikilinks~
Plain link: >
[[This is a link]]
With description: >
[[This is a link source|Description of the link]]
Wiki files don't need to be in the root directory of your wiki, you can put
them in subdirectories as well: >
[[projects/Important Project 1]]
To jump from that file back to the index file, use this link: >
[[../index]]
or: >
[[/index]]
The latter works because wiki links starting with "/" are considered to be
absolute to the wiki root directory, that is, the link [[/index]] always opens
the file /path/to/your/wiki/index.wiki, no matter in which subdirectory you
are currently in.
Links to subdirectories inside the wiki directory are also supported. They
end with a "/": >
[[a subdirectory/|Other files]]
Use |g:vimwiki_dir_link| to control the behavior when opening directories.
Typing wikilinks can be simplified by using Vim's omni completion (see
|compl-omni|) like so: >
[[ind<C-X><C-O>
which opens up a popup menu with all the wiki files starting with "ind".
When |vimwiki-option-maxhi| equals 1, a distinct highlighting style is used to
identify wikilinks whose targets are not found.
Interwiki~
If you maintain more than one wiki, you can create interwiki links between
them by adding a numbered prefix "wikiX:" in front of a link: >
[[wiki1:This is a link]]
or: >
[[wiki1:This is a link source|Description of the link]]
The number behind "wiki" is in the range 0..N-1 and identifies the destination
wiki in |g:vimwiki_list|.
Diary~
The "diary:" scheme is used to link to diary entries: >
[[diary:2012-03-05]]
Anchors~
A wikilink, interwiki link or diary link can be followed by a '#' and the name
of an anchor. When opening a link, the cursor jumps to the anchor. >
[[Todo List#Tomorrow|Tasks for tomorrow]]
To jump inside the current wiki file you can omit the file: >
[[#Tomorrow]]
See |vimwiki-anchors| for how to set an anchor.
Raw URLs~
Raw URLs are also supported: >
https://github.com/vimwiki/vimwiki.git
mailto:habamax@gmail.com
ftp://vim.org
External files~
The "file:" and "local:" schemes allow you to directly link to arbitrary
resources using absolute or relative paths: >
[[file:/home/somebody/a/b/c/music.mp3]]
[[file:C:/Users/somebody/d/e/f/music.mp3]]
[[file:~/a/b/c/music.mp3]]
[[file:../assets/data.csv|Important Data]]
[[local:C:/Users/somebody/d/e/f/music.mp3]]
[[file:/home/user/documents/|Link to a directory]]
These links are opened with the system command, i.e. !xdg-open (Linux), !open
(Mac), or !start (Windows). To customize this behavior, see
|VimwikiLinkHandler|.
In Vim, "file:" and "local:" behave the same, i.e. you can use them with both
relative and absolute links. When converted to HTML, however, "file:" links
will become absolute links, while "local:" links become relative to the HTML
output directory. The latter can be useful if you copy your HTML files to
another computer.
To customize the HTML conversion of links, see |VimwikiLinkConverter|.
Transclusion (Wiki-Include) Links~
Links that use "{{" and "}}" delimiters signify content that is to be
included into the HTML output, rather than referenced via hyperlink.
Wiki-include URLs may use any of the supported schemes, may be absolute or
relative, and need not end with an extension.
The primary purpose for wiki-include links is to include images.
Transclude from a local URL: >
{{file:../../images/vimwiki_logo.png}}
or from a universal URL: >
{{http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png}}
Transclude image with alternate text: >
{{http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png|Vimwiki}}
in HTML: >
<img src="http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png"
alt="Vimwiki"/>
Transclude image with alternate text and some style: >
{{http://.../vimwiki_logo.png|cool stuff|style="width:150px;height:120px;"}}
in HTML: >
<img src="http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png"
alt="cool stuff" style="width:150px; height:120px"/>
Transclude image _without_ alternate text and with a CSS class: >
{{http://.../vimwiki_logo.png||class="center flow blabla"}}
in HTML: >
<img src="http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png"
alt="" class="center flow blabla"/>
A trial feature allows you to supply your own handler for wiki-include links.
See |VimwikiWikiIncludeHandler|.
Thumbnail links~
>
Thumbnail links are constructed like this: >
[[http://someaddr.com/bigpicture.jpg|{{http://someaddr.com/thumbnail.jpg}}]]
in HTML: >
<a href="http://someaddr.com/ ... /.jpg">
<img src="http://../thumbnail.jpg /></a>
Markdown Links~
These links are only available for Markdown syntax. See
http://daringfireball.net/projects/markdown/syntax#link.
Inline link: >
[Looks like this](URL)
Image link: >

The URL can be anything recognized by Vimwiki as a raw URL.
Reference-style links: >
a) [Link Name][Id]
b) [Id][], using the "implicit link name" shortcut
Reference style links must always include two consecutive pairs of
[-brackets, and field entries can not use "[" or "]".
NOTE: (in Vimwiki's current implementation) Reference-style links are a hybrid
of Vimwiki's default "Wikilink" and the tradition reference-style link.
If the Id is defined elsewhere in the source, as per the Markdown standard: >
[Id]: URL
then the URL is opened with the system default handler. Otherwise, Vimwiki
treats the reference-style link as a Wikilink, interpreting the Id field as a
wiki page name.
Highlighting of existing links when |vimwiki-option-maxhi| is activated
identifies links whose Id field is not defined, either as a reference-link or
as a wiki page.
To scan the page for new or changed definitions for reference-links, simply
re-open the page ":e<CR>".
------------------------------------------------------------------------------
5.3. Headers *vimwiki-syntax-headers*
= Header level 1 =~
By default all headers are highlighted using |hl-Title| highlight group.
== Header level 2 ==~
You can set up different colors for each header level: >
:hi VimwikiHeader1 guifg=#FF0000
:hi VimwikiHeader2 guifg=#00FF00
:hi VimwikiHeader3 guifg=#0000FF
:hi VimwikiHeader4 guifg=#FF00FF
:hi VimwikiHeader5 guifg=#00FFFF
:hi VimwikiHeader6 guifg=#FFFF00
Set up colors for all 6 header levels or none at all.
=== Header level 3 ===~
==== Header level 4 ====~
===== Header level 5 =====~
====== Header level 6 ======~
You can center your headers in HTML by placing spaces before the first '=':
= Centered Header L1 =~
------------------------------------------------------------------------------
5.4. Paragraphs *vimwiki-syntax-paragraphs*
A paragraph is a group of lines starting in column 1 (no indentation).
Paragraphs are separated by a blank line:
This is first paragraph
with two lines.
This is a second paragraph with
two lines.
------------------------------------------------------------------------------
5.5. Lists *vimwiki-syntax-lists*
Unordered lists: >
- Bulleted list item 1
- Bulleted list item 2
or: >
* Bulleted list item 1
* Bulleted list item 2
Ordered lists: >
1. Numbered list item 1
2. Numbered list item 2
3. Numbered list item 3
or: >
1) Numbered list item 1
2) Numbered list item 2
3) Numbered list item 3
or: >
a) Numbered list item 1
b) Numbered list item 2
c) Numbered list item 3
or: >
A) Numbered list item 1
B) Numbered list item 2
C) Numbered list item 3
or: >
i) Numbered list item 1
ii) Numbered list item 2
iii) Numbered list item 3
or: >
I) Numbered list item 1
II) Numbered list item 2
III) Numbered list item 3
or: >
# Bulleted list item 1
# the # become numbers when converted to HTML
Note that a space after the list item symbols (-, *, 1. etc.) is essential.
You can nest and mix the various types: >
- Bulleted list item 1
- Bulleted list item 2
a) Numbered list sub item 1
b) more ...
* and more ...
* ...
c) Numbered list sub item 3
1. Numbered list sub sub item 1
2. Numbered list sub sub item 2
d) etc.
- Bulleted list item 3
List items can span multiple lines: >
* Item 1
Item 1 continued line.
Item 1 next continued line.
* Item 2
- Sub item 1
Sub item 1 continued line.
Sub item 1 next continued line.
- Sub item 2
- etc.
Continuation of Item 2
Next continuation of Item 2
Definition lists: >
Term 1:: Definition 1
Term 2::
:: Definition 2
:: Definition 3
------------------------------------------------------------------------------
5.6. Tables *vimwiki-syntax-tables*
Tables are created by entering the content of each cell separated by |
delimiters. You can insert other inline wiki syntax in table cells, including
typeface formatting and links.
For example: >
| Year | Temperature (low) | Temperature (high) |
|------|-------------------|--------------------|
| 1900 | -10 | 25 |
| 1910 | -15 | 30 |
| 1920 | -10 | 32 |
| 1930 | _N/A_ | _N/A_ |
| 1940 | -2 | 40 |
>
In HTML the following part >
| Year | Temperature (low) | Temperature (high) |
|------|-------------------|--------------------|
>
is highlighted as a table header.
If you indent a table then it will be centered in HTML.
If you put > in a cell, the cell spans the left column.
If you put \/ in a cell, the cell spans the above row.
For example: >
| a | b | c | d |
| \/ | e | > | f |
| \/ | \/ | > | g |
| h | > | > | > |
>
See |vimwiki-tables| for more details on how to manage tables.
------------------------------------------------------------------------------
5.7. Preformatted text *vimwiki-syntax-preformatted*
Use {{{ and }}} to define a block of preformatted text:
{{{ >
Tyger! Tyger! burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?
In what distant deeps or skies
Burnt the fire of thine eyes?
On what wings dare he aspire?
What the hand dare sieze the fire?
}}}
You can add optional information after the {{{: >
{{{class="brush: python" >
def hello(world):
for x in range(10):
print("Hello {0} number {1}".format(world, x))
}}}
Result of HTML export: >
<pre class="brush: python">
def hello(world):
for x in range(10):
print("Hello {0} number {1}".format(world, x))
</pre>
This might be useful for coloring program code with external JS tools
such as Google's syntax highlighter.
You can setup Vimwiki to highlight code snippets in preformatted text.
See |vimwiki-option-nested_syntaxes| and
|vimwiki-option-automatic_nested_syntaxes|.
------------------------------------------------------------------------------
5.8. Mathematical formulae *vimwiki-syntax-math*
Mathematical formulae are highlighted, and can be rendered in HTML using the
powerful open source display engine MathJax (http://www.mathjax.org/).
There are three supported syntaxes, which are inline, block display and
block environment.
Inline math is for short formulae within text. It is enclosed by single
dollar signs, e.g.:
$ \sum_i a_i^2 = 1 $
Block display creates a centered formula with some spacing before and after
it. It must start with a line including only {{$, then an arbitrary number
of mathematical text are allowed, and it must end with a line including only
}}$.
E.g.:
{{$
\sum_i a_i^2
=
1
}}$
Note: no matter how many lines are used in the text file, the HTML will
compress it to one line only.
Block environment is similar to block display, but is able to use specific
LaTeX environments, such as 'align'. The syntax is the same as for block
display, except for the first line which is {{$%environment%.
E.g.:
{{$%align%
\sum_i a_i^2 &= 1 + 1 \\
&= 2.
}}$
Similar compression rules for the HTML page hold (as MathJax interprets the
LaTeX code).
Note: the highlighting in Vim is automatic. For the rendering in HTML, you
have two alternative options:
1. installing MathJax locally (Recommended: faster, no internet required).
Choose a folder on your hard drive and save MathJax in it. Then add to your
HTML template the following line:
<script type="text/javascript" src="<mathjax_folder>/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
where <mathjax_folder> is the folder on your HD, as a relative path to the
template folder. For instance, a sensible folder structure could be:
- wiki
- text
- html
- templates
- mathjax
In this case, <mathjax_folder> would be "../mathjax" (without quotes).
2. Loading MathJax from a CDN-server (needs internet connection).
Add to your HTML template the following line:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/config/TeX-AMS-MML_HTMLorMML.js"></script>
------------------------------------------------------------------------------
5.9. Blockquotes *vimwiki-syntax-blockquotes*
Text which starts with 4 or more spaces is a blockquote.
This would be a blockquote in Vimwiki. It is not highlighted in Vim but
could be styled by CSS in HTML. Blockquotes are usually used to quote a
long piece of text from another source.
------------------------------------------------------------------------------
5.10. Comments *vimwiki-syntax-comments*
A line that starts with %% is a comment.
E.g.: >
%% this text would not be in HTML
<
------------------------------------------------------------------------------
5.11. Horizontal line *vimwiki-syntax-hr*
4 or more dashes at the start of the line is a horizontal line (<hr />): >
----
<
------------------------------------------------------------------------------
5.12. Tags *vimwiki-syntax-tags*
You can tag a wiki file, a header or an arbitrary place in a wiki file. Then,
you can use Vim's built-in tag search functionality (see |tagsrch.txt|) or
Vimwiki's tag related commands to quickly jump to all occurrences of the tag.
A tag is a sequence of non-space characters between two colons: >
:tag-example:
<
It is allowed to concatenate multiple tags in one line: >
:tag-one:tag-two:
<
If placed in the first two lines of a file, the whole file is tagged. If
placed under a header, within the 2 lines below it, the header is then tagged
with this tag, and the tag search commands will jump to this specific header.
Otherwise, the tag stands of its own and the search command jumps directly to
it.
Typing tags can be simplified by using Vim's omni completion (see
|compl-omni|) like so: >
:ind<C-X><C-O>
which opens up a popup menu with all tags defined in the wiki starting with
"ind".
Tags are also treated as |vimwiki-anchors| (similar to bold text).
*vimwiki-build-tags*
Note that the tag search/jump/completion commands need certain metadata saved
in the wiki folder. This metadata file can be manually updated by running
|:VimwikiRebuildTags|. When the option |vimwiki-option-auto_tags| is enabled,
the tags metadata will be auto-updated on each page save.
Tags-related commands and options:
* |:VimwikiRebuildTags|
* |:VimwikiGenerateTags|
* |:VimwikiSearchTags|
* |vimwiki-option-auto_tags|
==============================================================================
6. Folding/Outline *vimwiki-folding*
Vimwiki can fold or outline sections using headers and preformatted blocks.
Alternatively, one can fold list subitems instead. Folding is not enabled
by default, and requires the |g:vimwiki_folding| variable to be set.
Example for list folding with |g:vimwiki_folding| set to 'list':
= My current task =
* [ ] Do stuff 1
* [ ] Do substuff 1.1
* [ ] Do substuff 1.2
* [ ] Do substuff 1.2.1
* [ ] Do substuff 1.2.2
* [ ] Do substuff 1.3
* [ ] Do stuff 2
* [ ] Do stuff 3
Hit |zM| :
= My current task =
* [ ] Do stuff 1 [6] --------------------------------------~
* [ ] Do stuff 2
* [ ] Do stuff 3
Hit |zr| :
= My current task =
* [ ] Do stuff 1
* [ ] Do substuff 1.1
* [ ] Do substuff 1.2 [3] -------------------------------~
* [ ] Do substuff 1.3
* [ ] Do stuff 2
* [ ] Do stuff 3
Hit |zr| one more time :
= My current task =
* [ ] Do stuff 1
* [ ] Do substuff 1.1
* [ ] Do substuff 1.2
* [ ] Do substuff 1.2.1
* [ ] Do substuff 1.2.2
* [ ] Do substuff 1.3
* [ ] Do stuff 2
* [ ] Do stuff 3
Note: If you use the default Vimwiki syntax, folding on list items will work
properly only if all of them are indented using the current 'shiftwidth'.
For Markdown and MediaWiki syntax, * or # should be in the first column.
To turn folding on/off check |g:vimwiki_folding|.
==============================================================================
7. Placeholders *vimwiki-placeholders*
------------------------------------------------------------------------------
%title Title of the page *vimwiki-title*
When you htmlize your wiki page, the default title is the filename of the
page. Place >
%title My books
into your wiki page if you want another title.
------------------------------------------------------------------------------
%nohtml *vimwiki-nohtml*
If you do not want a wiki page to be converted to HTML, place:
%nohtml
into it.
------------------------------------------------------------------------------
%template *vimwiki-template*
To apply a concrete HTML template to a wiki page, place:
%template name
into it.
See |vimwiki-option-template_path| for details.
------------------------------------------------------------------------------
%date *vimwiki-date*
The date of the wiki page. The value can be used in the HTML template, see
|vimwiki-option-template_path| for details.
%date 2017-07-08
%date
If you omit the date after the placeholder, the date of the HTML conversion is
used.
==============================================================================
8. Lists *vimwiki-lists*
While writing lists, the keys <CR>, o and O insert new bullets or numbers as
you would expect it. A new bullet/number is inserted if and only if the cursor
is in a list item. To make a list item with more than one line, press <S-CR>
or press <CR> and <C-L><C-M>.
Note that the mapping <S-CR> is not available in all terminals.
Furthermore, <CR> and <S-CR> behave differently when the cursor is behind an
empty list item. See the table below.
You can configure the behavior of <CR> and of <S-CR> like this: >
inoremap <CR> <Esc>:VimwikiReturn 1 5<CR>
inoremap <S-CR> <Esc>:VimwikiReturn 2 2<CR>
The first argument of the command :VimwikiReturn is a number that specifies
when to insert a new bullet/number and when not, depending on whether the
cursor is in a list item or in a normal line: >
Number │ Before │ After
======================================
1 │ 1. item| │ 1. item
│ │ 2. |
│–––––––––––––––––––––––––––––– ← default for <CR>
│ 1. item │ 1. item
│ continue| │ continue
│ │ |
======================================
2 │ 1. item| │ 1. item
│ │ |
│–––––––––––––––––––––––––––––– ← default for <S-CR>
│ 1. item │ 1. item
│ continue| │ continue
│ │ 2. |
======================================
3 │ 1. item| │ 1. item
│ │ 2. |
│––––––––––––––––––––––––––––––
│ 1. item │ 1. item
│ continue| │ continue
│ │ 2. |
======================================
4 │ 1. item| │ 1. item
│ │ |
│––––––––––––––––––––––––––––––
│ 1. item │ 1. item
│ continue| │ continue
│ │ |
<
The second argument is a number that specifies what should happen when you
press <CR> or <S-CR> behind an empty list item. There are no less than five
possibilities:
>
Number │ Before │ After
======================================
1 │ 1. | │ 1.
│ │ 2. |
======================================
2 │ 1. | │ ← default for <S-CR>
│ │ 1. |
======================================
3 │ 1. | │ |
│ │
======================================
4 │ 1. | │
│ │ |
======================================
5 │ 1. | │ 1. |
│ │
│–––––––––––––––––––––––––––––– ← default for <CR>
│ 1. | │ |
│ │
<
*vimwiki-list-manipulation*
The level of a list item is determined by its indentation (default and
Markdown syntax) or by the number of list symbols (MediaWiki syntax).
Use gll and glh in normal mode to increase or decrease the level of a list
item. The symbols are adjusted automatically to the list items around it.
Use gLl and gLh to increase or decrease the level of a list item plus all
list items of lower level below it, that is, all child items.
Use <C-T> and <C-D> to change the level of a list item in insert mode.
See |vimwiki_gll|, |vimwiki_gLl|, |vimwiki_glh|, |vimwiki_gLh|,
|vimwiki_i_<C-T>|, |vimwiki_i_<C-D>|
Use gl followed by the desired symbol to change the symbol of a list item or
create one. Type gL and the symbol to change all items of the current list.
For default syntax, the following types are available: >
- hyphen
* asterisk
# hash
1. number with period
1) number with parenthesis
a) lower-case letter with parenthesis
A) upper-case letter with parenthesis
i) lower-case Roman numerals with parenthesis
I) upper-case Roman numerals with parenthesis
Markdown syntax has the following types: >
- hyphen
* asterisk
+ plus
1. number with period
MediaWiki syntax only has: >
* asterisk
# hash
In insert mode, use the keys <C-L><C-J> and <C-L><C-K> to switch between
symbols. For convenience, only the commonly used symbols can be reached
through these keys for default syntax.
Note that such a list: a) b) c) … only goes up to zz), to avoid confusion with
normal text followed by a parenthesis.
Roman numerals go up to MMMM) and numbers up to 2147483647. or
9223372036854775807. depending if your Vim is 32 or 64 bit.
Also note that you can, of course, mix different list symbols in one list, but
if you have the strange idea of putting a list with Romanian numerals right
after a list using letters or vice versa, Vimwiki will get confused because
it cannot distinguish which is which (at least if the types are both upper
case or both lower case).
See |vimwiki_glstar|, |vimwiki_gl#| |vimwiki_gl-|, |vimwiki_gl-|,
|vimwiki_gl1|, |vimwiki_gla|, |vimwiki_glA|, |vimwiki_gli|, |vimwiki_glI|
Use glr and gLr if the numbers of a numbered list are mixed up. See
|vimwiki_glr| and |vimwiki_gLr|.
------------------------------------------------------------------------------
Todo lists *vimwiki-todo-lists*
You can have todo lists -- lists of items you can check/uncheck.
Consider the following example: >
= Toggleable list of todo items =
* [X] Toggle list item on/off.
* [X] Simple toggling between [ ] and [X].
* [X] All list's subitems should be toggled on/off appropriately.
* [X] Toggle child subitems only if current line is list item
* [X] Parent list item should be toggled depending on it's child items.
* [X] Make numbered list items toggleable too
* [X] Add highlighting to list item boxes
* [X] Add [ ] to the next list item created with o, O and <CR>.
Pressing <C-Space> on the first list item will toggle it and all of its child
items: >
= Toggleable list of todo items =
* [ ] Toggle list item on/off.
* [ ] Simple toggling between [ ] and [X].
* [ ] All of a list's subitems should be toggled on/off appropriately.
* [ ] Toggle child subitems only if the current line is a list item.
* [ ] Parent list item should be toggled depending on their child items.
* [X] Make numbered list items toggleable too.
* [X] Add highlighting to list item boxes.
* [X] Add [ ] to the next list item created using o, O or <CR>.
Pressing <C-Space> on the third list item will toggle it and adjust all of its
parent items: >
= Toggleable list of todo items =
* [.] Toggle list item on/off.
* [ ] Simple toggling between [ ] and [X].
* [X] All of a list's subitems should be toggled on/off appropriately.
* [ ] Toggle child subitems only if current line is list item.
* [ ] Parent list item should be toggled depending on it's child items.
* [ ] Make numbered list items toggleable too.
* [ ] Add highlighting to list item boxes.
* [ ] Add [ ] to the next list item created using o, O or <CR>.
Parent items should change when their child items change. If not, use
|vimwiki_glr|. The symbol between [ ] depends on the percentage of toggled
child items (see also |g:vimwiki_listsyms|): >
[ ] -- 0%
[.] -- 1-33%
[o] -- 34-66%
[O] -- 67-99%
[X] -- 100%
You can use |vimwiki_gln| and |vimwiki_glp| to change the "done" status of a
checkbox without a childitem.
It is possible to toggle several list items using visual mode. But note that
instead of toggling every item individually, all items get checked if the
first item is unchecked and all items get unchecked if the first item is
checked.
Use gl<Space> (see |vimwiki_gl<Space>|) to remove a single checkbox and
gL<Space> (see |vimwiki_gL<Space>|) to remove all checkboxes of the list the
cursor is in.
You can mark an item as rejected ("won't do") with
|vimwiki_glx|. A rejected item will not influence the status of its parents.
==============================================================================
9. Tables *vimwiki-tables*
Use the :VimwikiTable command to create a default table with 5 columns and 2
rows: >
| | | | | |
|---|---|---|---|---|
| | | | | |
<
Tables are auto-formattable. Let's add some text into first cell: >
| First Name | | | | |
|---|---|---|---|---|
| | | | | |
<
Whenever you press <TAB>, <CR> or leave Insert mode, the table is formatted: >
| First Name | | | | |
|------------|---|---|---|---|
| | | | | |
<
You can easily create nice-looking text tables, just press <TAB> and enter new
values: >
| First Name | Last Name | Age | City | e-mail |
|------------|------------|-----|----------|----------------------|
| Vladislav | Pokrishkin | 31 | Moscow | vlad_pok@smail.com |
| James | Esfandiary | 27 | Istanbul | esfandiary@tmail.com |
<
To indent table indent the first row. Then format it with 'gqq'.
==============================================================================
10. Diary *vimwiki-diary*
The diary helps you make daily notes. You can easily add information into
Vimwiki that should be sorted out later. Just hit <Leader>w<Leader>w to create
a new note for today with a name based on the current date.
To generate the diary section with all available links one can use
|:VimwikiDiaryGenerateLinks| or <Leader>w<Leader>i .
Note: it works only for diary index file.
Example of diary section: >
= Diary =
== 2011 ==
=== December ===
* [[2011-12-09]]
* [[2011-12-08]]
See |g:vimwiki_diary_months| if you would like to rename months.
------------------------------------------------------------------------------
Calendar integration *vimwiki-calendar*
If you have Calendar.vim installed you can use it to create diary notes.
Just open calendar with :Calendar and tap <Enter> on the date. A wiki file
will be created in the default wiki's diary.
Get it from http://www.vim.org/scripts/script.php?script_id=52
See |g:vimwiki_use_calendar| option to turn it off/on.
==============================================================================
12. Anchors *vimwiki-anchors*
Every header, tag, and bold text can be used as an anchor. To jump to it, use
a wikilink of the form >
[[file#anchor]]
For example, consider the following file "Todo.wiki": >
= My tasks =
:todo-lists:
== Home ==
- [ ] bathe my dog
== Work ==
- [ ] beg for *pay rise*
== Knitting club ==
=== Knitting projects ===
- [ ] a *funny pig*
- [ ] a *scary dog*
Then, to jump from your index.wiki directly to your knitting projects, use: >
[[Todo#Knitting projects]]
Or, to jump to an individual project, use this link: >
[[Todo#funny pig]]
Or, to jump to a tag, use this link: >
[[Todo#todo-lists]]
If there are multiple instances of an anchor, you can use the long form which
consists of the complete header hierarchy, separated by '#': >
[[Todo#My tasks#Knitting club#Knitting projects#scary dog]]
If you don't feel like typing the whole stuff, type just [[Todo# and then
|i_CTRL-X_CTRL-O| to start the omni completion of anchors.
For jumping inside a single file, you can omit the file in the link: >
[[#pay rise]]
------------------------------------------------------------------------------
Table of Contents *vimwiki-toc* *vimwiki-table-of-contents*
You can create a "table of contents" at the top of your wiki file.
The commando |:VimwikiTOC| creates the magic header >
= Contents =
in the current file and below it a list of all the headers in this file as
links, so you can directly jump to specific parts of the file.
For the indentation of the list, the value of |vimwiki-option-list_margin| is
used.
If you don't want the TOC to sit in the very first line, e.g. because you have
a modeline there, put the magic header in the second or third line and run
:VimwikiTOC to update the TOC.
If English is not your preferred language, set the option
|g:vimwiki_toc_header| to your favorite translation.
If you want to keep the TOC up to date automatically, use the option
|vimwiki-option-auto_toc|.
------------------------------------------------------------------------------
Tagbar integration *vimwiki-tagbar*
As an alternative to the Table of Contents, you can use the Tagbar plugin
(http://majutsushi.github.io/tagbar/) to show the headers of your wiki files
in a side pane.
Download the Python script from
https://raw.githubusercontent.com/vimwiki/utils/master/vwtags.py and follow
the instructions in it.
==============================================================================
12. Options *vimwiki-options*
There are global options and local (per-wiki) options available to tune
Vimwiki.
Global options are configured via global variables. For a complete list of
them, see |vimwiki-global-options|.
Local options for multiple independent wikis are stored in a single global
variable |g:vimwiki_list|. The per-wiki options can be registered in advance,
as described in |vimwiki-register-wiki|, or may be registered on the fly as
described in |vimwiki-temporary-wiki|. For a list of per-wiki options, see
|vimwiki-local-options|.
------------------------------------------------------------------------------
12.1 Registered Wiki *g:vimwiki_list* *vimwiki-register-wiki*
One or more wikis can be registered using the |g:vimwiki_list| variable.
Each item in |g:vimwiki_list| is a |Dictionary| that holds all customizations
available for a distinct wiki. The options dictionary has the form: >
{'option1': 'value1', 'option2': 'value2', ...}
Consider the following: >
let g:vimwiki_list = [{'path': '~/my_site/', 'path_html': '~/public_html/'}]
This defines one wiki located at ~/my_site/. When converted to HTML, the
produced HTML files go to ~/public_html/ .
Another example: >
let g:vimwiki_list = [{'path': '~/my_site/', 'path_html': '~/public_html/'},
\ {'path': '~/my_docs/', 'ext': '.mdox'}]
defines two wikis: the first as before, and the second one located in
~/my_docs/, with files that have the .mdox extension.
An empty |Dictionary| in g:vimwiki_list is the wiki with default options: >
let g:vimwiki_list = [{},
\ {'path': '~/my_docs/', 'ext': '.mdox'}]
For clarity, in your .vimrc file you can define wiki options using separate
|Dictionary| variables and subsequently compose them into |g:vimwiki_list|. >
let wiki_1 = {}
let wiki_1.path = '~/my_docs/'
let wiki_1.html_template = '~/public_html/template.tpl'
let wiki_1.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
let wiki_2 = {}
let wiki_2.path = '~/project_docs/'
let wiki_2.index = 'main'
let g:vimwiki_list = [wiki_1, wiki_2]
<
------------------------------------------------------------------------------
12.2 Temporary Wiki *vimwiki-temporary-wiki*
The creation of temporary wikis allows you to create a wiki on the fly.
If a file with a registered wiki extension (see |vimwiki-register-extension|)
is opened in a directory that: 1) is not listed in |g:vimwiki_list|, and 2) is
not a subdirectory of any such directory, then a temporary wiki is created and
appended to the list of configured wikis in |g:vimwiki_list|.
In addition to Vimwiki's editing functionality, the temporary wiki enables: 1)
wiki-linking to other files in the same subtree, 2) highlighting of existing
wiki pages when |vimwiki-option-maxhi| is activated, and 3) HTML generation to
|vimwiki-option-path_html|.
Temporary wikis are configured using default |vimwiki-local-options|, except
for the path, extension, and syntax options. The path and extension are set
using the file's location and extension. The syntax is set to Vimwiki's
default unless another syntax is registered via |vimwiki-register-extension|.
Use |g:vimwiki_global_ext| to turn off creation of temporary wikis.
NOTE: Vimwiki assumes that the locations of distinct wikis do not overlap.
------------------------------------------------------------------------------
12.3 Per-Wiki Options *vimwiki-local-options*
*vimwiki-option-path*
------------------------------------------------------------------------------
Key Default value~
path ~/vimwiki/
Description~
Wiki files location: >
let g:vimwiki_list = [{'path': '~/my_site/'}]
<
*vimwiki-option-path_html*
------------------------------------------------------------------------------
Key Default value~
path_html ''
Description~
Location of HTML files converted from wiki files: >
let g:vimwiki_list = [{'path': '~/my_site/',
\ 'path_html': '~/html_site/'}]
If path_html is an empty string, the location is derived from
|vimwiki-option-path| by adding '_html'; i.e. for: >
let g:vimwiki_list = [{'path': '~/okidoki/'}]
path_html will be set to '~/okidoki_html/'.
*vimwiki-option-auto_export*
------------------------------------------------------------------------------
Key Default value Values~
auto_export 0 0, 1
Description~
Set this option to 1 to automatically generate the HTML file when the
corresponding wiki page is saved: >
let g:vimwiki_list = [{'path': '~/my_site/', 'auto_export': 1}]
This will keep your HTML files up to date.
*vimwiki-option-auto_toc*
------------------------------------------------------------------------------
Key Default value Values~
auto_toc 0 0, 1
Description~
Set this option to 1 to automatically update the table of contents when the
current wiki page is saved: >
let g:vimwiki_list = [{'path': '~/my_site/', 'auto_toc': 1}]
*vimwiki-option-index*
------------------------------------------------------------------------------
Key Default value~
index index
Description~
Name of wiki index file: >
let g:vimwiki_list = [{'path': '~/my_site/', 'index': 'main'}]
NOTE: Do not include the extension.
*vimwiki-option-ext*
------------------------------------------------------------------------------
Key Default value~
ext .wiki
Description~
Extension of wiki files: >
let g:vimwiki_list = [{'path': '~/my_site/',
\ 'index': 'main', 'ext': '.document'}]
<
*vimwiki-option-syntax*
------------------------------------------------------------------------------
Key Default value Values~
syntax default default, markdown, or media
Description~
Wiki syntax. You can use different markup languages (currently: Vimwiki's
default, Markdown, and MediaWiki), but only Vimwiki's default markup will be
converted to HTML at the moment.
To use Markdown's wiki markup: >
let g:vimwiki_list = [{'path': '~/my_site/',
\ 'syntax': 'markdown', 'ext': '.md'}]
<
*vimwiki-option-template_path*
------------------------------------------------------------------------------
Key Default value~
template_path ~/vimwiki/templates/
Description~
Setup path for HTML templates: >
let g:vimwiki_list = [{'path': '~/my_site/',
\ 'template_path': '~/public_html/templates/',
\ 'template_default': 'def_template',
\ 'template_ext': '.html'}]
There could be a bunch of templates: >
def_template.html
index.html
bio.html
person.html
etc.
Each template could look like: >
<html>
<head>
<link rel="Stylesheet" type="text/css" href="%root_path%style.css" />
<title>%title%</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div class="content">
%content%
</div>
<p><small>Page created on %date%</small></p>
</body>
</html>
where
%title% is replaced by a wiki page name or by a |vimwiki-title|
%date% is replaced with the current date or by |vimwiki-date|
%root_path% is replaced by a count of ../ for pages buried in subdirs:
if you have wikilink [[dir1/dir2/dir3/my page in a subdir]] then
%root_path% is replaced by '../../../'.
%content% is replaced by a wiki file content.
The default template will be applied to all wiki pages unless a page specifies
a template. Consider you have wiki page named 'Maxim.wiki' and you want apply
'person.html' template to it. Just add: >
%template person
to that page.
*vimwiki-option-template_default*
------------------------------------------------------------------------------
Key Default value~
template_default default
Description~
Setup default template name (without extension).
See |vimwiki-option-template_path| for details.
*vimwiki-option-template_ext*
------------------------------------------------------------------------------
Key Default value~
template_ext .tpl
Description~
Setup template filename extension.
See |vimwiki-option-template_path| for details.
*vimwiki-option-css_name*
------------------------------------------------------------------------------
Key Default value~
css_name style.css
Description~
Setup CSS file name: >
let g:vimwiki_list = [{'path': '~/my_pages/',
\ 'css_name': 'main.css'}]
<
or even >
let g:vimwiki_list = [{'path': '~/my_pages/',
\ 'css_name': 'css/main.css'}]
<
Vimwiki comes with a default CSS file "style.css".
*vimwiki-option-maxhi*
------------------------------------------------------------------------------
Key Default value Values~
maxhi 0 0, 1
Description~
If on, wiki links to non-existent wiki files are highlighted. However, it can
be quite slow. If you still want it, set maxhi to 1: >
let g:vimwiki_list = [{'path': '~/my_site/', 'maxhi': 1}]
*vimwiki-option-nested_syntaxes*
------------------------------------------------------------------------------
Key Default value Values~
nested_syntaxes {} pairs of highlight keyword and Vim filetype
Description~
You can configure preformatted text to be highlighted with any syntax
available for Vim.
For example the following setup in your vimrc: >
let wiki = {}
let wiki.path = '~/my_wiki/'
let wiki.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
let g:vimwiki_list = [wiki]
would give you Python and C++ highlighting in: >
{{{class="brush: python"
for i in range(1, 5):
print(i)
}}}
{{{class="brush: c++"
#include "helloworld.h"
int helloworld()
{
printf("hello world");
}
}}}
or in: >
{{{c++
#include "helloworld.h"
int helloworld()
{
printf("hello world");
}
}}}
{{{python
for i in range(1, 5):
print(i)
}}}
*vimwiki-option-automatic_nested_syntaxes*
------------------------------------------------------------------------------
Key Default value~
automatic_nested_syntaxes 1
Description~
If set, the nested syntaxes (|vimwiki-option-nested_syntaxes|) are
automatically derived when opening a buffer.
Just write your preformatted text in your file like this >
{{{xxx
my preformatted text
}}}
where xxx is a filetype which is known to Vim. For example, for C++
highlighting, use "cpp" (not "c++"). For a list of known filetypes, type
":setf " and hit Ctrl+d.
Note that you may have to reload the file (|:edit|) to see the highlight.
Since every file is scanned for the markers of preformatted text when it is
opened, it can be slow when you have huge files. In this case, set this option
to 0.
*vimwiki-option-diary_rel_path*
------------------------------------------------------------------------------
Key Default value~
diary_rel_path diary/
Description~
The path to the diary wiki files, relative to |vimwiki-option-path|.
*vimwiki-option-diary_index*
------------------------------------------------------------------------------
Key Default value~
diary_index diary
Description~
Name of wiki-file that holds all links to dated wiki files.
*vimwiki-option-diary_header*
------------------------------------------------------------------------------
Key Default value~
diary_header Diary
Description~
Name of the header in |vimwiki-option-diary_index| where links to dated
wiki-files are located.
*vimwiki-option-diary_sort*
------------------------------------------------------------------------------
Key Default value Values~
diary_sort desc desc, asc
Description~
Sort links in a diary index page.
*vimwiki-option-custom_wiki2html*
------------------------------------------------------------------------------
Key Default value~
custom_wiki2html ''
Description~
The full path to an user-provided script that converts a wiki page to HTML.
Vimwiki calls the provided |vimwiki-option-custom_wiki2html| script from the
command-line, using |:!| invocation.
The following arguments, in this order, are passed to the script:
1. force : [0/1] overwrite an existing file
2. syntax : the syntax chosen for this wiki
3. extension : the file extension for this wiki
4. output_dir : the full path of the output directory
5. input_file : the full path of the wiki page
6. css_file : the full path of the css file for this wiki
7. template_path : the full path to the wiki's templates
8. template_default : the default template name
9. template_ext : the extension of template files
10. root_path : a count of ../ for pages buried in subdirs
For example, if you have wikilink [[dir1/dir2/dir3/my page in a subdir]]
then this argument is '../../../'.
11. custom_args : custom arguments that will be passed to the conversion
(can be defined in g:vimwiki_list as 'custom_wiki2html_args' parameter,
see |vimwiki-option-custom_wiki2html_args|)
script.
Options 7-11 are experimental and may change in the future. If any of these
parameters is empty, a hyphen "-" is passed to the script in its place.
For an example and further instructions, refer to the following script:
$VIMHOME/autoload/vimwiki/customwiki2html.sh
An alternative converter was developed by Jason6Anderson, and can
be located at https://github.com/vimwiki-backup/vimwiki/issues/384
To use the internal wiki2html converter, use an empty string (the default).
vimwiki-option-custom_wiki2html_args
-----------------------------------------------------------------------------
Key Default value~
custom_wiki2html_args ''
Description
If a custom script is called with |vimwiki-option-custom_wiki2html|, additional
parameters can be passed by setting them using 'custom_wiki2html_args' in
|g:vimwiki_list|.
*vimwiki-option-list_margin*
------------------------------------------------------------------------------
Key Default value~
list_margin -1
Description~
Width of left-hand margin for lists. When negative, the current 'shiftwidth'
is used. This affects the appearance of the generated links (see
|:VimwikiGenerateLinks|), the Table of contents (|vimwiki-toc|) and the
behavior of the list manipulation commands |:VimwikiListChangeLevel| and the
local mappings |vimwiki_glstar|, |vimwiki_gl#| |vimwiki_gl-|, |vimwiki_gl-|,
|vimwiki_gl1|, |vimwiki_gla|, |vimwiki_glA|, |vimwiki_gli|, |vimwiki_glI| and
|vimwiki_i_<C-L>_<C-M>|.
Note: if you use Markdown or MediaWiki syntax, you probably would like to set
this option to 0, because every indented line is considered verbatim text.
*vimwiki-option-auto_tags*
------------------------------------------------------------------------------
Key Default value Values~
auto_tags 0 0, 1
Description~
Set this option to 1 to automatically update the tags metadata when the
current wiki page is saved: >
let g:vimwiki_list = [{'path': '~/my_site/', 'auto_tags': 1}]
------------------------------------------------------------------------------
12.4 Global Options *vimwiki-global-options*
Global options are configured using the following pattern: >
let g:option_name = option_value
------------------------------------------------------------------------------
*g:vimwiki_hl_headers*
Highlight headers with =Reddish=, ==Greenish==, ===Blueish=== colors.
Value Description~
1 Use VimwikiHeader1-VimwikiHeader6 group colors to highlight
different header levels.
0 Use |hl-Title| color for headers.
Default: 0
------------------------------------------------------------------------------
*g:vimwiki_hl_cb_checked*
Highlight checked list items with a special color:
* [X] the whole line can be highlighted with the option set to 1.
* this line is highlighted as well with the option set to 2
* [ ] this line is never highlighted
Value Description~
0 Don't highlight anything.
1 Highlight checked [X] list item with |group-name| "Comment".
2 Highlight checked [X] list item and all its child items.
Default: 0
Note: Option 2 does not work perfectly. Specifically, it might break if the
list item contains preformatted text or if you mix tabs and spaces for
indenting. Also, indented headers can be highlighted erroneously.
Furthermore, if your list is long, Vim's highlight can break. To solve this,
consider putting >
au BufEnter *.wiki :syntax sync fromstart
in your .vimrc
------------------------------------------------------------------------------
*g:vimwiki_global_ext*
Control the creation of |vimwiki-temporary-wiki|s.
If a file with a registered extension (see |vimwiki-register-extension|) is
opened in a directory that is: 1) not listed in |g:vimwiki_list|, and 2) not a
subdirectory of any such directory, then:
Value Description~
1 make temporary wiki and append it to |g:vimwiki_list|.
0 don't make temporary wiki in that dir.
If your preferred wiki extension is .txt then you can >
let g:vimwiki_global_ext = 0
to restrict Vimwiki's operation to only those paths listed in g:vimwiki_list.
Other text files wouldn't be treated as wiki pages.
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_ext2syntax* *vimwiki-register-extension*
A many-to-one mapping between file extensions and syntaxes whose purpose is to
register the extensions with Vimwiki.
E.g.: >
let g:vimwiki_ext2syntax = {'.md': 'markdown',
\ '.mkd': 'markdown',
\ '.wiki': 'media'}
An extension that is registered with Vimwiki can trigger creation of a
|vimwiki-temporary-wiki| with the associated syntax. File extensions used in
|g:vimwiki_list| are automatically registered with Vimwiki using the default
syntax.
Default: {}
------------------------------------------------------------------------------
*g:vimwiki_menu*
Create a menu in the menu bar of GVim, where you can open the available wikis.
Value Description~
'' No menu
'Vimwiki' Top level menu "Vimwiki"
'Plugin.Vimwiki' "Vimwiki" submenu of top level menu "Plugin"
etc.
Default: 'Vimwiki'
------------------------------------------------------------------------------
*g:vimwiki_listsyms*
String of at least two symbols to show the progression of todo list items.
Default value is ' .oOX'.
The first char is for 0% done items.
The last is for 100% done items.
You can set it to some more fancy symbols like this:
>
let g:vimwiki_listsyms = '✗○◐●✓'
------------------------------------------------------------------------------
*g:vimwiki_listsym_rejected*
Character that is used to show that an item of a todo list will not be done.
Default value is '-'.
The character used here must not be part of |g:vimwiki_listsyms|.
You can set it to a more fancy symbol like this:
>
let g:vimwiki_listsym_rejected = '✗'
------------------------------------------------------------------------------
*g:vimwiki_use_mouse*
Use local mouse mappings from |vimwiki-local-mappings|.
Value Description~
0 Do not use mouse mappings.
1 Use mouse mappings.
Default: 0
------------------------------------------------------------------------------
*g:vimwiki_folding*
Enable/disable Vimwiki's folding (outline) functionality. Folding in Vimwiki
can uses either the 'expr' or the 'syntax' |foldmethod| of Vim.
Value Description~
'' Disable folding
'expr' Folding based on expression (folds sections and code blocks)
'syntax' Folding based on syntax (folds sections; slower than 'expr')
'list' Folding based on expression (folds list subitems; much slower)
'custom' Leave the folding settings as they are (e.g. set by another
plugin)
Default: ''
Limitations:
- Opening very large files may be slow when folding is enabled.
- 'list' folding is particularly slow with larger files.
- 'list' is intended to work with lists nicely indented with 'shiftwidth'.
- 'syntax' is only available for the default syntax so far.
The options above can be suffixed with ':quick' (e.g.: 'expr:quick') in order
to use some workarounds to make folds work faster.
------------------------------------------------------------------------------
*g:vimwiki_list_ignore_newline*
This is HTML related.
Convert newlines to <br />s in multiline list items.
Value Description~
0 Newlines in a list item are converted to <br />s.
1 Ignore newlines.
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_text_ignore_newline*
This is HTML related.
Convert newlines to <br />s in text.
Value Description~
0 Newlines in text are converted to <br />s.
1 Ignore newlines.
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_use_calendar*
Create new or open existing diary wiki-file for the date selected in Calendar.
See |vimwiki-calendar|.
Value Description~
0 Do not use calendar.
1 Use calendar.
Default: 1
------------------------------------------------------------------------------
*VimwikiLinkHandler*
A customizable link handler can be defined to override Vimwiki's behavior when
opening links. Each recognized link, whether it is a wikilink, wiki-include
link or a weblink, is first passed to |VimwikiLinkHandler| to see if it can be
handled. The return value 1 indicates success.
If the link is not handled successfully, the behavior of Vimwiki depends on
the scheme. "wiki:", "diary:" or schemeless links are opened in Vim. "file:"
and "local:" links are opened with a system default handler.
You can redefine the VimwikiLinkHandler function in your .vimrc to do
something else: >
function! VimwikiLinkHandler(link)
try
let browser = 'C:\Program Files\Firefox\firefox.exe'
execute '!start "'.browser.'" ' . a:link
return 1
catch
echo "This can happen for a variety of reasons ..."
endtry
return 0
endfunction
A second example handles a new scheme, "vfile:", which behaves similar to
"file:", but the files are always opened with Vim in a new tab: >
function! VimwikiLinkHandler(link)
" Use Vim to open external files with the 'vfile:' scheme. E.g.:
" 1) [[vfile:~/Code/PythonProject/abc123.py]]
" 2) [[vfile:./|Wiki Home]]
let link = a:link
if link =~# '^vfile:'
let link = link[1:]
else
return 0
endif
let link_infos = vimwiki#base#resolve_link(link)
if link_infos.filename == ''
echomsg 'Vimwiki Error: Unable to resolve link!'
return 0
else
exe 'tabnew ' . fnameescape(link_infos.filename)
return 1
endif
endfunction
------------------------------------------------------------------------------
*VimwikiLinkConverter*
This function can be overridden in your .vimrc to specify what a link looks
like when converted to HTML. The parameters of the function are:
- the link as a string
- the full path to the wiki file where the link is in
- the full path to the output HTML file
It should return the HTML link if successful or an empty string '' otherwise.
This example changes how relative links to external files using the "local:"
scheme look like in HTML. Per default, they would become links relative to
the HTML output directory. This function converts them to links relative to
the wiki file, i.e. a link [[local:../document.pdf]] becomes
<a href="../document.pdf">. Also, this function will copy document.pdf to the
right place. >
function! VimwikiLinkConverter(link, source_wiki_file, target_html_file)
if a:link =~# '^local:'
let link_infos = vimwiki#base#resolve_link(a:link)
let html_link = vimwiki#path#relpath(
\ fnamemodify(a:source_wiki_file, ':h'), link_infos.filename)
let relative_link =
\ fnamemodify(a:target_html_file, ':h') . '/' . html_link
call system('cp ' . fnameescape(link_infos.filename) .
\ ' ' . fnameescape(relative_link))
return html_link
endif
return ''
endfunction
------------------------------------------------------------------------------
*VimwikiWikiIncludeHandler*
Vimwiki includes the content of a wiki-include URL as an image by default.
A trial feature allows you to supply your own handler for wiki-include links.
The handler should return the empty string when it does not recognize or
cannot otherwise convert the link. A customized handler might look like this: >
" Convert {{URL|#|ID}} -> URL#ID
function! VimwikiWikiIncludeHandler(value)
let str = a:value
" complete URL
let url_0 = matchstr(str, g:vimwiki_rxWikiInclMatchUrl)
" URL parts
let link_infos = vimwiki#base#resolve_link(url_0)
let arg1 = matchstr(str, VimwikiWikiInclMatchArg(1))
let arg2 = matchstr(str, VimwikiWikiInclMatchArg(2))
if arg1 =~ '#'
return link_infos.filename.'#'.arg2
endif
" Return the empty string when unable to process link
return ''
endfunction
<
------------------------------------------------------------------------------
*g:vimwiki_table_mappings*
Enable/disable table mappings for INSERT mode.
Value Description~
0 Disable table mappings.
1 Enable table mappings.
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_table_auto_fmt*
Enable/disable table auto formatting after leaving INSERT mode.
Value Description~
0 Disable table auto formatting.
1 Enable table auto formatting.
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_w32_dir_enc*
Convert directory name from current 'encoding' into 'g:vimwiki_w32_dir_enc'
before it is created.
If you have 'enc=utf-8' and set up >
let g:vimwiki_w32_dir_enc = 'cp1251'
<
then following the next link with <CR>: >
[[привет/мир]]
>
would convert utf-8 'привет' to cp1251 and create directory with that name.
Default: ''
------------------------------------------------------------------------------
*g:vimwiki_CJK_length*
Use a special method to calculate the correct length of the strings with
double-wide characters (to align table cells properly).
Value Description~
0 Do not use it.
1 Use it.
Default: 0
Note: Vim 7.3 has a new function |strdisplaywidth()|, so for users of an up to
date Vim, this option is obsolete.
------------------------------------------------------------------------------
*g:vimwiki_dir_link*
This option is about what to do with links to directories, like
[[directory/]], [[papers/]], etc.
Value Description~
'' Open 'directory/' using the standard netrw plugin.
'index' Open 'directory/index.wiki', create if needed.
'main' Open 'directory/main.wiki', create if needed.
etc.
Default: '' (empty string)
------------------------------------------------------------------------------
*g:vimwiki_html_header_numbering*
Set this option if you want headers to be auto-numbered in HTML.
E.g.: >
1 Header1
1.1 Header2
1.2 Header2
1.2.1 Header3
1.2.2 Header3
1.3 Header2
2 Header1
3 Header1
etc.
Value Description~
0 Header numbering is off.
1 Header numbering is on. Headers are numbered starting from
header level 1.
2 Header numbering is on. Headers are numbered starting from
header level 2.
etc.
Example when g:vimwiki_html_header_numbering = 2: >
Header1
1 Header2
2 Header2
2.1 Header3
2.1.1 Header4
2.1.2 Header4
2.2 Header3
3 Header2
4 Header2
etc.
Default: 0
------------------------------------------------------------------------------
*g:vimwiki_html_header_numbering_sym*
Ending symbol for |g:vimwiki_html_header_numbering|.
Value Description~
'.' Dot will be added after a header's number.
')' Closing bracket will be added after a header's number.
etc.
With
let g:vimwiki_html_header_numbering_sym = '.'
headers would look like: >
1. Header1
1.1. Header2
1.2. Header2
1.2.1. Header3
1.2.2. Header3
1.3. Header2
2. Header1
3. Header1
Default: '' (empty)
------------------------------------------------------------------------------
*g:vimwiki_valid_html_tags*
Case-insensitive comma separated list of HTML tags that can be used in
Vimwiki. When converting to HTML, these tags are left as they are, while
every other tag is escaped.
Default: 'b,i,s,u,sub,sup,kbd,br,hr'
------------------------------------------------------------------------------
*g:vimwiki_user_htmls*
Comma-separated list of HTML files that have no corresponding wiki files and
should not be deleted after |:VimwikiAll2HTML|.
Default: ''
Example:
Consider you have 404.html and search.html in your Vimwiki 'path_html'.
With: >
let g:vimwiki_user_htmls = '404.html,search.html'
they would not be deleted after |:VimwikiAll2HTML|.
------------------------------------------------------------------------------
*g:vimwiki_conceallevel*
In Vim 7.3 'conceallevel' is local to the current window, thus if you open a
Vimwiki buffer in a new tab or window, it would be set to the default value.
Vimwiki sets 'conceallevel' to g:vimwiki_conceallevel every time a Vimwiki
buffer is entered.
With default settings, Vimwiki conceals one-character markers, shortens long
URLs and hides markers and URL for links that have a description.
Default: 2
------------------------------------------------------------------------------
*g:vimwiki_autowriteall*
Automatically save a modified wiki buffer when switching wiki pages. Has the
same effect like setting the Vim option 'autowriteall', but it works for wiki
files only, while the Vim option is global.
Hint: if you're just annoyed that you have to save files manually to switch
wiki pages, consider setting the Vim option 'hidden' which makes that modified
files don't need to be saved.
Value Description~
0 autowriteall is off
1 autowriteall is on
Default: 1
------------------------------------------------------------------------------
*g:vimwiki_url_maxsave*
Setting the value of |g:vimwiki_url_maxsave| to 0 will prevent any link
shortening: you will see the full URL in all types of links, with no parts
being concealed. Concealing of one-character markers is not affected.
When positive, the value determines the maximum number of characters that
are retained at the end after concealing the middle part of a long URL.
It could be less: in case one of the characters /,#,? is found near the end,
the URL will be concealed up to the last occurrence of that character.
Note:
* The conceal feature works only with Vim >= 7.3.
* When using the default |wrap| option of Vim, the effect of concealed links
is not always pleasing, because the visible text on longer lines with
a lot of concealed parts may appear to be strangely broken across several
lines. This is a limitation of Vim's |conceal| feature.
* Many color schemes do not define an unobtrusive color for the Conceal
highlight group - this might be quite noticeable on shortened URLs.
Default: 15
------------------------------------------------------------------------------
*g:vimwiki_diary_months*
It is a |Dictionary| with the numbers of months and corresponding names. Diary
uses it.
Redefine it in your .vimrc to get localized months in your diary:
let g:vimwiki_diary_months = {
\ 1: 'Январь', 2: 'Февраль', 3: 'Март',
\ 4: 'Апрель', 5: 'Май', 6: 'Июнь',
\ 7: 'Июль', 8: 'Август', 9: 'Сентябрь',
\ 10: 'Октябрь', 11: 'Ноябрь', 12: 'Декабрь'
\ }
Default:
let g:vimwiki_diary_months = {
\ 1: 'January', 2: 'February', 3: 'March',
\ 4: 'April', 5: 'May', 6: 'June',
\ 7: 'July', 8: 'August', 9: 'September',
\ 10: 'October', 11: 'November', 12: 'December'
\ }
------------------------------------------------------------------------------
*g:vimwiki_toc_header*
A string with the magic header that tells Vimwiki where the Table of Contents
(see |vimwiki-toc|) is located in a file. You can change it to the
appropriate word in your mother tongue like this: >
let g:vimwiki_toc_header = 'Inhalt'
The default is 'Contents'.
------------------------------------------------------------------------------
*g:vimwiki_map_prefix*
A string which specifies the prefix for all global mappings (and some local
ones). Use it to avoid conflicts with other plugins. Note that it must be
defined before the plugin loads. >
let g:vimwiki_map_prefix = '<Leader>e'
The default is '<Leader>w'.
------------------------------------------------------------------------------
*g:vimwiki_auto_chdir*
When set to 1, enables auto-cd feature. Whenever Vimwiki page is opened,
Vimwiki performs an |:lcd| to the Vimwiki folder to where the page belongs.
Value Description~
0 Do not change directory.
1 Change directory to Vimwiki folder on opening page.
Default: 0
==============================================================================
13. Getting help *vimwiki-help*
For questions, discussions, praise or rants there is a mailing list:
https://groups.google.com/forum/#!forum/vimwiki
Also, there is the IRC channel #vimwiki on Freenode which can be accessed via
webchat: https://webchat.freenode.net/?channels=#vimwiki
==============================================================================
14. Contributing & Bug reports *vimwiki-contributing*
Your help in making Vimwiki better is really appreciated!
Any help, whether it is a spelling correction or a code snippet to patch --
everything is welcomed.
Before filing a bug or starting to write a patch, check the latest development
version from https://github.com/vimwiki/vimwiki/tree/dev to see if your
problem is already fixed.
Issues can be filed at https://github.com/vimwiki/vimwiki/issues/.
If you want to provide a pull request on GitHub, please start from the dev
branch, not from the master branch.
==============================================================================
15. Development *vimwiki-development*
Homepage: http://vimwiki.github.io/
Github: https://github.com/vimwiki/vimwiki/
Vim plugins: http://www.vim.org/scripts/script.php?script_id=2226
Old homepage: http://code.google.com/p/vimwiki/
Contributors and their Github usernames in roughly chronological order:
- Maxim Kim (@habamax) <habamax@gmail.com> as original author
- the people here: http://code.google.com/p/vimwiki/people/list
- Stuart Andrews (@tub78)
- Tomas Pospichal
- Daniel Schemala (@EinfachToll) as current maintainer
- Larry Hynes (@larryhynes)
- Hector Arciga (@harciga)
- Alexey Radkov (@lyokha)
- Aaron Franks (@af)
- Dan Bernier (@danbernier)
- Carl Helmertz (@chelmertz)
- Karl Yngve Lervåg (@lervag)
- Patrick Davey (@patrickdavey)
- Ivan Tishchenko (@t7ko)
- 修昊 (@Svtter)
- Marcelo D Montu (@mMontu)
- John Kaul
- Hongbo Liu (@hiberabyss)
- @Tomsod
- @wangzq
- Jinzhou Zhang (@lotabout)
- Michael Riley (@optik-aper)
- Irfan Sharif (@irfansharif)
- John Conroy (@jconroy77)
- Christian Rondeau (@christianrondeau)
- Alex Thorne (@thornecc)
- Shafqat Bhuiyan (@priomsrb)
- Bradley Cicenas (@bcicen)
- Michael Thessel (@MichaelThessel)
- Michael F. Schönitzer (@nudin)
- @sqlwwx
- Guilherme Salazar (@salazar)
- Daniel Trnka (@trnila)
- Yuchen Pei (@ycpei)
- @maqiv
==============================================================================
16. Changelog *vimwiki-changelog*
Issue numbers starting with '#' are issues from
https://github.com/vimwiki/vimwiki/issues/, all others from
http://code.google.com/p/vimwiki/issues/list. They may be accessible from
https://github.com/vimwiki-backup/vimwiki/issues.
2.3 (2016-03-31)~
New:
* Add |:VimwikiMakeYesterdayDiaryNote| command
* Issue #128: add option |vimwiki-option-automatic_nested_syntaxes|
* Issue #192: Sort links in the list generated by |:VimwikiGenerateTags|
Fixed:
* Issue #176: Fix issue when the wiki path contains spaces
* Also look for tags in wiki files in subdirectories
* Locate the .tags file correctly on Windows
* Issue #183: Fix HTML conversion of headers containing links
* Issue #64: create correct Markdown links when pressing CR on a word
* Issue #191: ignore headers inside preformatted text when creating the TOC
* Create the standard CSS file also if only one file is converted to HTML
* Fix #188: |vimwiki_+| on a raw url surrounds it with brackets
* various minor fixes
2.2.1 (2015-12-10)~
Removed:~
* Removed the option g:vimwiki_debug, which probably nobody used. If you
want it back, file an issue at Github.
Fixed:~
* Issue #175: Don't do random things when the user has remapped the z key
* Don't ask for confirmation when following an URL in MacOS
* Always jump to the first occurrence of a tag in a file
* Don't move the cursor when updating the TOC
* Fix some issues with the TOC when folding is enabled
2.2 (2015-11-25)~
New:~
* Support for anchors, see |vimwiki-anchors|
* in this context, add support for TOC, see |vimwiki-toc|
* add omni completion of wiki links (files and anchors)
* new local option |vimwiki-option-auto_toc|
* new global option |g:vimwiki_toc_header|
* Support for tags, see |vimwiki-syntax-tags|
* List editing capabilities, see |vimwiki-lists|:
* support for auto incrementing numbered lists
* more key maps for list manipulation, see |vimwiki-list-manipulation|
* improved automatic adjustment of checkboxes
* text objects for list items, see |vimwiki-text-objects|
* New command |:VimwikiCheckLinks| to check for broken links
* New global option |g:vimwiki_auto_chdir|
* New global option |g:vimwiki_map_prefix|
* Support for wiki links absolute to the wiki root
* Added the |VimwikiLinkConverter| function
* Issue #24: Basic support for remote directories via netrw
* Issue #50: in HTML, tables can now be embedded in lists
* When converting to HTML, show a message with the output directory
* Add auto completion for |:VimwikiGoto|
* Add Chinese Readme file
Changed:~
* Wiki files must not contain # anymore, because # is used to separate the
file from an anchor in a link.
* replace the function vimwiki#base#resolve_scheme() by
vimwiki#base#resolve_link() (relevant if you have a custom
|VimwikiLinkHandler| which used this function)
* The semantic of "file:" and "local:" links changed slightly, see
|vimwiki-syntax-links| for what they mean now
* The meaning of a link like [[/some/directory/]] changed. It used to be
a link to the actual directory /some/directory/, now it's relative to
the root of the current wiki. Use [[file:/some/directory/]] for the old
behavior.
Removed:~
* the %toc placeholder is now useless, use |vimwiki-toc| instead
* the global option g:vimwiki_auto_checkbox is now useless and removed
Fixed:~
* Issue 415: Disable folding if g:vimwiki_folding is set to ''
* Fix slowdown in Vim 7.4
* Issue #12: Separate diaries from different wikis
* Issue #13: Fix :VimwikiRenameLink on links containing a dot
* Always jump to previous link on <S-Tab>, not to beginning of link
* Issue #27: Fix <CR> on a visual selection sometimes not working
* |VimwikiBackLinks| now recognizes much more valid links
* Issue 424: make external links with #, % work under Linux
* Issue #39: don't htmlize stuff inside pre tags
* Issue #44: faster formatting of large tables
* Issue #52: Recognize markdown links when renaming wiki file
* Issue #54: Disable 'shellslash' on Windows to avoid problems
* Issue #81: Don't get stuck when converting a read-only file
* Issue #66: Better normalizing of links in diary
* Fix the menu in GVim, which was sometimes not shown correctly
* |VimwikiGenerateLinks| now also generates links for subdirectories
* Issue #93: Don't process placeholders inside preformatted text
* Issue #102: Add default values to some options like the doc says
* Issue #144: Fix bug with folds shortening on multibyte characters
* Issue #158: Detect the OS correctly
* |VimwikiGenerateLinks| now replaces a potentially existing old list
* Fix uneven indentation of list items with checkboxes in HTML
* Various small fixes
* Corrected website links in documentation. code.google is dead, long live
Github!
2.1~
* Concealing of links can be turned off - set |g:vimwiki_url_maxsave| to 0.
The option g:vimwiki_url_mingain was removed
* |g:vimwiki_folding| also accepts value 'list'; with 'expr' both sections
and code blocks folded, g:vimwiki_fold_lists option was removed
* Issue 261: Syntax folding is back. |g:vimwiki_folding| values are
changed to '', 'expr', 'syntax'.
* Issue 372: Ignore case in g:vimwiki_valid_html_tags
* Issue 374: Make autowriteall local to vimwiki. It is not 100% local
though.
* Issue 384: Custom_wiki2html script now receives templating arguments
* Issue 393: Custom_wiki2html script path can contain tilde character
* Issue 392: Custom_wiki2html arguments are quoted, e.g names with spaces
* Various small bug fixes.
2.0.1 'stu'~
* Follow (i.e. open target of) markdown reference-style links.
* Bug fixes.
2.0 'stu'~
This release is partly incompatible with previous.
Summary ~
* Quick page-link creation.
* Redesign of link syntaxes (!)
* No more CamelCase links. Check the ways to convert them
https://groups.google.com/forum/?fromgroups#!topic/vimwiki/NdS9OBG2dys
* No more [[link][desc]] links.
* No more [http://link description] links.
* No more plain image links. Use transclusions.
* No more image links identified by extension. Use transclusions.
* Interwiki links
* More link schemes
* Transclusions
* Normalize link command. See |vimwiki_+|.
* Improved diary organization and generation. See |vimwiki-diary|.
* List manipulation. See |vimwiki-list-manipulation|.
* Markdown support.
* Mathjax support. See |vimwiki-syntax-math|.
* Improved handling of special characters and punctuation in filenames and
urls.
* Back links command: list links referring to the current page.
* Highlighting nonexisted links are off by default.
* Table syntax change. Row separator uses | instead of +.
* Fold multilined list items.
* Custom wiki to HTML converters. See |vimwiki-option-custom_wiki2html|.
* Conceal long weblinks. See g:vimwiki_url_mingain.
* Option to disable table mappings. See |g:vimwiki_table_mappings|.
For detailed information see issues list on
http://code.google.com/p/vimwiki/issues/list
1.2~
* Issue 70: Table spanning cell support.
* Issue 72: Do not convert again for unchanged file. |:VimwikiAll2HTML|
converts only changed wiki files.
* Issue 117: |:VimwikiDiaryIndex| command that opens diary index wiki page.
* Issue 120: Links in headers are not highlighted in vimwiki but are
highlighted in HTML.
* Issue 138: Added possibility to remap table-column move bindings. See
|:VimwikiTableMoveColumnLeft| and |:VimwikiTableMoveColumnRight|
commands. For remap instructions see |vimwiki_<A-Left>|
and |vimwiki_<A-Right>|.
* Issue 125: Problem with 'o' command given while at the of the file.
* Issue 131: FileType is not set up when GUIEnter autocommand is used in
vimrc. Use 'nested' in 'au GUIEnter * nested VimwikiIndex'
* Issue 132: Link to perl (or any non-wiki) file in vimwiki subdirectory
doesn't work as intended.
* Issue 135: %title and %toc used together cause TOC to appear in an
unexpected place in HTML.
* Issue 139: |:VimwikiTabnewLink| command is added.
* Fix of g:vimwiki_stripsym = '' (i.e. an empty string) -- it removes bad
symbols from filenames.
* Issue 145: With modeline 'set ft=vimwiki' links are not correctly
highlighted when open wiki files.
* Issue 146: Filetype difficulty with ".txt" as a vimwiki extension.
* Issue 148: There are no mailto links.
* Issue 151: Use location list instead of quickfix list for :VimwikiSearch
command result. Use :lopen instead of :copen, :lnext instead of :cnext
etc.
* Issue 152: Add the list of HTML files that would not be deleted after
|:VimwikiAll2HTML|.
* Issue 153: Delete HTML files that has no corresponding wiki ones with
|:VimwikiAll2HTML|.
* Issue 156: Add multiple HTML templates. See
|vimwiki-option-template_path|. Options html_header and html_footer are
no longer exist.
* Issue 173: When virtualedit=all option is enabled the 'o' command behave
strange.
* Issue 178: Problem with alike wikie's paths.
* Issue 182: Browser command does not quote url.
* Issue 183: Spelling error highlighting is not possible with nested
syntaxes.
* Issue 184: Wrong foldlevel in some cases.
* Issue 195: Page renaming issue.
* Issue 196: vim: modeline bug -- syn=vim doesn't work.
* Issue 199: Generated HTML for sublists is invalid.
* Issue 200: Generated HTML for todo lists does not show completion status
the fix relies on CSS, thus your old stylesheets need to be updated!;
may not work in obsolete browsers or font-deficient systems.
* Issue 205: Block code: highlighting differs from processing. Inline code
block {{{ ... }}} is removed. Use `...` instead.
* Issue 208: Default highlight colors are problematic in many
colorschemes. Headers are highlighted as |hl-Title| by default, use
|g:vimwiki_hl_headers| to restore previous default Red, Green, Blue or
custom header colors. Some other changes in highlighting.
* Issue 209: Wild comments slow down html generation. Comments are
changed, use %% to comment out entire line.
* Issue 210: HTML: para enclose header.
* Issue 214: External links containing Chinese characters get trimmed.
* Issue 218: Command to generate HTML file and open it in webbrowser. See
|:Vimwiki2HTMLBrowse|(bind to <leader>whh)
* NEW: Added <Leader>wh mapping to call |:Vimwiki2HTML|
...
39 releases
...
0.1~
* First public version.
==============================================================================
17. License *vimwiki-license*
The MIT License
http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2008-2010 Maxim Kim
2013-2017 Daniel Schemala
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
vim:tw=78:ts=8:ft=help
|