1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248
|
<html lang="en">
<head>
<title>Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="contents">
<h2>Table of Contents</h2>
<ul>
<li><a name="toc_TOC0" href="#TOC0">1 Description</a>
<li><a name="toc_TOC1" href="#TOC1">2 Additional Features in Nex/Nvi</a>
<li><a name="toc_TOC2" href="#TOC2">3 Startup Information</a>
<li><a name="toc_TOC3" href="#TOC3">4 Recovery</a>
<li><a name="toc_TOC4" href="#TOC4">5 Sizing the Screen</a>
<li><a name="toc_TOC5" href="#TOC5">6 Character Display</a>
<li><a name="toc_TOC6" href="#TOC6">7 Multiple Screens</a>
<li><a name="toc_TOC7" href="#TOC7">8 Tags, Tag Stacks, and Cscope</a>
<li><a name="toc_TOC8" href="#TOC8">9 Regular Expressions and Replacement Strings</a>
<li><a name="toc_TOC9" href="#TOC9">10 Scripting Languages</a>
<li><a name="toc_TOC10" href="#TOC10">11 General Editor Description</a>
<li><a name="toc_TOC11" href="#TOC11">12 Vi Description</a>
<li><a name="toc_TOC12" href="#TOC12">13 Vi Commands</a>
<li><a name="toc_TOC13" href="#TOC13">14 Vi Text Input Commands</a>
<li><a name="toc_TOC14" href="#TOC14">15 Ex Addressing</a>
<li><a name="toc_TOC15" href="#TOC15">16 Ex Description</a>
<li><a name="toc_TOC16" href="#TOC16">17 Ex Commands</a>
<li><a name="toc_TOC17" href="#TOC17">18 Set Options</a>
<li><a name="toc_TOC18" href="#TOC18">19 Index</a>
</li></ul>
</div>
<h2 class="chapter"><a name="TOC0"></a>1 Description</h2>
<p><strong>Vi</strong>
is a screen oriented text editor.
<strong>Ex</strong>
is a line-oriented text editor.
<strong>Ex</strong>
and
<strong>vi</strong>
are different interfaces to the same program,
and it is possible to switch back and forth during an edit session.
<strong>View</strong>
is the equivalent of using the
<strong>-R</strong>
(read-only) option of
<strong>vi</strong> .
<p>This reference manual is the one provided with the
<strong>nex</strong>/<strong>nvi</strong>
versions of the
<strong>ex</strong>/<strong>vi</strong>
text editors.
<strong>Nex</strong>/<strong>nvi</strong>
are intended as bug-for-bug compatible replacements for the original
Fourth Berkeley Software Distribution (4BSD)
<strong>ex</strong>/<strong>vi</strong>
programs.
This reference manual is accompanied by a traditional-style manual page.
That manual page describes the functionality found in
<strong>ex</strong>/<strong>vi</strong>
in far less detail than the description here.
In addition, it describes the system interface to
<strong>ex</strong>/<strong>vi</strong>,
e.g. command line options, session recovery, signals,
environmental variables, and similar things.
<p>This reference is intended for users already familiar with
<strong>ex</strong>/<strong>vi</strong>.
Anyone else should almost certainly read a good tutorial on the
editor first.
If you are in an unfamiliar environment,
and you absolutely have to get work done immediately,
see the section entitled
“<strong>Fast Startup</strong>”
in the manual page.
It is probably enough to get you started.
<p>There are a few features in
<strong>nex</strong>/<strong>nvi</strong>
that are not found in historic versions of
<strong>ex</strong>/<strong>vi</strong>.
Some of the more interesting of those features are briefly described
in the next section, entitled
“<strong>Additional Features</strong>” .
For the rest of this document,
<strong>nex</strong>/<strong>nvi</strong>
is used only when it is necessary to distinguish it from the historic
implementations of
<strong>ex</strong>/<strong>vi</strong>.
<p>Future versions of this software will be periodically made available
by anonymous ftp, and can be retrieved from
<code>ftp.cs.berkeley.edu</code>,
in the directory
<code>ucb/4bsd</code>.
<h2 class="chapter"><a name="TOC1"></a>2 Additional Features in Nex/Nvi</h2>
<p>There are a few features in
<strong>nex</strong>/<strong>nvi</strong>
that are not found in historic versions of
<strong>ex</strong>/<strong>vi</strong>.
Some of the more interesting of these are as follows:
<ul>
<li><strong>8-bit clean data, large lines, files</strong>
<!-- @deffn {Command} {8-bit clean data, large lines, files} -->
<!-- @end deffn -->
<p><strong>Nex</strong>/<strong>nvi</strong>
will edit any format file.
Line lengths are limited by available memory,
and file sizes are limited by available disk space.
The
<strong>vi</strong>
text input mode command
<strong><control-X></strong>
can insert any possible character value into the text.
<li><strong>Background and foreground screens</strong>
<!-- @deffn {Command} {Background and foreground screens} -->
<!-- @end deffn -->
<p>The
<strong>bg</strong>
command backgrounds the current screen, and the
<strong>fg</strong>
command foregrounds backgrounded screens.
The
<strong>display</strong>
command can be used to list the background screens.
<li><strong>Command Editing</strong>
<!-- @deffn {Command} {Command Editing} -->
<!-- @end deffn -->
<p>You can enter a normal editing window on the collected commands that
you've entered on the
<strong>vi</strong>
colon command-line,
and then modify and/or execute the commands.
See the
<code>cedit</code>
edit option for more information.
<li><strong>Displays</strong>
<!-- @deffn {Command} {Displays} -->
<!-- @end deffn -->
<p>The
<strong>display</strong>
command can be used to display the current buffers, the backgrounded
screens, and the tags stack.
<li><strong>Extended Regular Expressions</strong>
<!-- @deffn {Command} {Extended Regular Expressions} -->
<!-- @end deffn -->
<p>The
<strong>extended</strong>
option causes Regular Expressions to be interpreted as as Extended
Regular Expressions, (i.e. <samp><span class="command">egrep</span></samp>(1) style Regular Expressions).
<li><strong>File Name Completion</strong>
<!-- @deffn {Command} {File Name Completion} -->
<!-- @end deffn -->
<p>It is possible to do file name completion and file name displays when
entering commands on the
<strong>vi</strong>
colon command-line.
See the
<code>filec</code>
option for more information.
<li><strong>Infinite undo</strong>
<!-- @deffn {Command} {Infinite undo} -->
<!-- @end deffn -->
<p>Changes made during an edit session may be rolled backward and forward.
A
<strong>.</strong>
command immediately after a
<strong>u</strong>
command continues either forward or backward depending on whether the
<strong>u</strong>
command was an undo or a redo.
<li><strong>Left-right scrolling</strong>
<!-- @deffn {Command} {Left-right scrolling} -->
<!-- @end deffn -->
<p>The
<strong>leftright</strong>
option causes
<strong>nvi</strong>
to do left-right screen scrolling, instead of the traditional
<strong>vi</strong>
line wrapping.
<li><strong>Message Catalogs</strong>
<!-- @deffn {Command} {Message Catalogs} -->
<!-- @end deffn -->
<p>It is possible to display informational and error messages in different
languages by providing a catalog of messages.
See the
<code>msgcat</code>
option and the file
<code>catalog/README</code>for more information.
<li><strong>Incrementing numbers</strong>
<!-- @deffn {Command} {Incrementing numbers} -->
<!-- @end deffn -->
<p>The
<strong>#</strong>
command increments or decrements the number referenced by the cursor.
<li><strong>Previous file</strong>
<!-- @deffn {Command} {Previous file} -->
<!-- @end deffn -->
<p>The
<strong>previous</strong>
command edits the previous file from the argument list.
<li><strong>Scripting languages</strong>
<!-- @deffn {Command} {Scripting languages} -->
<!-- @end deffn -->
<p>The
<strong>:pe[rl] cmd</strong>,
<strong>:perld[o] cmd</strong>
and
<strong>:tc[l] cmd</strong>
commands execute Perl and Tcl/Tk commands, respectively,
on lines from the edit buffer.
See the
“<strong>Scripting Languages</strong>”
section and the specific commands for more information.
<!-- @IP{Shell screens} -->
<!-- The -->
<!-- @CO{:sc[ript] [file ...]} -->
<!-- command runs a shell in the screen. -->
<!-- Editing is unchanged, with the exception that a \fC<carriage-return>\fP -->
<!-- enters the current line (stripped of any prompt) as input to the -->
<!-- shell. -->
<li><strong>Split screens</strong>
<!-- @deffn {Command} {Split screens} -->
<!-- @end deffn -->
<p>The
<strong>Edit</strong> ,
<strong>Ex</strong> ,
<strong>Next</strong> ,
<strong>Previous</strong> ,
<strong>Tag</strong>
and
<strong>Visual</strong>
(in
<strong>vi</strong>
mode) commands divide the screen into multiple editing regions and
then perform their normal function in a new screen area.
The
<strong><control-W></strong>
command rotates between the foreground screens.
The
<strong>resize</strong>
command can be used to grow or shrink a particular screen.
<li><strong>Tag stacks</strong>
<!-- @deffn {Command} {Tag stacks} -->
<!-- @end deffn -->
<p>Tags are now maintained in a stack.
The
<strong><control-T></strong>
command returns to the previous tag location.
The
<strong>tagpop</strong>
command returns to the most recent tag location by default, or,
optionally to a specific tag number in the tag stack,
or the most recent tag from a specified file.
The
<strong>display</strong>
command can be used to list the tags stack.
The
<strong>tagtop</strong>
command returns to the top of the tag stack.
<li><strong>Usage information</strong>
<!-- @deffn {Command} {Usage information} -->
<!-- @end deffn -->
<p>The
<strong>exusage</strong>
and
<strong>viusage</strong>
commands provide usage information for all of the
<strong>ex</strong>
and
<strong>vi</strong>
commands by default, or, optionally, for a specific command or key.
<li><strong>Word search</strong>
<!-- @deffn {Command} {Word search} -->
<!-- @end deffn -->
<p>The
<strong><control-A></strong>
command searches for the word referenced by the cursor.
</ul>
<h2 class="chapter"><a name="TOC2"></a>3 Startup Information</h2>
<p><strong>Ex</strong>/<strong>vi</strong>
interprets one of two possible environmental variables and reads up to
three of five possible files during startup.
The variables and files are expected to contain
<strong>ex</strong>
commands, not
<strong>vi</strong>
commands.
In addition, they are interpreted
<em>before</em>
the file to be edited is read, and therefore many
<strong>ex</strong>
commands may not be used.
Generally, any command that requires output to the screen or that
needs a file upon which to operate, will cause an error if included
in a startup file or environmental variable.
<p>Because the
<strong>ex</strong>
command set supported by
<strong>nex</strong>/<strong>nvi</strong>
is a superset of the command set supported by historical implementations of
<strong>ex</strong> ,
<strong>nex</strong>/<strong>nvi</strong>
can use the startup files created for the historical implementations,
but the converse may not be true.
<p>If the
<strong>-s</strong>
(the historic - option)
is specified, or if standard input is redirected from a file,
all environmental variables and startup files are ignored.
<p>Otherwise, startup files and environmental variables are handled
in the following order:
<ol type=1 start=1>
<li>The file
<code>/etc/vi.exrc</code>is read,
as long as it is owned by root or the effective user ID of the user.
<li>The environmental variable
<code>NEXINIT</code>(or the variable
<code>EXINIT</code>,
if
<code>NEXINIT</code>is not set) is interpreted.
<li>If neither
<code>NEXINIT</code>or
<code>EXINIT</code>was set, and the
<code>HOME</code>environmental variable is set, the file
<code>$HOME/.nexrc</code>(or the file
<code>$HOME/.exrc</code>,
if
<code>$HOME/.nexrc</code>does not exist) is read,
as long as the effective user ID of the user is root or is the same as
the owner of the file.
<pre class="sp">
</pre>
When the $HOME directory is being used for both
<strong>nex</strong>/<strong>nvi</strong>
and an historic implementation of
<strong>ex</strong>/<strong>vi</strong>,
a possible solution is to put
<strong>nex</strong>/<strong>nvi</strong>
specific commands in the
<code>.nexrc</code>file, along with a
<strong>:source $HOME/.exrc</strong>
command to read in the commands common to both implementations.
<li>If the
<code>exrc</code>
option was turned on by one of the previous startup information
sources, the file
<code>.nexrc</code>(or the file
<code>.exrc</code>,
if
<code>.nexrc</code>does not exist) is read, as long as the effective user ID of the user
is the same as the owner of the file.
</ol>
<p>No startup file is read if it is writable by anyone other than its owner.
<p>It is not an error for any of the startup environmental variables or files
not to exist.
<p>Once all environmental variables are interpreted,
and all startup files are read,
the first file to be edited is read in (or a temporary file is created).
Then, any commands specified using the
<strong>-c</strong>
option are executed, in the context of that file.
<h2 class="chapter"><a name="TOC3"></a>4 Recovery</h2>
<p>There is no recovery program for
<strong>nex</strong>/<strong>nvi</strong>,
nor does
<strong>nex</strong>/<strong>nvi</strong>
run setuid.
Recovery files are created readable and writable by the owner only.
Users may recover any file which they can read,
and the superuser may recover any edit session.
<p>Edit sessions are backed by files in the directory named by the
<code>recdir</code>
option (the directory
<code>/var/tmp/vi.recover</code>by default), and are named
“<strong>vi.XXXXXX</strong>”,
where
“<strong>XXXXXX</strong>”
is a number related to the process ID.
When a file is first modified,
a second recovery file containing an email message for the user is created,
and is named
“<strong>recover.XXXXXX</strong>”,
where, again,
“<strong>XXXXXX</strong>”
is associated with the process ID.
Both files are removed at the end of a normal edit session,
but will remain if the edit session is abnormally terminated
or the user runs the
<strong>ex</strong>
<strong>preserve</strong>
command.
<p>The
<code>recdir</code>
option may be set in either the user's or system's startup information,
changing the recovery directory.
(Note, however, that if a memory based file system is used as the backup
directory, each system reboot will delete all of the recovery files!
The same caution applies to directories such as
<code>/tmp</code>which are cleared of their contents by a system reboot, or
<code>/usr/tmp</code>which is periodically cleared of old files on many systems.)
<p>The recovery directory should be owned by root, or at least by a pseudo-user.
In addition, if directory
“sticky-bit”
semantics are available, the directory should have the sticky-bit
set so that files may only be removed by their owners.
The recovery directory must be read, write, and executable by any user,
i.e. mode 1777.
<p>If the recovery directory does not exist,
<strong>ex</strong>/<strong>vi</strong>
will attempt to create it.
This can result in the recovery directory being owned by a normal user,
which means that that user will be able to remove other user's recovery
and backup files.
This is annoying, but is not a security issue as the user cannot
otherwise access or modify the files.
<p>The recovery file has all of the necessary information in it to enable the
user to recover the edit session.
In addition, it has all of the necessary email headers for
<samp><span class="command">sendmail</span></samp>(8).
When the system is rebooted, all of the files in
<code>/var/tmp/vi.recover</code>named
“<strong>recover.XXXXXX</strong>”
should be sent to their owners, by email, using the
<strong>-t</strong>
option of
<strong>sendmail</strong>
(or a similar mechanism in other mailers).
If
<strong>ex</strong>/<strong>vi</strong>
receives a hangup (SIGHUP) signal, or the user executes the
<strong>ex</strong>
<strong>preserve</strong>
command,
<strong>ex</strong>/<strong>vi</strong>
will automatically email the recovery information to the user.
<p>If your system does not have the
<strong>sendmail</strong>
utility (or a mailer program which supports its interface)
the source file
<code>nvi/common/recover.c</code>will have to be modified to use your local mail delivery programs.
Note, if
<strong>nex</strong>/<strong>nvi</strong>
is changed to use another mailer,
it is important to remember that the owner of the file given to
the mailer is the
<strong>nex</strong>/<strong>nvi</strong>
user, so nothing in the file should be trusted as it may have been
modified in an effort to compromise the system.
<p>Finally, the owner execute bit is set on backup files when they are
created, and unset when they are first modified, e.g. backup files
that have no associated email recovery file will have this bit set.
(There is also a small window where empty files can be created and
not yet have this bit set.
This is due to the method in which the files are created.)
Such files should be deleted when the system reboots.
<p>A simple way to do this cleanup is to run the Bourne shell script
<strong>recover</strong> ,
from your
<code>/etc/rc.local</code>(or other system startup) file.
The script should work with the historic Bourne shell,
a POSIX 1003.2 shell or the Korn shell.
The
<strong>recover</strong>
script is installed as part of the
<strong>nex</strong>/<strong>nvi</strong>
installation process.
<p>Consult the manual page for details on recovering preserved or
aborted editing sessions.
<h2 class="chapter"><a name="TOC4"></a>5 Sizing the Screen</h2>
<p>The size of the screen can be set in a number of ways.
<strong>Ex</strong>/<strong>vi</strong>
takes the following steps until values are obtained for both the
number of rows and number of columns in the screen.
<ol type=1 start=1>
<li>If the environmental variable
<code>LINES</code>exists,
it is used to specify the number of rows in the screen.
<li>If the environmental variable
<code>COLUMNS</code>exists,
it is used to specify the number of columns in the screen.
<li>The TIOCGWINSZ
<samp><span class="command">ioctl</span></samp>(2)
is attempted on the standard error file descriptor.
<li>The termcap entry (or terminfo entry on System V machines)
is checked for the
“li”
entry (rows) and the
“co”
entry (columns).
<li>The number of rows is set to 24, and the number of columns is set to 80.
</ol>
<p>If a window change size signal (SIGWINCH) is received,
the new window size is retrieved using the TIOCGWINSZ
<samp><span class="command">ioctl</span></samp>(2)
call, and all other information is ignored.
<h2 class="chapter"><a name="TOC5"></a>6 Character Display</h2>
<p>In both
<strong>ex</strong>
and
<strong>vi</strong>
printable characters as defined by
<samp><span class="command">isprint</span></samp>(3)
are displayed using the local character set.
<p>Non-printable characters, for which
<samp><span class="command">iscntrl</span></samp>(3)
returns true, and which are less than octal \e040,
are displayed as the string
“<code>^<character></code>”,
where
<code><character></code>is the character that is the original character's value offset from the
“<code>@</code>”
character.
For example, the octal character \e001 is displayed as
“<code>^A</code>”.
If
<samp><span class="command">iscntrl</span></samp>(3)
returns true for the octal character \e177,
it is displayed as the string
“<code>^?</code>”.
All other characters are displayed as either hexadecimal values,
in the form
“<code>0x<high-halfbyte> ... 0x<low-halfbyte></code>”,
or as octal values, in the form
“<code>e<high-one-or-two-bits> ... e<low-three-bits></code>”.
The display of unknown characters is based on the value of the
<code>octal</code>
option.
<p>In
<strong>vi</strong>
command mode, the cursor is always positioned on the last column of
characters which take up more than one column on the screen.
In
<strong>vi</strong>
text input mode, the cursor is positioned on the first column of
characters which take up more than one column on the screen.
<h2 class="chapter"><a name="TOC6"></a>7 Multiple Screens</h2>
<p><strong>Nvi</strong>
supports multiple screens by dividing the window into regions.
It also supports stacks of screens by permitting the user to change
the set of screens that are currently displayed.
<p>The
<strong>Edit</strong> ,
<strong>Ex</strong> ,
<strong>Fg</strong> ,
<strong>Next</strong> ,
<strong>Previous</strong> ,
<strong>Tag</strong>
and
<strong>Visual</strong>
(in
<strong>vi</strong>
mode)
commands divide the current screen into two regions of approximately
equal size and then perform their usual action in a new screen area.
If the cursor is in the lower half of the screen, the screen will split
up, i.e. the new screen will be above the old one.
If the cursor is in the upper half of the screen, the new screen will be
below the old one.
<p>When more than one screen is editing a file, changes in any screen are
reflected in all other screens editing the same file.
Exiting a screen without saving any changes (or explicitly discarding
them) is permitted until the last screen editing the file is exited,
at which time the changes must be saved or discarded.
<p>The
<strong>resize</strong>
command permits resizing of individual screens.
Screens may be grown, shrunk or set to an absolute number of rows.
<p>The
<strong>^W</strong>
command is used to switch between screens.
Each
<strong>^W</strong>
moves to the next lower screen in the window, or to the first screen
in the window if there are no lower screens.
<p>The
<strong>bg</strong>
command
“backgrounds”
the current screen.
The screen disappears from the window,
and the rows it occupied are taken over by a neighboring screen.
It is an error to attempt to background the only screen in the window.
<p>The
<strong>display screens</strong>
command displays the names of the files associated with the current
backgrounded screens in the window.
<p>The
<strong>fg [file]</strong>
command moves the specified screen from the list of backgrounded screens
to the foreground.
If no file argument is specified, the first screen on the list is
foregrounded.
By default,
foregrounding consists of backgrounding the current screen,
and replacing its space in the window with the foregrounded screen.
<p>Capitalizing the first letter of the command, i.e.
<strong>Fg</strong> ,
will foreground the backgrounded screen in a new screen instead of
swapping it with the current screen.
<p>If the last foregrounded screen in the window is exited,
and there are backgrounded screens,
the first screen on the list of backgrounded screens takes over the window.
<h2 class="chapter"><a name="TOC7"></a>8 Tags, Tag Stacks, and Cscope</h2>
<p><strong>Nvi</strong>
supports the historic
<strong>vi</strong>
tag command
<strong><control-]></strong> ,
and the historic
<strong>ex</strong>
tag command
<strong>tag</strong> .
These commands change the current file context to a new location,
based on information found in the
<code>tags</code>files.
If you are unfamiliar with these commands,
you should review their description in the
<strong>ex</strong>
and
<strong>vi</strong>
commands section of this manual.
For additional information on tags files,
see the discussion of the
<code>tags</code>
edit option and the system
<samp><span class="command">ctags</span></samp>(1)
manual page.
<p>In addition,
<strong>nvi</strong>
supports the notion of
“tags stacks”,
using the
<strong><control-T></strong>
command.
The
<strong><control-T></strong>
command returns the user to the previous context, i.e.,
the last place from which a
<strong><control-]></strong>
or
<strong>tag</strong>
command was entered.
These three commands provide the basic functionality which allows you
to use
<strong>vi</strong>
to review source code in a structured manner.
<p><strong>Nvi</strong>
also provides two other basic
<strong>ex</strong>
commands for tag support:
<strong>tagpop</strong>
and
<strong>tagtop</strong> .
The
<strong>tagpop</strong>
command is identical to the
<strong><control-T></strong>
command,
with the additional functionality that you may specify that modifications
to the current file are to be discarded.
This cannot be done using the
<strong><control-T></strong>
command.
The
<strong>tagtop</strong>
command discards all of the contexts that have been pushed onto the tag
stack, returning to the context from which the first
<strong><control-]></strong>
or
<strong>tag</strong>
command was entered.
<p>The historic
<samp><span class="command">ctags</span></samp>(1)
tags file format supports only a single location per tag,
normally the function declaration or structure or string definition.
More sophisticated source code tools often provide multiple locations
per tag, e.g.,
a list of the places from which a function is called or a string
definition is used.
An example of this functionality is the System V source code tool,
<strong>cscope</strong> .
<pre class="sp">
</pre>
<strong>Cscope</strong>
creates a database of information on source code files,
and supports a query language for that information as described in the
<samp><span class="command">cscope</span></samp>(1)
manual page.
<strong>Nvi</strong>
contains an interface to the
<strong>cscope</strong>
query language which permits you to query
<strong>cscope</strong>
and then sequentially step through the locations in the sources files which
<strong>cscope</strong>
returns.
There are two
<strong>nvi</strong>
commands which support this ability to step through multiple locations.
They are the
<strong>ex</strong>
commands
<strong>tagnext</strong>
and
<strong>tagprev</strong> .
The
<strong>tagnext</strong>
command moves to the next location for the current tag.
The
<strong>tagprev</strong>
command moves to the previous location for the current tag.
(See the
<strong>tagnext</strong>
and
<strong>tagprev</strong>
command discussion in the
<strong>ex</strong>
commands section of this manual for more information.)
At any time during this sequential walk,
you may use the
<strong><control-]></strong> ,
<strong>tag</strong>
or
<strong>cscope</strong>
commands to move to a new tag context, and then use the
<strong><control-T></strong>
or
<strong>tagpop</strong>
commands to return and continue stepping through the locations for this
tag.
This is similar to the previous model of a simple tag stack,
except that each entry in the tag stack may have more than one file context
that is of interest.
<p>Although there is no widely distributed version of
<samp><span class="command">ctags</span></samp>(1)
that creates tags files with multiple locations per tag,
<strong>nvi</strong>
has been written to understand the obvious extension to the historic
tags file format, i.e., more than a single line in the tags file with
the same initial tag name.
If you wish to extend your
<strong>ctags</strong>
implementation or other tool with which you build tags files,
this extension should be simple and will require no changes to
<strong>nvi</strong> .
<p>The
<strong>nvi</strong>
and
<strong>cscope</strong>
interface is based on the new
<strong>ex</strong>
command
<strong>cscope</strong> ,
which has five subcommands:
<strong>add</strong> ,
<strong>find</strong> ,
<strong>help</strong> ,
<strong>kill</strong>
and
<strong>reset</strong> .
The subcommand
<strong>find</strong>
itself has eight subcommands:
<strong>c</strong> ,
<strong>d</strong> ,
<strong>e</strong> ,
<strong>f</strong> ,
<strong>g</strong> ,
<strong>i</strong> ,
<strong>s</strong>
and
<strong>t</strong> .
<ul>
<li><strong>cs[cope] a[dd] file</strong>
<!-- @deffn {Command} {cs[cope] a[dd] file} -->
<!-- @end deffn -->
<p>The
<strong>add</strong>
command attaches to the specified
<strong>cscope</strong>
database.
The file name is expanded using the standard filename expansions.
If
<strong>file</strong>
is a directory, the file
“cscope.out”
in that directory is used as the database.
<p>After
<strong>nvi</strong>
attaches to a new database,
all subsequent
<strong>cscope</strong>
queries will be asked of that database.
The result of any single query is the collection of response to the query
from all of the attached databases.
<pre class="sp">
</pre>
If the
“CSCOPE_DIRS”
environmental variable is set when
<strong>nvi</strong>
is run,
it is expected to be a <colon> or <blank>-separated list of
<strong>cscope</strong>
databases or directories containing
<strong>cscope</strong>
databases, to which the user wishes to attach.
<li><strong>:cs[cope] f[ind] c|d|e|f|g|i|s|t buffer|pattern</strong>
<!-- @deffn {Command} {:cs[cope] f[ind] c|d|e|f|g|i|s|t buffer|pattern} -->
<!-- @end deffn -->
<p>The
<strong>find</strong>
command is the
<strong>cscope</strong>
query command for
<strong>nvi</strong> .
For this command,
<strong>nvi</strong>
queries all attached
<strong>cscope</strong>
databases for the pattern.
If the pattern is a double-quote character followed by a valid buffer
name (e.g.,
"<character>" ),
then the contents of the named buffer are used as the pattern.
Otherwise, the pattern is a Regular Expression.
<pre class="sp">
</pre>
The
<strong>find</strong>
command pushes the current location onto the tags stack,
and switches to the first location resulting from the query,
if the query returned at least one result.
<pre class="sp">
</pre>
File names returned by the
<strong>cscope</strong>
query, if not absolute paths, are searched for relative to the directory
where the
<strong>cscope</strong>
database is located.
In addition, if the file
“cscope.tpath”
appears in the same directory as the
<strong>cscope</strong>
database,
it is expected to contain a colon-separated list of directory names
where files referenced by its associated
<strong>cscope</strong>
database may be found.
<pre class="sp">
</pre>
The
<strong>find</strong>
subcommand is one of the following:
<dl>
<dt>c<dd>Find callers of the name.
<br><dt>d<dd>Find all function calls made from name.
<br><dt>e<dd>Find pattern.
<br><dt>f<dd>Find files with name as substring.
<br><dt>g<dd>Find definition of name.
<br><dt>i<dd>Find files #including name.
<br><dt>s<dd>Find all uses of name.
<br><dt>t<dd>Find assignments to name.
</dl>
<li><strong>:cs[cope] h[elp] [command]</strong>
<!-- @deffn {Command} {:cs[cope] h[elp] [command]} -->
<!-- @end deffn -->
<p>List the
<strong>cscope</strong>
commands,
or optionally list usage help for any single
<strong>cscope</strong>
command.
<li><strong>:display c[onnections]</strong>
<!-- @deffn {Command} {:display c[onnections]} -->
<!-- @end deffn -->
<p>Display the list of
<strong>cscope</strong>
databases to which
<strong>nvi</strong>
is currently connected.
<li><strong>:cs[cope] k[ill] #</strong>
<!-- @deffn {Command} {:cs[cope] k[ill] #} -->
<!-- @end deffn -->
<p>Disconnect from a specific
<strong>cscope</strong>
database.
The connection number is the one displayed by the
<strong>ex</strong>
<strong>display connections</strong>
command.
<li><strong>:cs[cope] r[eset]</strong>
<!-- @deffn {Command} {:cs[cope] r[eset]} -->
<!-- @end deffn -->
<p>Disconnect from all attached
<strong>cscope</strong>
databases.
</ul>
<p>Cscope is not freely redistributable software,
but is fairly inexpensive and easily available.
To purchase a copy of
<strong>cscope</strong> ,
see http://www.att.com/ssg/products/toolchest.html.
<h2 class="chapter"><a name="TOC8"></a>9 Regular Expressions and Replacement Strings</h2>
<p>Regular expressions are used in line addresses,
as the first part of the
<strong>ex</strong>
<strong>substitute</strong> ,
<strong>global</strong> ,
and
<strong>v</strong>
commands, and in search patterns.
<p>The regular expressions supported by
<strong>ex</strong>/<strong>vi</strong>
are, by default, the Basic Regular Expressions (BRE's) described in the
IEEE POSIX Standard 1003.2.
The
<code>extended</code>
option causes all regular expressions to be interpreted as the Extended
Regular Expressions (ERE's) described by the same standard.
(See
<samp><span class="command">re_format</span></samp>(7)
for more information.)
Generally speaking, BRE's are the Regular Expressions found in
<samp><span class="command">ed</span></samp>(1)
and
<samp><span class="command">grep</span></samp>(1),
and ERE's are the Regular Expressions found in
<samp><span class="command">egrep</span></samp>(1).
<p>The following is not intended to provide a description of Regular
Expressions.
The information here only describes strings and characters which
have special meanings in the
<strong>ex</strong>/<strong>vi</strong>
version of RE's,
or options which change the meanings of characters that normally
have special meanings in RE's.
<ol type=1 start=1>
<li>An empty RE (e.g.
“<code>//</code>”
or
“<code>??</code>”
is equivalent to the last RE used.
<li>The construct
“<code>e<</code>”
matches the beginning of a word.
<li>The construct
“<code>e></code>”
matches the end of a word.
<li>The character
“<code>~</code>”
matches the replacement part of the last
<strong>substitute</strong>
command.
</ol>
<p>When the
<code>magic</code>
option is
<em>not</em>
set, the only characters with special meanings are a
“<code>^</code>”
character at the beginning of an RE, a
“<code>$</code>”
character at the end of an RE, and the escaping character
“<code>e</code>”.
The characters
“<code>.</code>”,
“<code>*</code>”,
“<code>[</code>”
and
“<code>~</code>”
are treated as ordinary characters unless preceded by a
“<code>e</code>”;
when preceded by a
“<code>e</code>”
they regain their special meaning.
<p>Replacement strings are the second part of a
<strong>substitute</strong>
command.
<p>The character
“<code>&</code>”
(or
“<code>e&</code>”
if the
<code>magic</code>
option is
<em>not</em>
set) in the replacement string stands for the text matched by the RE
that is being replaced.
The character
“<code>~</code>”
(or
“<code>e~</code>”
if the
<code>magic</code>
option is
<em>not</em>
set) stands for the replacement part of the previous
<strong>substitute</strong>
command.
It is only valid after a
<strong>substitute</strong>
command has been performed.
<p>The string
“<code>e#</code>”,
where
“<code>#</code>”
is an integer value from 1 to 9, stands for the text matched by
the portion of the RE enclosed in the
“<code>#</code>”'th
set of escaped parentheses, e.g.
“<code>e(</code>”
and
“<code>e)</code>”.
For example,
“<code>s/abce(.*e)def/e1/</code>”
deletes the strings
“<code>abc</code>”
and
“<code>def</code>”
from the matched pattern.
<p>The strings
“<code>el</code>”,
“<code>eu</code>”,
“<code>eL</code>”
and
“<code>eU</code>”
can be used to modify the case of elements in the replacement string.
The string
“<code>el</code>”
causes the next character to be converted to lowercase;
the string
“<code>eu</code>”
behaves similarly, but converts to uppercase
(e.g.
<code>s/abc/eU&/</code>replaces the string
<code>abc</code>with
<code>ABC</code>).
The string
“<code>eL</code>”
causes characters up to the end of the string or the next occurrence
of the strings
“<code>ee</code>”
or
“<code>eE</code>”
to be converted to lowercase;
the string
“<code>eU</code>”
behaves similarly, but converts to uppercase.
<p>If the entire replacement pattern is
“<code>%</code>”,
then the last replacement pattern is used again.
<p>In
<strong>vi</strong> ,
inserting a
<code><control-M></code>into the replacement string will cause
the matched line to be split into two lines at that point.
(The
<code><control-M></code>will be discarded.)
<h2 class="chapter"><a name="TOC9"></a>10 Scripting Languages</h2>
<p>The
<strong>nvi</strong>
editor currently supports two scripting languages, Tcl/Tk and Perl.
(Note that Perl4 isn't sufficient, and that the Perl5 used must be
version 5.002 or later.
See the
“<strong>Building Nvi</strong>”
section for more information.
<p>The scripting language interface is still being worked on,
therefore the following information is probably incomplete,
probably wrong in cases, and likely to change.
See the
<code>perl_api</code>and
<code>tcl_api</code>source directories for more information.
As a quick reference, the following function calls are provided for
both the Perl and Tcl interfaces.
The Perl interface uses a slightly different naming convention,
e.g. “viFindScreen” is named “VI::FindScreen”.
<ul>
<li><strong>viFindScreen file</strong>
<!-- @deffn {Command} {viFindScreen file} -->
<!-- @end deffn -->
<p>Return the
<code>screenId</code>associated with
<code>file</code>.
<li><strong>viAppendLine screenId lineNumber text</strong>
<!-- @deffn {Command} {viAppendLine screenId lineNumber text} -->
<!-- @end deffn -->
<p>Append
<code>text</code>as a new line after line number
<code>lineNumber</code>,
in the screen
<code>screenId</code>.
<li><strong>viDelLine screenId lineNum</strong>
<!-- @deffn {Command} {viDelLine screenId lineNum} -->
<!-- @end deffn -->
<p>Delete the line
<code>lineNumber</code>from the screen
<code>screenId</code>.
<li><strong>viGetLine screenId lineNumber</strong>
<!-- @deffn {Command} {viGetLine screenId lineNumber} -->
<!-- @end deffn -->
<p>Return the line
<code>lineNumber</code>from the screen
<code>screenId</code>.
<li><strong>viInsertLine screenId lineNumber text</strong>
<!-- @deffn {Command} {viInsertLine screenId lineNumber text} -->
<!-- @end deffn -->
<p>Insert
<code>text</code>as a new line before line number
<code>lineNumber</code>in the screen
<code>screenId</code>.
<li><strong>viLastLine screenId</strong>
<!-- @deffn {Command} {viLastLine screenId} -->
<!-- @end deffn -->
<p>Return the line number of the last line in the screen
<code>screenId</code>.
<li><strong>viSetLine screenId lineNumber text</strong>
<!-- @deffn {Command} {viSetLine screenId lineNumber text} -->
<!-- @end deffn -->
<p>Change the line
<code>lineNumber</code>in the screen
<code>screenId</code>to match the specified
<code>text</code>.
<li><strong>viGetMark screenId mark</strong>
<!-- @deffn {Command} {viGetMark screenId mark} -->
<!-- @end deffn -->
<p>Return the current line and column for the specified
<code>mark</code>from the screen
<code>screenId</code>.
<li><strong>viSetMark screenId mark line column</strong>
<!-- @deffn {Command} {viSetMark screenId mark line column} -->
<!-- @end deffn -->
<p>Set the specified
<code>mark</code>to be at line
<code>line</code>,
column
<code>column</code>,
in the screen
<code>screenId</code>.
<li><strong>viGetCursor screenId</strong>
<!-- @deffn {Command} {viGetCursor screenId} -->
<!-- @end deffn -->
<p>Return the current line and column for the cursor in the screen
<code>screenId</code>.
<li><strong>viSetCursor screenId line column</strong>
<!-- @deffn {Command} {viSetCursor screenId line column} -->
<!-- @end deffn -->
<p>Set the cursor in the screen
<code>screenId</code>to the specified
<code>line</code>and
<code>column</code>.
<li><strong>viMsg screenId text</strong>
<!-- @deffn {Command} {viMsg screenId text} -->
<!-- @end deffn -->
<p>Display the specified
<code>text</code>as a vi message in the screen
<code>screenId</code>.
<li><strong>viNewScreen screenId [file]</strong>
<!-- @deffn {Command} {viNewScreen screenId [file]} -->
<!-- @end deffn -->
<p>Create a new screen.
<li><strong>viEndScreen screenId</strong>
<!-- @deffn {Command} {viEndScreen screenId} -->
<!-- @end deffn -->
<p>Exit the screen
<code>screenId</code>.
<li><strong>viSwitchScreen screenId screenId</strong>
<!-- @deffn {Command} {viSwitchScreen screenId screenId} -->
<!-- @end deffn -->
<p>Switch from the screen
<code>screenId</code>to the screen
<code>screenId</code>.
<li><strong>viMapKey screenId key tclproc</strong>
<!-- @deffn {Command} {viMapKey screenId key tclproc} -->
<!-- @end deffn -->
<p>Map the specified
<code>key</code>in the screen
<code>screenId</code>to the Tcl procedure
<code>tclproc</code>.
<li><strong>viUnmMapKey screenId key</strong>
<!-- @deffn {Command} {viUnmMapKey screenId key} -->
<!-- @end deffn -->
<p>Unmap the specified
<code>key</code>in the screen
<code>screenId</code><li><strong>viGetOpt screenId option</strong>
<!-- @deffn {Command} {viGetOpt screenId option} -->
<!-- @end deffn -->
<p>Return the value of the specified
<code>option</code>from the screen
<code>screenId</code>.
<li><strong>viSetOpt screenId command</strong>
<!-- @deffn {Command} {viSetOpt screenId command} -->
<!-- @end deffn -->
<p>Set one or more options in the screen
<code>screenId</code>.
</ul>
<h2 class="chapter"><a name="TOC10"></a>11 General Editor Description</h2>
<p>When
<strong>ex</strong>
or
<strong>vi</strong>
are executed,
the text of a file is read (or a temporary file is created),
and then all editing changes happen within the context of the
copy of the file.
<em>No changes affect the actual file until the file is written out</em>,
either using a write command or another command which is affected by the
<code>autowrite</code>
option.
<p>All files are locked (using the
<samp><span class="command">flock</span></samp>(2)
or
<samp><span class="command">fcntl</span></samp>(2)
interfaces) during the edit session,
to avoid inadvertently making modifications to multiple copies of the file.
If a lock cannot be obtained for a file because it is locked by another
process, the edit session is read-only (as if the
<code>readonly</code>
option or the
<strong>-R</strong>
flag had been specified).
If a lock cannot be obtained for other reasons, the edit session will
continue, but the file status information
(see the
<strong><control-G></strong>
command) will reflect this fact.
<p>Both
<strong>ex</strong>
and
<strong>vi</strong>
are modeful editors, i.e. they have two modes,
“command”
mode and
“text input”
mode.
The former is intended to permit you to enter commands which modifies
already existing text.
The latter is intended to permit you to enter new text.
When
<strong>ex</strong>
first starts running, it is in command mode, and usually displays a prompt
(see the
<code>prompt</code>
option for more information).
The prompt is a single colon
“<code>:</code>”
character.
There are three commands that switch
<strong>ex</strong>
into text input mode:
<strong>append</strong> ,
<strong>change</strong>
and
<strong>insert</strong> .
Once in input mode, entering a line containing only a single period
“<code>.</code>”
ends text input mode and returns to command mode,
where the prompt is redisplayed.
<p>When
<strong>vi</strong>
first starts running, it is in command mode as well.
There are eleven commands that switch
<strong>vi</strong>
into text input mode:
<strong>A</strong> ,
<strong>a</strong> ,
<strong>C</strong> ,
<strong>c</strong> ,
<strong>I</strong> ,
<strong>i</strong> ,
<strong>O</strong> ,
<strong>o</strong> ,
<strong>R</strong> ,
<strong>S</strong>
and
<strong>s</strong> .
Once in input mode, entering an
<code><escape></code>character ends text input mode and returns to command mode.
<p><strong>Ex</strong>/<strong>vi</strong>
present three different interfaces to editing a file.
<strong>Ex</strong>
presents a line oriented interface.
<strong>Vi</strong>
presents a full screen display oriented interface,
also known as
“visual mode”.
In addition, there is a third mode,
“open mode”,
which is line oriented,
but supports cursor movement and editing within the displayed line,
similarly to visual mode.
Open mode is not yet implemented in
<strong>nvi</strong> .
<p>The following words have special meanings in both the
<strong>ex</strong>
and
<strong>vi</strong>
command descriptions:
<a name="index-g_t_003cinterrupt_003e-1"></a>
<ul><li><strong><interrupt></strong>
<!-- @deffn {Command} {<interrupt>} -->
<!-- @end deffn -->
<p>The interrupt character is used to interrupt the current operation.
Normally
<code><control-C></code>,
whatever character is set for the current terminal is used.
<a name="index-g_t_0022_003cliteral_002dnext_003e_0022-2"></a><li><strong><literal-next></strong>
<!-- @deffn {Command} {<literal-next>} -->
<!-- @end deffn -->
<p>The literal next character is used to escape the subsequent character
from any special meaning.
This character is always
<code><control-V></code>.
If the terminal is not set up to do XON/XOFF flow control,
then
<code><control-Q></code>is used to mean literal next as well.
<a name="index-g_t_0022current-pathname_0022-3"></a><li><strong>current pathname</strong>
<!-- @deffn {Command} {current pathname} -->
<!-- @end deffn -->
<p>The pathname of the file currently being edited by vi.
When the percent character
“<code>%</code>”
appears in a file name entered as part of an
<strong>ex</strong>
command argument, it is replaced by the current pathname.
(The
“<code>%</code>”
character can be escaped by preceding it with a backslash.)
<a name="index-g_t_0022alternate-pathname_0022-4"></a><li><strong>alternate pathname</strong>
<!-- @deffn {Command} {alternate pathname} -->
<!-- @end deffn -->
<p>The name of the last file name mentioned in an
<strong>ex</strong>
command, or,
the previous current pathname if the last file mentioned
becomes the current file.
When the hash mark character
“<code>#</code>”
appears in a file name entered as part of an
<strong>ex</strong>
command argument, it is replaced by the alternate pathname.
(The
“<code>#</code>”
character can be escaped by preceding it with a backslash.)
<a name="index-buffer-5"></a><li><strong>buffer</strong>
<!-- @deffn {Command} {buffer} -->
<!-- @end deffn -->
<p>One of a number of named areas for saving copies of text.
Commands that change or delete text can save the changed or deleted
text into a specific buffer, for later use, if the command allows
it (i.e. the
<strong>ex</strong>
<strong>change</strong>
command cannot save the changed text in a named buffer).
Buffers are named with a single character, preceded by a double quote,
e.g.
"<character>"
in
<strong>vi</strong>
and
without the double quote, e.g.
<code><character></code>,
in
<strong>ex</strong> .
(The double quote isn't necessary for
<strong>ex</strong>
because buffers names are denoted by their position in the command line.)
Historic implementations of
<strong>ex</strong>/<strong>vi</strong>
limited
<code><character></code>to the alphanumeric characters;
<strong>nex</strong>/<strong>nvi</strong>
permits the use of any character without another meaning in the position
where a buffer name is expected.
<pre class="sp">
</pre>
Buffers named by uppercase characters are the same as buffers
named by lowercase characters, e.g. the buffer named by the
English character
“<code>A</code>”
is the same as the buffer named by the character
“<code>a</code>”,
with the exception that, if the buffer contents are being changed (as
with a text deletion or
<strong>vi</strong>
<strong>change</strong>
command), the text is
<em>appended</em>
to the buffer, instead of replacing the current contents.
<pre class="sp">
</pre>
The buffers named by the numeric characters (in English,
“<code>1</code>”
through
“<code>9</code>”),
are special.
If a region of text including characters from more than one line,
or a single line of text specified by using a line-oriented motion,
is changed or deleted in the file using the
<strong>vi</strong>
<strong>change</strong>
or
<strong>delete</strong>
commands, a copy of the text is placed into the numeric buffer
“<code>1</code>”,
regardless of the user specifying another buffer in which to save it.
In addition, there are a few commands which, when used as a
<code>motion</code>with the
<strong>vi</strong>
<strong>change</strong>
and
<strong>delete</strong>
commands,
<em>always</em>
copy the specified region of text into the numeric buffers regardless
of the region including characters from more than one line.
These commands are:
<pre class="sp">
</pre>
<p><table summary=""><tr align="left"><td valign="top"><strong><control-A></strong> </td><td valign="top"><strong>%</strong> </td><td valign="top"><strong>(</strong> </td><td valign="top"><strong>)</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>`<character></strong> </td><td valign="top"><strong>/</strong> </td><td valign="top"><strong>?</strong> </td><td valign="top"><strong>N</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>n</strong> </td><td valign="top"><strong>{</strong> </td><td valign="top"><strong>}</strong>
<br></td></tr></table>
<pre class="sp">
</pre>
Before this copy is done, the previous contents of buffer
“<code>1</code>”
are moved into buffer
“<code>2</code>”,
“<code>2</code>”
into buffer
“<code>3</code>”,
and so on.
The contents of buffer
“<code>9</code>”
are discarded.
In
<strong>vi</strong> ,
text may be explicitly stored into the numeric buffers.
In this case, the buffer rotation described above occurs before the
replacement of the buffer's contents.
The numeric buffers are only available in
<code>visual</code>and
<code>open</code>modes,
and are not accessible by
<strong>ex</strong>
in any way, although changed and deleted text is still stored there
while in
<strong>ex</strong>
mode.
<pre class="sp">
</pre>
When a
<strong>vi</strong>
command synopsis shows both a
<code>[buffer]</code>and a
<code>[count]</code>,
they may be presented in any order.
<pre class="sp">
</pre>
Finally, all buffers are either
“line”
or
“character”
oriented.
All
<strong>ex</strong>
commands which store text into buffers are line oriented.
Some
<strong>vi</strong>
commands which store text into buffers are line oriented,
and some are character oriented; the description for each applicable
<strong>vi</strong>
command notes whether text copied into buffers using the command
is line or character oriented.
In addition, the
<strong>vi</strong>
command
<strong>display buffers</strong>
displays the current orientation for each buffer.
Generally, the only importance attached to this orientation is that
if the buffer is subsequently inserted into the text, line oriented
buffers create new lines for each of the lines they contain, and
character oriented buffers create new lines for any lines
<em>other</em>
than the first and last lines they contain.
The first and last lines are inserted into the text at the current
cursor position, becoming part of the current line.
If there is more than one line in the buffer, however, the current
line itself will be split.
<a name="index-g_t_0022unnamed-buffer_0022-6"></a><li><strong>unnamed buffer</strong>
<!-- @deffn {Command} {unnamed buffer} -->
<!-- @end deffn -->
<p>The unnamed buffer is a text storage area which is used by commands
that use or operate on a buffer when no buffer is specified by the user.
If the command stores text into a buffer,
the text is stored into the unnamed buffer even if a buffer is also
specified by the user.
It is not possible to append text to the unnamed buffer.
If text is appended to a named buffer,
the named buffer contains both the old and new text,
while the unnamed buffer contains only the new text.
There is no way to explicitly reference the unnamed buffer.
<pre class="sp">
</pre>
Historically, the contents of the unnamed buffer were discarded by many
different commands, even ones that didn't store text into it.
<strong>Nex</strong>/<strong>nvi</strong>
never discards the contents of the unnamed buffer until new text
replaces them.
<a name="index-whitespace-7"></a><li><strong>whitespace</strong>
<!-- @deffn {Command} {whitespace} -->
<!-- @end deffn -->
<p>The characters <tab> and <space>.
<a name="index-g_t_0022_003ccarriage_002dreturn_003e_0022-8"></a><li><strong><carriage-return></strong>
<!-- @deffn {Command} {<carriage-return>} -->
<!-- @end deffn -->
<p>The character represented by an ASCII
<code><control-M></code>.
This character is almost always treated identically to a
<code><newline></code>character, but differs in that it can be escaped into the file text or
into a command.
<a name="index-g_t_003cnewline_003e-9"></a><li><strong><newline></strong>
<!-- @deffn {Command} {<newline>} -->
<!-- @end deffn -->
<p>The character represented by an ASCII
<code><control-J></code>.
This character is almost always treated identically to a
<code><control-M></code>character, but differs in that it cannot be escaped into the file text or
into a command.
</ul>
<!-- .oh 'Vi/Ex Reference (Vi Commands)''USD:13-%' -->
<!-- .eh 'USD:13-%''Vi/Ex Reference (Vi Commands)' -->
<!-- Copyright (c) 1994 -->
<!-- The Regents of the University of California. All rights reserved. -->
<!-- Copyright (c) 1994, 1995, 1996 -->
<!-- Keith Bostic. All rights reserved. -->
<!-- See the LICENSE file for redistribution information. -->
<!-- $Id: vi.cmd.texi,v 8.1 2001/08/18 20:43:49 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:49 $ -->
<h2 class="chapter"><a name="TOC11"></a>12 Vi Description</h2>
<p><strong>Vi</strong> takes up the entire screen to display the edited file,
except for the bottom line of the screen.
The bottom line of the screen is used to enter
<strong>exp</strong>
commands, and for
<strong>vi</strong>
error and informational messages.
If no other information is being displayed,
the default display can show the current cursor row and cursor column,
an indication of whether the file has been modified,
and the current mode of the editor.
See the
<code>ruler</code>
and
<code>showmode</code>
options for more information.
<p>Empty lines do not have any special representation on the screen,
but lines on the screen that would logically come after the end of
the file are displayed as a single tilde
“<code>~</code>”
character.
To differentiate between empty lines and lines consisting of only
whitespace characters, use the
<code>list</code>
option.
Historically, implementations of
<strong>vi</strong>
have also displayed some lines as single asterisk
“<code>@</code>”
characters.
These were lines that were not correctly displayed, i.e. lines on the
screen that did not correspond to lines in the file, or lines that did
not fit on the current screen.
<strong>Nvi</strong>
never displays lines in this fashion.
<p><strong>Vi</strong>
is a modeful editor, i.e. it has two modes,
“command”
mode and
“text input”
mode.
When
<strong>vi</strong>
first starts, it is in command mode.
There are several commands that change
<strong>vi</strong>
into text input mode.
The
<code><escape></code>character is used to resolve the text input into the file,
and exit back into command mode.
In
<strong>vi</strong>
command mode, the cursor is always positioned on the last column of
characters which take up more than one column on the screen.
In
<strong>vi</strong>
text insert mode, the cursor is positioned on the first column of
characters which take up more than one column on the screen.
<p>When positioning the cursor to a new line and column,
the type of movement is defined by the distance to the new cursor position.
If the new position is close,
the screen is scrolled to the new location.
If the new position is far away,
the screen is repainted so that the new position is on the screen.
If the screen is scrolled,
it is moved a minimal amount,
and the cursor line will usually appear at the top or bottom of the screen.
If the screen is repainted,
the cursor line will appear in the center of the screen,
unless the cursor is sufficiently close to the beginning or end of the file
that this isn't possible.
If the
<code>leftright</code>
option is set, the screen may be scrolled or repainted in a horizontal
direction as well as in a vertical one.
<p>A major difference between the historical
<strong>vi</strong>
presentation and
<strong>nvi</strong>
is in the scrolling and screen oriented position commands,
<strong><control-B></strong>,
<strong><control-D></strong>,
<strong><control-E></strong>,
<strong><control-F></strong>,
<strong><control-U></strong>,
<strong><control-Y></strong>,
<strong>H</strong>,
<strong>L</strong>
and
<strong>M</strong>.
In historical implementations of
<strong>vi</strong>,
these commands acted on physical (as opposed to logical, or screen)
lines.
For lines that were sufficiently long in relation to the size of the
screen, this meant that single line scroll commands might repaint the
entire screen, scrolling or screen positioning commands might not change
the screen or move the cursor at all, and some lines simply could not
be displayed, even though
<strong>vi</strong>
would edit the file that contained them.
In
<strong>nvi</strong>,
these commands act on logical, i.e. screen lines.
You are unlikely to notice any difference unless you are editing files
with lines significantly longer than a screen width.
<p><strong>Vi</strong>
keeps track of the currently
“most attractive”
cursor position.
Each command description (for commands that alter the current cursor
position),
specifies if the cursor is set to a specific location in the line,
or if it is moved to the
“most attractive cursor position”.
The latter means that the cursor is moved to the cursor position that
is horizontally as close as possible to the current cursor position.
If the current line is shorter than the cursor position
<strong>vi</strong>
would select, the cursor is positioned on the last character in the line.
(If the line is empty, the cursor is positioned on the first column
of the line.)
If a command moves the cursor to the most attractive position,
it does not alter the current cursor position, and a subsequent
movement will again attempt to move the cursor to that position.
Therefore, although a movement to a line shorter than the currently
most attractive position will cause the cursor to move to the end of
that line, a subsequent movement to a longer line will cause the
cursor to move back to the most attractive position.
<p>In addition, the
<strong>$</strong>
command makes the end of each line the most attractive cursor position
rather than a specific column.
<p>Each
<strong>vi</strong>
command described below notes where the cursor ends up after it is
executed.
This position is described in terms of characters on the line, i.e.
“the previous character”,
or,
“the last character in the line”.
This is to avoid needing to continually refer to on what part of the
character the cursor rests.
<p>The following words have special meaning for
<strong>vi</strong>
commands.
<a name="index-g_t_0022previous-context_0022-10"></a>
<ul><li><strong>previous context</strong>
<!-- @deffn {Command} {previous context} -->
<!-- @end deffn -->
<p>The position of the cursor before the command which caused the
last absolute movement was executed.
Each
<strong>vi</strong>
command described in the next section that is considered an
absolute movement is so noted.
In addition, specifying
<em>any</em>
address to an
<strong>ex</strong>
command is considered an absolute movement.
<a name="index-g_t_0022motion_0022-11"></a><li><strong>motion</strong>
<!-- @deffn {Command} {motion} -->
<!-- @end deffn -->
<p>A second
<strong>vi</strong>
command can be used as an optional trailing argument to the
<strong>vi</strong>
<strong><</strong>,
<strong>></strong>,
<strong>!</strong>,
<strong>c</strong>,
<strong>d</strong>,
<strong>y</strong>,
and (depending on the
<code>tildeop</code>
option)
<strong>~</strong>
commands.
This command indicates the end of the region of text that's affected by
the command.
The motion command may be either the command character repeated (in
which case it means the current line) or a cursor movement command.
In the latter case, the region affected by the command is from the
starting or stopping cursor position which comes first in the file,
to immediately before the starting or stopping cursor position which
comes later in the file.
Commands that operate on lines instead of using beginning and ending
cursor positions operate on all of the lines that are wholly or
partially in the region.
In addition, some other commands become line oriented depending on
where in the text they are used.
The command descriptions below note these special cases.
<pre class="sp">
</pre>
The following commands may all be used as motion components for
<strong>vi</strong>
commands:
<pre class="sp">
</pre>
<p><table summary=""><tr align="left"><td valign="top"><strong><control-A></strong> </td><td valign="top"><strong><control-H></strong> </td><td valign="top"><strong><control-J></strong> </td><td valign="top"><strong><control-M></strong>
<br></td></tr><tr align="left"><td valign="top"><strong><control-N></strong> </td><td valign="top"><strong><control-P></strong> </td><td valign="top"><strong><space></strong> </td><td valign="top"><strong>$</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>%</strong> </td><td valign="top"><strong>'<character></strong> </td><td valign="top"><strong>(</strong> </td><td valign="top"><strong>)</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>+</strong> </td><td valign="top"><strong>,</strong> </td><td valign="top"><strong>-</strong> </td><td valign="top"><strong>/</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>0</strong> </td><td valign="top"><strong>;</strong> </td><td valign="top"><strong>?</strong> </td><td valign="top"><strong>B</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>E</strong> </td><td valign="top"><strong>F</strong> </td><td valign="top"><strong>G</strong> </td><td valign="top"><strong>H</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>L</strong> </td><td valign="top"><strong>M</strong> </td><td valign="top"><strong>N</strong> </td><td valign="top"><strong>T</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>W</strong> </td><td valign="top"><strong>[[</strong> </td><td valign="top"><strong>]]</strong> </td><td valign="top"><strong>^</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>_</strong> </td><td valign="top"><strong>`<character></strong> </td><td valign="top"><strong>b</strong> </td><td valign="top"><strong>e</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>f</strong> </td><td valign="top"><strong>h</strong> </td><td valign="top"><strong>j</strong> </td><td valign="top"><strong>k</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>l</strong> </td><td valign="top"><strong>n</strong> </td><td valign="top"><strong>t</strong> </td><td valign="top"><strong>w</strong>
<br></td></tr><tr align="left"><td valign="top"><strong>{</strong> </td><td valign="top"><strong>|</strong> </td><td valign="top"><strong>}</strong>
<br></td></tr></table>
<pre class="sp">
</pre>
The optional count prefix available for some of the
<strong>vi</strong>
commands that take motion commands,
or the count prefix available for the
<strong>vi</strong>
commands that are used as motion components,
may be included and is
<em>always</em>
considered part of the motion argument.
For example, the commands
“<code>c2w</code>”
and
“<code>2cw</code>”
are equivalent, and the region affected by the
<strong>c</strong>
command is two words of text.
In addition,
if the optional count prefix is specified for both the
<strong>vi</strong>
command and its motion component,
the effect is multiplicative and is considered part of the motion argument.
For example, the commands
“<code>4cw</code>”
and
“<code>2c2w</code>”
are equivalent, and the region affected by the
<strong>c</strong>
command is four words of text.
<a name="index-g_t_0022count_0022-12"></a><li><strong>count</strong>
<!-- @deffn {Command} {count} -->
<!-- @end deffn -->
<p>A positive number used as an optional argument to most commands,
either to give a size or a position (for display or movement commands),
or as a repeat count (for commands that modify text).
The count argument is always optional and defaults to 1 unless otherwise
noted in the command description.
<pre class="sp">
</pre>
When a
<strong>vi</strong>
command synopsis shows both a
<code>[buffer]</code>and
<code>[count]</code>,
they may be presented in any order.
<a name="index-word-13"></a><li><strong>word</strong>
<!-- @deffn {Command} {word} -->
<!-- @end deffn -->
<p>Generally, in languages where it is applicable,
<strong>vi</strong>
recognizes two kinds of words.
First, a sequence of letters, digits and underscores,
delimited at both ends by:
characters other than letters, digits, or underscores,
the beginning or end of a line, and the beginning or end of the file.
Second, a sequence of characters other than letters, digits, underscores,
or whitespace characters, delimited at both ends by: a letter, digit,
underscore, or whitespace character,
the beginning or end of a line, and the beginning or end of the file.
For example, the characters
“<code>!@#abc$%^ </code>”
contain three words:
“<code>!@#</code>”,
“<code>abc</code>”
and
“<code>$%^</code>”.
<pre class="sp">
</pre>
Groups of empty lines (or lines containing only whitespace characters)
are treated as a single word.
<a name="index-g_t_0022bigword_0022-14"></a><li><strong>bigword</strong>
<!-- @deffn {Command} {bigword} -->
<!-- @end deffn -->
<p>A set of non-whitespace characters preceded and followed by whitespace
characters or the beginning or end of the file or line.
For example, the characters
“<code>!@#abc$%^ </code>”
contain one bigword:
“<code>!@#abc$%^</code>”.
<pre class="sp">
</pre>
Groups of empty lines (or lines containing only whitespace characters)
are treated as a single bigword.
<a name="index-g_t_0022paragraph_0022-15"></a><li><strong>paragraph</strong>
<!-- @deffn {Command} {paragraph} -->
<!-- @end deffn -->
<p>An area of text that begins with either the beginning of a file,
an empty line, or a section boundary, and continues until either
an empty line, section boundary, or the end of the file.
<pre class="sp">
</pre>
Groups of empty lines (or lines containing only whitespace characters)
are treated as a single paragraph.
<pre class="sp">
</pre>
Additional paragraph boundaries can be defined using the
<code>paragraphs</code>
option.
<a name="index-g_t_0022section_0022-16"></a><li><strong>section</strong>
<!-- @deffn {Command} {section} -->
<!-- @end deffn -->
<p>An area of text that starts with the beginning of the file or a line
whose first character is an open brace
<!-- PQ -->
“<code>{</code>”
and continues until the next section or the end of the file.
<pre class="sp">
</pre>
Additional section boundaries can be defined using the
<code>sections</code>
option.
<a name="index-g_t_0022sentence_0022-17"></a><li><strong>sentence</strong>
<!-- @deffn {Command} {sentence} -->
<!-- @end deffn -->
<p>An area of text that begins with either the beginning of the file or the
first nonblank character following the previous sentence, paragraph, or
section boundary and continues until the end of the file or a period
“<code>.</code>”
exclamation point
“<code>!</code>”
or question mark
“<code>?</code>”
character,
followed by either an end-of-line or two whitespace characters.
Any number of closing parentheses
“<code>)</code>”,
brackets
“<code>]</code>”,
double-quote
“<code>"</code>”
or single quote
“<code>'</code>”
characters can appear between the period, exclamation point,
or question mark and the whitespace characters or end-of-line.
<pre class="sp">
</pre>
Groups of empty lines (or lines containing only whitespace characters)
are treated as a single sentence.
<h2 class="chapter"><a name="TOC12"></a>13 Vi Commands</h2>
</ul>
<p>The following section describes the commands available in the command
mode of the
<strong>vi</strong>
editor.
In each entry below, the tag line is a usage synopsis for the command
character.
In addition, the final line and column the cursor rests upon,
and any options which affect the command are noted.
<p><a name="index-g_t_003ccontrol_002dA_003e-18"></a>
<div class="defun">
— Command: [count] <b><control-A></b><var><a name="index-g_t_003ccontrol_002dA_003e-19"></a></var><br>
<blockquote>
<p>Search forward
<code>count</code>times for the current word.
The current word begins at the first non-whitespace character on or
after the current cursor position,
and extends up to the next non-word character or the end of the line.
The search is literal, i.e. no characters in the word have any special
meaning in terms of Regular Expressions.
It is an error if no matching pattern is found between the starting position
and the end of the file.
<pre class="sp">
</pre>
The
<strong><control-A></strong>
command is an absolute movement.
The
<strong><control-A></strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line where the word is found.
<br><dt>Column:<dd>Set to the first character of the word.
<br><dt>Options:<dd>Affected by the
<code>ignorecase</code>
and
<code>wrapscan</code>
options.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dB_003e-20"></a>
<div class="defun">
— Command: [count] <b><control-B></b><var><a name="index-g_t_003ccontrol_002dB_003e-21"></a></var><br>
<blockquote>
<p>Page backward
<code>count</code>screens.
Two lines of overlap are maintained, if possible,
by displaying the window starting at line
<code>(top_line - count * window_size) + 2</code>,
where
<code>window_size</code>is the value of the
<code>window</code>
option.
(In the case of split screens, this size is corrected to the
current screen size.)
It is an error if the movement is past the beginning of the file.
<dl>
<dt>Line:<dd>Set to the last line of text displayed on the screen.
<br><dt>Column:<dd>Set to the first nonblank character of the line.
<br><dt>Options:<dd>Affected by the
<code>window</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dD_003e-22"></a>
<div class="defun">
— Command: [count] <b><control-D></b><var><a name="index-g_t_003ccontrol_002dD_003e-23"></a></var><br>
<blockquote>
<p>Scroll forward
<code>count</code>lines.
If
<code>count</code>is not specified, scroll forward the number of lines specified by the last
<strong><control-D></strong>
or
<strong><control-U></strong>
command.
If this is the first
<strong><control-D></strong>
or
<strong><control-U></strong>
command,
scroll forward half the number of lines in the screen.
(In the case of split screens, the default scrolling distance is
corrected to half the current screen size.)
It is an error if the movement is past the end of the file.
<dl>
<dt>Line:<dd>Set to the current line plus the number of lines scrolled.
<br><dt>Column:<dd>Set to the first nonblank character of the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dE_003e-24"></a>
<div class="defun">
— Command: [count] <b><control-E></b><var><a name="index-g_t_003ccontrol_002dE_003e-25"></a></var><br>
<blockquote>
<p>Scroll forward
<code>count</code>lines, leaving the cursor on the current line and column, if possible.
It is an error if the movement is past the end of the file.
<dl>
<dt>Line:<dd>Unchanged unless the current line scrolls off the screen,
in which case it is set to the first line on the screen.
<br><dt>Column:<dd>Unchanged unless the current line scrolls off the screen,
in which case it is set to the most attractive cursor position.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dF_003e-26"></a>
<div class="defun">
— Command: [count] <b><control-F></b><var><a name="index-g_t_003ccontrol_002dF_003e-27"></a></var><br>
<blockquote>
<p>Page forward
<code>count</code>screens.
Two lines of overlap are maintained, if possible,
by displaying the window starting at line
<code>top_line + count * window_size - 2</code>,
where
<code>window_size</code>is the value of the
<code>window</code>
option.
(In the case of split screens, this size is corrected to the
current screen size.)
It is an error if the movement is past the end of the file.
<dl>
<dt>Line:<dd>Set to the first line on the screen.
<br><dt>Column:<dd>Set to the first nonblank character of the current line.
<br><dt>Options:<dd>Affected by the
<code>window</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dG_003e-28"></a>
<div class="defun">
— Command: <b><control-G></b><var><a name="index-g_t_003ccontrol_002dG_003e-29"></a></var><br>
<blockquote>
<p>Display the file information.
The information includes the current pathname, the current line,
the number of total lines in the file, the current line as a percentage
of the total lines in the file, if the file has been modified,
was able to be locked, if the file's name has been changed,
and if the edit session is read-only.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<p><a name="index-g_t_003ccontrol_002dH_003e-30"></a>
<div class="defun">
— Command: [count] <b><control-H></b><var><a name="index-g_t_003ccontrol_002dH_003e-31"></a></var><br>
— Command: [count] <b>h</b><var><a name="index-h-32"></a></var><br>
<blockquote><p>Move the cursor back
<code>count</code>characters in the current line.
It is an error if the cursor is on the first character in the line.
<pre class="sp">
</pre>
The
<strong><control-H></strong>
and
<strong>h</strong>
commands may be used as the motion component of other
<strong>vi</strong>
commands,
in which case any text copied into a buffer is character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the
<code>current - count</code>character, or, the first character in the line if
<code>count</code>is greater than or equal to the number of characters in the line
before the cursor.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<p><a name="index-g_t_003ccontrol_002dJ_003e-33"></a>
<div class="defun">
— Command: [count] <b><control-J></b><var><a name="index-g_t_003ccontrol_002dJ_003e-34"></a></var><br>
<blockquote>
<p><a name="index-g_t_003ccontrol_002dN_003e-35"></a>
— Command: [count] <b><control-N></b><var><a name="index-g_t_003ccontrol_002dN_003e-36"></a></var><br>
<blockquote><p><a name="index-j-37"></a>
— Command: [count] <b>j</b><var><a name="index-j-38"></a></var><br>
<blockquote><p>Move the cursor down
<code>count</code>lines without changing the current column.
It is an error if the movement is past the end of the file.
<pre class="sp">
</pre>
The
<strong><control-J></strong>,
<strong><control-N></strong>
and
<strong>j</strong>
commands may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the current line plus
<code>count</code>.
<br><dt>Column:<dd>The most attractive cursor position.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dL_003e-39"></a>
<div class="defun">
— Command: <b><control-L></b><var><a name="index-g_t_003ccontrol_002dL_003e-40"></a></var><br>
<blockquote>
<p><a name="index-g_t_003ccontrol_002dR_003e-41"></a>
— Command: <b><control-R></b><var><a name="index-g_t_003ccontrol_002dR_003e-42"></a></var><br>
<blockquote><p>Repaint the screen.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dM_003e-43"></a>
<div class="defun">
— Command: [count] <b><control-M></b><var><a name="index-g_t_003ccontrol_002dM_003e-44"></a></var><br>
<blockquote>
<p><a name="index-g_t_002b-45"></a>
— Command: [count] <b>+</b><var><a name="index-g_t_002b-46"></a></var><br>
<blockquote><p>Move the cursor down
<code>count</code>lines to the first nonblank character of that line.
It is an error if the movement is past the end of the file.
<pre class="sp">
</pre>
The
<strong><control-M></strong>
and
<strong>+</strong>
commands may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the current line plus
<code>count</code>.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dP_003e-47"></a>
<div class="defun">
— Command: [count] <b><control-P></b><var><a name="index-g_t_003ccontrol_002dP_003e-48"></a></var><br>
<blockquote>
<p><a name="index-k-49"></a>
— Command: [count] <b>k</b><var><a name="index-k-50"></a></var><br>
<blockquote><p>Move the cursor up
<code>count</code>lines, without changing the current column.
It is an error if the movement is past the beginning of the file.
<pre class="sp">
</pre>
The
<strong><control-P></strong>
and
<strong>k</strong>
commands may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the current line minus
<code>count</code>.
<br><dt>Column:<dd>The most attractive cursor position.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dT_003e-51"></a>
<div class="defun">
— Command: <b><control-T></b><var><a name="index-g_t_003ccontrol_002dT_003e-52"></a></var><br>
<blockquote>
<p>Return to the most recent tag context.
The
<strong><control-T></strong>
command is an absolute movement.
<dl>
<dt>Line:<dd>Set to the context of the previous tag command.
<br><dt>Column:<dd>Set to the context of the previous tag command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dU_003e-53"></a>
<div class="defun">
— Command: [count] <b><control-U></b><var><a name="index-g_t_003ccontrol_002dU_003e-54"></a></var><br>
<blockquote>
<p>Scroll backward
<code>count</code>lines.
If
<code>count</code>is not specified, scroll backward the number of lines specified by the
last
<strong><control-D></strong>
or
<strong><control-U></strong>
command.
If this is the first
<strong><control-D></strong>
or
<strong><control-U></strong>
command,
scroll backward half the number of lines in the screen.
(In the case of split screens, the default scrolling distance is
corrected to half the current screen size.)
It is an error if the movement is past the beginning of the file.
<dl>
<dt>Line:<dd>Set to the current line minus the amount scrolled.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dW_003e-55"></a>
<div class="defun">
— Command: <b><control-W></b><var><a name="index-g_t_003ccontrol_002dW_003e-56"></a></var><br>
<blockquote>
<p>Switch to the next lower screen in the window, or, to the first
screen if there are no lower screens in the window.
<dl>
<dt>Line:<dd>Set to the previous cursor position in the window.
<br><dt>Column:<dd>Set to the previous cursor position in the window.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dY_003e-57"></a>
<div class="defun">
— Command: [count] <b><control-Y></b><var><a name="index-g_t_003ccontrol_002dY_003e-58"></a></var><br>
<blockquote>
<p>Scroll backward
<code>count</code>lines, leaving the current line and column as is, if possible.
It is an error if the movement is past the beginning of the file.
<dl>
<dt>Line:<dd>Unchanged unless the current line scrolls off the screen,
in which case it is set to the last line of text displayed
on the screen.
<br><dt>Column:<dd>Unchanged unless the current line scrolls off the screen,
in which case it is the most attractive cursor position.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dZ_003e-59"></a>
<div class="defun">
— Command: <b><control-Z></b><var><a name="index-g_t_003ccontrol_002dZ_003e-60"></a></var><br>
<blockquote>
<p>Suspend the current editor session.
If the file has been modified since it was last completely written,
and the
<code>autowrite</code>
option is set, the file is written before the editor session is
suspended.
If this write fails, the editor session is not suspended.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003cescape_003e-61"></a>
<div class="defun">
— Command: <b><escape></b><var><a name="index-g_t_003cescape_003e-62"></a></var><br>
<blockquote>
<p>Execute
<strong>ex</strong>
commands or cancel partial commands.
If an
<strong>ex</strong>
command is being entered (e.g.
<strong>/</strong>,
<strong>?</strong>,
<strong>:</strong>
or
<strong>!</strong>),
the command is executed.
If a partial command has been entered, e.g.
“<code>[0-9]*</code>”,
or
“<code>[0-9]*[!<>cdy]</code>”,
the command is cancelled.
Otherwise, it is an error.
<dl>
<dt>Line:<dd>When an
<strong>ex</strong>
command is being executed, the current line is set as described for
that command.
Otherwise, unchanged.
<br><dt>Column:<dd>When an
<strong>ex</strong>
command is being executed, the current column is set as described for
that command.
Otherwise, unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002d_005d_003e-63"></a>
<div class="defun">
— Command: <b><control-]></b><var><a name="index-g_t_003ccontrol_002d_005d_003e-64"></a></var><br>
<blockquote>
<p>Push a tag reference onto the tag stack.
The tags files (see the
<code>tags</code>
option for more information) are searched for a tag matching the
current word.
The current word begins at the first non-whitespace character on or
after the current cursor position,
and extends up to the next non-word character or the end of the line.
If a matching tag is found, the current file is discarded and the
file containing the tag reference is edited.
<pre class="sp">
</pre>
If the current file has been modified since it was last completely
written, the command will fail.
The
<strong><control-]></strong>
command is an absolute movement.
<dl>
<dt>Line:<dd>Set to the line containing the matching tag string.
<br><dt>Column:<dd>Set to the start of the matching tag string.
<br><dt>Options:<dd>Affected by the
<code>tags</code>
and
<code>taglength</code>
options.
</dl>
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002d_005e_003e-65"></a>
<div class="defun">
— Command: <b><control-^></b><var><a name="index-g_t_003ccontrol_002d_005e_003e-66"></a></var><br>
<blockquote>
<p>Switch to the most recently edited file.
<pre class="sp">
</pre>
If the file has been modified since it was last completely written,
and the
<code>autowrite</code>
option is set, the file is written out.
If this write fails, the command will fail.
Otherwise, if the current file has been modified since it was last
completely written, the command will fail.
<dl>
<dt>Line:<dd>Set to the line the cursor was on when the file was last edited.
<br><dt>Column:<dd>Set to the column the cursor was on when the file was last edited.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003cspace_003e-67"></a>
<div class="defun">
— Command: [count] <b><space></b><var><a name="index-g_t_003cspace_003e-68"></a></var><br>
<blockquote>
<p><a name="index-l-69"></a>
— Command: [count] <b>l</b><var><a name="index-l-70"></a></var><br>
<blockquote><p>Move the cursor forward
<code>count</code>characters without changing the current line.
It is an error if the cursor is on the last character in the line.
<pre class="sp">
</pre>
The
<strong><space></strong>
and
<strong>l</strong>
commands may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
In addition, these commands may be used as the motion components
of other commands when the cursor is on the last character in the
line, without error.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the current character plus the next
<code>count</code>characters, or to the last character on the line if
<code>count</code>is greater than the number of characters in the line after the
current character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0021-71"></a>
<div class="defun">
— Command: [count] <b>!</b><var> motion shell-argument(s)<carriage-return><a name="index-g_t_0021-72"></a></var><br>
<blockquote>
<p>Replace text with results from a shell command.
Pass the lines specified by the
<code>count</code>and
<code>motion</code>arguments as standard input to the program named by the
<code>shell</code>
option, and replace those lines with the output (both
standard error and standard output) of that command.
<pre class="sp">
</pre>
After the motion is entered,
<strong>vi</strong>
prompts for arguments to the shell command.
<pre class="sp">
</pre>
Within those arguments,
“<code>%</code>”
and
“<code>#</code>”
characters are expanded to the current and alternate pathnames,
respectively.
The
“<code>!</code>”
character is expanded with the command text of the previous
<strong>!</strong>
or
<strong>:!</strong>
commands.
(Therefore, the command
<strong>!<motion>!</strong>
repeats the previous
<strong>!</strong>
command.)
The special meanings of
“<code>%</code>”,
“<code>#</code>”
and
“<code>!</code>”
can be overridden by escaping them with a backslash.
If no
<strong>!</strong>
or
<strong>:!</strong>
command has yet been executed,
it is an error to use an unescaped
“<code>!</code>”
character as a shell argument.
The
<strong>!</strong>
command does
<em>not</em>
do shell expansion on the strings provided as arguments.
If any of the above expansions change the arguments the user entered,
the command is redisplayed at the bottom of the screen.
<pre class="sp">
</pre>
<strong>Vi</strong>
then executes the program named by the
<code>shell</code>
option, with a
<strong>-c</strong>
flag followed by the arguments (which are bundled into a single argument).
<pre class="sp">
</pre>
The
<strong>!</strong>
command is permitted in an empty file.
<pre class="sp">
</pre>
If the file has been modified since it was last completely written,
the
<strong>!</strong>
command will warn you.
<dl>
<dt>Line:<dd>The first line of the replaced text.
<br><dt>Column:<dd>The first column of the replaced text.
<br><dt>Options:<dd>Affected by the
<code>shell</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_0023-73"></a>
<div class="defun">
— Command: [count] <b>#</b><var> #|+|-<a name="index-g_t_0023-74"></a></var><br>
<blockquote>
<p>Increment or decrement the number referenced by the cursor.
If the trailing character is a
<code>+</code>or
<code>#</code>,
the number is incremented by
<code>count</code>.
If the trailing character is a
<code>-</code>,
the number is decremented by
<code>count</code>.
<pre class="sp">
</pre>
A leading
“<code>0X</code>”
or
“<code>0x</code>”
causes the number to be interpreted as a hexadecimal number.
Otherwise, a leading
“<code>0</code>”
causes the number to be interpreted as an octal number, unless a non-octal
digit is found as part of the number.
Otherwise, the number is interpreted as a decimal number, and may
have a leading
<code>+</code>or
<code>-</code>sign.
The current number begins at the first non-blank character at or after
the current cursor position, and extends up to the end of the line or
the first character that isn't a possible character for the numeric type.
The format of the number (e.g. leading 0's, signs) is retained unless
the new value cannot be represented in the previous format.
<pre class="sp">
</pre>
Octal and hexadecimal numbers, and the result of the operation, must fit
into an
“<code>unsigned long</code>”.
Similarly, decimal numbers and their result must fit into a
“<code>signed long</code>”.
It is an error to use this command when the cursor is not positioned at
a number.
<pre class="sp">
</pre>
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the first character in the cursor number.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0024-75"></a>
<div class="defun">
— Command: [count] <b>$</b><var><a name="index-g_t_0024-76"></a></var><br>
<blockquote>
<p>Move the cursor to the end of a line.
If
<code>count</code>is specified, the cursor moves down
<code>count - 1</code>lines.
<pre class="sp">
</pre>
It is not an error to use the
<strong>$</strong>
command when the cursor is on the last character in the line or
when the line is empty.
<pre class="sp">
</pre>
The
<strong>$</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the cursor is at, or before the first
nonblank character in the line, in which case it is line oriented.
It is not an error to use the
<strong>$</strong>
command as a motion component when the cursor is on the last character
in the line, although it is an error when the line is empty.
<dl>
<dt>Line:<dd>Set to the current line plus
<code>count</code>minus 1.
<br><dt>Column:<dd>Set to the last character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0025-77"></a>
<div class="defun">
— Command: <b>%</b><var><a name="index-g_t_0025-78"></a></var><br>
<blockquote>
<p>Move to the matching character.
The cursor moves to the parenthesis or curly brace which
<em>matches</em>
the parenthesis or curly brace found at the current cursor position
or which is the closest one to the right of the cursor on the line.
It is an error to execute the
<strong>%</strong>
command on a line without a parenthesis or curly brace.
Historically, any
<code>count</code>specified to the
<strong>%</strong>
command was ignored.
<pre class="sp">
</pre>
The
<strong>%</strong>
command is an absolute movement.
The
<strong>%</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting point of the region is at
or before the first nonblank character on its line, and the ending
point is at or after the last nonblank character on its line, in
which case it is line oriented.
<dl>
<dt>Line:<dd>Set to the line containing the matching character.
<br><dt>Column:<dd>Set to the matching character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0026-79"></a>
<div class="defun">
— Command: <b>&</b><var><a name="index-g_t_0026-80"></a></var><br>
<blockquote>
<p>Repeat the previous substitution command on the current line.
<pre class="sp">
</pre>
Historically, any
<code>count</code>specified to the
<strong>&</strong>
command was ignored.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged if the cursor was on the last character in the line,
otherwise, set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>edcompatible</code>,
<code>extended</code>,
<code>ignorecase</code>
and
<code>magic</code>
options.
</dl>
</p></blockquote></div>
<a name="index-SQUOTE_003ccharacter_003e-81"></a>
<div class="defun">
— Command: <b>'<character></b><var><a name="index-g_t_0027_003ccharacter_003e-82"></a></var><br>
<blockquote>
<p><a name="index-g_t_0060_003ccharacter_003e-83"></a>
— Command: <b>`<character></b><var><a name="index-g_t_0060_003ccharacter_003e-84"></a></var><br>
<blockquote><p>Return to a context marked by the character
<code><character></code>.
If
<code><character></code>is the
“<code>'</code>”
or
“<code>`</code>”
character, return to the previous context.
If
<code><character></code>is any other character,
return to the context marked by that character (see the
<strong>m</strong>
command for more information).
If the command is the
<strong>'</strong>
command, only the line value is restored,
and the cursor is placed on the first nonblank character of that line.
If the command is the
<strong>`</strong>
command, both the line and column values are restored.
<pre class="sp">
</pre>
It is an error if the context no longer exists because of
line deletion.
(Contexts follow lines that are moved, or which are deleted
and then restored.)
<pre class="sp">
</pre>
The
<strong>'</strong>
and
<strong>`</strong>
commands are both absolute movements.
They may be used as a motion component for other
<strong>vi</strong>
commands.
For the
<strong>'</strong>
command, any text copied into a buffer is line oriented.
For the
<strong>`</strong>
command,
any text copied into a buffer is character oriented,
unless it both starts and stops at the first character in the line,
in which case it is line oriented.
In addition, when using the
<strong>`</strong>
command as a motion component,
commands which move backward and started at the first character in the line,
or move forward and ended at the first character in the line,
are corrected to the last character of the line preceding the starting and
ending lines, respectively.
<dl>
<dt>Line:<dd>Set to the line from the context.
<br><dt>Column:<dd>Set to the first nonblank character in the line, for the
<strong>'</strong>
command, and set to the context's column for the
<strong>`</strong>
command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0028-85"></a>
<div class="defun">
— Command: <b>[count] (</b><var><a name="index-g_t_005bcount_005d-_0028-86"></a></var><br>
<blockquote>
<p>Back up
<code>count</code>sentences.
<pre class="sp">
</pre>
The
<strong>(</strong>
command is an absolute movement.
The
<strong>(</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands,
in which case any text copied into a buffer is character oriented,
unless the starting and stopping points of the region are the first
character in the line,
in which case it is line oriented.
If it is line oriented,
the starting point of the region is adjusted to be the end of the line
immediately before the starting cursor position.
<dl>
<dt>Line:<dd>Set to the line containing the beginning of the sentence.
<br><dt>Column:<dd>Set to the first nonblank character of the sentence.
<br><dt>Options:<dd>Affected by the
<code>lisp</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_0029-87"></a>
<div class="defun">
— Command: [count] <b>)</b><var><a name="index-g_t_0029-88"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>sentences.
<pre class="sp">
</pre>
The
<strong>)</strong>
command is an absolute movement.
The
<strong>)</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting point of the region is the
first character in the line, in which case it is line oriented.
In the latter case, if the stopping point of the region is also
the first character in the line, it is adjusted to be the end of the
line immediately before it.
<dl>
<dt>Line:<dd>Set to the line containing the beginning of the sentence.
<br><dt>Column:<dd>Set to the first nonblank character of the sentence.
<br><dt>Options:<dd>Affected by the
<code>lisp</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_002c-89"></a>
<div class="defun">
— Command: [count] <b>,</b><var><a name="index-g_t_002c-90"></a></var><br>
<blockquote>
<p>Reverse find character
<code>count</code>times.
Reverse the last
<strong>F</strong>,
<strong>f</strong>,
<strong>T</strong>
or
<strong>t</strong>
command, searching the other way in the line,
<code>count</code>times.
It is an error if a
<strong>F</strong>,
<strong>f</strong>,
<strong>T</strong>
or
<strong>t</strong>
command has not been performed yet.
<pre class="sp">
</pre>
The
<strong>,</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the searched-for character for the
<strong>F</strong>
and
<strong>f</strong>
commands,
before the character for the
<strong>t</strong>
command
and after the character for the
<strong>T</strong>
command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-MINUSSIGN-91"></a>
<div class="defun">
— Command: [count] <b>-</b><var><a name="index-g_t_002d-92"></a></var><br>
<blockquote>
<p>Move to the first nonblank of the previous line,
<code>count</code>times.
<pre class="sp">
</pre>
It is an error if the movement is past the beginning of the file.
<pre class="sp">
</pre>
The
<strong>-</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the current line minus
<code>count</code>.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_002e-93"></a>
<div class="defun">
— Command: [count] <b>.</b><var><a name="index-g_t_002e-94"></a></var><br>
<blockquote>
<p>Repeat the last
<strong>vi</strong>
command that modified text.
The repeated command may be a command and motion component combination.
If
<code>count</code>is specified, it replaces
<em>both</em>
the count specified for the repeated command, and, if applicable, for
the repeated motion component.
If
<code>count</code>is not specified, the counts originally specified to the command being
repeated are used again.
<pre class="sp">
</pre>
As a special case, if the
<strong>.</strong>
command is executed immediately after the
<strong>u</strong>
command, the change log is rolled forward or backward, depending on
the action of the
<strong>u</strong>
command.
<dl>
<dt>Line:<dd>Set as described for the repeated command.
<br><dt>Column:<dd>Set as described for the repeated command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_002fRE_002f-95"></a>
<div class="defun">
— Command: <b>/RE<carriage-return></b><var><a name="index-g_t_002fRE_003ccarriage_002dreturn_003e-96"></a></var><br>
— Command: <b>/RE/</b> [<var><a name="index-g_t_002fRE_002f-97"></a></var><br>
<blockquote><p><a name="index-g_t_003fRE_003f-98"></a>
— Command: <b>?RE<carriage-return></b><var><a name="index-g_t_003fRE_003ccarriage_002dreturn_003e-99"></a></var><br>
— Command: <b>?RE?</b> [<var><a name="index-g_t_003fRE_003f-100"></a></var><br>
<blockquote><p><a name="index-N-101"></a>
— Command: <b>N</b><var><a name="index-N-102"></a></var><br>
<blockquote><p><a name="index-n-103"></a>
— Command: <b>n</b><var><a name="index-n-104"></a></var><br>
<blockquote><p>Search forward or backward for a regular expression.
The commands beginning with a slash
“<code>/</code>”
character are forward searches, the commands beginning with a
question mark
“<code>?</code>”
are backward searches.
<strong>Vi</strong>
prompts with the leading character on the last line of the screen
for a string.
It then searches forward or backward in the file for the next
occurrence of the string, which is interpreted as a Basic Regular
Expression.
<pre class="sp">
</pre>
The
<strong>/</strong>
and
<strong>?</strong>
commands are absolute movements.
They may be used as the motion components of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the search started and ended on
the first column of a line, in which case it is line oriented.
In addition, forward searches ending at the first character of a line,
and backward searches beginning at the first character in the line,
are corrected to begin or end at the last character of the previous line.
(Note, forward and backward searches can occur for both
<strong>/</strong>
and
<strong>?</strong>
commands, if the
<code>wrapscan</code>
option is set.)
<pre class="sp">
</pre>
If an offset from the matched line is specified (i.e. a trailing
“<code>/</code>”
or
“<code>?</code>”
character is followed by a signed offset), the buffer will always
be line oriented (e.g.
“<code>/string/+0</code>”
will always guarantee a line orientation).
<pre class="sp">
</pre>
The
<strong>N</strong>
command repeats the previous search, but in the reverse direction.
The
<strong>n</strong>
command repeats the previous search.
If either the
<strong>N</strong>
or
<strong>n</strong>
commands are used as motion components for the
<strong>!</strong>
command, you will not be prompted for the text of the bang command,
instead the previous bang command will be executed.
<pre class="sp">
</pre>
Missing RE's (e.g.
“<code>//<carriage-return></code>”,
“<code>/<carriage-return></code>”,
“<code>??<carriage-return></code>”,
or
“<code>?<carriage-return></code>”
search for the last search RE, in the indicated direction.
<pre class="sp">
</pre>
Searches may be interrupted using the
<code><interrupt></code>character.
<pre class="sp">
</pre>
Multiple search patterns may be grouped together by delimiting
them with semicolons and zero or more whitespace characters, e.g.
<code>/foo/ ; ?bar?</code>searches forward for
<code>foo</code>and then, from that location, backwards for
<code>bar</code>.
When search patterns are grouped together in this manner,
the search patterns are evaluated left to right with the
final cursor position determined by the last search pattern.
<pre class="sp">
</pre>
It is also permissible to append a
<strong>z</strong>
command to the search strings, e.g.
<code>/foo/ z.</code>searches forward for the next occurrence of
<code>foo</code>,
and then positions that line in the middle of screen.
<dl>
<dt>Line:<dd>Set to the line in which the match occurred.
<br><dt>Column:<dd>Set to the first character of the matched string.
<br><dt>Options:<dd>Affected by the
<code>edcompatible</code>,
<code>extended</code>,
<code>ignorecase</code>,
<code>magic</code>,
and
<code>wrapscan</code>
options.
</dl>
</p></blockquote></div>
<a name="index-g_t0-105"></a>
<div class="defun">
— Command: <b>0</b><var><a name="index-g_t0-106"></a></var><br>
<blockquote>
<p>Move to the first character in the current line.
It is not an error to use the
<strong>0</strong>
command when the cursor is on the first character in the line,
<pre class="sp">
</pre>
The
<strong>0</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands,
in which case it is an error if the cursor is on the first character
in the line,
and any text copied into a buffer is character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the first character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003a-107"></a>
<div class="defun">
— Command: <b>:</b><var><a name="index-g_t_003a-108"></a></var><br>
<blockquote>
<p>Execute an
<strong>ex</strong>
command.
<strong>Vi</strong>
prompts for an
<strong>ex</strong>
command on the last line of the screen, using a colon
“<code>:</code>”
character.
The command is terminated by a
<code><carriage-return></code>,
<code><newline></code>or
<code><escape></code>character; all of these characters may be escaped by using a
<code><literal-next></code>character.
The command is then executed.
<pre class="sp">
</pre>
If the
<strong>ex</strong>
command writes to the screen,
<strong>vi</strong>
will prompt the user for a
<code><carriage-return></code>before continuing
when the
<strong>ex</strong>
command finishes.
Large amounts of output from the
<strong>ex</strong>
command will be paged for the user, and the user prompted for a
<code><carriage-return></code>or
<code><space></code>key to continue.
In some cases, a quit (normally a
“q”
character) or
<code><interrupt></code>may be entered to interrupt the
<strong>ex</strong>
command.
<pre class="sp">
</pre>
When the
<strong>ex</strong>
command finishes, and the user is prompted to resume visual mode,
it is also possible to enter another
“<code>:</code>”
character followed by another
<strong>ex</strong>
command.
<dl>
<dt>Line:<dd>The current line is set as described for the
<strong>ex</strong>
command.
<br><dt>Column:<dd>The current column is set as described for the
<strong>ex</strong>
command.
<br><dt>Options:<dd>Affected as described for the
<strong>ex</strong>
command.
</dl>
</p></blockquote></div>
<a name="index-g_t_003b-109"></a>
<div class="defun">
— Command: [count] <b>;</b><var><a name="index-g_t_003b-110"></a></var><br>
<blockquote>
<p>Repeat the last character find
<code>count</code>times.
The last character find is one of the
<strong>F</strong>,
<strong>f</strong>,
<strong>T</strong>
or
<strong>t</strong>
commands.
It is an error if a
<strong>F</strong>,
<strong>f</strong>,
<strong>T</strong>
or
<strong>t</strong>
command has not been performed yet.
<pre class="sp">
</pre>
The
<strong>;</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the searched-for character for the
<strong>F</strong>
and
<strong>f</strong>
commands,
before the character for the
<strong>t</strong>
command
and after the character for the
<strong>T</strong>
command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003c-111"></a>
<div class="defun">
— Command: [count] <b>< motion</b><var><a name="index-g_t_003c-motion-112"></a></var><br>
<blockquote>
<p><a name="index-g_t_003e-113"></a>
— Command: [count] <b>></b><var> motion<a name="index-g_t_003e-114"></a></var><br>
<blockquote><p>Shift lines left or right.
Shift the number of lines in the region specified by the
<code>count</code>and
<code>motion</code>left (for the
<strong><</strong>
command) or right (for the
<strong>></strong>
command) by the number of columns specified by the
<code>shiftwidth</code>
option.
Only whitespace characters are deleted when shifting left.
Once the first character in the line no longer contains a whitespace
character, the command will succeed,
but the line will not be modified.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>shiftwidth</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_0040_0040-115"></a>
<div class="defun">
— Command: <b>@</b><var> buffer<a name="index-g_t_0040_0040-116"></a></var><br>
<blockquote>
<p>Execute a named buffer.
Execute the named buffer as
<strong>vi</strong>
commands.
The buffer may include
<strong>ex</strong>
commands, too, but they must be expressed as a
<strong>:</strong>
command.
If the buffer is line oriented,
<code><newline></code>characters are logically appended to each line of the buffer.
If the buffer is character oriented,
<code><newline></code>characters are logically appended to all but the last line in the buffer.
<pre class="sp">
</pre>
If the buffer name is
“<code>@</code>”,
or
“<code>*</code>”,
then the last buffer executed shall be used.
It is an error to specify
“<code>@@</code>”
or
“<code>@*</code>”
if there were no previous buffer executions.
The text of a buffer may contain a
<strong>@</strong>
command,
and it is possible to create infinite loops in this manner.
(The
<code><interrupt></code>character may be used to interrupt the loop.)
<dl>
<dt>Line:<dd>The current line is set as described for the command(s).
<br><dt>Column:<dd>The current column is set as described for the command(s).
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-A-117"></a>
<div class="defun">
— Command: [count] <b>A</b><var><a name="index-A-118"></a></var><br>
<blockquote>
<p>Enter input mode, appending the text after the end of the line.
If
<code>count</code>is specified, the text is repeatedly input
<code>count - 1</code>more times after input mode is exited.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-B-119"></a>
<div class="defun">
— Command: [count] <b>B</b><var><a name="index-B-120"></a></var><br>
<blockquote>
<p>Move backward
<code>count</code>bigwords.
Move the cursor backward to the beginning of a bigword by repeating the
following algorithm: if the current position is at the beginning of a
bigword or the character at the current position cannot be part of a bigword,
move to the first character of the preceding bigword.
Otherwise, move to the first character of the bigword at the current position.
If no preceding bigword exists on the current line, move to the first
character of the last bigword on the first preceding line that contains a
bigword.
<pre class="sp">
</pre>
The
<strong>B</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line containing the word selected.
<br><dt>Column:<dd>Set to the first character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-C-121"></a>
<div class="defun">
— Command: [buffer] <b>[count] C</b><var><a name="index-g_t_005bcount_005d-C-122"></a></var><br>
<blockquote>
<p>Change text from the current position to the end-of-line.
If
<code>count</code>is specified, the input text replaces from the current position to
the end-of-line, plus
<code>count - 1</code>subsequent lines.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-D-123"></a>
<div class="defun">
— Command: [buffer] <b>D</b><var><a name="index-D-124"></a></var><br>
<blockquote>
<p>Delete text from the current position to the end-of-line.
<pre class="sp">
</pre>
It is not an error to execute the
<strong>D</strong>
command on an empty line.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the character before the current character, or, column 1 if
the cursor was on column 1.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-E-125"></a>
<div class="defun">
— Command: [count] <b>E</b><var><a name="index-E-126"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>end-of-bigwords.
Move the cursor forward to the end of a bigword by repeating the
following algorithm: if the current position is the end of a
bigword or the character at that position cannot be part of a bigword,
move to the last character of the following bigword.
Otherwise, move to the last character of the bigword at the current
position.
If no succeeding bigword exists on the current line,
move to the last character of the first bigword on the next following
line that contains a bigword.
<pre class="sp">
</pre>
The
<strong>E</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line containing the word selected.
<br><dt>Column:<dd>Set to the last character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-F-127"></a>
<div class="defun">
— Command: [count] <b>F</b><var> <character><a name="index-F-128"></a></var><br>
<blockquote>
<p>Search
<code>count</code>times backward through the current line for
<code><character></code>.
<pre class="sp">
</pre>
The
<strong>F</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the searched-for character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-G-129"></a>
<div class="defun">
— Command: [count] <b>G</b><var><a name="index-G-130"></a></var><br>
<blockquote>
<p>Move to line
<code>count</code>,
or the last line of the file if
<code>count</code>not specified.
<pre class="sp">
</pre>
The
<strong>G</strong>
command is an absolute movement.
The
<strong>G</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to
<code>count</code>,
if specified, otherwise, the last line.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-H-131"></a>
<div class="defun">
— Command: [count] <b>H</b><var><a name="index-H-132"></a></var><br>
<blockquote>
<p>Move to the screen line
<code>count - 1</code>lines below the top of the screen.
<pre class="sp">
</pre>
The
<strong>H</strong>
command is an absolute movement.
The
<strong>H</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the line
<code>count - 1</code>lines below the top of the screen.
<br><dt>Column:<dd>Set to the first nonblank character of the
<em>screen</em>
line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-I-133"></a>
<div class="defun">
— Command: [count] <b>I</b><var><a name="index-I-134"></a></var><br>
<blockquote>
<p>Enter input mode, inserting the text at the beginning of the line.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-J-135"></a>
<div class="defun">
— Command: [count] <b>J</b><var><a name="index-J-136"></a></var><br>
<blockquote>
<p>Join lines.
If
<code>count</code>is specified,
<code>count</code>lines are joined; a minimum of two lines are always joined,
regardless of the value of
<code>count</code>.
<pre class="sp">
</pre>
If the current line ends with a whitespace character, all whitespace
is stripped from the next line.
Otherwise, if the next line starts with a open parenthesis
“<code>(</code>”
do nothing.
Otherwise, if the current line ends with a question mark
“<code>?</code>”,
period
“<code>.</code>”
or exclamation point
“<code>!</code>”,
insert two spaces.
Otherwise, insert a single space.
<pre class="sp">
</pre>
It is not an error to join lines past the end of the file,
i.e. lines that do not exist.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the character after the last character of the next-to-last
joined line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-L-137"></a>
<div class="defun">
— Command: [count] <b>L</b><var><a name="index-L-138"></a></var><br>
<blockquote>
<p>Move to the screen line
<code>count - 1</code>lines above the bottom of the screen.
<pre class="sp">
</pre>
The
<strong>L</strong>
command is an absolute movement.
The
<strong>L</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<dl>
<dt>Line:<dd>Set to the line
<code>count - 1</code>lines above the bottom of the screen.
<br><dt>Column:<dd>Set to the first nonblank character of the
<em>screen</em>
line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-M-139"></a>
<div class="defun">
— Command: <b>M</b><var><a name="index-M-140"></a></var><br>
<blockquote>
<p>Move to the screen line in the middle of the screen.
<pre class="sp">
</pre>
The
<strong>M</strong>
command is an absolute movement.
The
<strong>M</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<pre class="sp">
</pre>
Historically, any
<code>count</code>specified to the
<strong>M</strong>
command was ignored.
<dl>
<dt>Line:<dd>Set to the line in the middle of the screen.
<br><dt>Column:<dd>Set to the first nonblank character of the
<em>screen</em>
line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-O-141"></a>
<div class="defun">
— Command: [count] <b>O</b><var><a name="index-O-142"></a></var><br>
<blockquote>
<p>Enter input mode, appending text in a new line above the current line.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<pre class="sp">
</pre>
Historically, any
<code>count</code>specified to the
<strong>O</strong>
command was ignored.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-P-143"></a>
<div class="defun">
— Command: [buffer] <b>P</b><var><a name="index-P-144"></a></var><br>
<blockquote>
<p>Insert text from a buffer.
Text from the buffer (the unnamed buffer by default) is inserted
before the current column or, if the buffer is line oriented,
before the current line.
<dl>
<dt>Line:<dd>Set to the lowest numbered line insert,
if the buffer is line oriented, otherwise unchanged.
<br><dt>Column:<dd>Set to the first nonblank character of the appended text,
if the buffer is line oriented, otherwise, the last character
of the appended text.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-Q-145"></a>
<div class="defun">
— Command: <b>Q</b><var><a name="index-Q-146"></a></var><br>
<blockquote>
<p>Exit
<strong>vi</strong>
(or visual) mode and switch to
<strong>ex</strong>
mode.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>No longer relevant.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-R-147"></a>
<div class="defun">
— Command: [count] <b>R</b><var><a name="index-R-148"></a></var><br>
<blockquote>
<p>Enter input mode, replacing the characters in the current line.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<pre class="sp">
</pre>
If the end of the current line is reached, no more characters are
replaced and any further characters input are appended to the line.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-S-149"></a>
<div class="defun">
— Command: [buffer] [count] <b>S</b><var><a name="index-S-150"></a></var><br>
<blockquote>
<p>Substitute
<code>count</code>lines.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-T-151"></a>
<div class="defun">
— Command: [count] <b>T</b><var> <character><a name="index-T-152"></a></var><br>
<blockquote>
<p>Search backward,
<code>count</code>times,
through the current line for the character
<em>after</em>
the specified
<code><character></code>.
<pre class="sp">
</pre>
The
<strong>T</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the character
<em>after</em>
the searched-for character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-U-153"></a>
<div class="defun">
— Command: <b>U</b><var><a name="index-U-154"></a></var><br>
<blockquote>
<p>Restore the current line to its state before the cursor last
moved to it.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>The first character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-W-155"></a>
<div class="defun">
— Command: [count] <b>W</b><var><a name="index-W-156"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>bigwords.
Move the cursor forward to the beginning of a bigword by repeating the
following algorithm: if the current position is within a bigword or the
character at that position cannot be part of a bigword, move to the first
character of the next bigword.
If no subsequent bigword exists on the current line,
move to the first character of the first bigword on the first following
line that contains a bigword.
<pre class="sp">
</pre>
The
<strong>W</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>The line containing the word selected.
<br><dt>Column:<dd>The first character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-X-157"></a>
<div class="defun">
— Command: [buffer] [count] <b>X</b><var><a name="index-X-158"></a></var><br>
<blockquote>
<p>Delete
<code>count</code>characters before the cursor.
If the number of characters to be deleted is greater than or equal to
the number of characters to the beginning of the line, all of the
characters before the current cursor position, to the beginning of the
line, are deleted.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the current character minus
<code>count</code>,
or the first character if count is greater than the number of
characters in the line before the cursor.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-Y-159"></a>
<div class="defun">
— Command: [buffer] [count] <b>Y</b><var><a name="index-Y-160"></a></var><br>
<blockquote>
<p>Copy (or
“yank”)
<code>count</code>lines into the specified buffer.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-ZZ-161"></a>
<div class="defun">
— Command: <b>ZZ</b><var><a name="index-ZZ-162"></a></var><br>
<blockquote>
<p>Write the file and exit
<strong>vi</strong>.
The file is only written if it has been modified since the last
complete write of the file to any file.
<pre class="sp">
</pre>
The
<strong>ZZ</strong>
command will exit the editor after writing the file,
if there are no further files to edit.
Entering two
“quit”
commands (i.e.
<strong>wq</strong>,
<strong>quit</strong>,
<strong>xit</strong>
or
<strong>ZZ</strong>)
in a row will override this check and the editor will exit,
ignoring any files that have not yet been edited.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_005b_005b-163"></a>
<div class="defun">
— Command: [count] <b>[[</b><var><a name="index-g_t_005b_005b-164"></a></var><br>
<blockquote>
<p>Back up
<code>count</code>section boundaries.
<pre class="sp">
</pre>
The
<strong>[[</strong>
command is an absolute movement.
The
<strong>[[</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting position is column 0,
in which case it is line oriented.
<pre class="sp">
</pre>
It is an error if the movement is past the beginning of the file.
<dl>
<dt>Line:<dd>Set to the previous line that is
<code>count</code>section boundaries back,
or the first line of the file if no more section boundaries exist
preceding the current line.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>sections</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_005d_005d-165"></a>
<div class="defun">
— Command: [count] <b>]]</b><var><a name="index-g_t_005d_005d-166"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>section boundaries.
<pre class="sp">
</pre>
The
<strong>]]</strong>
command is an absolute movement.
The
<strong>]]</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting position is column 0,
in which case it is line oriented.
<pre class="sp">
</pre>
It is an error if the movement is past the end of the file.
<dl>
<dt>Line:<dd>Set to the line that is
<code>count</code>section boundaries forward,
or to the last line of the file if no more section
boundaries exist following the current line.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>sections</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_005e-167"></a>
<div class="defun">
— Command: <b>^</b><var><a name="index-g_t_005e-168"></a></var><br>
<blockquote>
<p>Move to first nonblank character on the current line.
<pre class="sp">
</pre>
The
<strong>^</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the first nonblank character of the current line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_005f-169"></a>
<div class="defun">
— Command: [count] <b>_</b><var><a name="index-g_t_005f-170"></a></var><br>
<blockquote>
<p>Move down
<code>count - 1</code>lines, to the first nonblank character.
The
<strong>_</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
line oriented.
<pre class="sp">
</pre>
It is not an error to execute the
<strong>_</strong>
command when the cursor is on the first character in the line.
<dl>
<dt>Line:<dd>The current line plus
<code>count - 1</code>.
<br><dt>Column:<dd>The first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-a-171"></a>
<div class="defun">
— Command: [count] <b>a</b><var><a name="index-a-172"></a></var><br>
<blockquote>
<p>Enter input mode, appending the text after the cursor.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-b-173"></a>
<div class="defun">
— Command: [count] <b>b</b><var><a name="index-b-174"></a></var><br>
<blockquote>
<p>Move backward
<code>count</code>words.
Move the cursor backward to the beginning of a word by repeating the
following algorithm: if the current position is at the beginning of a word,
move to the first character of the preceding word.
Otherwise, the current position moves to the first character of the word
at the current position.
If no preceding word exists on the current line, move to the first
character of the last word on the first preceding line that contains
a word.
<pre class="sp">
</pre>
The
<strong>b</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line containing the word selected.
<br><dt>Column:<dd>Set to the first character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-c-175"></a>
<div class="defun">
— Command: [buffer] [count] <b>c</b><var> motion<a name="index-c-176"></a></var><br>
<blockquote>
<p>Change the region of text specified by the
<code>count</code>and
<code>motion</code>.
If only part of a single line is affected, then the last character
being changed is marked with a
“<code>$</code>”.
Otherwise, the region of text is deleted, and input mode is entered.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-d-177"></a>
<div class="defun">
— Command: [buffer] [count] <b>d</b><var> motion<a name="index-d-178"></a></var><br>
<blockquote>
<p>Delete the region of text specified by the
<code>count</code>and
<code>motion</code>.
<dl>
<dt>Line:<dd>Set to the line where the region starts.
<br><dt>Column:<dd>Set to the first character in the line after the last character in the
region.
If no such character exists, set to the last character before the region.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-e-179"></a>
<div class="defun">
— Command: [count] <b>e</b><var><a name="index-e-180"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>end-of-words.
Move the cursor forward to the end of a word by repeating the following
algorithm: if the current position is the end of a word,
move to the last character of the following word.
Otherwise, move to the last character of the word at the current position.
If no succeeding word exists on the current line, move to the last character
of the first word on the next following line that contains a word.
<pre class="sp">
</pre>
The
<strong>e</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line containing the word selected.
<br><dt>Column:<dd>Set to the last character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-f-181"></a>
<div class="defun">
— Command: [count] <b>f</b><var> <character><a name="index-f-182"></a></var><br>
<blockquote>
<p>Search forward,
<code>count</code>times, through the rest of the current line for
<code><character></code>.
<pre class="sp">
</pre>
The
<strong>f</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the searched-for character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-i-183"></a>
<div class="defun">
— Command: [count] <b>i</b><var><a name="index-i-184"></a></var><br>
<blockquote>
<p>Enter input mode, inserting the text before the cursor.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-m-185"></a>
<div class="defun">
— Command: <b>m</b><var> <character><a name="index-m-186"></a></var><br>
<blockquote>
<p>Save the current context (line and column) as
<code><character></code>.
The exact position is referred to by
“<code>`<character></code>”.
The line is referred to by
“<code>'<character></code>”.
<pre class="sp">
</pre>
Historically,
<code><character></code>was restricted to lower-case letters.
<strong>Nvi</strong>
permits the use of any character.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-o-187"></a>
<div class="defun">
— Command: [count] <b>o</b><var><a name="index-o-188"></a></var><br>
<blockquote>
<p>Enter input mode, appending text in a new line under the current line.
If
<code>count</code>is specified, the text input is repeatedly input
<code>count - 1</code>more times.
<pre class="sp">
</pre>
Historically, any
<code>count</code>specified to the
<strong>o</strong>
command was ignored.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-p-189"></a>
<div class="defun">
— Command: [buffer] <b>p</b><var><a name="index-p-190"></a></var><br>
<blockquote>
<p>Append text from a buffer.
Text from the buffer (the unnamed buffer by default) is appended
after the current column or, if the buffer is line oriented,
after the current line.
<dl>
<dt>Line:<dd>Set to the first line appended, if the buffer is line oriented,
otherwise unchanged.
<br><dt>Column:<dd>Set to the first nonblank character of the appended text if the buffer
is line oriented, otherwise, the last character of the appended text.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-r-191"></a>
<div class="defun">
— Command: [count] <b>r</b><var> <character><a name="index-r-192"></a></var><br>
<blockquote>
<p>Replace characters.
The next
<code>count</code>characters in the line are replaced with
<code><character></code>.
Replacing characters with
<code><newline></code>characters results in creating new, empty lines into the file.
<pre class="sp">
</pre>
If
<code><character></code>is
<code><escape></code>,
the command is cancelled.
<dl>
<dt>Line:<dd>Unchanged unless the replacement character is a
<code><newline></code>,
in which case it is set to the current line plus
<code>count - 1</code>.
<br><dt>Column:<dd>Set to the last character replaced,
unless the replacement character is a
<code><newline></code>,
in which case the cursor is in column 1 of the last line inserted.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-s-193"></a>
<div class="defun">
— Command: [buffer] [count] <b>s</b><var><a name="index-s-194"></a></var><br>
<blockquote>
<p>Substitute
<code>count</code>characters in the current line starting with the current character.
<dl>
<dt>Line:<dd>Set to the last line upon which characters were entered.
<br><dt>Column:<dd>Set to the last character entered.
<br><dt>Options:<dd>Affected by the
<code>altwerase</code>,
<code>autoindent</code>,
<code>beautify</code>,
<code>showmatch</code>,
<code>ttywerase</code>
and
<code>wrapmargin</code>
options.
</dl>
</p></blockquote></div>
<a name="index-t-195"></a>
<div class="defun">
— Command: [count] <b>t</b><var> <character><a name="index-t-196"></a></var><br>
<blockquote>
<p>Search forward,
<code>count</code>times, through the current line for the character immediately
<em>before</em>
<code><character></code>.
<pre class="sp">
</pre>
The
<strong>t</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the character
<em>before</em>
the searched-for character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-u-197"></a>
<div class="defun">
— Command: <b>u</b><var><a name="index-u-198"></a></var><br>
<blockquote>
<p>Undo the last change made to the file.
If repeated, the
<strong>u</strong>
command alternates between these two states, and is its own inverse.
When used after an insert that inserted text on more than one line,
the lines are saved in the numeric buffers.
<pre class="sp">
</pre>
The
<strong>.</strong>
command, when used immediately after the
<strong>u</strong>
command, causes the change log to be rolled forward or backward,
depending on the action of the
<strong>u</strong>
command.
<dl>
<dt>Line:<dd>Set to the position of the first line changed, if the reversal affects
only one line or represents an addition or change; otherwise, the line
preceding the deleted text.
<br><dt>Column:<dd>Set to the cursor position before the change was made.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-w-199"></a>
<div class="defun">
— Command: [count] <b>w</b><var><a name="index-w-200"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>words.
Move the cursor forward to the beginning of a word by repeating the
following algorithm: if the current position is at the
beginning of a word, move to the first character of the next word.
If no subsequent word exists on the current line, move to the first
character of the first word on the first following line that contains
a word.
<pre class="sp">
</pre>
The
<strong>w</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
<dl>
<dt>Line:<dd>Set to the line containing the word selected.
<br><dt>Column:<dd>Set to the first character of the word selected.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-x-201"></a>
<div class="defun">
— Command: [buffer] [count] <b>x</b><var><a name="index-x-202"></a></var><br>
<blockquote>
<p>Delete
<code>count</code>characters.
The deletion is at the current character position.
If the number of characters to be deleted is greater than or equal to
the number of characters to the end of the line, all of the characters
from the current cursor position to the end of the line are deleted.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Unchanged unless the last character in the line is deleted and the cursor
is not already on the first character in the line, in which case it is
set to the previous character.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-y-203"></a>
<div class="defun">
— Command: [buffer] [count] <b>y</b><var> motion<a name="index-y-204"></a></var><br>
<blockquote>
<p>Copy (or
“yank”)
the text region specified by the
<code>count</code>and
<code>motion</code>,
into a buffer.
<dl>
<dt>Line:<dd>Unchanged, unless the region covers more than a single line,
in which case it is set to the line where the region starts.
<br><dt>Column:<dd>Unchanged, unless the region covers more than a single line,
in which case it is set to the character were the region starts.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-z-205"></a>
<div class="defun">
— Command: [count1] <b>z</b> [<var><a name="index-z-206"></a></var><br>
<blockquote>
<p>Redraw the screen with a window
<code>count2</code>lines long, with line
<code>count1</code>placed as specified by the
<code>type</code>character.
If
<code>count1</code>is not specified, it defaults to the current line.
If
<code>count2</code>is not specified, it defaults to the current window size.
<pre class="sp">
</pre>
The following
<code>type</code>characters may be used:
<dl>
<dt>+<dd>If
<code>count1</code>is specified, place the line
<code>count1</code>at the top of the screen.
Otherwise, display the screen after the current screen, similarly to the
<strong><control-F></strong>
command.
<br><dt><carriage-return><dd>Place the line
<code>count1</code>at the top of the screen.
<br><dt>.<dd>Place the line
<code>count1</code>in the center of the screen.
<br><dt>-<dd>Place the line
<code>count1</code>at the bottom of the screen.
<br><dt>^<dd>If
<code>count1</code>is specified, place the line that is at the top of the screen
when
<code>count1</code>is at the bottom of the screen, at the bottom of the screen,
i.e. display the screen before the screen before
<code>count1</code>.
Otherwise, display the screen before the current screen, similarly to the
<strong><control-B></strong>
command.
</dl>
<dl>
<dt>Line:<dd>Set to
<code>count1</code>unless
<code>count1</code>is not specified and the
<code>type</code>character was either
“<code>^</code>”
or
“<code>+</code>”,
in which case it is set to the line before the first line on the
previous screen or the line after the last line on the previous
screen, respectively.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0040_007b-207"></a>
<div class="defun">
— Command: [count] <b>{</b><var><a name="index-g_t_0040_007b-208"></a></var><br>
<blockquote>
<p>Move backward
<code>count</code>paragraphs.
<pre class="sp">
</pre>
The
<strong>{</strong>
command is an absolute movement.
The
<strong>{</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting character is the first
character on its line, in which case it is line oriented.
<dl>
<dt>Line:<dd>Set to the line containing the beginning of the previous paragraph.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>paragraph</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_007c-209"></a>
<div class="defun">
— Command: [count] <b>|</b><var><a name="index-g_t_007c-210"></a></var><br>
<blockquote>
<p>Move to a specific
<em>column</em>
position on the current line.
<pre class="sp">
</pre>
The
<strong>|</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented.
It is an error to use the
<strong>|</strong>
command as a motion component and for the cursor not to move.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Column:<dd>Set to the character occupying the column position identified by
<code>count</code>,
if the position exists in the line.
If the column length of the current line is less than
<code>count</code>,
the cursor is moved to the last character in the line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_0040_007d-211"></a>
<div class="defun">
— Command: [count] <b>}</b><var><a name="index-g_t_0040_007d-212"></a></var><br>
<blockquote>
<p>Move forward
<code>count</code>paragraphs.
<pre class="sp">
</pre>
The
<strong>}</strong>
command is an absolute movement.
The
<strong>}</strong>
command may be used as the motion component of other
<strong>vi</strong>
commands, in which case any text copied into a buffer is
character oriented, unless the starting character is at or
before any nonblank characters in its line,
in which case it is line oriented.
<dl>
<dt>Line:<dd>Set to the line containing the beginning of the next paragraph.
<br><dt>Column:<dd>Set to the first nonblank character in the line.
<br><dt>Options:<dd>Affected by the
<code>paragraph</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_007e-213"></a>
<div class="defun">
— Command: [count] <b>~</b><var><a name="index-g_t_007e-214"></a></var><br>
<blockquote>
<p>Reverse the case of the next
<code>count</code>character(s).
This is the historic semantic for the
<strong>~</strong>
command and it is only in effect if the
<code>tildeop</code>
option is not set.
<pre class="sp">
</pre>
Lowercase alphabetic characters are changed to uppercase,
and uppercase characters are changed to lowercase.
No other characters are affected.
<pre class="sp">
</pre>
Historically, the
<strong>~</strong>
command did not take an associated count, nor did it move past the
end of the current line.
As it had no associated motion it was difficult to change the case
of large blocks of text.
In
<strong>nvi</strong>,
if the cursor is on the last character of a line, and there are
more lines in the file, the cursor moves to the next line.
<pre class="sp">
</pre>
It is not an error to specify a count larger than the number of
characters between the cursor and the end of the file.
<dl>
<dt>Line:<dd>Set to the line of the character after
<code>count</code>characters, or, end of file.
<br><dt>Column:<dd>Set to the character after
<code>count</code>characters, or, end-of-file.
<br><dt>Options:<dd>Affected by the
<code>tildeop</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_007e-215"></a>
<div class="defun">
— Command: [count] <b>~</b><var> motion<a name="index-g_t_007e-216"></a></var><br>
<blockquote>
<p>Reverse the case of the characters in a text region specified by the
<code>count</code>and
<code>motion</code>.
Only in effect if the
<code>tildeop</code>
option is set.
<pre class="sp">
</pre>
Lowercase characters are changed to uppercase,
and uppercase characters are changed to lowercase.
No other characters are affected.
<dl>
<dt>Line:<dd>Set to the line of the character after the last character in the region.
<br><dt>Column:<dd>Set to the character after the last character in the region.
<br><dt>Options:<dd>Affected by the
<code>tildeop</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003cinterrupt_003e-217"></a>
<div class="defun">
— Command: <b><interrupt></b><var><a name="index-g_t_003cinterrupt_003e-218"></a></var><br>
<blockquote>
<p>Interrupt the current operation.
Many of the potentially long-running
<strong>vi</strong>
commands may be interrupted using the terminal interrupt character.
These operations include searches, file reading and writing, filter
operations and map character expansion.
Interrupts are also enabled when running commands outside of
<strong>vi</strong>.
<pre class="sp">
</pre>
If the
<code><interrupt></code>character is used to interrupt while entering an
<strong>ex</strong>
command, the command is aborted, the cursor returns to its previous
position, and
<strong>vi</strong>
remains in command mode.
<pre class="sp">
</pre>
Generally, if the
<code><interrupt></code>character is used to interrupt any
operation, any changes made before the interrupt are left in place.
<dl>
<dt>Line:<dd>Dependent on the operation being interrupted.
<br><dt>Column:<dd>Dependent on the operation being interrupted.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<h2 class="chapter"><a name="TOC13"></a>14 Vi Text Input Commands</h2>
<p>The following section describes the commands available in the text
input mode of the
<strong>vi</strong>
editor.
<p>Historically,
<strong>vi</strong>
implementations only permitted the characters inserted on the current
line to be erased.
In addition, only the
<code><control-D></code>erase character and the
“<code>0<control-D></code>”
and
“<code>^<control-D></code>”
erase strings could erase autoindent characters.
(Autoindent characters include both the characters inserted automatically
at the beginning of an input line as well as characters inserted using the
<code><control-T></code>command.)
This implementation permits erasure to continue past the beginning
of the current line, and back to where text input mode was entered.
In addition, autoindent characters may be erased using the standard
erase characters.
For the line and word erase characters, reaching the autoindent
characters forms a
“soft”
boundary, denoting the end of the current word or line erase.
Repeating the word or line erase key will erase the autoindent characters.
<p>Historically,
<strong>vi</strong>
always used
<code><control-H></code>and
<code><control-W></code>as character and word erase characters, respectively, regardless of
the current terminal settings.
This implementation accepts, in addition to these two characters,
the current terminal characters for those operations.
<a name="index-g_t_003cnul_003e-219"></a>
<div class="defun">
— Input: <b><nul></b><var><a name="index-g_t_003cnul_003e-220"></a></var><br>
<blockquote>
<p>If the first character of the input is a
<code><nul></code>,
the previous input is replayed, as if just entered.
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dD_003e-221"></a>
<div class="defun">
— Input: <b><control-D></b><var><a name="index-g_t_003ccontrol_002dD_003e-222"></a></var><br>
<blockquote>
<p>If the previous character on the line was an autoindent character,
erase characters to move the cursor back to the column immediately
after the previous (1-based) column which is a multiple of the
<code>shiftwidth</code>
edit option.
This may result in any number of
<code><tab></code>and
<code><space></code>characters preceding the cursor being changed.
<pre class="sp">
</pre>
Otherwise, if the
<code>autoindent</code>
option is set and the user is entering the first character in the line,
<code><control-D></code>is ignored.
Otherwise, a literal
<code><control-D></code>character is entered.
</p></blockquote></div>
<a name="index-g_t_005e_003ccontrol_002dD_003e-223"></a>
<div class="defun">
— Input: <b>^<control-D></b><var><a name="index-g_t_005e_003ccontrol_002dD_003e-224"></a></var><br>
<blockquote>
<p>If the previous character on the line was an autoindent character,
erase all of the autoindent characters on the line.
In addition, the autoindent level is reset to 0.
</p></blockquote></div>
<a name="index-g_t0_003ccontrol_002dD_003e-225"></a>
<div class="defun">
— Input: <b>0<control-D></b><var><a name="index-g_t0_003ccontrol_002dD_003e-226"></a></var><br>
<blockquote>
<p>If the previous character on the line was an autoindent character,
erase all of the autoindent characters on the line.
The autoindent level is not altered.
</p></blockquote></div>
<a name="index-g_t_003ccontrol_002dT_003e-227"></a>
<div class="defun">
— Input: <b><control-T></b><var><a name="index-g_t_003ccontrol_002dT_003e-228"></a></var><br>
<blockquote>
<p>Insert sufficient
<code><tab></code>and
<code><space></code>characters to move the cursor forward to the column immediately
after the next (1-based) column which is a multiple of the
<code>shiftwidth</code>
edit option.
This may result in any number of
<code><tab></code>and
<code><space></code>characters preceding the cursor being changed.
<pre class="sp">
</pre>
Historically,
<strong>vi</strong>
did not permit the
<code><control-T></code>command to be used unless the cursor was at the first column of a new
line or it was preceded only by autoindent characters.
<strong>Nvi</strong>
permits it to be used at any time during insert mode.
</p></blockquote></div>
<a name="index-g_t_003cerase_003e-229"></a>
<div class="defun">
— Input: <b><erase></b><var><a name="index-g_t_003cerase_003e-230"></a></var><br>
<blockquote>
<p><a name="index-g_t_003ccontrol_002dH_003e-231"></a>
— Input: <b><control-H></b><var><a name="index-g_t_003ccontrol_002dH_003e-232"></a></var><br>
<blockquote><p>Erase the last character.
</p></blockquote></div>
<a name="index-g_t_0022_003cliteral_002dnext_003e_0022-233"></a>
<div class="defun">
— Input: <b><literal-next></b><var><a name="index-g_t_003cliteral_002dnext_003e-234"></a></var><br>
<blockquote>
<p>Quote the next character.
The next character will not be mapped (see the
<strong>map</strong>
command for more information)
or interpreted specially.
A carat
“<code>^</code>”
character will be displayed immediately as a placeholder,
but will be replaced by the next character.
</p></blockquote></div>
<a name="index-g_t_003cescape_003e-235"></a>
<div class="defun">
— Input: <b><escape></b><var><a name="index-g_t_003cescape_003e-236"></a></var><br>
<blockquote>
<p>If on the colon command line, and the
<code>filec</code>
edit option is set, behave as described for that option.
Otherwise, if on the colon command line,
execute the command.
Otherwise, if not on the colon command line,
resolve all text input into the file, and return to command mode.
</p></blockquote></div>
<a name="index-g_t_0022_003cline-erase_003e_0022-237"></a>
<div class="defun">
— Input: <b><line erase></b><var><a name="index-g_t_003cline-erase_003e-238"></a></var><br>
<blockquote>
<p>Erase the current line.
</p></blockquote></div>
<a name="index-g_t_0022_003ccontrol_002dW_003e_0022-239"></a>
<div class="defun">
— Input: <b><control-W></b><var><a name="index-g_t_003ccontrol_002dW_003e-240"></a></var><br>
<blockquote>
<p><a name="index-g_t_0022_003cword-erase_003e_0022-241"></a>
— Input: <b><word erase></b><var><a name="index-g_t_003cword-erase_003e-242"></a></var><br>
<blockquote><p>Erase the last word.
The definition of word is dependent on the
<code>altwerase</code>
and
<code>ttywerase</code>
options.
</p></blockquote></div>
<a name="index-g_t_0022_003ccontrol_002dX_003e_0022-243"></a>
<div class="defun">
— Input: <b><control-X>[0-9A-Fa-f]+</b><var><a name="index-g_t_003ccontrol_002dX_003e_005b0_002d9A_002dFa_002df_005d_002b-244"></a></var><br>
<blockquote>
<p>Insert a character with the specified hexadecimal value into the text.
The value is delimited by any non-hexadecimal character or the input
of the maximum number of characters that can be translated into a single
character value.
</p></blockquote></div>
<a name="index-g_t_003cinterrupt_003e-245"></a>
<div class="defun">
— Input: <b><interrupt></b><var><a name="index-g_t_003cinterrupt_003e-246"></a></var><br>
<blockquote>
<p>Interrupt text input mode, returning to command mode.
If the
<code><interrupt></code>character is used to interrupt inserting text into the file,
it is as if the
<code><escape></code>character was used; all text input up to the interruption is
resolved into the file.
</p></blockquote></div>
<!-- .oh 'Vi/Ex Reference''USD:13-%' -->
<!-- .eh 'USD:13-%''Vi/Ex Reference' -->
<h2 class="chapter"><a name="TOC14"></a>15 Ex Addressing</h2>
<p>Addressing in
<strong>ex</strong>
(and when
<strong>ex</strong>
commands are executed from
<strong>vi</strong> )
relates to the current line.
In general, the current line is the last line affected by a command.
The exact effect on the current line is discussed under the description
of each command.
When the file contains no lines, the current line is zero.
<p>Addresses are constructed by one or more of the following methods:
<ol type=1 start=1>
<li>The address
“<code>.</code>”
refers to the current line.
<li>The address
“<code>$</code>”
refers to the last line of the file.
<li>The address
“<code>N</code>”,
where
<code>N</code>is a positive number, refers to the N-th line of the file.
<li>The address
“<code>'<character></code>”
or
“<code>`<character></code>”
refers to the line marked with the name
<code><character></code>.
(See the
<strong>k</strong>
or
<strong>m</strong>
commands for more information on how to mark lines.)
<li>A regular expression (RE) enclosed by slashes
“<code>/</code>”
is an address,
and it refers to the first line found by searching forward from the line
<em>after</em>
the current line toward the end of the file, and stopping at the
first line containing a string matching the RE.
(The trailing slash can be omitted at the end of the command line.)
<pre class="sp">
</pre>
If no RE is specified, i.e. the pattern is
“<code>//</code>”,
the last RE used in any command is used in the search.
<pre class="sp">
</pre>
If the
<code>extended</code>
option is set, the RE is handled as an extended RE, not a basic RE.
If the
<code>wrapscan</code>
option is set, the search wraps around to the beginning of the file
and continues up to and including the current line, so that the entire
file is searched.
<pre class="sp">
</pre>
The form
“<code>e/</code>”
is accepted for historic reasons,
and is identical to
“<code>//</code>”.
<li>An RE enclosed in question marks
“<code>?</code>”
addresses the first line found by searching backward from the line
<em>preceding</em>
the current line, toward the beginning of the file and stopping at the
first line containing a string matching the RE.
(The trailing question mark can be omitted at the end of a command line.)
<pre class="sp">
</pre>
If no RE is specified, i.e. the pattern is
“<code>??</code>”,
the last RE used in any command is used in the search.
<pre class="sp">
</pre>
If the
<code>extended</code>
option is set, the RE is handled as an extended RE, not a basic RE.
If the
<code>wrapscan</code>
option is set, the search wraps around from the beginning of the file to
the end of the file and continues up to and including the current line,
so that the entire file is searched.
<pre class="sp">
</pre>
The form
“<code>e?</code>”
is accepted for historic reasons, and is identical to
“<code>??</code>”.
<li>An address followed by a plus sign
“<code>+</code>”
or a minus sign
“<code>-</code>”
followed by a number is an offset address and refers to the address
plus (or minus) the indicated number of lines.
If the address is omitted, the addition or subtraction is done with
respect to the current line.
<li>An address of
“<code>+</code>”
or
“<code>-</code>”
followed by a number is an offset from the current line.
For example,
“<code>-5</code>”
is the same as
“<code>.-5</code>”.
<li>An address ending with
“<code>+</code>”
or
“<code>-</code>”
has 1 added to or subtracted from the address, respectively.
As a consequence of this rule and of the previous rule, the address
“<code>-</code>”
refers to the line preceding the current line.
Moreover, trailing
“<code>+</code>”
and
“<code>-</code>”
characters have a cumulative effect.
For example,
“<code>++-++</code>”
refers to the current line plus 3.
<li>A percent sign
“<code>%</code>”
is equivalent to the address range
“<code>1,$</code>”.
</ol>
<p><strong>Ex</strong>
commands require zero, one, or two addresses.
It is an error to specify an address to a command which requires zero
addresses.
<p>If the user provides more than the expected number of addresses to any
<strong>ex</strong>
command, the first addresses specified are discarded.
For example,
“<code>1,2,3,5</code>”print
prints lines 3 through 5, because the
<strong>print</strong>
command only takes two addresses.
<p>The addresses in a range are separated from each other by a comma
“<code>,</code>”
or a semicolon
“<code>;</code>”.
In the latter case, the current line
“<code>.</code>”
is set to the first address, and only then is the second address calculated.
This feature can be used to determine the starting line for forward and
backward searches (see rules (5) and (6) above).
The second address of any two-address sequence corresponds to a line that
follows, in the file, the line corresponding to the first address.
The first address must be less than or equal to the second address.
The first address must be greater than or equal to the first line of the
file, and the last address must be less than or equal to the last line
of the file.
<!-- .oh 'Vi/Ex Reference (Ex Commands)''USD:13-%' -->
<!-- .eh 'USD:13-%''Vi/Ex Reference (Ex Commands)' -->
<!-- Copyright (c) 1994 -->
<!-- The Regents of the University of California. All rights reserved. -->
<!-- Copyright (c) 1994, 1995, 1996 -->
<!-- Keith Bostic. All rights reserved. -->
<!-- See the LICENSE file for redistribution information. -->
<!-- $Id: ex.cmd.texi,v 8.2 2001/08/20 16:05:50 skimo Exp $ (Berkeley) $Date: 2001/08/20 16:05:50 $ -->
<h2 class="chapter"><a name="TOC15"></a>16 Ex Description</h2>
<p>The following words have special meanings for
<strong>ex</strong>
commands.
<a name="index-g_t_0022_003cend_002dof_002dfile_003e_0022-247"></a>
<ul><li><strong><end-of-file></strong>
<!-- @deffn {Command} {<end-of-file>} -->
<!-- @end deffn -->
<p>The end-of-file character is used to scroll the screen in the
<strong>ex</strong>
editor.
This character is normally
<code><control-D></code>.
However, whatever character is set for the current terminal is supported
as well as
<code><control-D></code>.
<a name="index-g_t_0022line_0022-248"></a><li><strong>line</strong>
<!-- @deffn {Command} {line} -->
<!-- @end deffn -->
<p>A single-line address, given in any of the forms described in the
section entitled
“<strong>Ex Addressing</strong>” .
The default for
<code>line</code>is the current line.
<a name="index-g_t_0022range_0022-249"></a><li><strong>range</strong>
<!-- @deffn {Command} {range} -->
<!-- @end deffn -->
<p>A line, or a pair of line addresses, separated by a comma or semicolon.
(See the section entitled
“<strong>Ex Addressing</strong>”
for more information.)
The default for range is the current line
<em>only</em>,
i.e.
“<code>.,.</code>”.
A percent sign
“<code>%</code>”
stands for the range
“<code>1,$</code>”.
The starting address must be less than, or equal to, the ending address.
<a name="index-g_t_0022count_0022-250"></a><li><strong>count</strong>
<!-- @deffn {Command} {count} -->
<!-- @end deffn -->
<p>A positive integer, specifying the number of lines to be affected by
the command; the default is 1.
Generally, a count past the end-of-file may be specified, e.g. the
command
“<code>p 3000</code>”
in a 10 line file is acceptable, and will print from the current line
through the last line in the file.
<a name="index-g_t_0022flags_0022-251"></a><li><strong>flags</strong>
<!-- @deffn {Command} {flags} -->
<!-- @end deffn -->
<p>One or more of the characters
“#”,
“p”,
and
“l”.
When a command that accepts these flags completes, the addressed line(s)
are written out as if by the corresponding
<strong>#</strong>,
<strong>l</strong>
or
<strong>p</strong>
commands.
In addition, any number of
“<code>+</code>”
or
“<code>-</code>”
characters can be specified before, after, or during the flags, in which
case the line written is not necessarily the one affected by the command,
but rather the line addressed by the offset address specified.
The default for
<code>flags</code>is none.
<a name="index-g_t_0022file_0022-252"></a><li><strong>file</strong>
<!-- @deffn {Command} {file} -->
<!-- @end deffn -->
<p>A pattern used to derive a pathname; the default is the current file.
File names are subjected to normal
<samp><span class="command">sh</span></samp>(1)
word expansions.
</ul>
<p>Anywhere a file name is specified, it is also possible to use
the special string
“<code>/tmp</code>”.
This will be replaced with a temporary file name which can be used
for temporary work, e.g.
“<code>:e /tmp</code>”
creates and edits a new file.
<p>If both a count and a range are specified for commands that use either,
the starting line for the command is the
<em>last</em>
line addressed by the range, and
<code>count</code>- 1
subsequent lines are affected by the command, e.g. the command
“<code>2,3p4</code>”
prints out lines 3, 4, 5 and 6.
<p>When only a line or range is specified, with no command, the implied
command is either a
<strong>list</strong>,
<strong>number</strong>
or
<strong>print</strong>
command.
The command used is the most recent of the three commands to have been
used (including any use as a flag).
If none of these commands have been used before, the
<strong>print</strong>
command is the implied command.
When no range or count is specified and the command line is a blank line,
the current line is incremented by 1 and then the current line is displayed.
<p>Zero or more whitespace characters may precede or follow the addresses,
count, flags, or command name.
Any object following a command name (such as buffer, file, etc.),
that begins with an alphabetic character,
should be separated from the command name by at least one whitespace
character.
<p>Any character, including
<code><carriage-return></code>,
“<code>%</code>”
and
“<code>#</code>”
retain their literal value when preceded by a backslash.
<h2 class="chapter"><a name="TOC16"></a>17 Ex Commands</h2>
<p>The following section describes the commands available in the
<strong>ex</strong>
editor.
In each entry below, the tag line is a usage synopsis for the command.
<p>Each command can be entered as the abbreviation
(those characters in the synopsis command word preceding the
“[”
character),
the full command (all characters shown for the command word,
omitting the
“[”
and
“]”
characters),
or any leading subset of the full command down to the abbreviation.
For example, the args command (shown as
“<code>ar[gs]</code>”
in the synopsis)
can be entered as
“<code>ar</code>”,
“<code>arg</code>”
or
“<code>args</code>”.
<p>Each
<strong>ex</strong>
command described below notes the new current line after it
is executed, as well as any options that affect the command.
<a name="index-DOUBLEQUOTE-253"></a>
<div class="defun">
— Command: <b>"</b><var><a name="index-g_t_0022-254"></a></var><br>
<blockquote>
<p>A comment.
Command lines beginning with the double-quote character
“<code>"</code>”
are ignored.
This permits comments in editor scripts and startup files.
</p></blockquote></div>
<a name="index-g_t_0022_003ccontrol_002dD_003e_0022-255"></a><a name="index-g_t_0022_003cend_002dof_002dfile_003e_0022-256"></a>
<div class="defun">
— Command: <b><control-D></b><var><a name="index-g_t_003ccontrol_002dD_003e-257"></a></var><br>
— Command: <b><end-of-file></b><var><a name="index-g_t_003cend_002dof_002dfile_003e-258"></a></var><br>
<blockquote>
<p>Scroll the screen.
Write the next N lines, where N is the value of the
<code>scroll</code>
option.
The command is the end-of-file terminal character, which may be
different on different terminals.
Traditionally, it is the
<code><control-D></code>key.
<pre class="sp">
</pre>
Historically, the
<strong>eof</strong>
command ignored any preceding count, and the
<code><end-of-file></code>character was ignored unless it was entered as the first character
of the command.
This implementation treats it as a command
<em>only</em>
if entered as the first character of the command line, and otherwise
treats it as any other character.
<dl>
<dt>Line:<dd>Set to the last line written.
<br><dt>Options:<dd>Affected by the
<code>scroll</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_0022_0021_0022-259"></a>
<div class="defun">
— Command: <b>!</b><var> argument(s)<a name="index-g_t_0021-260"></a></var><br>
— Command: <b>[range]!</b><var> argument(s)<a name="index-g_t_005brange_005d_0021-261"></a></var><br>
<blockquote><p>Execute a shell command, or filter lines through a shell command.
In the first synopsis, the remainder of the line after the
“<code>!</code>”
character is passed to the program named by the
<code>shell</code>
option, as a single argument.
<pre class="sp">
</pre>
Within the rest of the line,
“<code>%</code>”
and
“<code>#</code>”
are expanded into the current and alternate pathnames, respectively.
The character
“<code>!</code>”
is expanded with the command text of the previous
<strong>!</strong>
command.
(Therefore, the command
<strong>!!</strong>
repeats the previous
<strong>!</strong>
command.)
The special meanings of
“<code>%</code>”,
“<code>#</code>”,
and
“<code>!</code>”
can be overridden by escaping them with a backslash.
If no
<strong>!</strong>
or
<strong>:!</strong>
command has yet been executed, it is an error to use an unescaped
“<code>!</code>”
character.
The
<strong>!</strong>
command does
<em>not</em>
do shell expansion on the strings provided as arguments.
If any of the above expansions change the command the user entered,
the command is redisplayed at the bottom of the screen.
<pre class="sp">
</pre>
<strong>Ex</strong>
then executes the program named by the
<code>shell</code>
option, with a
<strong>-c</strong>
flag followed by the arguments (which are bundled into a single argument).
<pre class="sp">
</pre>
The
<strong>!</strong>
command is permitted in an empty file.
<pre class="sp">
</pre>
If the file has been modified since it was last completely written,
the
<strong>!</strong>
command will warn you.
<pre class="sp">
</pre>
A single
“<code>!</code>”
character is displayed when the command completes.
<pre class="sp">
</pre>
In the second form of the
<strong>!</strong>
command, the remainder of the line after the
“<code>!</code>”
is passed to the program named by the
<code>shell</code>
option, as described above.
The specified lines are passed to the program as standard input,
and the standard and standard error output of the program replace
the original lines.
<dl>
<dt>Line:<dd>Unchanged if no range was specified, otherwise set to the first
line of the range.
<br><dt>Options:<dd>Affected by the
<code>shell</code>
and
<code>warn</code>
options.
</dl>
</p></blockquote></div>
<a name="index-g_t_0022_0023_0022-262"></a>
<div class="defun">
— Command: [range] <b>#</b> [<var><a name="index-g_t_0023-263"></a></var><br>
<blockquote>
<p><a name="index-g_t_0022number_0022-264"></a>
— Command: [range] <b>nu[mber]</b> [<var><a name="index-nu_005bmber_005d-265"></a></var><br>
<blockquote><p>Display the selected lines, each preceded with its line number.
<pre class="sp">
</pre>
The line number format is
“%6d”,
followed by two spaces.
<dl>
<dt>Line:<dd>Set to the last line displayed.
<br><dt>Options:<dd>Affected by the
<code>list</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_0022_0040_0040_0022-266"></a>
<div class="defun">
— Command: @ <b>buffer</b><var><a name="index-buffer-267"></a></var><br>
<blockquote>
<p><a name="index-g_t_0022_002a_0022-268"></a>
— Command: <b>*</b><var> buffer<a name="index-g_t_002a-269"></a></var><br>
<blockquote><p>Execute a buffer.
Each line in the named buffer is executed as an
<strong>ex</strong>
command.
If no buffer is specified, or if the specified buffer is
“<code>@</code>”
or
“<code>*</code>”,
the last buffer executed is used.
</p></blockquote></div>
<a name="index-g_t_003c-270"></a>
<div class="defun">
— Command: [range] <b><[< ...]</b> [<var><a name="index-g_t_003c_005b_003c-_002e_002e_002e_005d-271"></a></var><br>
<blockquote>
<p>Shift lines left or right.
The specified lines are shifted to the left (for the
<strong><</strong>
command) or right (for the
<strong>></strong>
command), by the number of columns specified by the
<code>shiftwidth</code>
option.
Only leading whitespace characters are deleted when shifting left;
once the first column of the line contains a nonblank character,
the
<strong>shift</strong>
command will succeed, but the line will not be modified.
<pre class="sp">
</pre>
If the command character
<strong><</strong>
or
<strong>></strong>
is repeated more than once, the command is repeated once for each
additional command character.
<dl>
<dt>Line:<dd>If the current line is set to one of the lines that are affected
by the command, it is unchanged.
Otherwise, it is set to the first nonblank character of the lowest
numbered line shifted.
<br><dt>Options:<dd>Affected by the
<code>shiftwidth</code>
option.
</dl>
</p></blockquote></div>
<a name="index-g_t_003d-272"></a>
<div class="defun">
— Command: [line] <b>=</b> [<var><a name="index-g_t_003d-273"></a></var><br>
<blockquote>
<p>Display the line number of
<code>line</code>(which defaults to the last line in the file).
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-g_t_003e-274"></a>
<div class="defun">
— Command: [range] <b>>[> ...]</b> [<var><a name="index-g_t_003e_005b_003e-_002e_002e_002e_005d-275"></a></var><br>
<blockquote>
<p>Shift right.
The specified lines are shifted to the right by the number of columns
specified by the
<code>shiftwidth</code>
option, by inserting tab and space characters.
Empty lines are not changed.
<pre class="sp">
</pre>
If the command character
“<code>></code>”
is repeated more than once, the command is repeated once for each
additional command character.
<dl>
<dt>Line:<dd>Set to the last line modified by the command.
<br><dt>Options:<dd>Affected by the
<code>shiftwidth</code>
option.
</dl>
</p></blockquote></div>
<a name="index-abbrev-276"></a>
<div class="defun">
— Command: <b>ab[brev]</b><var> lhs rhs<a name="index-ab_005bbrev_005d-277"></a></var><br>
<blockquote>
<p>Add an abbreviation to the current abbreviation list.
When inserting text in
<strong>vi</strong>,
each time a non-word character is entered after a word character,
a set of characters ending at the word character are checked for
a match with
<code>lhs</code>.
If a match is found, they are replaced with
<code>rhs</code>.
The set of characters that are checked for a match are defined as follows,
for inexplicable historical reasons.
If only one or two characters were entered before the non-word character
that triggered the check,
and after the beginning of the insertion,
or the beginning of the line or the file,
or the last
<code><blank></code>character that was entered,
then the one or the both characters are checked for a match.
Otherwise, the set includes both characters,
as well as the characters that precede them that are the same word
class (i.e. word or non-word) as the
<strong>second</strong>
to last character entered before the non-word character that triggered
the check,
back to the first
<code><blank></code>character,
the beginning of the insertion,
or the beginning of the line or the file.
<pre class="sp">
</pre>
For example, the abbreviations:
<pre class="sp">
</pre>
<p><table summary=""><tr align="left"><td valign="top">:abbreviate </td><td valign="top">abc </td><td valign="top">ABC
<br></td></tr><tr align="left"><td valign="top">:abbreviate </td><td valign="top">#i </td><td valign="top">#include
<br></td></tr><tr align="left"><td valign="top">:abbreviate </td><td valign="top">/*#i </td><td valign="top">/*#include
<br></td></tr></table>
will all work, while the abbreviations:
<pre class="sp">
</pre>
<p><table summary=""><tr align="left"><td valign="top">:abbreviate </td><td valign="top">a#i </td><td valign="top">A#include
<br></td></tr><tr align="left"><td valign="top">:abbreviate </td><td valign="top">/* </td><td valign="top">/********************
<br></td></tr></table>
will not work, and are not permitted by
<strong>nvi</strong>.
<pre class="sp">
</pre>
To keep the abbreviation expansion from happening,
the character immediately following the
<code>lhs</code>characters should be quoted with a
<code><literal-next></code>character.
<pre class="sp">
</pre>
The replacement
<code>rhs</code>is itself subject to both further abbreviation expansion and further
map expansion.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-append-278"></a>
<div class="defun">
— Command: [line] <b>a[ppend][!]</b><var><a name="index-a_005bppend_005d_005b_0021_005d-279"></a></var><br>
<blockquote>
<p>The input text is appended to the specified line.
If line 0 is specified, the text is inserted at the beginning of the file.
Set to the last line input.
If no lines are input, then set to
<code>line</code>,
or to the first line of the file if a
<code>line</code>of 0 was specified.
Following the command name with a
“<code>!</code>”
character causes the
<code>autoindent</code>
option to be toggled for the duration of the command.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>autoindent</code>
and
<code>number</code>
options.
</dl>
</p></blockquote></div>
<a name="index-args-280"></a>
<div class="defun">
— Command: <b>ar[gs]</b><var><a name="index-ar_005bgs_005d-281"></a></var><br>
<blockquote>
<p>Display the argument list.
The current argument is displayed inside of
“<code>[</code>”
and
“<code>]</code>”
characters.
The argument list is the list of operands specified on startup,
which can be replaced using the
<strong>next</strong>
command.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-bg-282"></a>
<div class="defun">
— Command: <b>bg</b><var><a name="index-bg-283"></a></var><br>
<blockquote>
<p><strong>Vi</strong>
mode only.
Background the current screen.
The screen is unchanged,
but is no longer accessible and disappears from the display.
Use the
<strong>fg</strong>
command to bring the screen back to the display foreground.
<dl>
<dt>Line:<dd>Set to the current line when the screen was last edited.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-change-284"></a>
<div class="defun">
— Command: [range] <b>c[hange][!]</b> [<var><a name="index-c_005bhange_005d_005b_0021_005d-285"></a></var><br>
<blockquote>
<p>Replace the lines with input text.
Following the command name with a
“<code>!</code>”
character causes the
<code>autoindent</code>
option to be toggled for the duration of the command.
<dl>
<dt>Line:<dd>Set to the last line input, or, if no lines were input,
set to the line before the target line, or to the first
line of the file if there are no lines preceding the target line.
<br><dt>Options:<dd>Affected by the
<code>autoindent</code>
and
<code>number</code>
options.
</dl>
<a name="index-cd-286"></a></p></blockquote></div>
<a name="index-chdir-287"></a>
<div class="defun">
— Command: <b>chd[ir][!]</b> [<var><a name="index-chd_005bir_005d_005b_0021_005d-288"></a></var><br>
— Command: <b>cd[!]</b> [<var><a name="index-cd_005b_0021_005d-289"></a></var><br>
<blockquote><p>Change the current working directory.
The
<code>directory</code>argument is subjected to
<samp><span class="command">sh</span></samp>(1)
word expansions.
When invoked with no directory argument and the
<code>HOME</code>environment variable is set, the directory named by the
<code>HOME</code>environment variable becomes the new current directory.
Otherwise, the new current directory becomes the directory returned
by the
<samp><span class="command">getpwent</span></samp>(3)
routine.
<pre class="sp">
</pre>
The
<strong>chdir</strong>
command will fail if the file has been modified since the last complete
write of the file.
You can override this check by appending a
“<code>!</code>”
character to the command.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>cdpath</code>
option.
</dl>
<a name="index-copy-290"></a></p></blockquote></div>
<a name="index-t-291"></a>
<div class="defun">
— Command: [range] <b>co[py]</b><var> line [flags]<a name="index-co_005bpy_005d-292"></a></var><br>
— Command: [range] <b>t</b><var> line [flags]<a name="index-t-293"></a></var><br>
<blockquote><p>Copy the specified lines (range) after the destination line.
Line 0 may be specified to insert the lines at the beginning of
the file.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-cscope-294"></a>
<div class="defun">
— Command: <b>cs[cope]</b><var> command [args]<a name="index-cs_005bcope_005d-295"></a></var><br>
<blockquote>
<p>Execute a
<strong>cscope</strong>
command.
For more information, see the section of the reference manual entitled
“<strong>Tags, Tag Stacks, and Cscope</strong>” .
</p></blockquote></div>
<a name="index-delete-296"></a>
<div class="defun">
— Command: [range] <b>d[elete]</b> [<var><a name="index-d_005belete_005d-297"></a></var><br>
<blockquote>
<p>Delete the lines from the file.
The deleted text is saved in the specified buffer, or, if no buffer
is specified, in the unnamed buffer.
If the command name is followed by a letter that could be interpreted
as either a buffer name or a flag value (because neither a
<code>count</code>or
<code>flags</code>values were given),
<strong>ex</strong>
treats the letter as a
<code>flags</code>value if the letter immediately follows the command name,
without any whitespace separation.
If the letter is preceded by whitespace characters,
it treats it as a buffer name.
<dl>
<dt>Line:<dd>Set to the line following the deleted lines,
or to the last line if the deleted lines were at the end.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-display-298"></a>
<div class="defun">
— Command: <b>di[splay]</b><var> b[uffers] | c[onnections] | s[creens] | t[ags]<a name="index-di_005bsplay_005d-299"></a></var><br>
<blockquote>
<p>Display buffers,
<strong>cscope</strong>
connections, screens or tags.
The
<strong>display</strong>
command takes one of three additional arguments, which are as follows:
<dl>
<dt>b[uffers]<dd>Display all buffers (including named, unnamed, and numeric)
that contain text.
<br><dt>c[onnections]<dd>Display the source directories for all attached
<strong>cscope</strong>
databases.
<br><dt>s[creens]<dd>Display the file names of all background screens.
<br><dt>t[ags]<dd>Display the tags stack.
</dl>
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-edit-300"></a>
<div class="defun">
— Command: <b>e[dit][!]</b> [<var><a name="index-e_005bdit_005d_005b_0021_005d-301"></a></var><br>
— Command: <b>ex[!]</b> [<var><a name="index-ex_005b_0021_005d-302"></a></var><br>
— Command: <b>vs[plit][!]</b> [<var><a name="index-vs_005bplit_005d_005b_0021_005d-303"></a></var><br>
<blockquote><p>Edit a different file.
If the current buffer has been modified since the last complete write,
the command will fail.
You can override this by appending a
“<code>!</code>”
character to the command name.
<pre class="sp">
</pre>
If the
“<code>+cmd</code>”
option is specified, that
<strong>ex</strong>
command will be executed in the new file.
Any
<strong>ex</strong>
command may be used, although the most common use of this feature is
to specify a line number or search pattern to set the initial location
in the new file.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.,
<strong>Edit</strong>
or
<strong>Ex</strong>,
while in
<strong>vi</strong>
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<a name="index-vertical-split-304"></a><a name="index-splitting_002c-vertically-305"></a><strong>vsplit</strong> is similar, but the screen will be split vertically
to produce the new screen, rather than horizontally.
<dl>
<dt>Line:<dd>If you have previously edited the file, the current line will be set
to your last position in the file.
If that position does not exist, or you have not previously edited the
file, the current line will be set to the first line of the file if
you are in
<strong>vi</strong>
mode, and the last line of the file if you are in
<strong>ex</strong>.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-exusage-306"></a>
<div class="defun">
— Command: <b>exu[sage]</b> [<var><a name="index-exu_005bsage_005d-307"></a></var><br>
<blockquote>
<p>Display usage for an
<strong>ex</strong>
command.
If
<code>command</code>is specified, a usage statement for that command is displayed.
Otherwise, usage statements for all
<strong>ex</strong>
commands are displayed.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-file-308"></a>
<div class="defun">
— Command: <b>f[ile]</b> [<var><a name="index-f_005bile_005d-309"></a></var><br>
<blockquote>
<p>Display and optionally change the file name.
If a file name is specified, the current pathname is changed to the
specified name.
The current pathname, the number of lines, and the current position
in the file are displayed.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-fg-310"></a>
<div class="defun">
— Command: <b>fg</b> [<var><a name="index-fg-311"></a></var><br>
<blockquote>
<p><strong>Vi</strong>
mode only.
Foreground the specified screen.
If the argument name doesn't exactly match the name of a file displayed
by a background screen,
it is compared against the last component of each of the file names.
If no background screen is specified,
the first background screen is foregrounded.
<pre class="sp">
</pre>
By default,
foregrounding causes the current screen to be swapped with the backgrounded
screen.
Capitalizing the first letter of the command, i.e.
<strong>Fg</strong>,
will foreground the backgrounded screen in a new screen instead of
swapping it with the current screen.
<dl>
<dt>Line:<dd>Set to the current line when the screen was last edited.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-global-312"></a>
<div class="defun">
— Command: [range] <b>g[lobal]</b><var> /pattern/ [commands]<a name="index-g_005blobal_005d-313"></a></var><br>
<blockquote>
<p><a name="index-v-314"></a>
— Command: [range] <b>v</b><var> /pattern/ [commands]<a name="index-v-315"></a></var><br>
<blockquote><p>Apply commands to lines matching (or not matching) a pattern.
The lines within the given range that match
“<code>g[lobal]</code>”,
or do not match
“<code>v</code>”
the given pattern are selected.
Then, the specified
<strong>ex</strong>
command(s) are executed with the current line
“<code>.</code>”
set to each selected line.
If no range is specified, the entire file is searched for matching,
or not matching, lines.
<pre class="sp">
</pre>
Multiple commands can be specified, one per line, by escaping each
<code><newline></code>character with a backslash, or by separating commands with a
“<code>|</code>”
character.
If no commands are specified, the command defaults to the
<strong>print</strong>
command.
<pre class="sp">
</pre>
For the
<strong>append</strong>,
<strong>change</strong>
and
<strong>insert</strong>
commands, the input text must be part of the global command line.
In this case, the terminating period can be omitted if it ends the commands.
<pre class="sp">
</pre>
The
<strong>visual</strong>
command may also be specified as one of the
<strong>ex</strong>
commands.
In this mode, input is taken from the terminal.
Entering a
<strong>Q</strong>
command in
<strong>vi</strong>
mode causes the next line matching the pattern to be selected and
<strong>vi</strong>
to be reentered, until the list is exhausted.
<pre class="sp">
</pre>
The
<strong>global</strong>,
<strong>v</strong>
and
<strong>undo</strong>
commands cannot be used as part of these commands.
<pre class="sp">
</pre>
The editor options
<code>autoindent</code>,
<code>autoprint</code>
and
<code>report</code>
are turned off for the duration of the
<strong>global</strong>
and
<strong>v</strong>
commands.
<dl>
<dt>Line:<dd>The last line modified.
<br><dt>Options:<dd>Affected by the
<code>ignorecase</code>
and
<code>magic</code>
options.
Turns off the
<code>autoindent</code>,
<code>autoprint</code>
and
<code>report</code>
options.
</dl>
</p></blockquote></div>
<a name="index-help-316"></a>
<div class="defun">
— Command: <b>he[lp]</b><var><a name="index-he_005blp_005d-317"></a></var><br>
<blockquote>
<p>Display a help message.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-insert-318"></a>
<div class="defun">
— Command: [line] <b>i[nsert][!]</b><var><a name="index-i_005bnsert_005d_005b_0021_005d-319"></a></var><br>
<blockquote>
<p>The input text is inserted before the specified line.
Following the command name with a
“<code>!</code>”
character causes the
<code>autoindent</code>
option setting to be toggled for the duration of this command.
<dl>
<dt>Line:<dd>Set to the last line input; if no lines were input,
set to the line before the target line, or to the first line
of the file if there are no lines preceding the target line.
Affected by the
<code>autoindent</code>
and
<code>number</code>
options.
</dl>
</p></blockquote></div>
<a name="index-join-320"></a>
<div class="defun">
— Command: [range] <b>j[oin][!]</b> [<var><a name="index-j_005boin_005d_005b_0021_005d-321"></a></var><br>
<blockquote>
<p>Join lines of text together.
<pre class="sp">
</pre>
A
<code>count</code>specified to the
<strong>join</strong>
command specifies that the last line of the
<code>range</code>plus
<code>count</code>subsequent lines will be joined.
(Note, this differs by one from the general rule where only
<code>count</code>- 1
subsequent lines are affected.)
<pre class="sp">
</pre>
If the current line ends with a whitespace character, all whitespace
is stripped from the next line.
Otherwise, if the next line starts with a open parenthesis
“<code>(</code>”,
do nothing.
Otherwise, if the current line ends with a question mark
“<code>?</code>”,
period
“<code>.</code>”
or exclamation point
“<code>!</code>”,
insert two spaces.
Otherwise, insert a single space.
<pre class="sp">
</pre>
Appending a
“<code>!</code>”
character to the command name causes a simpler join with no
white-space processing.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-list-322"></a>
<div class="defun">
— Command: [range] <b>l[ist]</b> [<var><a name="index-l_005bist_005d-323"></a></var><br>
<blockquote>
<p>Display the lines unambiguously.
Tabs are displayed as
“<code>^I</code>”,
and the end of the line is marked with a
“<code>$</code>”
character.
<dl>
<dt>Line:<dd>Set to the last line displayed.
<br><dt>Options:<dd>Affected by the
<code>number</code>
option.
</dl>
</p></blockquote></div>
<a name="index-map-324"></a>
<div class="defun">
— Command: <b>map[!]</b> [<var><a name="index-map_005b_0021_005d-325"></a></var><br>
<blockquote>
<p>Define or display maps (for
<strong>vi</strong>
only).
<pre class="sp">
</pre>
If
“<code>lhs</code>”
and
“<code>rhs</code>”
are not specified, the current set of command mode maps are displayed.
If a
“<code>!</code>”
character is appended to to the command,
the text input mode maps are displayed.
<pre class="sp">
</pre>
Otherwise, when the
“<code>lhs</code>”
character sequence is entered in
<strong>vi</strong>,
the action is as if the corresponding
“<code>rhs</code>”
had been entered.
If a
“<code>!</code>”
character is appended to the command name,
the mapping is effective during text input mode,
otherwise, it is effective during command mode.
This allows
“<code>lhs</code>”
to have two different macro definitions at the same time: one for command
mode and one for input mode.
<pre class="sp">
</pre>
Whitespace characters require escaping with a
<code><literal-next></code>character to be entered in the
<code>lhs</code>string in visual mode.
<pre class="sp">
</pre>
Normally, keys in the
<code>rhs</code>string are remapped (see the
<code>remap</code>
option),
and it is possible to create infinite loops.
However, keys which map to themselves are not further remapped,
regardless of the setting of the
<code>remap</code>
option.
For example, the command
“<code>:map n nz.</code>”
maps the
“<code>n</code>”
key to the
<strong>n</strong>
and
<strong>z</strong>
commands.
<pre class="sp">
</pre>
To exit an infinitely looping map, use the terminal
<code><interrupt></code>character.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>remap</code>
option.
</dl>
<a name="index-mark-326"></a></p></blockquote></div>
<a name="index-k-327"></a>
<div class="defun">
— Command: [line] <b>ma[rk]</b><var> <character><a name="index-ma_005brk_005d-328"></a></var><br>
— Command: [line] <b>k</b><var> <character><a name="index-k-329"></a></var><br>
<blockquote><p>Mark the line with the mark
<code><character></code>.
The expressions
“<code>'<character></code>”
and
“<code>`<character></code>”
can then be used as an address in any command that uses one.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-move-330"></a>
<div class="defun">
— Command: [range] <b>m[ove]</b><var> line<a name="index-m_005bove_005d-331"></a></var><br>
<blockquote>
<p>Move the specified lines after the target line.
A target line of 0 places the lines at the beginning of the file.
<dl>
<dt>Line:<dd>Set to the first of the moved lines.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-mkexrc-332"></a>
<div class="defun">
— Command: <b>mk[exrc][!]</b><var> file<a name="index-mk_005bexrc_005d_005b_0021_005d-333"></a></var><br>
<blockquote>
<p>Write the abbreviations, editor options and maps to the specified
file.
Information is written in a form which can later be read back in
using the
<strong>ex</strong>
<strong>source</strong>
command.
If
<code>file</code>already exists, the
<strong>mkexrc</strong>
command will fail.
This check can be overridden by appending a
“<code>!</code>”
character to the command.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-next-334"></a>
<div class="defun">
— Command: <b>n[ext][!]</b> [<var><a name="index-n_005bext_005d_005b_0021_005d-335"></a></var><br>
<blockquote>
<p>Edit the next file from the argument list.
The
<strong>next</strong>
command will fail if the file has been modified since the last complete
write.
This check can be overridden by appending the
“<code>!</code>”
character to the command name.
The argument list can optionally be replaced by specifying a new one
as arguments to this command.
In this case, editing starts with the first file on the new list.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Next</strong>,
while in
<strong>vi</strong>
mode, will set the argument list and edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<dl>
<dt>Line:<dd>Set as described for the
<strong>edit</strong>
command.
<br><dt>Options:<dd>Affected by the options
<code>autowrite</code>
and
<code>writeany</code>.
</dl>
</p></blockquote></div>
<a name="index-open-336"></a>
<div class="defun">
— Command: [line] <b>o[pen]</b><var> /pattern/ [flags]<a name="index-o_005bpen_005d-337"></a></var><br>
<blockquote>
<p>Enter open mode.
Open mode is the same as being in
<strong>vi</strong>,
but with a one-line window.
All the standard
<strong>vi</strong>
commands are available.
If a match is found for the optional RE argument,
the cursor is set to the start of the matching pattern.
<pre class="sp">
</pre>
<em>This command is not yet implemented.</em>
<dl>
<dt>Line:<dd>Unchanged, unless the optional RE is specified, in which case it is
set to the line where the matching pattern is found.
<br><dt>Options:<dd>Affected by the
<code>open</code>
option.
</dl>
</p></blockquote></div>
<a name="index-preserve-338"></a>
<div class="defun">
— Command: <b>pre[serve]</b><var><a name="index-pre_005bserve_005d-339"></a></var><br>
<blockquote>
<p>Save the file in a form that can later be recovered using the
<strong>ex</strong>
<strong>-r</strong>
option.
When the file is preserved, an email message is sent to the user.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-previous-340"></a>
<div class="defun">
— Command: <b>prev[ious][!]</b><var><a name="index-prev_005bious_005d_005b_0021_005d-341"></a></var><br>
<blockquote>
<p>Edit the previous file from the argument list.
The
<strong>previous</strong>
command will fail if the file has been modified since the last complete
write.
This check can be overridden by appending the
“<code>!</code>”
character to the command name.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Previous</strong>,
while in
<strong>vi</strong>
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<dl>
<dt>Line:<dd>Set as described for the
<strong>edit</strong>
command.
<br><dt>Options:<dd>Affected by the options
<code>autowrite</code>
and
<code>writeany</code>.
None.
</dl>
</p></blockquote></div>
<a name="index-print-342"></a>
<div class="defun">
— Command: [range] <b>p[rint]</b> [<var><a name="index-p_005brint_005d-343"></a></var><br>
<blockquote>
<p>Display the specified lines.
<dl>
<dt>Line:<dd>Set to the last line displayed.
<br><dt>Options:<dd>Affected by the
<code>list</code>
and
<code>number</code>
option.
</dl>
</p></blockquote></div>
<a name="index-put-344"></a>
<div class="defun">
— Command: [line] <b>pu[t]</b> [<var><a name="index-pu_005bt_005d-345"></a></var><br>
<blockquote>
<p>Append buffer contents to the current line.
If a buffer is specified, its contents are appended to the line,
otherwise, the contents of the unnamed buffer are used.
<dl>
<dt>Line:<dd>Set to the line after the current line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-quit-346"></a>
<div class="defun">
— Command: <b>q[uit][!]</b><var><a name="index-q_005buit_005d_005b_0021_005d-347"></a></var><br>
<blockquote>
<p>End the editing session.
If the file has been modified since the last complete write, the
<strong>quit</strong>
command will fail.
This check may be overridden by appending a
“<code>!</code>”
character to the command.
<pre class="sp">
</pre>
If there are more files to edit, the
<strong>quit</strong>
command will fail.
Appending a
“<code>!</code>”
character to the command name or entering two
<strong>quit</strong>
commands (i.e.
<strong>wq</strong>,
<strong>quit</strong>,
<strong>xit</strong>
or
<strong>ZZ</strong>)
in a row) will override this check and the editor will exit.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-read-348"></a>
<div class="defun">
— Command: [line] <b>r[ead][!]</b> [<var><a name="index-r_005bead_005d_005b_0021_005d-349"></a></var><br>
<blockquote>
<p>Read a file.
A copy of the specified file is appended to the line.
If
<code>line</code>is 0, the copy is inserted at the beginning of the file.
If no file is specified, the current file is read; if there is no
current file, then
<code>file</code>becomes the current file.
If there is no current file and no
<code>file</code>is specified, then the
<strong>read</strong>
command will fail.
<pre class="sp">
</pre>
If
<code>file</code>is preceded by a
“<code>!</code>”
character,
<code>file</code>is treated as if it were a shell command, and passed to the program
named by the
<code>shell</code>
edit option.
The standard and standard error outputs of that command are read into
the file after the specified line.
The special meaning of the
“<code>!</code>”
character can be overridden by escaping it with a backslash
“<code>e</code>”
character.
<dl>
<dt>Line:<dd>When executed from
<strong>ex</strong>,
the current line is set to the last line read.
When executed from
<strong>vi</strong>,
the current line is set to the first line read.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-recover-350"></a>
<div class="defun">
— Command: <b>rec[over]</b><var> file<a name="index-rec_005bover_005d-351"></a></var><br>
<blockquote>
<p>Recover
<code>file</code>if it was previously saved.
If no saved file by that name exists, the
<strong>recover</strong>
command behaves equivalently to the
<strong>edit</strong>
command.
<dl>
<dt>Line:<dd>Set as described for the
<strong>edit</strong>
command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-resize-352"></a>
<div class="defun">
— Command: <b>res[ize]</b> [<var><a name="index-res_005bize_005d-353"></a></var><br>
<blockquote>
<p><strong>Vi</strong>
mode only.
Grow or shrink the current screen.
If
<code>size</code>is a positive, signed number, the current screen is grown by that many lines.
If
<code>size</code>is a negative, signed number, the current screen is shrunk by that many lines.
If
<code>size</code>is not signed, the current screen is set to the specified
<code>size</code>.
Applicable only to split screens.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-rewind-354"></a>
<div class="defun">
— Command: <b>rew[ind][!]</b><var><a name="index-rew_005bind_005d_005b_0021_005d-355"></a></var><br>
<blockquote>
<p>Rewind the argument list.
If the current file has been modified since the last complete write,
the
<strong>rewind</strong>
command will fail.
This check may be overridden by appending the
“<code>!</code>”
character to the command.
<pre class="sp">
</pre>
Otherwise, the current file is set to the first file in the argument
list.
<dl>
<dt>Line:<dd>Set as described for the
<strong>edit</strong>
command.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-set-356"></a>
<div class="defun">
— Command: <b>se[t]</b> [<var><a name="index-se_005bt_005d-357"></a></var><br>
<blockquote>
<p>Display or set editor options.
When no arguments are specified, the editor option
<code>term</code>,
and any editor options whose values have been changed from the
default settings are displayed.
If the argument
<code>all</code>is specified, the values of all of editor options are displayed.
<pre class="sp">
</pre>
Specifying an option name followed by the character
“<code>?</code>”
causes the current value of that option to be displayed.
The
“<code>?</code>”
can be separated from the option name by whitespace characters.
The
“<code>?</code>”
is necessary only for Boolean valued options.
Boolean options can be given values by the form
“<code>set option</code>”
to turn them on, or
“<code>set nooption</code>”
to turn them off.
String and numeric options can be assigned by the form
“<code>set option=value</code>”.
Any whitespace characters in strings can be included literally by preceding
each with a backslash.
More than one option can be set or listed by a single set command,
by specifying multiple arguments, each separated from the next by
whitespace characters.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-shell-358"></a>
<div class="defun">
— Command: <b>sh[ell]</b><var><a name="index-sh_005bell_005d-359"></a></var><br>
<blockquote>
<p>Run the shell program.
The program named by the
<code>shell</code>
option is run with a
<strong>-i</strong>
(for interactive) flag.
Editing is resumed when that program exits.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>shell</code>
option.
</dl>
</p></blockquote></div>
<a name="index-source-360"></a>
<div class="defun">
— Command: <b>so[urce]</b><var> file<a name="index-so_005burce_005d-361"></a></var><br>
<blockquote>
<p>Read and execute
<strong>ex</strong>
commands from a file.
<strong>Source</strong>
commands may be nested.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-substitute-362"></a>
<div class="defun">
— Command: [range] <b>s[ubstitute]</b> [<var><a name="index-s_005bubstitute_005d-363"></a></var><br>
<blockquote>
<p><a name="index-g_t_0026-364"></a>
— Command: [range] <b>&</b> [<var><a name="index-g_t_0026-365"></a></var><br>
<blockquote><p><a name="index-g_t_007e-366"></a>
— Command: [range] <b>~</b> [<var><a name="index-g_t_007e-367"></a></var><br>
<blockquote><p>Make substitutions.
Replace the first instance of
<code>pattern</code>with the string
<code>replace</code>on the specified line(s).
If the
“<code>/pattern/repl/</code>”
argument is not specified, the
“<code>/pattern/repl/</code>”
from the previous
<strong>substitute</strong>
command is used.
Any character other than an alphabetic, numeric, <blank> or backslash
character may be used as the delimiter.
<pre class="sp">
</pre>
If
<code>options</code>includes the letter
“<code>c</code>”
(confirm), you will be prompted for confirmation before each replacement
is done.
An affirmative response (in English, a
“<code>y</code>”
character) causes the replacement to be made.
A quit response (in English, a
“<code>q</code>”
character) causes the
<strong>substitute</strong>
command to be terminated.
Any other response causes the replacement not to be made, and the
<strong>substitute</strong>
command continues.
If
<code>options</code>includes the letter
“<code>g</code>”
(global), all nonoverlapping instances of
<code>pattern</code>in the line are replaced.
<pre class="sp">
</pre>
The
<strong>&</strong>
version of the command is the same as not specifying a pattern
or replacement string to the
<strong>substitute</strong>
command, and the
“<code>&</code>”
is replaced by the pattern and replacement information from the
previous substitute command.
<pre class="sp">
</pre>
The
<strong>~</strong>
version of the command is the same as
<strong>&</strong>
and
<strong>s</strong>,
except that the search pattern used is the last RE used in
<em>any</em>
command, not necessarily the one used in the last
<strong>substitute</strong>
command.
<pre class="sp">
</pre>
For example, in the sequence
<pre class="example"> s/red/blue/
/green
~
</pre>
<p>the
“<code>~</code>”
is equivalent to
“<code>s/green/blue/</code>”.
<pre class="sp">
</pre>
The
<strong>substitute</strong>
command may be interrupted, using the terminal interrupt character.
All substitutions completed before the interrupt are retained.
<dl>
<dt>Line:<dd>Set to the last line upon which a substitution was made.
<br><dt>Options:<dd>Affected by the
<code>ignorecase</code>
and
<code>magic</code>
option.
</dl>
</p></blockquote></div>
<a name="index-suspend-368"></a>
<div class="defun">
— Command: <b>su[spend][!]</b><var><a name="index-su_005bspend_005d_005b_0021_005d-369"></a></var><br>
<blockquote>
<p><a name="index-stop-370"></a>
— Command: <b>st[op][!]</b><var><a name="index-st_005bop_005d_005b_0021_005d-371"></a></var><br>
— Comamnd: <b><control-Z></b><var><a name="index-g_t_003ccontrol_002dZ_003e-372"></a></var><br>
<blockquote><p>Suspend the edit session.
Appending a
“<code>!</code>”
character to these commands turns off the
<code>autowrite</code>
option for the command.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-tag-373"></a>
<div class="defun">
— Command: <b>ta[g][!]</b><var> tagstring<a name="index-ta_005bg_005d_005b_0021_005d-374"></a></var><br>
<blockquote>
<p>Edit the file containing the specified tag.
If the tag is in a different file, then the new file is edited.
If the current file has been modified since the last complete write,
the
<strong>tag</strong>
command will fail.
This check can be overridden by appending the
“<code>!</code>”
character to the command name.
<pre class="sp">
</pre>
The
<strong>tag</strong>
command searches for
<code>tagstring</code>in the tags file(s) specified by the
<code>tags</code>
option.
(See
<samp><span class="command">ctags</span></samp>(1)
for more information on tags files.)
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Tag</strong>,
while in
<strong>vi</strong>
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<dl>
<dt>Line:<dd>Set to the line indicated by the tag.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>,
<code>taglength</code>,
<code>tags</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-tagnext-375"></a>
<div class="defun">
— Command: <b>tagn[ext][!]</b><var><a name="index-tagn_005bext_005d_005b_0021_005d-376"></a></var><br>
<blockquote>
<p>Edit the file containing the next context for the current tag.
If the context is in a different file, then the new file is edited.
If the current file has been modified since the last complete write,
the
<strong>tagnext</strong>
command will fail.
This check can be overridden by appending the
“<code>!</code>”
character to the command name.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Tagnext</strong>,
while in
<strong>vi</strong>
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<dl>
<dt>Line:<dd>Set to the line indicated by the tag.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-tagpop-377"></a>
<div class="defun">
— Command: <b>tagp[op][!]</b> [<var><a name="index-tagp_005bop_005d_005b_0021_005d-378"></a></var><br>
<blockquote>
<p>Pop to the specified tag in the tags stack.
If neither
<code>file</code>or
<code>number</code>is specified, the
<strong>tagpop</strong>
command pops to the most recent entry on the tags stack.
If
<code>file</code>or
<code>number</code>is specified, the
<strong>tagpop</strong>
command pops to the most recent entry in the tags stack for that file,
or numbered entry in the tags stack, respectively.
(See the
<strong>display</strong>
command for information on displaying the tags stack.)
<pre class="sp">
</pre>
If the file has been modified since the last complete write, the
<strong>tagpop</strong>
command will fail.
This check may be overridden by appending a
“<code>!</code>”
character to the command name.
<dl>
<dt>Line:<dd>Set to the line indicated by the tag.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-tagprev-379"></a>
<div class="defun">
— Command: <b>tagp[rev][!]</b><var><a name="index-tagp_005brev_005d_005b_0021_005d-380"></a></var><br>
<blockquote>
<p>Edit the file containing the previous context for the current tag.
If the context is in a different file, then the new file is edited.
If the current file has been modified since the last complete write,
the
<strong>tagprev</strong>
command will fail.
This check can be overridden by appending the
“<code>!</code>”
character to the command name.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Tagprev</strong>,
while in
<strong>vi</strong>
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
<dl>
<dt>Line:<dd>Set to the line indicated by the tag.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-tagtop-381"></a>
<div class="defun">
— Command: <b>tagt[op][!]</b><var><a name="index-tagt_005bop_005d_005b_0021_005d-382"></a></var><br>
<blockquote>
<p>Pop to the least recent tag on the tags stack, clearing the tags stack.
<pre class="sp">
</pre>
If the file has been modified since the last complete write, the
<strong>tagtop</strong>
command will fail.
This check may be overridden by appending a
“<code>!</code>”
character to the command name.
<dl>
<dt>Line:<dd>Set to the line indicated by the tag.
<br><dt>Options:<dd>Affected by the
<code>autowrite</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-unabbrev-383"></a>
<div class="defun">
— Command: <b>una[bbrev]</b><var> lhs<a name="index-una_005bbbrev_005d-384"></a></var><br>
<blockquote>
<p>Delete an abbreviation.
Delete
<code>lhs</code>from the current list of abbreviations.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-undo-385"></a>
<div class="defun">
— Command: <b>u[ndo]</b><var><a name="index-u_005bndo_005d-386"></a></var><br>
<blockquote>
<p>Undo the last change made to the file.
Changes made by
<strong>global</strong>,
<strong>v</strong>,
<strong>visual</strong>
and map sequences are considered a single command.
If repeated, the
<strong>u</strong>
command alternates between these two states, and is its own inverse.
<dl>
<dt>Line:<dd>Set to the last line modified by the command.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-unmap-387"></a>
<div class="defun">
— Command: <b>unm[ap][!]</b><var> lhs<a name="index-unm_005bap_005d_005b_0021_005d-388"></a></var><br>
<blockquote>
<p>Unmap a mapped string.
Delete the command mode map definition for
<code>lhs</code>.
If a
“<code>!</code>”
character is appended to the command name, delete the text input mode
map definition instead.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-version-389"></a>
<div class="defun">
— Command: <b>ve[rsion]</b><var><a name="index-ve_005brsion_005d-390"></a></var><br>
<blockquote>
<p>Display the version of the
<strong>ex/vi</strong>
editor.
</p></blockquote></div>
<a name="index-visual-391"></a>
<div class="defun">
— Command: [line] <b>vi[sual]</b> [<var><a name="index-vi_005bsual_005d-392"></a></var><br>
<blockquote>
<p><strong>Ex</strong>
mode only.
Enter
<strong>vi</strong>.
The
<code>type</code>is optional, and can be
“<code>-</code>”,
“<code>+</code>”
or
“<code>^</code>”,
as in the
<strong>ex</strong>
<strong>z</strong>
command, to specify the position of the specified line in the screen
window.
(The default is to place the line at the top of the screen window.)
A
<code>count</code>specifies the number of lines that will initially be displayed.
(The default is the value of the
<code>window</code>
editor option.)
<dl>
<dt>Line:<dd>Unchanged unless
<code>line</code>is specified, in which case it is set to that line.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-visual-393"></a>
<div class="defun">
— Command: <b>vi[sual][!]</b> [<var><a name="index-vi_005bsual_005d_005b_0021_005d-394"></a></var><br>
<blockquote>
<p><strong>Vi</strong>
mode only.
Edit a new file.
Identical to the
“<code>edit[!] [+cmd] [file]</code>”
command.
<pre class="sp">
</pre>
Capitalizing the first letter of the command, i.e.
<strong>Visual</strong>,
will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
</p></blockquote></div>
<a name="index-viusage-395"></a>
<div class="defun">
— Command: <b>viu[sage]</b> [<var><a name="index-viu_005bsage_005d-396"></a></var><br>
<blockquote>
<p>Display usage for a
<strong>vi</strong>
command.
If
<code>command</code>is specified, a usage statement for that command is displayed.
Otherwise, usage statements for all
<strong>vi</strong>
commands are displayed.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-write-397"></a>
<div class="defun">
— Command: [range] <b>w[rite][!]</b> [<var><a name="index-w_005brite_005d_005b_0021_005d-398"></a></var><br>
— Command: [range] <b>w[rite]</b> [<var><a name="index-w_005brite_005d-399"></a></var><br>
<blockquote><p><a name="index-wn-400"></a>
— Command: [range] <b>wn[!]</b> [<var><a name="index-wn_005b_0021_005d-401"></a></var><br>
<blockquote><p><a name="index-wq-402"></a>
— Command: [range] <b>wq[!]</b> [<var><a name="index-wq_005b_0021_005d-403"></a></var><br>
<blockquote><p>Write the file.
The specified lines (the entire file, if no range is given) is written
to
<code>file</code>.
If
<code>file</code>is not specified, the current pathname is used.
If
<code>file</code>is specified, and it exists, or if the current pathname was set using the
<strong>file</strong>
command, and the file already exists, these commands will fail.
Appending a
“<code>!</code>”
character to the command name will override this check and the write
will be attempted, regardless.
<pre class="sp">
</pre>
Specifying the optional
“<code>>></code>”
string will cause the write to be appended to the file, in which case
no tests are made for the file already existing.
<pre class="sp">
</pre>
If the file is preceded by a
“<code>!</code>”
character, the program named by the shell edit option is
invoked with file as its second argument, and the specified
lines are passed as standard input to that command.
The
“<code>!</code>”
in this usage must be separated from command name by at least one
whitespace character.
The special meaning of the
“<code>!</code>”
may be overridden by escaping it with a backslash
“<code>e</code>”
character.
<pre class="sp">
</pre>
The
<strong>wq</strong>
version of the write command will exit the editor after writing the file,
if there are no further files to edit.
Appending a
“<code>!</code>”
character to the command name or entering two
“quit”
commands (i.e.
<strong>wq</strong>,
<strong>quit</strong>,
<strong>xit</strong>
or
<strong>ZZ</strong>)
in a row) will override this check and the editor will exit,
ignoring any files that have not yet been edited.
<pre class="sp">
</pre>
The
<strong>wn</strong>
version of the write command will move to the next file after writing
the file, unless the write fails.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>readonly</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-xit-404"></a>
<div class="defun">
— Command: [range] <b>x[it][!]</b> [<var><a name="index-x_005bit_005d_005b_0021_005d-405"></a></var><br>
<blockquote>
<p>Write the file if it has been modified.
The specified lines are written to
<code>file</code>,
if the file has been modified since the last complete write to any
file.
If no
<code>range</code>is specified, the entire file is written.
<pre class="sp">
</pre>
The
<strong>xit</strong>
command will exit the editor after writing the file,
if there are no further files to edit.
Appending a
“<code>!</code>”
character to the command name or entering two
“quit”
commands (i.e.
<strong>wq</strong>,
<strong>quit</strong>,
<strong>xit</strong>
or
<strong>ZZ</strong>)
in a row) will override this check and the editor will exit,
ignoring any files that have not yet been edited.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>Affected by the
<code>readonly</code>
and
<code>writeany</code>
options.
</dl>
</p></blockquote></div>
<a name="index-yank-406"></a>
<div class="defun">
— Command: [range] <b>ya[nk]</b> [<var><a name="index-ya_005bnk_005d-407"></a></var><br>
<blockquote>
<p>Copy the specified lines to a buffer.
If no buffer is specified, the unnamed buffer is used.
<dl>
<dt>Line:<dd>Unchanged.
<br><dt>Options:<dd>None.
</dl>
</p></blockquote></div>
<a name="index-z-408"></a>
<div class="defun">
— Command: [line] <b>z</b> [<var><a name="index-z-409"></a></var><br>
<blockquote>
<p>Adjust the window.
If no
<code>type</code>is specified, then
<code>count</code>lines following the specified line are displayed.
The default
<code>count</code>is the value of the
<code>window</code>
option.
The
<code>type</code>argument changes the position at which
<code>line</code>is displayed on the screen by changing the number of lines
displayed before and after
<code>line</code>.
The following
<code>type</code>characters may be used:
<dl>
<dt>-<dd>Place the line at the bottom of the screen.
<br><dt>+<dd>Place the line at the top of the screen.
<br><dt>.<dd>Place the line in the middle of the screen.
<br><dt>^<dd>Write out count lines starting
<code>count * 2</code>lines before
<code>line</code>;
the net effect of this is that a
“<code>z^</code>”
command following a
<strong>z</strong>
command writes the previous page.
<br><dt>=<dd>Center
<code>line</code>on the screen with a line of hyphens displayed immediately before and
after it.
The number of preceding and following lines of text displayed are
reduced to account for those lines.
</dl>
<dl>
<dt>Line:<dd>Set to the last line displayed, with the exception of the
“<code>=</code>”
<code>type</code>,
where the current line is set to the line specified by the command.
<br><dt>Options:<dd>Affected by the
<code>scroll</code>
option.
</dl>
</p></blockquote></div>
<!-- .oh 'Vi/Ex Reference (Options)''USD:13-%' -->
<!-- .eh 'USD:13-%''Vi/Ex Reference (Options)' -->
<!-- Copyright (c) 1994 -->
<!-- The Regents of the University of California. All rights reserved. -->
<!-- Copyright (c) 1994, 1995, 1996 -->
<!-- Keith Bostic. All rights reserved. -->
<!-- See the LICENSE file for redistribution information. -->
<!-- $Id: set.opt.texi,v 8.1 2001/08/18 20:43:48 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:48 $ -->
<h2 class="chapter"><a name="TOC17"></a>18 Set Options</h2>
<p>There are a large number of options that may be set (or unset) to
change the editor's behavior.
This section describes the options, their abbreviations and their
default values.
<p>In each entry below, the first part of the tag line is the full name
of the option, followed by any equivalent abbreviations.
(Regardless of the abbreviations, it is only necessary to use the
minimum number of characters necessary to distinguish an abbreviation
from all other commands for it to be accepted, in
<strong>nex</strong>/<strong>nvi</strong>.
Historically, only the full name and the official abbreviations
were accepted by
<strong>ex</strong>/<strong>vi</strong>.
Using full names in your startup files and environmental variables will
probably make them more portable.)
The part in square brackets is the default value of the option.
Most of the options are boolean, i.e. they are either on or off,
and do not have an associated value.
<p>Options apply to both
<strong>ex</strong>
and
<strong>vi</strong>
modes, unless otherwise specified.
<p>With a few exceptions,
all options are settable per screen, i.e. the
<code>tags</code>
option can be set differently in each screen.
The exceptions are the
<code>columns</code>,
<code>lines</code>,
<code>secure</code>
and
<code>term</code>
options.
Changing these options modifies the respective information for all screens.
<p>For information on modifying the options or to display the options and
their current values, see the
“set”
command in the section entitled
“<strong>Ex Commands</strong>” .
<a name="index-altwerase-410"></a>
<ul><li><strong>altwerase [off]</strong>
<!-- @deffn {Command} {altwerase [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Change how
<strong>vi</strong>
does word erase during text input.
When this option is set, text is broken up into three classes:
alphabetic, numeric and underscore characters, other nonblank
characters, and blank characters.
Changing from one class to another marks the end of a word.
In addition, the class of the first character erased is ignored
(which is exactly what you want when erasing pathname components).
<a name="index-autoindent-411"></a><li><strong>autoindent, ai [off]</strong>
<!-- @deffn {Command} {autoindent, ai [off]} -->
<!-- @end deffn -->
<p>If this option is set, whenever you create a new line (using the
<strong>vi</strong>
<strong>A</strong>,
<strong>a</strong>,
<strong>C</strong>,
<strong>c</strong>,
<strong>I</strong>,
<strong>i</strong>,
<strong>O</strong>,
<strong>o</strong>,
<strong>R</strong>,
<strong>r</strong>,
<strong>S</strong>,
and
<strong>s</strong>
commands, or the
<strong>ex</strong>
<strong>append</strong>,
<strong>change</strong>,
and
<strong>insert</strong>
commands) the new line is automatically indented to align the cursor with
the first nonblank character of the line from which you created it.
Lines are indented using tab characters to the extent possible (based on
the value of the
<code>tabstop</code>
option) and then using space characters as necessary.
For commands inserting text into the middle of a line, any blank characters
to the right of the cursor are discarded, and the first nonblank character
to the right of the cursor is aligned as described above.
<pre class="sp">
</pre>
The indent characters are themselves somewhat special.
If you do not enter more characters on the new line before moving to
another line, or entering
<code><escape></code>,
the indent character will be deleted and the line will be empty.
For example, if you enter
<code><carriage-return></code>twice in succession,
the line created by the first
<code><carriage-return></code>will not have any characters in it,
regardless of the indentation of the previous or subsequent line.
<pre class="sp">
</pre>
Indent characters also require that you enter additional erase characters
to delete them.
For example,
if you have an indented line, containing only blanks, the first
<code><word-erase></code>character you enter will erase up to end of the indent characters,
and the second will erase back to the beginning of the line.
(Historically, only the
<code><control-D></code>key would erase the indent characters.
Both the
<code><control-D></code>key and the usual erase keys work in
<strong>nvi</strong>.)
In addition, if the cursor is positioned at the end of the indent
characters, the keys
“<code>0<control-D></code>”
will erase all of the indent characters for the current line,
resetting the indentation level to 0.
Similarly, the keys
“<code>^<control-D></code>”
will erase all of the indent characters for the current line,
leaving the indentation level for future created lines unaffected.
<pre class="sp">
</pre>
Finally, if the
<code>autoindent</code>
option is set, the
<strong>S</strong>
and
<strong>cc</strong>
commands change from the first nonblank of the line to the end of the
line, instead of from the beginning of the line to the end of the line.
<a name="index-autoprint-412"></a><li><strong>autoprint, ap [off]</strong>
<!-- @deffn {Command} {autoprint, ap [off]} -->
<!-- @end deffn -->
<p><strong>Ex</strong>
only.
Cause the current line to be automatically displayed after the
<strong>ex</strong>
commands
<strong><</strong>,
<strong>></strong>,
<strong>copy</strong>,
<strong>delete</strong>,
<strong>join</strong>,
<strong>move</strong>,
<strong>put</strong>,
<strong>t</strong>,
<strong>Undo</strong>,
and
<strong>undo</strong>.
This automatic display is suppressed during
<strong>global</strong>
and
<strong>v</strong>
commands, and for any command where optional flags are used to explicitly
display the line.
<a name="index-autowrite-413"></a><li><strong>autowrite, aw [off]</strong>
<!-- @deffn {Command} {autowrite, aw [off]} -->
<!-- @end deffn -->
<p>If this option is set, the
<strong>vi</strong>
<strong>!</strong>,
<strong>^^</strong>,
<strong>^]</strong>
and
<strong><control-Z></strong>
commands, and the
<strong>ex</strong>
<strong>edit</strong>,
<strong>next</strong>,
<strong>rewind</strong>,
<strong>stop</strong>,
<strong>suspend</strong>,
<strong>tag</strong>,
<strong>tagpop</strong>,
and
<strong>tagtop</strong>
commands automatically write the current file back to the current file name
if it has been modified since it was last written.
If the write fails, the command fails and goes no further.
<pre class="sp">
</pre>
Appending the optional force flag character
“<code>!</code>”
to the
<strong>ex</strong>
commands
<strong>next</strong>,
<strong>rewind</strong>,
<strong>stop</strong>,
<strong>suspend</strong>,
<strong>tag</strong>,
<strong>tagpop</strong>,
and
<strong>tagtop</strong>
stops the automatic write from being attempted.
<pre class="sp">
</pre>
(Historically, the
<strong>next</strong>
command ignored the optional force flag.)
Note, the
<strong>ex</strong>
commands
<strong>edit</strong>,
<strong>quit</strong>,
<strong>shell</strong>,
and
<strong>xit</strong>
are
<em>not</em>
affected by the
<code>autowrite</code>
option.
<pre class="sp">
</pre>
The
<code>autowrite</code>
option is ignored if the file is considered read-only for any reason.
<!-- I cannot get a double quote to print between the square brackets -->
<!-- to save my life. The ONLY way I've been able to get this to work -->
<!-- is with the .tr command. -->
<a name="index-backup-414"></a><li><strong>backup [""]</strong>
<!-- @deffn {Command} {backup [""]} -->
<!-- @end deffn -->
<p>If this option is set, it specifies a pathname used as a backup file,
and, whenever a file is written, the file's current contents are copied
to it.
The pathname is
“<code>#</code>”,
“<code>%</code>”
and
“<code>!</code>”
expanded.
<pre class="sp">
</pre>
If the first character of the pathname is
“<code>N</code>”,
a version number is appended to the pathname (and the
“<code>N</code>”
character is then discarded).
Version numbers are always incremented, and each backup file will have
a version number one greater than the highest version number currently
found in the directory.
<pre class="sp">
</pre>
Backup files must be regular files, owned by the real user ID of the
user running the editor, and not accessible by any other user.
<a name="index-beautify-415"></a><li><strong>beautify, bf [off]</strong>
<!-- @deffn {Command} {beautify, bf [off]} -->
<!-- @end deffn -->
<p>If this option is set, all control characters that are not currently being
specially interpreted, other than
<code><tab></code>,
<code><newline></code>,
and
<code><form-feed></code>,
are
discarded from commands read in by
<strong>ex</strong>
from command files, and from input text entered to
<strong>vi</strong>
(either into the file or to the colon command line).
Text files read by
<strong>ex</strong>/<strong>vi</strong>
are
<em>not</em>
affected by the
<code>beautify</code>
option.
<a name="index-cdpath-416"></a><li><strong>cdpath [environment variable CDPATH, or current directory]</strong>
<!-- @deffn {Command} {cdpath [environment variable CDPATH, or current directory]} -->
<!-- @end deffn -->
<p>This option is used to specify a colon separated list of directories
which are used as path prefixes for any relative path names used as
arguments for the
<strong>cd</strong>
command.
The value of this option defaults to the value of the environmental
variable
<code>CDPATH</code>if it is set, otherwise to the current directory.
For compatibility with the POSIX 1003.2 shell, the
<strong>cd</strong>
command does
<em>not</em>
check the current directory as a path prefix for relative path names
unless it is explicitly specified.
It may be so specified by entering an empty string or a
“<code>.</code>”
character into the
<code>CDPATH</code>variable or the option value.
<a name="index-cedit-417"></a><li><strong>cedit [no default]</strong>
<!-- @deffn {Command} {cedit [no default]} -->
<!-- @end deffn -->
<p>This option adds the ability to edit the colon command-line history.
This option is set to a string.
Whenever the first character of that string is entered on the colon
command line,
you will enter a normal editing window on the collected commands that
you've entered on the
<strong>vi</strong>
colon command-line.
You may then modify and/or execute the commands.
All normal text editing is available,
except that you cannot use
<strong><control-W></strong>
to switch to an alternate screen.
Entering a
<strong><carriage-return></strong>
will execute the current line of the screen window as an ex command in
the context of the screen from which you created the colon command-line
screen,
and you will then return to that screen.
<pre class="sp">
</pre>
Because of
<strong>vi</strong>'s
parsing rules, it can be difficult to set the colon command-line edit
character to the
<code><escape></code>character.
To set it to
<code><escape></code>,
use
“<code>set cedit=<literal-next><escape></code>”.
<pre class="sp">
</pre>
If the
<code>cedit</code>
edit option is set to the same character as the
<code>filec</code>
edit option,
<strong>vi</strong>
will perform colon command-line editing if the character is entered as
the first character of the line,
otherwise,
<strong>vi</strong>
will perform file name expansion.
<a name="index-columns-418"></a><li><strong>columns, co [80]</strong>
<!-- @deffn {Command} {columns, co [80]} -->
<!-- @end deffn -->
<p>The number of columns in the screen.
Setting this option causes
<strong>ex</strong>/<strong>vi</strong>
to set (or reset) the environmental variable
<code>COLUMNS</code>.
See the section entitled
“<strong>Sizing the Screen</strong>”
more information.
<a name="index-comment-419"></a><li><strong>comment [off]</strong>
<!-- @deffn {Command} {comment [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
If the first non-empty line of the file begins with the string
“<code>#</code>”,
“<code>/*</code>”
or
“<code>//</code>”,
this option causes
<strong>vi</strong>
to skip to the end of that shell, C or C++ comment (probably a
terribly boring legal notice) before displaying the file.
<a name="index-directory-420"></a><li><strong>directory, dir [environment variable TMPDIR, or /tmp]</strong>
<!-- @deffn {Command} {directory, dir [environment variable TMPDIR, or /tmp]} -->
<!-- @end deffn -->
<p>The directory where temporary files are created.
The environmental variable
<code>TMPDIR</code>is used as the default value if it exists, otherwise
<code>/tmp</code>is used.
<a name="index-edcompatible-421"></a><li><strong>edcompatible, ed [off]</strong>
<!-- @deffn {Command} {edcompatible, ed [off]} -->
<!-- @end deffn -->
<p>Remember the values of the
“c”
and
“g”
suffixes to the
<strong>substitute</strong>
commands, instead of initializing them as unset for each new
command.
Specifying pattern and replacement strings to the
<strong>substitute</strong>
command unsets the
“c”
and
“g”
suffixes as well.
<a name="index-escapetime-422"></a><li><strong>escapetime [1]</strong>
<!-- @deffn {Command} {escapetime [1]} -->
<!-- @end deffn -->
<p>The 10th's of a second
<strong>ex</strong>/<strong>vi</strong>
waits for a subsequent key to complete an
<code><escape></code>key mapping.
<a name="index-errorbells-423"></a><li><strong>errorbells, eb [off]</strong>
<!-- @deffn {Command} {errorbells, eb [off]} -->
<!-- @end deffn -->
<p><strong>Ex</strong>
only.
<strong>Ex</strong>
error messages are normally presented in inverse video.
If that is not possible for the terminal, setting this option causes
error messages to be announced by ringing the terminal bell.
<a name="index-exrc-424"></a><li><strong>exrc, ex [off]</strong>
<!-- @deffn {Command} {exrc, ex [off]} -->
<!-- @end deffn -->
<p>If this option is turned on in the EXINIT environment variables,
or the system or $HOME startup files,
the local startup files are read,
unless they are the same as the system or $HOME startup files or
fail to pass the standard permission checks.
See the section entitled
“<strong>Startup Information</strong>”
for more information.
<a name="index-extended-425"></a><li><strong>extended [off]</strong>
<!-- @deffn {Command} {extended [off]} -->
<!-- @end deffn -->
<p>This option causes all regular expressions to be treated as POSIX
1003.2 Extended Regular Expressions (which are similar to historic
<samp><span class="command">egrep</span></samp>(1)
style expressions).
<a name="index-filec-426"></a><li><strong>filec [no default]</strong>
<!-- @deffn {Command} {filec [no default]} -->
<!-- @end deffn -->
<p>This option adds the ability to do shell expansion when entering input
on the colon command line.
This option is set to a string.
Whenever the first character of that string is entered on the colon
command line,
the <blank> delimited string immediately before the cursor is expanded
as if it were followed by a
<code>*</code>character, and file name expansion for the
<strong>ex</strong>
edit command was done.
If no match is found, the screen is flashed and text input resumed.
If a single match results, that match replaces the expanded text.
In addition, if the single match is for a directory, a
<code>/</code>character is appended and file completion is repeated.
If more than a single match results,
any unique prefix shared by the matches replaces the expanded text,
the matches are displayed,
and text input resumed.
<pre class="sp">
</pre>
Because of
<strong>vi</strong>'s
parsing rules, it can be difficult to set the path completion character
to two command values,
<code><escape></code>and
<code><tab></code>.
To set it to
<code><escape></code>,
use
“<code>set filec=<literal-next><escape></code>”.
To set it to
<code><tab></code>,
use
“<code>set filec=e<tab></code>”.
<pre class="sp">
</pre>
If the
<code>cedit</code>
edit option is set to the same character as the
<code>filec</code>
edit option,
<strong>vi</strong>
will perform colon command-line editing if the character is entered as
the first character of the line,
otherwise,
<strong>vi</strong>
will perform file name expansion.
<a name="index-flash-427"></a><li><strong>flash [on]</strong>
<!-- @deffn {Command} {flash [on]} -->
<!-- @end deffn -->
<p>This option causes the screen to flash instead of beeping the keyboard,
on error, if the terminal has the capability.
<a name="index-hardtabs-428"></a><li><strong>hardtabs, ht [8]</strong>
<!-- @deffn {Command} {hardtabs, ht [8]} -->
<!-- @end deffn -->
<p>This option defines the spacing between hardware tab settings, i.e.
the tab expansion done by the operating system and/or the terminal
itself.
As
<strong>nex</strong>/<strong>nvi</strong>
never writes
<code><tab></code>characters to the terminal, unlike historic versions of
<strong>ex</strong>/<strong>vi</strong>,
this option does not currently have any affect.
<a name="index-iclower-429"></a><li><strong>iclower [off]</strong>
<!-- @deffn {Command} {iclower [off]} -->
<!-- @end deffn -->
<p>The
<code>iclower</code>
edit option makes all Regular Expressions case-insensitive,
as long as an upper-case letter does not appear in the search string.
<a name="index-ignorecase-430"></a><li><strong>ignorecase, ic [off]</strong>
<!-- @deffn {Command} {ignorecase, ic [off]} -->
<!-- @end deffn -->
<p>This option causes regular expressions, both in
<strong>ex</strong>
commands and in searches,
to be evaluated in a case-insensitive manner.
<a name="index-keytime-431"></a><li><strong>keytime [6]</strong>
<!-- @deffn {Command} {keytime [6]} -->
<!-- @end deffn -->
<p>The 10th's of a second
<strong>ex</strong>/<strong>vi</strong>
waits for a subsequent key to complete a key mapping.
<a name="index-leftright-432"></a><li><strong>leftright [off]</strong>
<!-- @deffn {Command} {leftright [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
This option causes the screen to be scrolled left-right to view
lines longer than the screen, instead of the traditional
<strong>vi</strong>
screen interface which folds long lines at the right-hand margin
of the terminal.
<a name="index-lines-433"></a><li><strong>lines, li [24]</strong>
<!-- @deffn {Command} {lines, li [24]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
The number of lines in the screen.
Setting this option causes
<strong>ex</strong>/<strong>vi</strong>
to set (or reset) the environmental variable
<code>LINES</code>.
See the section entitled
“<strong>Sizing the Screen</strong>”
for more information.
<a name="index-lisp-434"></a><li><strong>lisp [off]</strong>
<!-- @deffn {Command} {lisp [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
This option changes the behavior of the
<strong>vi</strong>
<strong>(</strong>,
<strong>)</strong>,
<strong>{</strong>,
<strong>}</strong>,
<strong>[[</strong>
and
<strong>]]</strong>
commands to match the Lisp language.
Also, the
<code>autoindent</code>
option's behavior is changed to be appropriate for Lisp.
<pre class="sp">
</pre>
<em>This option is not yet implemented.</em>
<a name="index-list-435"></a><li><strong>list [off]</strong>
<!-- @deffn {Command} {list [off]} -->
<!-- @end deffn -->
<p>This option causes lines to be displayed in an unambiguous fashion.
Specifically, tabs are displayed as control characters, i.e.
“<code>^I</code>”,
and the ends of lines are marked with a
“<code>$</code>”
character.
<a name="index-lock-436"></a><li><strong>lock [on]</strong>
<!-- @deffn {Command} {lock [on]} -->
<!-- @end deffn -->
<p>This option causes the editor to attempt to get an exclusive lock on
any file being edited, read or written.
Reading or writing a file that cannot be locked produces a warning
message, but no other effect.
Editing a file that cannot be locked results in a read only edit session,
as if the
<code>readonly</code>
edit option were set.
<a name="index-magic-437"></a><li><strong>magic [on]</strong>
<!-- @deffn {Command} {magic [on]} -->
<!-- @end deffn -->
<p>This option is on by default.
Turning the
<code>magic</code>
option off causes all regular expression characters except for
“<code>^</code>”
and
“<code>$</code>”,
to be treated as ordinary characters.
To re-enable characters individually, when the
<code>magic</code>
option is off,
precede them with a backslash
“<code>e</code>”
character.
See the section entitled
“<strong>Regular Expressions and Replacement Strings</strong>”
for more information.
<a name="index-matchtime-438"></a><li><strong>matchtime [7]</strong>
<!-- @deffn {Command} {matchtime [7]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
The 10th's of a second
<strong>vi</strong>
pauses on the matching character when the
<code>showmatch</code>
option is set.
<a name="index-mesg-439"></a><li><strong>mesg [on]</strong>
<!-- @deffn {Command} {mesg [on]} -->
<!-- @end deffn -->
<p>This option allows other users to contact you using the
<samp><span class="command">talk</span></samp>(1)
and
<samp><span class="command">write</span></samp>(1)
utilities, while you are editing.
<strong>Ex</strong>/<strong>vi</strong>
does not turn message on, i.e. if messages were turned off when the
editor was invoked, they will stay turned off.
This option only permits you to disallow messages for the edit session.
See the
<samp><span class="command">mesg</span></samp>(1)
utility for more information.
<a name="index-msgcat-440"></a><li><strong>msgcat [./]</strong>
<!-- @deffn {Command} {msgcat [./]} -->
<!-- @end deffn -->
<p>This option selects a message catalog to be used to display error and
informational messages in a specified language.
If the value of this option ends with a '/', it is treated as the name
of a directory that contains a message catalog
“<code>vi_XXXX</code>”,
where
“<code>XXXX</code>”
is the value of the
<code>LANG</code>environmental variable, if it's set, or the value of the
<code>LC_MESSAGES</code>environmental variable if it's not.
If neither of those environmental variables are set,
or if the option doesn't end in a '/',
the option is treated as the full path name of the message catalog to use.
<pre class="sp">
</pre>
If any messages are missing from the catalog,
the backup text (English) is used instead.
<pre class="sp">
</pre>
See the distribution file
<code>catalog/README</code>for additional information on building and installing message catalogs.
<a name="index-modelines-441"></a><li><strong>modelines, modeline [off]</strong>
<!-- @deffn {Command} {modelines, modeline [off]} -->
<!-- @end deffn -->
<p>If the
<code>modelines</code>
option is set,
<strong>ex</strong>/<strong>vi</strong>
has historically scanned the first and last five lines of each file as
it is read for editing, looking for any
<strong>ex</strong>
commands that have been placed in those lines.
After the startup information has been processed, and before the user
starts editing the file, any commands embedded in the file are executed.
<pre class="sp">
</pre>
Commands were recognized by the letters
“e”
or
“v”
followed by
“x”
or
“i”,
at the beginning of a line or following a tab or space character,
and followed by a
“:”,
an
<strong>ex</strong>
command, and another
“:”.
<pre class="sp">
</pre>
This option is a security problem of immense proportions,
and should not be used under any circumstances.
<pre class="sp">
</pre>
<em>This option will never be implemented.</em>
<!-- I cannot get a double quote to print between the square brackets -->
<!-- to save my life. The ONLY way I've been able to get this to work -->
<!-- is with the .tr command. -->
<a name="index-noprint-442"></a><li><strong>noprint [""]</strong>
<!-- @deffn {Command} {noprint [""]} -->
<!-- @end deffn -->
<p>Characters that are never handled as printable characters.
By default, the C library function
<samp><span class="command">isprint</span></samp>(3)
is used to determine if a character is printable or not.
This edit option overrides that decision.
<a name="index-number-443"></a><li><strong>number, nu [off]</strong>
<!-- @deffn {Command} {number, nu [off]} -->
<!-- @end deffn -->
<p>Precede each line displayed with its current line number.
<a name="index-octal-444"></a><li><strong>octal [off]</strong>
<!-- @deffn {Command} {octal [off]} -->
<!-- @end deffn -->
<p>Display unknown characters as octal numbers
“<code>"e###"</code>”,
instead of the default
hexadecimal
“<code>"ex##"</code>”.
<a name="index-open-445"></a><li><strong>open [on]</strong>
<!-- @deffn {Command} {open [on]} -->
<!-- @end deffn -->
<p><strong>Ex</strong>
only.
If this option is not set, the
<strong>open</strong>
and
<strong>visual</strong>
commands are disallowed.
<a name="index-optimize-446"></a><li><strong>optimize, opt [on]</strong>
<!-- @deffn {Command} {optimize, opt [on]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Throughput of text is expedited by setting the terminal not to do automatic
carriage returns when printing more than one (logical) line of output,
greatly speeding output on terminals without addressable cursors when text
with leading white space is printed.
<pre class="sp">
</pre>
<em>This option is not yet implemented.</em>
<a name="index-paragraphs-447"></a><li><strong>paragraphs, para [IPLPPPQPP LIpplpipbp]</strong>
<!-- @deffn {Command} {paragraphs, para [IPLPPPQPP LIpplpipbp]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Define additional paragraph boundaries for the
<strong>{</strong>
and
<strong>}</strong>
commands.
The value of this option must be a character string consisting
of zero or more character pairs.
<pre class="sp">
</pre>
In the text to be edited, the character string
<code><newline>.<char-pair></code>,
(where
<code><char-pair></code>is one of the character pairs in the option's value)
defines a paragraph boundary.
For example, if the option were set to
<code>LaA<space>##</code>,
then all of the following additional paragraph boundaries would be
recognized:
<pre class="sp">
</pre>
<pre class="example"> <newline>.La
<newline>.A<space>
<newline>.##
</pre>
<p><a name="index-path-448"></a><li><strong>path []</strong>
<!-- @deffn {Command} {path []} -->
<!-- @end deffn -->
<p>The path option can be used to specify a <colon>-separated list of
paths, similar to the
<code>PATH</code>environment variable in the shells.
If this option is set,
the name of the file to be edited is not an absolute pathname,
the first component of the filename is not
“<code>.</code>”
or
“<code>..</code>”,
and the file to be edited doesn't exist in the current directory,
the elements of the
<code>path</code>
option are sequentially searched for a file of the specified name.
If such a file is found, it is edited.
<!-- I cannot get a double quote to print between the square brackets -->
<!-- to save my life. The ONLY way I've been able to get this to work -->
<!-- is with the .tr command. -->
<a name="index-print-449"></a><li><strong>print [""]</strong>
<!-- @deffn {Command} {print [""]} -->
<!-- @end deffn -->
<p>Characters that are always handled as printable characters.
By default, the C library function
<samp><span class="command">isprint</span></samp>(3)
is used to determine if a character is printable or not.
This edit option overrides that decision.
<a name="index-prompt-450"></a><li><strong>prompt [on]</strong>
<!-- @deffn {Command} {prompt [on]} -->
<!-- @end deffn -->
<p><strong>Ex</strong>
only.
This option causes
<strong>ex</strong>
to prompt for command input with a
“<code>:</code>”
character; when it is not set, no prompt is displayed.
<a name="index-readonly-451"></a><li><strong>readonly, ro [off]</strong>
<!-- @deffn {Command} {readonly, ro [off]} -->
<!-- @end deffn -->
<p>This option causes a force flag to be required to attempt to write the file.
Setting this option is equivalent to using the
<strong>-R</strong>
command line option,
or executing the
<strong>vi</strong>
program using the name
<strong>view</strong>.
<pre class="sp">
</pre>
The
<code>readonly</code>
edit option is not usually persistent, like other edit options.
If the
<strong>-R</strong>
command line option is set,
<strong>vi</strong>
is executed as
<strong>view</strong>,
or the
<code>readonly</code>
edit option is explicitly set,
all files edited in the screen will be marked readonly,
and the force flag will be required to write them.
However, if none of these conditions are true,
or the
<code>readonly</code>
edit option is explicitly unset,
then the
<code>readonly</code>
edit option will toggle based on the write permissions of the file currently
being edited as of when it is loaded into the edit buffer.
In other words, the
<code>readonly</code>
edit option will be set if the current file lacks write permissions,
and will not be set if the user has write permissions for the file.
<a name="index-recdir-452"></a><li><strong>recdir [/var/tmp/vi.recover]</strong>
<!-- @deffn {Command} {recdir [/var/tmp/vi.recover]} -->
<!-- @end deffn -->
<p>The directory where recovery files are stored.
<pre class="sp">
</pre>
If you change the value of
<code>recdir</code>,
be careful to choose a directory whose contents are not regularly
deleted.
Bad choices include directories in memory based filesystems,
or
<code>/tmp</code>,
on most systems,
as their contents are removed when the machine is rebooted.
<pre class="sp">
</pre>
Public directories like
<code>/usr/tmp</code>and
<code>/var/tmp</code>are usually safe, although some sites periodically prune old files
from them.
There is no requirement that you use a public directory,
e.g. a sub-directory of your home directory will work fine.
<pre class="sp">
</pre>
Finally, if you change the value of
<code>recdir</code>,
you must modify the recovery script to operate in your chosen recovery
area.
<pre class="sp">
</pre>
See the section entitled
“<strong>Recovery</strong>”
for further information.
<a name="index-redraw-453"></a><li><strong>redraw, re [off]</strong>
<!-- @deffn {Command} {redraw, re [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
The editor simulates (using great amounts of output), an intelligent
terminal on a dumb terminal (e.g. during insertions in
<strong>vi</strong>
the characters to the right of the cursor are refreshed as each input
character is typed).
<pre class="sp">
</pre>
<em>This option is not yet implemented.</em>
<a name="index-remap-454"></a><li><strong>remap [on]</strong>
<!-- @deffn {Command} {remap [on]} -->
<!-- @end deffn -->
<p>If this option is set,
it is possible to define macros in terms of other macros.
Otherwise, each key is only remapped up to one time.
For example, if
“<code>A</code>”
is mapped to
“<code>B</code>”,
and
“<code>B</code>”
is mapped to
“<code>C</code>”,
The keystroke
“<code>A</code>”
will be mapped to
“<code>C</code>”
if the
<code>remap</code>
option is set, and to
“<code>B</code>”
if it is not set.
<a name="index-report-455"></a><li><strong>report [5]</strong>
<!-- @deffn {Command} {report [5]} -->
<!-- @end deffn -->
<p>Set the threshold of the number of lines that need to be changed or
yanked before a message will be displayed to the user.
For everything but the yank command, the value is the largest value
about which the editor is silent, i.e. by default, 6 lines must be
deleted before the user is notified.
However, if the number of lines yanked is greater than
<em>or equal to</em>
the set value, it is reported to the user.
<a name="index-ruler-456"></a><li><strong>ruler [off]</strong>
<!-- @deffn {Command} {ruler [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Display a row/column ruler on the colon command line.
<a name="index-scroll-457"></a><li><strong>scroll, scr [(environment variable LINES - 1) / 2]</strong>
<!-- @deffn {Command} {scroll, scr [(environment variable LINES - 1) / 2]} -->
<!-- @end deffn -->
<p>Set the number of lines scrolled by the
<strong>ex</strong>
<strong><control-D></strong>
and
<strong><end-of-file></strong>
commands.
<pre class="sp">
</pre>
Historically, the
<strong>ex</strong>
<strong>z</strong>
command, when specified without a count, used two times the size of the
scroll value; the POSIX 1003.2 standard specified the window size, which
is a better choice.
<a name="index-searchincr-458"></a><li><strong>searchincr [off]</strong>
<!-- @deffn {Command} {searchincr [off]} -->
<!-- @end deffn -->
<p>The
<code>searchincr</code>
edit option makes the search commands
<strong>/</strong>
and
<strong>?</strong>
incremental, i.e. the screen is updated and the cursor moves to the matching
text as the search pattern is entered.
If the search pattern is not found,
the screen is beeped and the cursor remains on the colon-command line.
Erasing characters from the search pattern backs the cursor up to the
previous matching text.
<a name="index-sections-459"></a><li><strong>sections, sect [NHSHH HUnhsh]</strong>
<!-- @deffn {Command} {sections, sect [NHSHH HUnhsh]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Define additional section boundaries for the
<strong>[[</strong>
and
<strong>]]</strong>
commands.
The
<code>sections</code>
option should be set to a character string consisting of zero or
more character pairs.
In the text to be edited, the character string
<code><newline>.<char-pair></code>,
(where
<code><char-pair></code>is one of the character pairs in the option's value),
defines a section boundary in the same manner that
<code>paragraphs</code>
option boundaries are defined.
<a name="index-secure-460"></a><li><strong>secure [off]</strong>
<!-- @deffn {Command} {secure [off]} -->
<!-- @end deffn -->
<p>The
<code>secure</code>
edit option turns off all access to external programs.
This means that the versions of the
<strong>read</strong>
and
<strong>write</strong>
commands that filter text through other programs,
the
<strong>vi</strong>
<strong>!</strong>
and
<strong><control-Z></strong>
commands,
the
<strong>ex</strong>
<strong>!</strong>,
<strong>script</strong>,
<strong>shell</strong>,
<strong>stop</strong>
and
<strong>suspend</strong>
commands and file name expansion will not be permitted.
Once set,
the
<code>secure</code>
edit option may not be unset.
<a name="index-shell-461"></a><li><strong>shell, sh [environment variable SHELL, or /bin/sh]</strong>
<!-- @deffn {Command} {shell, sh [environment variable SHELL, or /bin/sh]} -->
<!-- @end deffn -->
<p>Select the shell used by the editor.
The specified path is the pathname of the shell invoked by the
<strong>vi</strong>
<strong>!</strong>
shell escape command and by the
<strong>ex</strong>
<strong>shell</strong>
command.
This program is also used to resolve any shell meta-characters in
<strong>ex</strong>
commands.
<!-- I cannot get a double quote to print between the square brackets -->
<!-- to save my life. The ONLY way I've been able to get this to work -->
<!-- is with the .tr command. -->
<a name="index-shellmeta-462"></a><!-- @IP{shellmeta [~@{[*?@$`'"\e]} -->
<li><strong>shellmeta [~{[*?$`'"\]</strong>
<p>The set of characters that
<strong>ex</strong>
checks for when doing file name expansion.
If any of the specified characters are found in the file name arguments
to the
<strong>ex</strong>
commands,
the arguments are expanded using the program defined by the
<code>shell</code>
option.
The default set of characters is a union of meta characters
from the Version 7 and the Berkeley C shell.
<a name="index-shiftwidth-463"></a><li><strong>shiftwidth, sw [8]</strong>
<!-- @deffn {Command} {shiftwidth, sw [8]} -->
<!-- @end deffn -->
<p>Set the autoindent and shift command indentation width.
This width is used by the
<code>autoindent</code>
option and by the
<strong><</strong>,
<strong>></strong>,
and
<strong>shift</strong>
commands.
<a name="index-showmatch-464"></a><li><strong>showmatch, sm [off]</strong>
<!-- @deffn {Command} {showmatch, sm [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
This option causes
<strong>vi</strong>,
when a
<!-- QT -->
“<code>}</code>”
or
“<code>)</code>”
is entered, to briefly move the cursor the matching
<!-- QT -->
“<code>{</code>”
or
“<code>(</code>”.
See the
<code>matchtime</code>
option for more information.
<a name="index-showmode-465"></a><li><strong>showmode, smd [off]</strong>
<!-- @deffn {Command} {showmode, smd [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
This option causes
<strong>vi</strong>
to display a string identifying the current editor mode on the colon
command line.
The string is preceded by an asterisk (“*”) if the file has been
modified since it was last completely written,
<a name="index-sidescroll-466"></a><li><strong>sidescroll [16]</strong>
<!-- @deffn {Command} {sidescroll [16]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Sets the number of columns that are shifted to the left or right,
when
<strong>vi</strong>
is doing left-right scrolling and the left or right margin is
crossed.
See the
<code>leftright</code>
option for more information.
<a name="index-slowopen-467"></a><li><strong>slowopen, slow [off]</strong>
<!-- @deffn {Command} {slowopen, slow [off]} -->
<!-- @end deffn -->
<p>This option affects the display algorithm used by
<strong>vi</strong>,
holding off display updating during input of new text to improve
throughput when the terminal in use is slow and unintelligent.
<pre class="sp">
</pre>
<em>This option is not yet implemented.</em>
<a name="index-sourceany-468"></a><li><strong>sourceany [off]</strong>
<!-- @deffn {Command} {sourceany [off]} -->
<!-- @end deffn -->
<p>If this option is turned on,
<strong>vi</strong>
historically read startup files that were owned by someone other than
the editor user.
See the section entitled
“<strong>Startup Information</strong>”
for more information.
This option is a security problem of immense proportions,
and should not be used under any circumstances.
<pre class="sp">
</pre>
<em>This option will never be implemented.</em>
<a name="index-tabstop-469"></a><li><strong>tabstop, ts [8]</strong>
<!-- @deffn {Command} {tabstop, ts [8]} -->
<!-- @end deffn -->
<p>This option sets tab widths for the editor display.
<a name="index-taglength-470"></a><li><strong>taglength, tl [0]</strong>
<!-- @deffn {Command} {taglength, tl [0]} -->
<!-- @end deffn -->
<p>This option sets the maximum number of characters that are considered
significant in a tag name.
Setting the value to 0 makes all of the characters in the tag name
significant.
<a name="index-tags-471"></a><li><strong>tags, tag [tags /var/db/libc.tags /sys/kern/tags]</strong>
<!-- @deffn {Command} {tags, tag [tags /var/db/libc.tags /sys/kern/tags]} -->
<!-- @end deffn -->
<p>Sets the list of tags files, in search order,
which are used when the editor searches for a tag.
<a name="index-term-472"></a><li><strong>term, ttytype, tty [environment variable TERM]</strong>
<!-- @deffn {Command} {term, ttytype, tty [environment variable TERM]} -->
<!-- @end deffn -->
<p>Set the terminal type.
Setting this option causes
<strong>ex</strong>/<strong>vi</strong>
to set (or reset) the environmental variable
<code>TERM</code>.
<a name="index-terse-473"></a><li><strong>terse [off]</strong>
<!-- @deffn {Command} {terse [off]} -->
<!-- @end deffn -->
<p>This option has historically made editor messages less verbose.
It has no effect in this implementation.
See the
<code>verbose</code>
option for more information.
<a name="index-tildeop-474"></a><li><strong>tildeop [off]</strong>
<!-- @deffn {Command} {tildeop [off]} -->
<!-- @end deffn -->
<p>Modify the
<strong>~</strong>
command to take an associated motion.
<a name="index-timeout-475"></a><li><strong>timeout, to [on]</strong>
<!-- @deffn {Command} {timeout, to [on]} -->
<!-- @end deffn -->
<p>If this option is set,
<strong>ex</strong>/<strong>vi</strong>
waits for a specific period for a subsequent key to complete a key
mapping (see the
<code>keytime</code>
option).
If the option is not set, the editor waits until enough keys are
entered to resolve the ambiguity, regardless of how long it takes.
<a name="index-ttywerase-476"></a><li><strong>ttywerase [off]</strong>
<!-- @deffn {Command} {ttywerase [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
This option changes how
<strong>vi</strong>
does word erase during text input.
If this option is set, text is broken up into two classes,
blank characters and nonblank characters.
Changing from one class to another marks the end of a word.
<a name="index-verbose-477"></a><li><strong>verbose [off]</strong>
<!-- @deffn {Command} {verbose [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
<strong>Vi</strong>
historically bells the terminal for many obvious mistakes, e.g. trying
to move past the left-hand margin, or past the end of the file.
If this option is set, an error message is displayed for all errors.
<a name="index-w300-478"></a><li><strong>w300 [no default]</strong>
<!-- @deffn {Command} {w300 [no default]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Set the window size if the baud rate is less than 1200 baud.
See the
<code>window</code>
option for more information.
<a name="index-w1200-479"></a><li><strong>w1200 [no default]</strong>
<!-- @deffn {Command} {w1200 [no default]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Set the window size if the baud rate is equal to 1200 baud.
See the
<code>window</code>
option for more information.
<a name="index-w9600-480"></a><li><strong>w9600 [no default]</strong>
<!-- @deffn {Command} {w9600 [no default]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
Set the window size if the baud rate is greater than 1200 baud.
See the
<code>window</code>
option for more information.
<a name="index-warn-481"></a><li><strong>warn [on]</strong>
<!-- @deffn {Command} {warn [on]} -->
<!-- @end deffn -->
<p><strong>Ex</strong>
only.
This option causes a warning message to the terminal if the file has
been modified, since it was last written, before a
<strong>!</strong>
command.
<a name="index-window-482"></a><li><strong>window, w, wi [environment variable LINES - 1]</strong>
<!-- @deffn {Command} {window, w, wi [environment variable LINES - 1]} -->
<!-- @end deffn -->
<p>This option determines the default number of lines in a screenful,
as displayed by the
<strong>z</strong>
command.
It also determines the number of lines scrolled by the
<strong>vi</strong>
commands
<strong><control-B></strong>
and
<strong><control-F></strong>,
and the default number of lines scrolled by the
<strong>vi</strong>
commands
<strong><control-D></strong>
and
<strong><control-U></strong>.
The value of window can be unrelated to the real screen size,
although it starts out as the number of lines on the screen.
See the section entitled
“<strong>Sizing the Screen</strong>”
for more information.
Setting the value of the
<code>window</code>
option is the same as using the
<strong>-w</strong>
command line option.
<pre class="sp">
</pre>
If the value of the
<code>window</code>
option (as set by the
<code>window</code>,
<code>w300</code>,
<code>w1200</code>
or
<code>w9600</code>
options) is smaller than the actual size of the screen,
large screen movements will result in displaying only that smaller
number of lines on the screen.
(Further movements in that same area will result in the screen being
filled.)
This can provide a performance improvement when viewing different
places in one or more files over a slow link.
<pre class="sp">
</pre>
Resetting the window size does not reset the default number of lines
scrolled by the
<strong><control-D></strong>
and
<strong><control-U></strong>
commands.
<a name="index-windowname-483"></a><li><strong>windowname [off]</strong>
<!-- @deffn {Command} {windowname [off]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
changes the name of the editor's icon/window to the current file name
when it's possible and not destructive, i.e.,
when the editor can restore it to its original value on exit or when
the icon/window will be discarded as the editor exits.
If the
<code>windowname</code>
edit option is set,
<strong>vi</strong>
will change the icon/window name even when it's destructive and the
icon/window name will remain after the editor exits.
(This is the case for
<samp><span class="command">xterm</span></samp>(1)).
<a name="index-wraplen-484"></a><li><strong>wraplen, wl [0]</strong>
<!-- @deffn {Command} {wraplen, wl [0]} -->
<!-- @end deffn -->
<p>This option is identical to the
<code>wrapmargin</code>
option, with the exception that it specifies the number of columns
from the
<em>left</em>
margin before the line splits, not the right margin.
<pre class="sp">
</pre>
If both
<code>wraplen</code>
and
<code>wrapmargin</code>
are set, the
<code>wrapmargin</code>
value is used.
<a name="index-wrapmargin-485"></a><li><strong>wrapmargin, wm [0]</strong>
<!-- @deffn {Command} {wrapmargin, wm [0]} -->
<!-- @end deffn -->
<p><strong>Vi</strong>
only.
If the value of the
<code>wrapmargin</code>
option is non-zero,
<strong>vi</strong>
will split lines so that they end at least that number of columns
before the right-hand margin of the screen.
(Note, the value of
<code>wrapmargin</code>
is
<em>not</em>
a text length.
In a screen that is 80 columns wide, the command
“<code>:set wrapmargin=8</code>”
attempts to keep the lines less than or equal to 72 columns wide.)
<pre class="sp">
</pre>
Lines are split at the previous whitespace character closest to the
number.
Any trailing whitespace characters before that character are deleted.
If the line is split because of an inserted
<code><space></code>or
<code><tab></code>character, and you then enter another
<code><space></code>character, it is discarded.
<pre class="sp">
</pre>
If wrapmargin is set to 0,
or if there is no blank character upon which to split the line,
the line is not broken.
<pre class="sp">
</pre>
If both
<code>wraplen</code>
and
<code>wrapmargin</code>
are set, the
<code>wrapmargin</code>
value is used.
<a name="index-wrapscan-486"></a><li><strong>wrapscan, ws [on]</strong>
<!-- @deffn {Command} {wrapscan, ws [on]} -->
<!-- @end deffn -->
<p>This option causes searches to wrap around the end or the beginning
of the file, and back to the starting point.
Otherwise, the end or beginning of the file terminates the search.
<a name="index-writeany-487"></a><li><strong>writeany, wa [off]</strong>
<!-- @deffn {Command} {writeany, wa [off]} -->
<!-- @end deffn -->
<p>If this option is set, file-overwriting checks that would usually be
made before the
<strong>write</strong>
and
<strong>xit</strong>
commands, or before an automatic write (see the
<code>autowrite</code>
option), are not made.
This allows a write to any file, provided the file permissions allow it.
</ul>
<!-- .oh 'Vi/Ex Reference''USD:13-%' -->
<!-- .eh 'USD:13-%''Vi/Ex Reference' -->
<h2 class="chapter"><a name="TOC18"></a>19 Index</h2>
<ul class="index-cp" compact>
<li><a href="#index-g_t_0021-260"><code>!</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0021-72"><code>!</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0021-71">!</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022-254"><code>"</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_0021_0022-259">"!"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_0023_0022-262">"#"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_002a_0022-268">"*"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003ccarriage_002dreturn_003e_0022-8">"<carriage-return>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003ccontrol_002dD_003e_0022-255">"<control-D>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003ccontrol_002dW_003e_0022-239">"<control-W>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003ccontrol_002dX_003e_0022-243">"<control-X>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cend_002dof_002dfile_003e_0022-256">"<end-of-file>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cend_002dof_002dfile_003e_0022-247">"<end-of-file>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cline-erase_003e_0022-237">"<line erase>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cliteral_002dnext_003e_0022-233">"<literal-next>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cliteral_002dnext_003e_0022-2">"<literal-next>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_003cword-erase_003e_0022-241">"<word erase>"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022_0040_0040_0022-266">"@"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022alternate-pathname_0022-4">"alternate pathname"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022bigword_0022-14">"bigword"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022count_0022-250">"count"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022count_0022-12">"count"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022current-pathname_0022-3">"current pathname"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022file_0022-252">"file"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022flags_0022-251">"flags"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022line_0022-248">"line"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022motion_0022-11">"motion"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022number_0022-264">"number"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022paragraph_0022-15">"paragraph"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022previous-context_0022-10">"previous context"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022range_0022-249">"range"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022section_0022-16">"section"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022sentence_0022-17">"sentence"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0022unnamed-buffer_0022-6">"unnamed buffer"</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0023-263"><code>#</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0023-74"><code>#</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0023-73">#</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0024-76"><code>$</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0024-75">$</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0025-78"><code>%</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0025-77">%</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0026-365"><code>&</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0026-364">&</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0026-80"><code>&</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0026-79">&</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0027_003ccharacter_003e-82"><code>'<character></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0028-85">(</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0029-88"><code>)</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0029-87">)</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002a-269"><code>*</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002b-46"><code>+</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002b-45">+</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002c-90"><code>,</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002c-89">,</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002d-92"><code>-</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002e-94"><code>.</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002e-93">.</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002fRE_002f-97"><code>/RE/</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002fRE_002f-95">/RE/</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_002fRE_003ccarriage_002dreturn_003e-96"><code>/RE<carriage-return></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t0-106"><code>0</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t0-105">0</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t0_003ccontrol_002dD_003e-226"><code>0<control-D></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t0_003ccontrol_002dD_003e-225">0<control-D></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003a-108"><code>:</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003a-107">:</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003b-110"><code>;</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003b-109">;</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003c-270"><</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003c-111"><</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003c-motion-112"><code>< motion</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003c_005b_003c-_002e_002e_002e_005d-271"><code><[< ...]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002d_005d_003e-64"><code><control-]></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002d_005d_003e-63"><control-]></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002d_005e_003e-66"><code><control-^></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002d_005e_003e-65"><control-^></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dA_003e-19"><code><control-A></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dA_003e-18"><control-A></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dB_003e-21"><code><control-B></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dB_003e-20"><control-B></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dD_003e-257"><code><control-D></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dD_003e-222"><code><control-D></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dD_003e-221"><control-D></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dD_003e-23"><code><control-D></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dD_003e-22"><control-D></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dE_003e-25"><code><control-E></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dE_003e-24"><control-E></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dF_003e-27"><code><control-F></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dF_003e-26"><control-F></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dG_003e-29"><code><control-G></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dG_003e-28"><control-G></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dH_003e-232"><code><control-H></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dH_003e-231"><control-H></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dH_003e-31"><code><control-H></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dH_003e-30"><control-H></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dJ_003e-34"><code><control-J></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dJ_003e-33"><control-J></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dL_003e-40"><code><control-L></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dL_003e-39"><control-L></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dM_003e-44"><code><control-M></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dM_003e-43"><control-M></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dN_003e-36"><code><control-N></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dN_003e-35"><control-N></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dP_003e-48"><code><control-P></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dP_003e-47"><control-P></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dR_003e-42"><code><control-R></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dR_003e-41"><control-R></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dT_003e-228"><code><control-T></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dT_003e-227"><control-T></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dT_003e-52"><code><control-T></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dT_003e-51"><control-T></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dU_003e-54"><code><control-U></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dU_003e-53"><control-U></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dW_003e-240"><code><control-W></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dW_003e-56"><code><control-W></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dW_003e-55"><control-W></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dX_003e_005b0_002d9A_002dFa_002df_005d_002b-244"><code><control-X>[0-9A-Fa-f]+</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dY_003e-58"><code><control-Y></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dY_003e-57"><control-Y></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dZ_003e-372"><code><control-Z></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dZ_003e-60"><code><control-Z></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003ccontrol_002dZ_003e-59"><control-Z></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cend_002dof_002dfile_003e-258"><code><end-of-file></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cerase_003e-230"><code><erase></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cerase_003e-229"><erase></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cescape_003e-236"><code><escape></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cescape_003e-235"><escape></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cescape_003e-62"><code><escape></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cescape_003e-61"><escape></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cinterrupt_003e-246"><code><interrupt></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cinterrupt_003e-245"><interrupt></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cinterrupt_003e-218"><code><interrupt></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cinterrupt_003e-217"><interrupt></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cinterrupt_003e-1"><interrupt></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cline-erase_003e-238"><code><line erase></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cliteral_002dnext_003e-234"><code><literal-next></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cnewline_003e-9"><newline></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cnul_003e-220"><code><nul></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cnul_003e-219"><nul></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cspace_003e-68"><code><space></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cspace_003e-67"><space></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003cword-erase_003e-242"><code><word erase></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003d-273"><code>=</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003d-272">=</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003e-274">></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003e-114"><code>></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003e-113">></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003e_005b_003e-_002e_002e_002e_005d-275"><code>>[> ...]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003fRE_003ccarriage_002dreturn_003e-99"><code>?RE<carriage-return></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003fRE_003f-100"><code>?RE?</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_003fRE_003f-98">?RE?</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_0040-116"><code>@</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_0040-115">@</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005b_005b-164"><code>[[</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005b_005b-163">[[</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005bcount_005d-_0028-86"><code>[count] (</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005bcount_005d-C-122"><code>[count] C</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005brange_005d_0021-261"><code>[range]!</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005d_005d-166"><code>]]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005d_005d-165">]]</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005e-168"><code>^</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005e-167">^</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005e_003ccontrol_002dD_003e-224"><code>^<control-D></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005e_003ccontrol_002dD_003e-223">^<control-D></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005f-170"><code>_</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_005f-169">_</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0060_003ccharacter_003e-84"><code>`<character></code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0060_003ccharacter_003e-83">`<character></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-a-172"><code>a</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-a-171">a</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-A-118"><code>A</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-A-117">A</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-a_005bppend_005d_005b_0021_005d-279"><code>a[ppend][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ab_005bbrev_005d-277"><code>ab[brev]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-abbrev-276">abbrev</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-altwerase-410">altwerase</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-append-278">append</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ar_005bgs_005d-281"><code>ar[gs]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-args-280">args</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-autoindent-411">autoindent</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-autoprint-412">autoprint</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-autowrite-413">autowrite</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-b-174"><code>b</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-b-173">b</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-B-120"><code>B</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-B-119">B</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-backup-414">backup</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-beautify-415">beautify</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-bg-283"><code>bg</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-bg-282">bg</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-buffer-267"><code>buffer</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-buffer-5">buffer</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-c-176"><code>c</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-c-175">c</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-C-121">C</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-c_005bhange_005d_005b_0021_005d-285"><code>c[hange][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cd-286">cd</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cd_005b_0021_005d-289"><code>cd[!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cdpath-416">cdpath</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cedit-417">cedit</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-change-284">change</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-chd_005bir_005d_005b_0021_005d-288"><code>chd[ir][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-chdir-287">chdir</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-co_005bpy_005d-292"><code>co[py]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-columns-418">columns</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-comment-419">comment</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-copy-290">copy</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cs_005bcope_005d-295"><code>cs[cope]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-cscope-294">cscope</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-d-178"><code>d</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-d-177">d</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-D-124"><code>D</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-D-123">D</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-d_005belete_005d-297"><code>d[elete]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-delete-296">delete</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-di_005bsplay_005d-299"><code>di[splay]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-directory-420">directory</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-display-298">display</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-DOUBLEQUOTE-253">DOUBLEQUOTE</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-e-180"><code>e</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-e-179">e</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-E-126"><code>E</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-E-125">E</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-e_005bdit_005d_005b_0021_005d-301"><code>e[dit][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-edcompatible-421">edcompatible</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-edit-300">edit</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-errorbells-423">errorbells</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-escapetime-422">escapetime</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ex_005b_0021_005d-302"><code>ex[!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-exrc-424">exrc</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-extended-425">extended</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-exu_005bsage_005d-307"><code>exu[sage]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-exusage-306">exusage</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-f-182"><code>f</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-f-181">f</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-F-128"><code>F</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-F-127">F</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-f_005bile_005d-309"><code>f[ile]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-fg-311"><code>fg</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-fg-310">fg</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-file-308">file</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-filec-426">filec</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-flash-427">flash</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-G-130"><code>G</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-G-129">G</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_005blobal_005d-313"><code>g[lobal]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-global-312">global</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-H-132"><code>H</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-H-131">H</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-h-32"><code>h</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-hardtabs-428">hardtabs</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-he_005blp_005d-317"><code>he[lp]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-help-316">help</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-i-184"><code>i</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-i-183">i</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-I-134"><code>I</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-I-133">I</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-i_005bnsert_005d_005b_0021_005d-319"><code>i[nsert][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-iclower-429">iclower</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ignorecase-430">ignorecase</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-insert-318">insert</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-J-136"><code>J</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-J-135">J</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-j-38"><code>j</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-j-37">j</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-j_005boin_005d_005b_0021_005d-321"><code>j[oin][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-join-320">join</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-k-329"><code>k</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-k-327">k</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-k-50"><code>k</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-k-49">k</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-keytime-431">keytime</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-L-138"><code>L</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-L-137">L</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-l-70"><code>l</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-l-69">l</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-l_005bist_005d-323"><code>l[ist]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-leftright-432">leftright</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-lines-433">lines</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-lisp-434">lisp</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-list-435">list</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-list-322">list</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-lock-436">lock</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-m-186"><code>m</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-m-185">m</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-M-140"><code>M</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-M-139">M</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-m_005bove_005d-331"><code>m[ove]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ma_005brk_005d-328"><code>ma[rk]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-magic-437">magic</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-map-324">map</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-map_005b_0021_005d-325"><code>map[!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-mark-326">mark</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-matchtime-438">matchtime</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-mesg-439">mesg</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-MINUSSIGN-91">MINUSSIGN</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-mk_005bexrc_005d_005b_0021_005d-333"><code>mk[exrc][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-mkexrc-332">mkexrc</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-modelines-441">modelines</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-move-330">move</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-msgcat-440">msgcat</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-n-104"><code>n</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-n-103">n</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-N-102"><code>N</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-N-101">N</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-n_005bext_005d_005b_0021_005d-335"><code>n[ext][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-next-334">next</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-noprint-442">noprint</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-nu_005bmber_005d-265"><code>nu[mber]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-number-443">number</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-o-188"><code>o</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-o-187">o</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-O-142"><code>O</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-O-141">O</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-o_005bpen_005d-337"><code>o[pen]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-octal-444">octal</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-open-445">open</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-open-336">open</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-optimize-446">optimize</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-p-190"><code>p</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-p-189">p</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-P-144"><code>P</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-P-143">P</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-p_005brint_005d-343"><code>p[rint]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-paragraphs-447">paragraphs</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-path-448">path</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-pre_005bserve_005d-339"><code>pre[serve]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-preserve-338">preserve</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-prev_005bious_005d_005b_0021_005d-341"><code>prev[ious][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-previous-340">previous</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-print-449">print</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-print-342">print</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-prompt-450">prompt</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-pu_005bt_005d-345"><code>pu[t]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-put-344">put</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-Q-146"><code>Q</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-Q-145">Q</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-q_005buit_005d_005b_0021_005d-347"><code>q[uit][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-quit-346">quit</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-r-192"><code>r</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-r-191">r</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-R-148"><code>R</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-R-147">R</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-r_005bead_005d_005b_0021_005d-349"><code>r[ead][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-read-348">read</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-readonly-451">readonly</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-rec_005bover_005d-351"><code>rec[over]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-recdir-452">recdir</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-recover-350">recover</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-redraw-453">redraw</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-remap-454">remap</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-report-455">report</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-res_005bize_005d-353"><code>res[ize]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-resize-352">resize</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-rew_005bind_005d_005b_0021_005d-355"><code>rew[ind][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-rewind-354">rewind</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ruler-456">ruler</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-s-194"><code>s</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-s-193">s</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-S-150"><code>S</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-S-149">S</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-s_005bubstitute_005d-363"><code>s[ubstitute]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-scroll-457">scroll</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-se_005bt_005d-357"><code>se[t]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-searchincr-458">searchincr</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-sections-459">sections</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-secure-460">secure</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-set-356">set</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-sh_005bell_005d-359"><code>sh[ell]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-shell-461">shell</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-shell-358">shell</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-shellmeta-462">shellmeta</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-shiftwidth-463">shiftwidth</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-showmatch-464">showmatch</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-showmode-465">showmode</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-sidescroll-466">sidescroll</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-slowopen-467">slowopen</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-so_005burce_005d-361"><code>so[urce]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-source-360">source</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-sourceany-468">sourceany</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-splitting_002c-vertically-305">splitting, vertically</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-SQUOTE_003ccharacter_003e-81">SQUOTE<character></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-st_005bop_005d_005b_0021_005d-371"><code>st[op][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-stop-370">stop</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-su_005bspend_005d_005b_0021_005d-369"><code>su[spend][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-substitute-362">substitute</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-suspend-368">suspend</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-t-293"><code>t</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-t-291">t</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-t-196"><code>t</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-t-195">t</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-T-152"><code>T</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-T-151">T</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ta_005bg_005d_005b_0021_005d-374"><code>ta[g][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tabstop-469">tabstop</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tag-373">tag</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-taglength-470">taglength</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagn_005bext_005d_005b_0021_005d-376"><code>tagn[ext][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagnext-375">tagnext</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagp_005bop_005d_005b_0021_005d-378"><code>tagp[op][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagp_005brev_005d_005b_0021_005d-380"><code>tagp[rev][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagpop-377">tagpop</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagprev-379">tagprev</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tags-471">tags</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagt_005bop_005d_005b_0021_005d-382"><code>tagt[op][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tagtop-381">tagtop</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-term-472">term</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-terse-473">terse</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-tildeop-474">tildeop</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-timeout-475">timeout</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ttywerase-476">ttywerase</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-u-198"><code>u</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-u-197">u</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-U-154"><code>U</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-U-153">U</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-u_005bndo_005d-386"><code>u[ndo]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-una_005bbbrev_005d-384"><code>una[bbrev]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-unabbrev-383">unabbrev</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-undo-385">undo</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-unm_005bap_005d_005b_0021_005d-388"><code>unm[ap][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-unmap-387">unmap</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-v-315"><code>v</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-v-314">v</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ve_005brsion_005d-390"><code>ve[rsion]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-verbose-477">verbose</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-version-389">version</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-vertical-split-304">vertical split</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-vi_005bsual_005d-392"><code>vi[sual]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-vi_005bsual_005d_005b_0021_005d-394"><code>vi[sual][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-visual-393">visual</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-visual-391">visual</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-viu_005bsage_005d-396"><code>viu[sage]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-viusage-395">viusage</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-vs_005bplit_005d_005b_0021_005d-303"><code>vs[plit][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w-200"><code>w</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w-199">w</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-W-156"><code>W</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-W-155">W</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w1200-479">w1200</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w300-478">w300</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w9600-480">w9600</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w_005brite_005d-399"><code>w[rite]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-w_005brite_005d_005b_0021_005d-398"><code>w[rite][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-warn-481">warn</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-whitespace-7">whitespace</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-window-482">window</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-windowname-483">windowname</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wn-400">wn</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wn_005b_0021_005d-401"><code>wn[!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-word-13">word</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wq-402">wq</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wq_005b_0021_005d-403"><code>wq[!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wraplen-484">wraplen</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wrapmargin-485">wrapmargin</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-wrapscan-486">wrapscan</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-write-397">write</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-writeany-487">writeany</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-x-202"><code>x</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-x-201">x</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-X-158"><code>X</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-X-157">X</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-x_005bit_005d_005b_0021_005d-405"><code>x[it][!]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-xit-404">xit</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-y-204"><code>y</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-y-203">y</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-Y-160"><code>Y</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-Y-159">Y</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ya_005bnk_005d-407"><code>ya[nk]</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-yank-406">yank</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-z-409"><code>z</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-z-408">z</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-z-206"><code>z</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-z-205">z</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ZZ-162"><code>ZZ</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-ZZ-161">ZZ</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_007b-208"><code>{</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_007b-207">{</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007c-210"><code>|</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007c-209">|</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_007d-212"><code>}</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_0040_007d-211">}</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-367"><code>~</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-366">~</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-216"><code>~</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-215">~</a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-214"><code>~</code></a>: <a href="#TOC0">1 Description</a></li>
<li><a href="#index-g_t_007e-213">~</a>: <a href="#TOC0">1 Description</a></li>
</ul><!-- Force the TOC to an odd page, in case it's a duplex printer. -->
</body></html>
|