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
|
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
.reverse {color: white; background-color: black;}
.linedisp {color: red;}
.unilineend {color: cyan;}
.unispecial {background-color: cyan;}
.uniillegal {background-color: cyan;}
.items {list-style-type: none;}
code {font-weight: bold;}
code.option {font-weight: normal;}
</style>
<script language="JavaScript">
top.select ("mined");
</script>
<title>mined editor</title>
</head>
<body>
<h2>NAME</h2>
<dl><dd>
mined - a text editor
</dl>
<h2>SYNTAX</h2>
<dl><dd>
<code>mined</code>
[ <code>-</code>/<code>+</code>options ]
[ <code>+</code>line ]
[ <code>+/</code>search ]
[ files ... ]
<p>
<code>xmined</code> ...
<br>
<code>umined</code> ...
<br>
<code>lmined</code> ...
<p>
<code>wmined</code> ...
</dl>
<h2>DESCRIPTION</h2>
<dl>
<dd>Mined is a text editor with
<dd>
<ul type=disk>
<h4>Good interactive features</h4>
<li>Intuitive user interface
<li>Logical and consistent concept of text entities and
navigating or modifying text
(without ancient line-end handling limitations or
insert/append confusion)
<li>Supports various control styles:
<br>Editing with command control, function key control, or menu control
<br>Navigation by cursor keys, control keys, mouse or scrollbar
<li>Comprehensive menus (driven by keyboard or mouse)
<li>"HOP" key paradigm doubles the number of navigation functions
that can be most easily reached and remembered by
intuitively amplifying the associated function
<li>Immediate adjustment if the window size is changed, in any
state of interaction
</ul>
</dd>
<dd>
<ul type=disk>
<h4>Versatile character encoding support</h4>
<li>Extensive Unicode support, including double-width and combining characters,
script highlighting,
various methods of character input support
(mnemonic, numeric, mapped keyboard),
<br>Support of bidirectional terminals, Arabic ligature joining
<li>East Asian character set support: handling of major CJK
encodings (including GB18030 and full EUC-JP) in
either Unicode terminal or CJK terminal,
<br>Support of CJK input methods by enhanced keyboard
mapping including multiple choice mappings (handled by
a pick list menu);
<img align=absmiddle src=new-rot.gif>
characters in the pick list being sorted by relevance of Unicode ranges
<li>Auto-detection of text character encoding, edits files with
mixed character encoding sections (e.g. mailboxes)
<li>Auto-detection of UTF-8 / CJK terminal mode and detailed features
(like different Unicode width and combining data versions)
<li>Encoding support tested with:
xterm, mlterm, hanterm, cxterm, rxvt, linux console
</ul>
</dd>
<dd>
<ul type=disk>
<h4>Many useful text editing capabilities</h4>
<li>Many text editing features, e.g. paragraph wrapping,
smart quotes (with quotation marks style selection and
<img align=absmiddle src=new.gif> auto-detection),
multi-line support in search and replacement patterns
<li>Cross-session paste buffer (copy/paste between multiple,
even subsequent or remote, invocations of mined)
<li>Multiple paste buffers (emacs-style)
<li>Program editing features, HTML support and syntax highlighting,
identifier and function definition search, also across files
<li>Search and replacement patterns can contain embedded newlines
<li>Systematic text and file handling safety, avoiding loss of data
<li>Visible indications of special text contents
(TAB characters, different line-end types, character
codes that cannot be displayed in the current mode)
<li>Full binary transparent editing with visible indications
(illegal UTF-8, mixed line end types, NUL characters, ...)
<li>Optional emacs command mode
</ul>
</dd>
<dd>
<ul type=disk>
<h4>Small-footprint operation and portability</h4>
<li>Plain text mode (terminal) operation
<li>Instant start-up
<li>Runs on many platforms: Unix (Linux/Sun/HP/BSD/Mac and more),
DOS (djgpp), Windows (cygwin)
</ul>
</dd>
</dl>
<dl><dd>
<p>
This manual contains the main topics
<ul>
<li><a href=#options>Command line options</a>
<hr align=left width=50%>
<li><a href=#editing>Editing text with mined</a>, an overview
<ul>
<li><dd><a href=#keylayout>Key layout</a></dd>
<li><dd><a href=#hop>The HOP function</a></dd>
<li><dd><a href=#mousemenus>Mouse control and Menus</a></dd>
<li><dd><a href=#pastebuffers>Paste buffers</a></dd>
<li><dd><a href=#markerstack>Text position marker stack</a></dd>
<li><dd><a href=#justification>Paragraph justification</a></dd>
<li><dd><a href=#autoindent>Auto indentation and Structure input support</a></dd>
<li><dd><a href=#searchmultilines>Search and replace multiple lines</a></dd>
</ul>
<li><a href=#inputsupport>Overview: input support features</a>
<li><a href=#working>Handling files with mined</a>
<ul>
<li><dd><a href=#tags>Tags file support</a></dd>
<li><dd><a href=#datasecurity>Data security</a></dd>
<li><dd><a href=#binarytransparency>Line end modes and binary-transparent editing</a></dd>
<li><dd><a href=#memory>Memory of file position and editing style parameters</a></dd>
<li><dd><a href=#versioncontrol>Version control integration</a></dd>
<li><dd><a href=#printing>Printing</a></dd>
</ul>
<li><a href=#working>Working with mined</a>
<ul>
<li><dd><a href=#flags>Mode indication flags</a></dd>
<li><dd><a href=#highlighting>HTML support</a></dd>
<li><dd><a href=#visible>Visible indication of line contents</a></dd>
</ul>
<li><a href=#characterinputsupport>Character input support</a>
<ul>
<li><dd><a href=#composedinput>Accented and mnemonic input support</a></dd>
<li><dd><a href=#keymap>Keyboard Mapping and Input Methods</a></dd>
</ul>
<hr align=left width=50%>
<li><a href=#unicode>Unicode support</a>
<ul>
<li><dd><a href=#smartquotes>Smart quotes</a></dd>
<li><dd><a href=#bidi>Bidirectional terminal support</a></dd>
<li><dd><a href=#combined>Combining characters</a></dd>
<li><dd><a href=#joined>Joining characters</a></dd>
</ul>
<li><a href=#cjk>CJK support</a>
<ul>
<li><dd><a href=#cjkinputmethods>CJK input method support</a></dd>
<li><dd><a href=#haninfo>Han character information display</a></dd>
</ul>
<li><a href=#charencoding>Character encoding support</a>
<ul>
<li><dd><a href=#cjkencoding>CJK and mapped 8 bit encoding support</a></dd>
<li><dd><a href=#cjkcombining>Combining characters</a></dd>
</ul>
<li><a href=#terminalencoding>Terminal encoding support</a>
<hr align=left width=50%>
<li><a href=#commands>Mined Command reference (command and key function assignments)</a>
<ul>
<li><dd><a href=#cmdmotion>Cursor and screen motion</a></dd>
<li><dd><a href=#cmdenter>Entering text</a></dd>
<ul>
<li><dd><a href=#controlv>Input support commands</a></dd>
</ul>
<li><dd><a href=#cmdmodify>Modifying text</a></dd>
<li><dd><a href=#cmdbuffer>Text block and buffer operations</a></dd>
<li><dd><a href=#cmdsearch>Search</a></dd>
<li><dd><a href=#cmdfile>File operations</a></dd>
<li><dd><a href=#cmdmenu>Menu</a></dd>
<li><dd><a href=#cmdmisc>Miscellaneous</a></dd>
<li><dd><a href=#cmdmsdos>MSDOS only</a></dd>
<li><dd><a href=#emacs>emacs mode</a></dd>
<li><dd><a href=#wordstar>WordStar mode</a></dd>
</ul>
<hr align=left width=50%>
<li><a href=#configuration>Environment interworking and configuration hints</a>
<ul>
<li><dd><a href=#support>Mined runtime support library</a></dd>
<li><dd><a href=#terminalenv>Terminal environment</a></dd>
<ul>
<li><dd><a href=#localeconv>Locale configuration</a></dd>
<li><dd><a href=#terminalsetup>Terminal setup</a></dd>
<li><dd><a href=#terminalinterworking>Terminal interworking problems</a></dd>
</ul>
<li><dd><a href=#MINEDKEYMAP>Keyboard Mapping / Input Method pre-selection</a></dd>
<li><dd><a href=#smartquotesconf>Smart Quotes style configuration</a></dd>
<li><dd><a href=#haninfoconf>Han info configuration</a></dd>
<li><dd><a href=#bufferconf>Common paste buffer configuration</a></dd>
<li><dd><a href=#keyconf>Keypad configuration</a></dd>
<li><dd><a href=#printconf>Printing configuration</a></dd>
<li><dd><a href=#scriptconf>Compile-time configuration</a></dd>
<li><dd><a href=#msdos>MSDOS-only notes</a></dd>
</ul>
<li><a href=#envvar>Environment variables</a>
<hr align=left width=50%>
<li><a href=#acknowledgements>Author and Acknowledgements</a>
</ul>
<p>
Online help is also available.
</dl>
<a name=options></a>
<p><hr width=95%>
<h2>Command line options</h2>
<dd>Mined can be invoked
<ul>
<li>with or without list of file names
<li>reading from a pipe (reading text from standard input)
<li>writing into a pipe (writing edited text to standard output)
<li>using a script that starts it in a new window
</ul>
<dl><dd>
<h3> Examples</h3>
<dl><dl compact>
<dt><code>mined x</code>
<dd> edits the file x
<dt><code>mined x y z</code>
<dd> edits files x, y, and z
<dt><code>cmd | mined</code>
<dd> edits the output of program <code>cmd</code>;
a file name for saving can be given later
<dt><code>mined x > y</code>
<dd> takes the contents of file x and edits it
for writing into y
<dt><code>mined | mail nn</code>
<dd> edits a text to be mailed
<dt><code>cmd1 | mined | cmd2</code>
<dd> modifies text within a pipe between
program <code>cmd1</code> (output)
and <code>cmd2</code> (as input)
<dt><code>xmined ...</code>
<dd> starts a new xterm and invokes mined in it
<dt><code>umined ...</code>
<dd> starts a new xterm in UTF-8 mode and invokes mined in it
<dt><code>lmined ...</code>
<dd> starts a new xterm in 8 bit mode and invokes mined in it
<dt><code>wmined ...</code>
<dd> (especially on Windows) starts a new rxvt terminal, using
Windows look-and-feel, and invokes mined in it;
the terminal is configured to run in UTF-8 mode which
may work with a future version of rxvt (currently ignored)
</dl></dl>
</dl>
<dl><dd>
<h3> Startup options</h3>
<dl><dl compact>
<dt><code class=option>+</code>number
<dd> Mined positions to the given line number.
<dt><code class=option>+/</code>expr
<dd> Mined initially searches for the given search expression.
<dt><code class=option>-v</code>
<dd> Mined starts in view only mode. The text cannot be modified.
<dt><code class=option>--</code>
<dd> Restricted mode (tool mode): no other files can be edited
or otherwise affected.
<dt><code class=option>++</code>
<dd> End of options; subsequent file name can start with "<code class=option>-</code>" or "<code class=option>+</code>".
<dt><code class=option>+x</code>
<dd> Makes a new file executable (Unix).
</dl></dl>
</dl>
<dl><dd>
<h3> Line end handling (transparent and transforming)</h3>
<dl><dl compact>
<dt><code class=option>-r</code>
<dd> Ignore CR characters (so strip them at line ends).
I.e., read MSDOS text on Unix machines.
<dt><code class=option>-R</code>
<dd> Convert single CR (Mac newline) into LF (Unix newline),
i.e., read MacIntosh text on MSDOS or Unix machines,
transforming the line ends.
<dt><code class=option>+R</code>
<dd> Accept CR (Mac) newlines; don't transform them, use
specific indication for their display.
<dt><code class=option>+u-u</code>
<dd> Interpret Unicode line separator and paragraph separator
as normal characters, not line ends (handling them as
line ends was previously enabled with <code class=option>-uu</code> and is now
on by default).
</dl></dl>
</dl>
<dl><dd>
<h3> Character set and character handling</h3>
<dl><dl compact>
<dt><code class=option>-u</code> <i>(character set)</i>
<dd> Interprets edited text as UTF-8,
disables UTF and CJK auto detection.
<br>
Identical with <code class=option>-EU</code>, ignored if the terminal is
configured or detected to be in CJK mode.
<dt><code class=option>-l</code> <i>(character set)</i>
<dd> Interprets edited text as Latin-1,
disables UTF and CJK auto detection.
(Used to be <code class=option>+u</code> which is still valid for compatibility.)
<br>
Identical with <code class=option>-EL</code>, ignored if the terminal is
configured or detected to be in CJK mode.
<dt><code class=option>+u-u</code> <i>(character handling)</i>
<dd> Interpret text as UTF-8, but interpret Unicode line
separator and paragraph separator as normal
characters, not line ends (handling them as line ends
was previously enabled with <code class=option>-uu</code> and is now on by
default).
<dt><code class=option>-b</code> <i>(character handling)</i>
<dd> Toggle <a href=#righttoleft>"poor man's bidi" mode</a>:
input support for right-to-left scripts, based on
Unicode script ranges.
(Enabled by default unless the terminal is detected to
be in bidi mode; so e.g. in mlterm, poor man's bidi
is disabled by default.)
<dt><code class=option>-c</code> <i>(character handling)</i>
<dd> Selects separated display mode for combined characters
(separating base character and combining characters).
This mode can also be toggled from the eXtra menu or
by clicking on the Combining flag (next to the
character encoding flag) in the flags area.
<dt><code class=option>-C</code> <i>(character set and terminal mode)</i>
<dd> Enables use of CJK encoding (Chinese/Japanese/Korean)
for Han character set.
If UTF-8 terminal mode is selected at the same time
(by auto-detection, environment or option), this will
enable handling of CJK character encoding in a UTF-8
terminal.
Otherwise, mined will assume that it operates in a
CJK terminal (e.g. hanterm or cxterm).
For details, see <a href=#cjkencoding>CJK encoding support</a>.
<a name=encodingoption></a>
<dt><code class=option>-E</code>X <i>(character set)</i>
<dd> Where X is one of B/G/C/J/S/K/H: Selects one of the
supported CJK character encodings for CJK mode and
disables auto-detection of CJK encodings.
Unless <code class=option>-C</code> is also selected, Latin/UTF-8 auto detection
is still active and may override the encoding selected
here.
"X" is a one-letter tag of the encoding; for supported
encodings, see the
<a href=#flags>Mode indication flags</a> listing.
For details, see <a href=#cjkencoding>CJK encoding support</a>.
<dt><code class=option>-E</code>X <i>(character set)</i>
<dd> Where X is one of g/c/j: Selects one of the
CJK character encodings like G/C/J and if running in
a CJK terminal this tells mined to assume that the
terminal cannot display GB18030 4-byte encodings,
CNS 4-byte encodings, EUC-JP 3-byte encodings,
respectively.
<dt><code class=option>-E</code>X <i>(character set)</i>
<dd> Where X is one of U/L or W/Y/M/V/N/T: Selects one of the
character encodings Unicode/UTF-8, Latin-1, or one of the
mapped 8 bit encodings Windows-ANSI, Cyrillic/KOI8-RU,
Mac Roman, VISCII, TCVN, TIS-620.
This is ignored if the terminal is configured or
detected to be in CJK mode.
<a name=optionK></a>
<dt><code class=option>-K</code>X <i>(input method handling)</i>
<dd> Configure the space key to perform a certain function
in keyboard mapping selection menus
("CJK input method pick lists"), where X is one of:
'n' to navigate to the next choice (like cursor-right),
'r' to navigate to the next row (like cursor-down),
's' to select the current choice (like Return).
<dt><code class=option>+K</code> <i>(input method handling)</i>
<dd> Enable keyboard mappings (input methods) even in 8-bit
terminal or when editing a Latin-1 file; the
characters thus entered will mostly only be displayed
by substitute indications, as most characters anyway
when editing UTF-8, CJK encoded, or mapped encoding
(VISCII) files in an 8-bit terminal.
</dl></dl>
</dl>
<dl><dd>
<h3> Terminal mode</h3>
<dl><dl compact>
<dt><code class=option>-U</code> <i>(terminal mode)</i>
<dd> Toggles UTF-8 screen handling assumption, i.e. selects
UTF-8 screen handling unless UTF-8 keyboard input is
already selected (by another <code class=option>-U</code> option or environment
setting).
In the latter case, <code class=option>-U</code> deselects UTF-8 terminal operation.
This option should normally not be used as the mode should
be configured in the environment (see
<a href=#localeconv>Locale configuration</a>).
<dt><code class=option>+U</code> <i>(terminal mode)</i>
<dd> Selects UTF-8 screen handling.
Note that none of the options <code class=option>-U</code> or <code class=option>+U</code> needs to be
used if the environment is correctly configured to
indicate UTF-8 as it should (see <a href=#unicodeenv>
Unicode handling / Terminal environment</a>).
<br>
Also, mined performs auto-detection of UTF-8 terminal
encoding and UTF-8 terminal features (different width
data versions, handling of double-width, combining and
joining characters), so even if the environment is
not correctly configured, mined should work now without
this explicit terminal mode parameter.
<dt><code class=option>+UU</code> <i>(terminal mode)</i>
<dd> Selects <a href=#bidi>bidirectional terminal support</a>.
This mode implies UTF-8 and also assumes that Arabic
ligature joining (of LAM/ALEF combinations) is
applied; it will be handled by mined accordingly.
<dt><code class=option>-cc</code> <i>(terminal mode)</i>
<dd> Assumes that the terminal does not support combining characters.
By default - unless otherwise detected - mined assumes
that combining characters work on UTF-8 terminals and
do not work in CJK terminals.
<dt><code class=option>+c</code> <i>(terminal mode)</i>
<dd> Assumes that the terminal supports combining characters.
This is enabled by default for UTF-8 terminals, and
disabled by default for CJK terminals, unless otherwise
detected.
<dt><code class=option>-C</code> <i>(character set and terminal mode)</i>
<dd> Unless UTF-8 terminal mode is selected at the same time
(by auto-detection, environment or option), mined will
assume that it operates in a CJK terminal (e.g.
hanterm or cxterm) and CJK encoding is assumed.
For details, see <a href=#cjkencoding>CJK encoding support</a>.
<br>
Mined performs auto-detection of certain CJK terminal
features (handling of non-EUC code points, GB18030,
3-byte and 4-byte encodings).
<dt><code class=option>-CC</code> <i>(terminal mode)</i>
<dd> Like <code class=option>-C</code>, and override UTF-8 terminal auto-detection.
This enforces the assumption of a CJK terminal unless
UTF-8 terminal mode is also configured by environment
variable setting.
<dt><code class=option>+C</code> <i>(character set and terminal mode)</i>
<dd> Like <code class=option>-C</code>, but characters encoded in a CJK encoding format
are displayed transparently even if they do not map to
a valid Unicode character.
<dt><code class=option>+CC</code> <i>(terminal mode)</i>
<dd> Implies <code class=option>+C</code>, but even character codes that do not match
the encoding scheme (e.g. wrt. to specified byte ranges)
are written transparently to the terminal.
<dt><code class=option>+CCC</code> <i>(terminal mode)</i>
<dd> Implies <code class=option>+CC</code> and overrides auto-detection of the
terminal capability to display CJK 3-byte / 4-byte codes
which would by default suppress their display if the
terminal does not support them.
<dt><code class=option>-G</code> <i>(terminal mode)</i>
<dd> Toggles display of a subset of the control characters as
block graphics (disabled by default).
<dt><code class=option>+G</code> <i>(terminal mode)</i>
<dd> Enforces use of block graphics for display of menu borders.
May be used if the "alternative character set" capability
is not configured in your system but your terminal does
have the capability.
(Similar but not identical to <code class=option>-Qv</code>.)
</dl></dl>
</dl>
<dl><dd>
<h3> Editing behaviour</h3>
<dl><dl compact>
<dt><code class=option>-w</code>
<dd> Recognise fewer places as word boundaries for word skip
and delete commands.
<dt><code class=option>-a</code>
<dd> Append mode: Append to text buffer or external file for
copy/delete commands instead of replacing it.
<dt><code class=option>+j</code>
<dd> Set justification level 1 (or increment level
previously set by environment variable to 1 or 2):
Level 1 initially enables automatic word wrap at line
end when typing over right margin.
Can be changed by clicking on the j/J flag.
<dt><code class=option>+jj</code>
<dd> Set justification level 2:
Level 2 initially enables automatic word wrap at line
end when typing within paragraph; buggy.
Can be changed by clicking on the j/J flag.
<dt><code class=option>-j</code>
<dd> Set justification level 1 or 2 (other than previously
set).
Can be changed by clicking on the j/J flag.
<dt><code class=option>-T</code>
<dd> When moving vertically over a TAB character from a line
position which would have been inside the TAB column range,
the default behaviour is to position on the left end of the
TAB. This option changes that to position right of the TAB.
</dl></dl>
</dl>
<dl><dd>
<h3> Appearance</h3>
<dl><dl compact>
<img align=right valign=bottom src=menu.png>
<dt><code class=option>-Q</code>X
<dd> Select menu border style, where X is one of
<ul>
<dd><li>s: simple border,
<li>r: rounded corners,
<li>f: fat border,
<li>d: double border,
<li>a: ASCII border (can be combined with another option <code class=option>-Qs</code> or <code class=option>-Qr</code>),
<li>v: VT100 alternate character set graphics border,
<li>@: reverse blank border,
<li>Q: stylish selection bar for navigating menu items, see image
(can be combined with another option <code class=option>-Qs</code> or <code class=option>-Qr</code> or <code class=option>-Qf</code>).
</ul>
Mined sets an appropriate default based on its
assumptions of the terminal capabilities.
</dl></dl>
</dl>
<dl><dd>
<h3> Further mode selection, interface and display behaviour</h3>
<dl><dl compact>
<dt><code class=option>-4</code>
<dd> Set TAB size to 4 rather than 8.
The effective TAB size can also be toggled while
editing with the ESC T command.
<dt><code class=option>-8</code>
<dd> Set TAB size to 8. (May be used on command line to override
TAB size being set to 4 be MINED environment variable.)
The effective TAB size can also be toggled while
editing with the ESC T command.
<dt><code class=option>-L</code>N
<dd> (N is a number) Define mouse wheel movement to scroll
by N lines. Control-mouse-wheel always scrolls by 1 line.
Shift-mouse-wheel scrolls by 1 page.
<dt><code class=option>-e</code>
<dd> Select <a href=#emacs>emacs mode</a>. This assigns
functions to control keys, M-X commands (ESC commands,
using the "meta" key as emacs calls the Alt prefix)
and C-X commands as defined by the emacs editor. Also
the emacs paste buffer ring and cut/paste behaviour is
enabled.
<dt><code class=option>+V</code>
<dd> Enable emacs-style paste buffer functions for
"delete word" and "delete to end of line" commands
(^T, ^K), and place the cursor behind the pasted
regions after buffer insertion.
(May become the default in a future version, disabled
by <code class=option>-V</code>.)
<dt><code class=option>-W</code>
<dd> Select <a href=#wordstar>WordStar mode</a>. This
configures WordStar command key layout and enables
many functions of the ^K, ^O, and ^Q menus.
<dt><code class=option>-B</code>
<dd> Backspace deletes right, Delete deletes left.
But see also "Automatic backspace mode adaptation"
<a href=#backspaceadaptation>below</a>.
<dt><code class=option>-k</code>
<dd> Assign the more usual functions "goto line beginning",
"goto line end" and "delete character" to the Home,
End and Delete keys of the right keypad.
The (assumedly more useful) mined default is to assign
the frequently used paste buffer functions (mark,
copy, cut) to these keys.
In any case, shifted keys (Shift-Home etc) will invoke
the according paste buffer functions and Control-Home etc.
the more widespread functions to these keys, provided
your terminal supports it (see
<a href=#keyconf>Keypad configuration</a>
for further hints).
<dt><code class=option>-*</code>
<dd> Disable mouse support.
<dt><code class=option>-m</code> (default)
<dd> ESC ESC proceeds to the next file (after asking to save
if appropriate) and exits after the last file.
<dt><code class=option>+m</code>
<dd> ESC ESC exits mined (after asking to save if appropriate).
<dt><code class=option>-M</code>
<dd> Disables mouse control and pull-down and pop-up menus.
<dt><code class=option>-o</code>N
<dd> Select scrollbar display mode.
N=0 disables the scrollbar (may speed up editing on
slow remote lines), N=1 enables cell-grained
scrollbar display, N=2 (default) enables finer-grained
scrollbar display on a UTF-8 terminal.
For backwards compatibility, <code class=option>-o</code> without a subsequent
digit toggles scrollbar.
<dt><code class=option>-p</code>
<dd> Enables distinguished display of line ends and
paragraph ends with different symbols.
<dt><code class=option>-t</code>< tab >
<dd> Sets the character to be used for visible TAB character
indication.
<dt><code class=option>-X</code>
<dd> Disables display of the filename in the window title bar.
<dt><code class=option>-s</code>
<dd> Stay with cursor in top line after page down
or bottom line after page up instead of center line.
<dt><code class=option>-S</code>
<dd> Use scrolling for page up/down.
<dt><code class=option>-d</code>N
<dd> Apply delay between lines of page output to achieve
visually effective display build-up which may help to quickly
focus on the new cursor position (the screen output is
displayed starting from the cursor position, proceeding
to the screen edges).
<br> If N lies between '0' and '9', the respective number of
milliseconds is applied between display of two lines.
If N='0', still an output flush is performed.
If N='-', no delay at all is applied though still the order
of display output is from cursor position to edges.
<br> <i>Default</i>: '-'; configuration is currently disabled
in the Unix version as 'usleep' doesn't seem to be very
portable.
<dt><code class=option>-P</code>
<dd> Enables provisions for proportional display fonts.
(Not really tested as there doesn't seem to exist a
terminal emulator that handles proportional fonts and
cursor positioning correctly.)
<p>
All options are also looked for in the environment variable MINED.
</dl></dl>
</dl>
<a name=editing></a>
<p><hr width=95%>
<h2>Editing text with mined</h2>
<dl><dd>
Mined is always in insert mode. Commands are single control
characters, double key commands starting with ESCAPE, and a
collection of function keys (for various types of keyboards and
terminals). As a specialty, note the prefixing 'HOP KEY' which
amplifies the effect of certain commands "just as you would expect";
this provides for more command flexibility without having to
remember too many keys. It is described in a separate section
below.
<a name=keylayout></a>
<h3> Key layout</h3>
Control key layout for basic movement functions is topographic
on the left-hand side of the keyboard (an idea originating
from early editors, when keyboards didn't have cursor keypads).
(Although using a cursor block is more comfortable, a simple
set of control key assignments is useful as a fallback on
terminals or remote connections with reduced functionality.)
<p>
The right-hand cursor block of typical keyboards is assigned
the most important movement and paste buffer functions.
<dl>
<dt><b>Keypad assignment features:</b>
<dd>
<li>central placement of HOP key (see below)
<li>integration of frequently used copy/paste functions
<pre>
+------+------+------+
| (7) | (8) | (9) |
| Mark | ^ | PgUp |
+------+------+------+
| (4) | (5) | (6) |
| <- | HOP | -> |
+------+------+------+
| (1) | (2) | (3) |
| Copy | v | PgDn |
+------+------+------+
| (0) | (.) |
| Paste | Cut |
+------+------+------+
</pre>
</dl>
<p> Note that the mined keypad function assignment as shown here
deviates from the more usual assignment of Home/End to
"move to beginning/end of line" and Del to "delete character".
This is deliberately designed to provide more useful functions
to easily available keys, while e.g. line movement can also
easily be achieved with HOP cursor-left or HOP cursor-right,
respectively, and character deletion can still be done with
the Del key on the smaller keypad.
This is considered much more useful than the
"standard assignment" although now and then a user is
irritated by it.
<br> There is an option <code class=option>-k</code> to switch to the "standard assignment".
Also the respective keys pressed together with the control key
invoke the "standard functions". In <code class=option>-k</code> mode, the paste buffer
functions can be invoked by pressing these keys together with
the shift key. This behaviour depends on proper keyboard
configuration, see <a href=#keyconf>Keypad configuration</a>
for details.
<br>
<a name=hop></a>
<h3> The HOP function</h3>
This function, triggered by any of the HOP keys, amplifies (or
modifies) functions as listed below. To achieve the combined
function, first press any key that is assigned the HOP
function, then any key assigned the second function:
<dl>
<dd><table>
<tr valign=top><td>HOP - char left
<td> move cursor to beginning of current line
<tr valign=top><td>HOP - char right
<td> move cursor to end of current line
<tr valign=top><td>HOP - line up
<td> move cursor to top of screen
<tr valign=top><td>HOP - line down
<td> move cursor to bottom of screen
<tr valign=top><td>HOP - scroll up
<td> scroll half a screen up
<tr valign=top><td>HOP - scroll down
<td> scroll half a screen down
<tr valign=top><td>HOP - page up
<td> move to beginning of file
<tr valign=top><td>HOP - page down
<td> move to end of file
<tr valign=top><td>HOP - word left
<td> move cursor to previous ";" or "."
<tr valign=top><td>HOP - word right
<td> move cursor to next ";" or "."
<tr valign=top><td>HOP - delete tail of line/line end
<td> delete whole line
<tr valign=top><td>HOP - delete whole line
<td> delete tail of line
<tr valign=top><td>HOP - delete previous character
<td> delete beginning of line
<tr valign=top><td>HOP - set mark
<td> go to mark
<tr valign=top><td>HOP - search
<td> search for current identifier
<tr valign=top><td>HOP - search next
<td> repeat previous (last but one) search
<tr valign=top><td>HOP - copy/cut
<td> copy or cut, but append to buffer
<tr valign=top><td>HOP - save buffer
<td> save buffer, but append to file
<tr valign=top><td>HOP - paste buffer
<td> paste "inter-window buffer",
which is the last saved buffer by any invocation
of mined on the same machine by the same user.
<tr valign=top><td>HOP - edit next file
<td> edit last file
<tr valign=top><td>HOP - edit previous file
<td> edit first file
<tr valign=top><td>HOP - exit current file
<td> exit mined
<tr valign=top><td>HOP - suspend
<td> suspend without writing file
<tr valign=top><td>HOP - show status line
<td> toggle permanent status line
<tr valign=top><td>HOP - enter HTML tag (alternate opening/closing)
<td> embed copy area in HTML tags
</table>
</dl>
</dl>
<dl><dd>
While a pull-down or pop-up menu is opened, any HOP key or the
blank key or the middle mouse button toggles the HOP amplifier
for a function subsequently invoked in the menu; the menu
redisplays with function names changed where applicable.
<h3> Character-oriented navigation and editing</h3>
From the traditional restriction of Unix tools to the line as a
unit of operation, other editors have derived a line-oriented
movement and insertion paradigm which is a nuisance for
anyone who wants an editor with decently intuitive operation.
<br> Mined handles the end-of-line character like any ordinary
character during movement and editing operations.
Also search and replace strings can contain line ends.
<a name=mousemenus></a>
<h3> Mouse control and menus</h3>
All versions of mined (Unix, DOS/Windows) support mouse operation.
<br> Mouse control operates on pull-down and pop-up menus, flags,
the text area, the bottom line, and the scroll bar,
in order to provide the most useful functions and menu-driven
command selection at hand.
<p>
<dl>
<i>Summary of mouse functions</i>:
<ul>
<dt>In text area:
<ul>
<li>left click
<dd> moves the text cursor to the mouse position
<li>left click-drag-release
<dd> selects a text area and copies it
to the paste buffer
<li>middle click
<dd> display the text status line
<li>right click
<dd> pops up the quick menu
</ul>
<dt>On scroll-bar column:
<ul>
<li>left click
<dd> moves one page down
<li>middle click
<dd> moves to text position corresponding to cursor
<li>right click
<dd> move one page up
</ul>
<dt>On bottom line (status line):
<ul>
<li>left click
<dd> moves one page down
<li>middle click
<dd> displays the text status line
<li>right click
<dd> move one page up
</ul>
<dt>On menu header (in menu area of upper line):
<ul>
<li>any click
<dd> pulls down menu
</ul>
<dt>On flag indication (in flag area of upper line):
<ul>
<li>any click
<dd> toggles flag
</ul>
</ul>
</dl>
</dl>
<dl><dd>
<p> <i>Configuration hint</i>: To enable mouse operation in a Windows
DOS box, deactivate "QuickEdit mode" in the properties menu.
<h3> Menus</h3>
Mined provides three kinds of menus, all can be opened with
either mouse clicks or commands.
The menus offer the most important editing functions (apart
from simple movement).
Some menus have their items grouped into sections, some of which
have subtitles.
<br>The HOP flag can be toggled while a menu is open with any
of the HOP key, ^G, Blank, or the middle mouse button.
When a pull-down menu is opened with the middle mouse button,
the HOP variation is initially triggered, offering the HOP
versions of the menu's items.
<br>The three menu groups are used as follows:
<dl>
<ul>
<li>The <i>pull-down menus</i> can be opened with the mouse or
from the keyboard (Alt-f or ESC f for the file menu etc.,
using the capital letter from the menu title as a small
letter).
<li>The <i>flag menus</i> are opened by clicking the
right mouse button on one of the flags in the flags area
(right part of top screen line).
They offer a choice of the available settings and thus allow
to select among them in a more intuitive way than by just
toggling the flag.
Also the flag menus have optional markers in front of each
item showing which items are currently active (since
mined 2000.10).
(The Info menu, Input Method (Keyboard Mapping) menu, Smart
Quotes menu, Encoding menu can also be opened with Alt-F10,
ESC K or Alt-K, ESC Q or Alt-Q, ESC E or Alt-E, respectively.)
<li>The <i>pop-up menu</i> is placed above the text area and
can be opened with a right-click or Alt-Space (ESC Space).
</ul>
When a menu is open, the cursor-left or cursor-right keys
cycle through the pull-down and flag menus.
</dl>
<p> <dl>There are three methods to navigate menus:
<ul>
<li>With the keyboard: open menu as described above, navigate
with cursor keys or (since mined 2000.10) by typing the first
letter of the desired menu item (which cycles through all items
starting with that letter), activate with Return key.
<li>With mouse clicks: open menu with click (and release)
mouse button, switch to other menu with another click, click
on item to activate it. The mouse wheel may be used to navigate
menu items.
<li>With mouse dragging: open menu with mouse button (left or
right), browse menus and items with button held down, activate
selected item with releasing mouse button.
</ul>
Methods may be mixed, e.g. open a menu with either mouse click
or keyboard, navigate with mouse wheel, then select with Return.
</dl>
</dl>
<dl><dd>
<p> <i>Note:</i> Your mouse driver may be configured to generate
multiple (e.g. 3) mouse wheel events on one mouse wheel
movement (e.g. with Windows).
<p> <i>Configuration hint:</i> On Unix, in order to make Alt work
as a modifier, set the xterm resource metaSendsEscape to true
as suggested in the example file Xdefaults.mined.
(With older versions of xterm, setting eightBitInput to false
may be required instead; this xterm option doesn't actually
disable 8 bit input as its name might suggest.)
<a name=pastebuffers></a>
<h3> Inter-window paste buffer</h3>
Mined can perform copy/paste operations within different
editing sessions (parallel or subsequent invocations of mined):
The command HOP Insert (e.g. ^G ^P) will insert the most
recent paste buffer copied or cut in any of the user's mined
sessions.
This can also work remotely in a network; to configure this
features, see
<a href=#bufferconf>Common paste buffer configuration</a>.
<h3> Multiple paste buffers</h3>
Since mined 2000.8, emacs-style multiple paste buffers are
provided that are organised as a buffer ring. Every buffer
cut or copy operation (that places the text between the marked
and the current position to the buffer) creates a new buffer
and stacks it to the list of buffers.
The commands delete-end-of-line (^K), delete-word (^T) and
delete-end-of-sentence (currently emacs mode only) append to
the top buffer in emacs mode or if mined was started with
the <code class=option>+V</code> option.
<br>
To paste a non-top-most buffer, paste the most recent buffer
first as usual, then use the buffer-ring command
(Alt-Insert-key or Control-F4, or M-y in emacs mode) to
exchange the pasted text with the previous buffer. This
can be repeated, going down the stack of buffers, and at
its bottom, starting over from the top again.
<h3> Text position markers</h3>
A default marker for quick use and additional 10 numbered
text markers are available.
<br>
Marker 0 has a special function: 1. it is set when opening a
file at the memorized position, 2. whenever a new current
marker is set, the previous one is pushed to marker 0.
<a name=markerstack></a>
<h3> Text position marker stack</h3>
In addition to the explicit text markers,
mined implicitly maintains a marker stack to support navigation
and orientation when browsing files.
Whenever a command moves the position by a far distance
(Go to marker, Go to line, Go to file beginning/end,
Go to next/previous file, Search functions including Search
identifier definition across files, Replace with confirm), the
current position is first pushed to this stack.
Later, in order to return to the previous position, use
the command ESC Return (Alt-Return) to move along the positions
in the marker stack.
The command HOP ESC Return (HOP Alt-Return) moves again forward
along the stack.
<a name=justification></a>
<h3> Paragraph justification / word wrap</h3>
Manual paragraph line/word wrap is invoked with the
justify command (ESC j or ESC J); it justifies the current
paragraph (wraps its lines/words) according to the effective
margins and paragraph termination mode.
<br><i>Clever justification</i>: With ESC j, mined automatically
determines left margins depending on the current paragraph and
line contents. Heuristic detection of numbered items will trigger
automatic indentation.
<br><i>Normal justification</i>: With ESC J, mined justifies
strictly according to the margin values currently configured.
<br>See commands listing below "<a href=#escj>ESC j</a>"
for margin setting commands.
<p>
<dl>
<i>Paragraph termination modes</i>:
Two different definitions of paragraph end are available.
<ul>
<li>The primary mode is to add a space at the end of each line
when the paragraph continues and to end the line without
space where the paragraph ends. This seems an intuitive
way and as a big advantage over other approaches, it is
transparent with respect to visual formatting, i.e. no
text property is required that would affect visual layout
of the text.
<br><i>Note</i>: Additional visual support of paragraph end
detection is available with the mined option <code class=option>-p</code> that
distinguishes paragraph/line end display.
<li>The other word-wrap mode is to add an empty (blank-only)
line after each paragraph. Obviously this imposes more
additional requirements on text formatting discipline and
reduces freedom of text layout.
</ul>
The mode in effect is indicated in the mode indication display;
see description <a href=#flags>there</a>.
</dl>
</dl>
<dl><dd>
<a name=autoindent></a>
<h3> Auto indentation</h3>
By default, mined acts in auto-indent mode: When you enter a
newline, the following line will be filled with the same
prefix of white space characters (blank or tab) as the current one.
This option can be toggled from the eXtra menu.
A new line without auto indentation can be entered
with the ^O command.
<p> Auto indentation is automatically suppressed if text is entered
very fast (by heuristic detection of input speed) in order to
allow unmodified copy and paste using terminal mouse functions.
<h4> Structure input commands</h4>
A pair of parentheses with matched indentation can be entered
by prefixing a parenthesis character with HOP.
For example, HOP "{" would enter a pair of "{" "}", both
auto-indented on their respective new line. Other pairs are
"(" ")", "[" "]", "<" ">".
<br> HOP "/" enters an indented Javadoc comment frame.
<h4> Back Tab (Undent function / reverse indent)</h4>
A Backspace from a position that is only preceded by white
space on the line and on the line above will revert the input
position to the previous matching indentation level.
To avoid auto-undentation, use Control-Backspace to delete
only character left. (This only works if Control-Backspace is
enabled in your X configuration, see the example configuration
file Xdefaults.mined in the
<a href=#support>Mined runtime support library</a>.)
<a name=searchmultilines></a>
<h3> Search and replace multiple lines</h3>
Mined has overcome the typical Unix tool limitation of line
orientation in search operations.
Search and replacement patterns can contain embedded newlines.
Enter a linefeed character in the search string with ^V^J or \n.
(In some cases there are still display problems; then update
the screen with the ESC "." command.)
<a name=underline></a>
<h3> Header line underlining</h3>
The command HOP "-" (e.g. Control-G -) underlines the
header line before the cursor position with as many "-"
characters as needed; it applies to the current line unless
the cursor is at a line beginning in which case it applies to
the previous line.
<a name=backspaceadaptation></a>
<h3> Automatic backspace mode adaptation</h3>
The Backarrow and Delete keyboard keys are handled very differently
by operating environments. In addition to the <code class=option>-B</code> option to exchange
their normal function, mined will detect the Unix terminal line
setting for the "erase" function (stty erase ..) and attach the
"Delete character left" function to the key configured there.
For command details, see <a href=#cmddel>below</a>.
</dl>
<a name=inputsupport></a>
<p><hr width=95%>
<h2>Overview: input support features</h2>
<dl><dd>
<h3> Character input</h3>
Mined provides several methods to support input of special
characters that may not be easily available on the keyboard.
<ul>
<li><a href=#composedinput>Accented and mnemonic input support</a>
defines <a href=#accentprefixkeys>Accent prefix function keys</a>
to compose accent combinations for the most frequently used
accented characters such as .
<li>It also provides
<a href=#mnemonicinput>Character input mnemonics</a> for
easily memorisable input of a wide range of characters,
including most composed Unicode characters.
<li><a href=#controlv>Input support commands</a>
include a quick shortcut for two-character mnemonics.
<li><a href=#controlv>Input support commands</a>
also provide for character input by hexadecimal / octal / decimal
character code or Unicode value, including support for
subsequent entry of multiple numeric characters according to
ISO 14755.
<li><a href=#keymap>Keyboard mapping</a> switching the keyboard
to support another script.
This mechanism also provides <i>CJK input methods</i>.
</ul>
<h3> Structured input</h3>
<ul>
<li><a href=#html>HTML tag input</a>
(starting/closing or embedding marked text).
<li><a href=#autoindent>Auto indentation</a> and back TAB.
<li><a href=#autoindent>Structure input commands:</a>
Input of indented matching parentheses and Javadoc frames.
<li><a href=#justification>Paragraph justification</a> (line/word wrap).
<li><a href=#underline>Header line underlining</a>
</ul>
<h3> Special features</h3>
<ul>
<li><a href=#smartquotes>Smart quotes</a> (UTF-8 text mode):
automatic transformation of entered straight quote marks into
typographic quotation marks, as well as smart dashes.
(style can be selected in flags area).
<li><a href=#righttoleft>Right-to-left script input</a> support.
</ul>
</dl>
<a name=editing></a>
<p><hr width=95%>
<h2>Handling files with mined</h2>
<dl><dd>
<a name=tags></a>
<h3> Tags file support</h3>
The ESC t command moves to the definition of an identifier
(on which the cursor should be placed) using the tags file
(generated by the <code>ctags</code> command).
HOP ESC t prompts for an identifier. (Also available from
search or popup menu.)
If a new file is opened for this purpose, the current
file is saved automatically.
<br>Like with some commands, ESC t places the current position
on the position marker stack before going to the location of
the identifier definition. The command ESC Return (Alt-Ret)
moves back to that position, also saving the current file if
needed first.
<a name=datasecurity></a>
<h3> Data security</h3>
<h4> Edited text</h4>
Every care has been taken to prevent loss of the edited text
in case of save errors or accidental quit commands etc.
If mined really needs to terminate in the case of an
unrecoverable error (which has not occurred to me in a recent
released version) or due to an external signal, it will try to
write the edited text into a panic file in the /usr/tmp or
/tmp directory. So only if the temporary area happens to be
full, you would be out of luck.
<h4> Files</h4>
Also, if any command is issued to write to a file not
previously read in (after change of file name or directory,
through copy command) mined prompts for confirmation.
<h3> Pipe output</h3>
In the "write to standard output" mode (i.e. when invoked
within a pipe), only one "file save" operation can be performed
writing to standard output.
If more than one such operations are issued (e.g. using the
ESC w / F2 , F3, or suspend command) only the first one
will write the text buffer to standard output; any subsequent
one is treated as usual (with empty file name).
<a name=binarytransparency></a>
<h3> Line end modes and binary-transparent editing</h3>
Mined is binary transparent. It can handle all types of
line ends (Unix, DOS, optionally Mac and Unicode separators)
simultaneously in the same editing session. They are indicated
by different visible line end indications. Files without
trailing line end can be edited and created (using the delete
character right function on the last line end). NUL characters
are handled as virtual line ends. Lines too long for internal
handling are split transparently (with a "none" virtual
line end).
<br> <i>Unicode mode</i>: Illegal UTF-8 sequences are maintained
transparently. Files with mixed UTF-8 / 8 bit sections can
be edited comfortably.
<br> <i>Input</i>: To enter a NUL character, use ^V # 0 or
^V < NUL or Control-Space > (if the keyboard supports
the latter).
<a name=memory></a>
<h3> Memory of file position and editing style parameters</h3>
If the current directory contains a file named @mined.mar ,
file position memory is enabled.
The current cursor position is stored with every file save
command (even if no write is performed because the text has not
been edited).
<br> When editing that file again, mined will automatically move to
that position (and set text marker 0 to it).
(The association of the position is not with the file itself
but with its relative name from the current directory.)
If the marker file does not yet exist, its creation can be
enforced by prefixing any file writing command with the HOP
function, or with the "Save Position" command from the File menu.
<p> In addition to the current position, mined also stores the
paragraph justification margins (only if automatic paragraph
justification is active) and the selected Smart Quotes style.
<h3> Page length</h3>
The command ESC P sets the number of lines that mined assumes
to be on a page. So the status line can contain the page
number to make finding the current position in a print-out
easy. Also the Goto Line/% command (^G etc.) accepts a final
'p' or 'P' in which cases it positions to the top of the given
page.
This information will be associated and stored with the file
name if file position storing is active (i.e. if the file
@mined.mar exists in the current directory).
<h3> File names</h3>
When entering file names, the leading ~/ notation to refer to
one's home directory is accepted.
<h3> Restricted mode (tool mode)</h3>
Restricted mode is activated with
<pre>
<code class=option>mined --</code> [ filenames ... ]
</pre>
In restricted mode, only the file opened when mined was started can
be edited, no commands changing file name reference, involving other
files (copy/paste), or escaping to a shell command will be allowed.
(When mined is invoked without filename argument, a file name
will be prompted for despite restricted mode, however.)
<a name=versioncontrol></a>
<h3> Version control integration</h3>
From the File menu, checkout and checkin commands are
available that invoke "co" or "ci" scripts, respectively
(which must reside in the user's command search path).
This offers a gateway to ClearCase or other version control
systems; mined applies automatic save or screen update
as appropriate.
<a name=printing></a>
<h3> Printing</h3>
From the File menu, a print command is available that
prints the text currently being edited.
If the script <code>uprint</code> is installed and configured
properly, printing works in any selected character encoding.
See <a href=#printconf>Printing configuration</a> for further
details.
</dl>
<a name=working></a>
<p><hr width=95%>
<h2>Working with mined</h2>
<dl><dd>
<a name=flags></a>
<dd><h3> Mode indication flags</h3>
The right side of the top menu bar displays a number of
one-letter or two-letter indications for certain modes;
the associated flag menus can be opened from here with a
mouse right-click, or the modes can be toggled quickly with
a left-click.
(Keyboard shortcuts for handling flags and menus are also
available.)
<ul>
<li>Information display mode
<ul class=items>
<li> "<code>?</code>": this flag menu offers options
for permanent File info, Char info, or
<a href=#haninfo>Han character information display</a>.
For the latter, further options can be selected
to configure the information shown.
</ul>
<li>(In UTF-8 text and terminal mode or in CJK text mode)
Input Method (Keyboard Mapping)
<ul class=items>
<li> "<code class=reverse>--</code>": no keyboard mapping
is active.
<li> "<font class=reverse>...</font>": a two-letter
input method tag indicates that an according
<a href=#keymap>keyboard mapping</a> is active,
mapping keyboard input to characters of
the selected Unicode script range, or
using a more complex CJK input method involving
"pick list" selection menus.
See <a href=#keymap>Keyboard Mapping</a> below.
<li> Right mouse button on this indication opens a
menu for selection of the desired keyboard mapping.
<li> Left mouse button on this indication cycles
through the available mappings.
</ul>
<li>(In UTF-8 text mode only)
Smart Quotes
<ul class=items>
<li> Two quote marks are displayed that act as
automatic "smart quotes": When you type a "
or ' character (straight double or single quote),
it is replaced by an opening or closing typographic
quote mark as indicated here, depending on the
text context.
<li> Right mouse button on these indications opens a
menu for selection of the desired quotation
marks style.
<li> Left mouse button on these indications cycles
through the available options (in either direction).
</ul>
<li>Character encoding (used for text interpretation)
<ul class=items>
<li> "<code class=reverse>U8</code>":
Unicode/ISO 10646 character set / UTF-8 encoding
<br><i>UTF-8 encoding is auto-detected unless
overridden with <code class=option>-l</code> or <code class=option>-C</code></i>
<li> "<code class=reverse>L1</code>":
Western "Latin-1" character set / ISO 8859-1
(other 8 bit character sets handled transparently
if terminal font matches)
<br><i>8 bit encoding is auto-detected unless
overridden with <code class=option>-u</code> or <code class=option>-C</code></i>
<li> "<code class=reverse>WA</code>":
Western "ANSI" character set / Windows "codepage" 1252
(superset of Latin-1)
<br><i>Windows encoding is not auto-detected</i>
<li> "<code class=reverse>CY</code>":
Cyrillic character set / KOI8-RU encoding
(Russian, Ukrainian, Bjelorussian)
<br><i>KOI8 encoding is not auto-detected</i>
<li> "<code class=reverse>MR</code>":
Mac-Roman character code
<br><i>Mac encoding is not auto-detected</i>
<li> "<code class=reverse>B5</code>":
Traditional Chinese character set /
Big5 encoding with HKSCS extensions
<br><i>CJK encodings are auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-E</code></i>
<li> "<code class=reverse>GB</code>":
Simplified Chinese character set /
GB18030 encoding, includes GBK encoding,
includes GB 2312 / EUC-CN encoding
<br><i>CJK encodings are auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-E</code></i>
<li> "<code class=reverse>CN</code>":
Traditional Chinese character set /
CNS / EUC-TW encoding (including 4-byte code points)
<br><i>CNS encoding is not auto-detected</i>
<li> "<code class=reverse>JP</code>":
Japanese character set / JIS X 0208 / 0212 / 0213 /
EUC-JP encoding (including 3-byte code points)
<br><i>CJK encodings are auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-E</code></i>
<li> "<code class=reverse>sJ</code>":
Japanese character set / Shift-JIS encoding
(including single-byte mappings to Halfwidth Forms)
<br><i>CJK encodings are auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-E</code></i>
<li> "<code class=reverse>KR</code>":
Korean Unified Hangul character set / UHC encoding,
includes KS C 5601 / KS X 1001 / EUC-KR encoding
<br><i>CJK encodings are auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-E</code></i>
<li> "<code class=reverse>Jh</code>":
Korean Johab character set and encoding
<br><i>Johab encoding is not auto-detected</i>
<li> "<code class=reverse>VI</code>":
Vietnamese character set / VISCII encoding
<br><i>VISCII encoding is auto-detected unless
overridden with <code class=option>-u</code>/<code class=option>-l</code>/<code class=option>-C</code></i>
<li> "<code class=reverse>TC</code>":
Vietnamese character set / TCVN encoding
<br><i>TCVN encoding is not auto-detected</i>
<li> "<code class=reverse>TI</code>":
Thai character set / TIS-620 encoding
<br><i>TIS-620 encoding is not auto-detected</i>
</ul>
<li>Combining display (available only if the current text encoding
contains combining characters)
<ul class=items>
<li> "<code></code>": combined display mode
<li> "<code class=unispecial>`</code>": separated display mode:
combining characters are separated from their
base character and displayed with coloured background
</ul>
<li>HOP key active
<ul class=items>
<li> "<code class=reverse>H</code>": HOP applies to next command
<li> "<code>h</code>": HOP not active
</ul>
<li>Edit mode vs. View only mode
<ul class=items>
<li> "<code>E</code>": text is being edited
<li> "<code class=reverse>V</code>": text is being viewed (modification inhibited)
<li> <i>Note</i>: this is not related to a file being
read-only; if you "edit" and modify the text
of a read-only file, you will have to save
to a different file name (or discard)
</ul>
<li>Append mode
<ul class=items>
<li> "<code>=</code>": cut/copy replaces (overwrites) paste buffer
<li> "<code class=reverse>+</code>": cut/copy appends to paste buffer
</ul>
<li>Auto-indent mode
<ul class=items>
<li> "<code class=reverse></code>": auto-indentation enabled: entering a newline
indents the following line like the current one
<li> "<code class=reverse></code>": auto-indentation disabled
</ul>
<li>Automatic paragraph justification levels
<ul class=items>
<li> "<code>j</code>": justification only on request (ESC j command)
<li> "<code class=reverse>j</code>": justification is performed whenever
text is entered beyond the right margin
<li> "<code class=reverse>J</code>": justification is performed whenever
text is inserted and the line exceeds the
right margin (slightly buggy)
</ul>
<li>Paragraph termination definition effective for justification
<ul class=items>
<li> "<code class=reverse> </code>": non-blank line end terminates
paragraph (blank at line end continues paragraph)
<li> "<code class=reverse></code>": empty line terminates paragraph
</ul>
</ul>
<h3> Scrollbar</h3>
By default, mined displays a scrollbar at the right side. It
may be used for position indication within the text and for
relative or absolute positioning with the three mouse buttons.
<br>In a UTF-8 terminal, mined uses Unicode character cell
vertical eighths characters U+2581..U+2587 for a fine-grained
scrollbar display. If your Unicode font doesn't include those
block characters, you may switch to the cell-grained scrollbar
with the <code class=option>-o1</code> option.
<h3> Text position marker stack</h3>
On commands that jump away from the current position (HOP Mark,
File Begin/End, Search, Search identifier definition, Search
current character, Goto Line/%, Goto Next/Previous File),
the current position is remembered in a position stack.
The command ESC Return goes backward, HOP ESC Return forward
in this "stack", even if this means switching the file
being edited.
<a name=highlighting></a>
<a name=html></a>
<h3> HTML support: syntax highlighting and tag entry/matching</h3>
<i>HTML tag entry</i>: With the <a href=#escH>ESC H commands</a>,
opening and closing HTML tags can be entered or (with HOP) a
marked area can be enclosed into HTML tags.
<br><i>Syntax highlighting</i>: HTML tags are displayed in
light blue colour to set them back from the actual text
contents.
Other highlighting modes apply to HTML comments and JSP code.
This option is activated if the file name suffix is
one of .html, .htm, .xml, .jsp, .sgml;
it can be toggled from the eXtra menu.
<br><i>HTML tag matching</i>: With the ESC ( or ESC ) command,
mined searches for the opening / closing HTML tag
corresponding to the current one.
<br><i>Note</i>: While you edit within a line and change its HTML
ending status (by entering or deleting '<' or '>'), the
display status of subsequent lines is not changed. (You may
refresh the display with ESC ".")
<br><i>Configuration hint</i>: The colour used for displaying HTML
tags can be configured with the environment variable MINEDHTML
using an ANSI sequence, e.g. MINEDHTML=34 (the default).
<h3> Script highlighting</h3>
<img align=right src=script-highlighting.png>
It may be desirable to distinguish characters in different
script by displaying their glyphs in different colours.
(This especially allows to distinguish easier between
similar glyphs as they occur in Latin/Greek/Cyrillic scripts.)
<br>Script highlighting is currently pre-configured for
Greek and Cyrillic. It uses the terminal's 256-colour mode
if available.
<br>The scripts to highlight and the colour values to use
can be configured at compile-time.
See <a href=#scriptconf>configuration hints</a> below.
<a name=visible></a>
<h3> Visible indication of line contents and display</h3>
Various options are available to indicate line control characters
(TAB and line-feed) as well as shifted line display (of lines
longer than the screen width).
(So you can see how many dummy blanks there are before the
line ends or how many superfluous blanks precede a TAB character.)
<br> Environment variables can be used to modify these indications.
Some indications may be configured specifically for UTF-8
display mode, given as UTF-8 character in the variable
containing "UTF" in its name (see listing).
<br>Default indications and according configuration variables:
<dl><dd><table name=lineindications border=0>
<tr valign=top><td width=30><code class=linedisp></code>
<td>LF (Unix-type line end)
<br>change with MINEDRET or MINEDUTFRET, may contain
up to 3 characters to configure different appearance
<tr valign=top><td><code class=linedisp></code>
<td>CRLF (MSDOS-type two-character line end)
<tr valign=top><td><code class=linedisp>@</code>
<td>CR (Mac-type line end)
<br>transparently handled and displayed with
<code class=option>+R</code> command line option
<tr valign=top><td><code class=linedisp></code>
<td>NUL character (pseudo line end)
<tr valign=top><td><code class=linedisp></code>
<td>"none" line end (virtual line end as used to split
input lines too long for internal handling; will be
joined into a single line when saving the file)
<tr valign=top><td><code class=unilineend></code>
<td>non-breaking space (character code hex A0)
<tr valign=top><td><code class=unilineend></code>
<td>Unicode line separator
<tr valign=top><td><code class=unilineend></code>
<td>Unicode paragraph separator
<tr valign=top><td><code class=linedisp></code>
<td>end of paragraph (if enabled by <code class=option>-p</code>)
<br>change with MINEDPARA or MINEDUTFPARA
<tr valign=top><td><code class=linedisp></code>
<td>line extending the end of the screen line
<br>(move cursor right to shift line display)
<br>change with MINEDSHIFT
<tr valign=top><td><code class=linedisp></code>
<td>position spanned by TAB character
<br>change with MINEDTAB or MINEDUTFTAB, may contain
up to 3 characters to configure different appearance
within the TAB span
</table></dl>
</dl>
<dl><dd>
<i>Configuration</i>: Display colour of the indications which
are by default red can be changed with the environment
variable MINEDDIM, display colour for Unicode line end
indications with MINEDUNIMARK. Their values should be the
numeric part of an ANSI terminal control sequence, e.g. 31 for
red, "33;44" for yellow text on blue background.
For more details and recommended settings see the example script
file <code>profile.mined</code> in the
<a href=#support>Mined runtime support library</a>.
Default values are compiled in and can be overridden by setting
the variables to empty values.
<h3> Long line splitting</h3>
Mined has an internal line length limit (> ca. 1024 characters).
When opening a file, longer lines are split. This is handled
transparently as virtual "none" line ends are used and indicated.
When saving the file, lines will be joined again.
<h3> Menu display</h3>
Menu borders are displayed using block graphics characters if
they are detected to be available.
(<i>Configuration hint:</i> This depends on the "alternative
character set" being defined in your system's termcap/terminfo
database for the terminal you use. If it's not configured on
your system but you know the terminal has the capability, use
of block graphics for menu border can be enforced with the <code class=option>+G</code>
command line option.)
</dl>
<a name=characterinputsupport></a>
<p><hr width=95%>
<h2>Character input support</h2>
<dl><dd>
Some character input support features support international
scripts (especially with <a href=#keymap>Keyboard Mapping and
Input Methods</a>), others mainly address composite characters.
For the latter, it is useful to explain a few notions:
<dl>
<dt><i>Combining character:</i>
<dd>A character (usually in Unicode) that is defined to combine
with the previous character into a combined character, to be
displayed as a single glyph (visual unit).
<dt><i>Combined character:</i>
<dd>The glyph combination of a Unicode character (base character)
with one or more Unicode combining characters.
<dt><i>Composed character (or composite character):</i>
<dd>A character that has one or more accents - hmm - composed
into it, or is otherwise composed of components, like the ae
ligature, to be displayed as a single glyph. It can be a
single Unicode character or a Unicode combined character
consisting of a Unicode base character and one or two Unicode
combining characters.
<dt><i>Accented character (or diacritic character):</i>
<dd>A special case of a composite character where a letter is
composed with one or more accents.
<dt><i>Compose key:</i>
<dd>A number of system and keyboard vendors have equipped
their keyboards with a "Compose" or "Combine" key. This key -
when configured and interpreted properly by the operating
environment - produces a composed character which is then
provided as input to the application.
</dl>
<a name=composedinput></a>
<h3> Accented and mnemonic input support</h3>
Function keys or character mnemonics can be used to
enter accented or other composite characters.
(This is also known as digraph function with some editors.)
<br>
These character composition functions also work on the prompt line.
<br>
(Any composite character configured on your keyboard can of
course also be entered directly or using the Compose/Combine
key of your keyboard.)
<a name=accentprefix></a>
<h4> Accent prefix function keys</h4>
<p>
For the most common Western European accents, the following
function keys are defined as accent prefix keys:
<dl><dd><table>
<tr><td>F5
<td> diaeresis: composes next input character with diaeresis,
e.g. a
<tr><td>Shift-F5
<td> tilde: composes next input character with tilde,
e.g. a
<tr><td>Control-F5
<td> ring: composes next input character with ring or with cedilla,
e.g. a , c
<tr><td>F6
<td> acute: composes next input character with acute accent
(accent d'aigu),
e.g. a
<tr><td>Shift-F6
<td> grave: composes next input character with grave accent,
e.g. a
<tr><td>Control-F6
<td> circumflex: composes next input character with circumflex accent,
e.g. a
</table></dl>
<p>
For the Sun keyboard, the function keys
R4/- , R5/ , R6/ , R3 , R1 , R2
are attached to the same prefix functions, in this order.
<p>For Vietnamese input support, the following additional
accent prefix keys may be configured (see Xdefaults.mined in
the <a href=#support>Mined runtime support library</a>):
<dl><dd><table>
<tr><td>Control-1
<td> acute:
composes following character with acute
<tr><td>Control-2
<td> grave:
...
<tr><td>Control-3
<td> hook above
<tr><td>Control-4
<td> tilde
<tr><td>Control-5
<td> dot below
<tr><td>Control-6
<td> circumflex
<tr><td>Control-7
<td> breve
<tr><td>Control-8
<td> horn
<tr><td>Control-9
<td> stroke
<tr><td>Alt-1
<td> circumflex and acute
<tr><td>Alt-2
<td> circumflex and grave
<tr><td>Alt-3
<td> circumflex and hook above
<tr><td>Alt-4
<td> circumflex and tilde
<tr><td>Alt-5
<td> circumflex and dot below
<tr><td>Control-Alt-1
<td> breve/horn and acute:
composes following A/a with breve and acute, or
following O/o or U/u with horn and acute
<tr><td>Control-Alt-2
<td> breve/horn and grave:
...
<tr><td>Control-Alt-3
<td> breve/horn and hook above
<tr><td>Control-Alt-4
<td> breve/horn and tilde
<tr><td>Control-Alt-5
<td> breve/horn and dot below
</table></dl>
</dl>
</dl>
<a name=mnemonicinput></a>
<dl><dd>
<h4> Character input mnemonics</h4>
The enter-control-code prefix (^V, or ^Q in emacs mode, or ^P
in WordStar mode) can be used for mnemonic character composition.
This covers accented characters and other mnemonics.
The available mnemonics include RFC1345 mnemonics (extended
to provide generic accent mnemonics for Unicode characters),
mnemonics known from HTML and TeX and useful additional
mnemonics. See <a href=mnemodoc.html>Character Mnemos reference</a>
on the mined web site for a listing.
<br>With mined 2000.10, additional character mnemonics have been
revised and made consistent with generic RFC1345 mnemonics,
redundant mnemonics have been removed, and coverage of all Latin
characters (esp. with multiple accents) has been completed.
<p>
For accent compositions, <i>mnemonic patterns</i>
(generic accent mnemonics) are listed in the following table;
the respective letter to place the accent(s) on is indicated
with an "<code>x</code>" below.
<dl><dd><table name=genericmnemonics border=1>
<tr><th>generic mnemonic
<th>accent placed on the base character ("<code>x</code>")
<tr><td><code>x:</code> <i>or</i> <code>"x</code>
<td>diaeresis (umlaut)
<tr><td><code>x'</code> <i>or</i> <code>x</code>
<td>acute (accent d'aigu)
<tr><td><code>x!</code> <i>or</i> <code>`x</code>
<td>grave
<tr><td><code>x></code> <i>or</i> <code>^x</code>
<td>circumflex
<tr><td><code>x?</code> <i>or</i> <code>~x</code>
<td>tilde
<tr><td><code>x0</code> <i>or</i> <code>x</code>
<td>ring above
<tr><td><code>x,</code>
<td>cedilla
<tr><td><code>x-</code>
<td>macron
<tr><td><code>x(</code>
<td>breve
<tr><td><code>x.</code>
<td>dot above / middle dot
<tr><td><code>x_</code> <i>or</i> <code>_x</code>
<td>line below
<tr><td><code>x/</code>
<td>stroke
<tr><td><code>x"</code>
<td>double acute
<tr><td><code>x;</code>
<td>ogonek
<tr><td><code>x<</code>
<td>caron
<tr><td><code>x2</code>
<td>hook above
<tr><td><code>x9</code>
<td>horn
<tr><td><code>x-></code> <i>or</i> <code>>x</code>
<td>circumflex below
<tr><td><code>x-.</code> <i>or</i> <code>.x</code>
<td>dot below
<tr><td><code>x--.</code> <i>or</i> <code>.x-</code>
<td>dot below and macron
<tr><td><code>x.-.</code> <i>or</i> <code>.x.</code>
<td>dot below and dot above
<tr><td><code>x7</code> <i>or</i> <code>x.-</code>
<td>dot above and macron
<tr><td><code>x~-</code> <i>or</i> <code>x?-</code>
<td>tilde and macron
<tr><td><code>x;-</code>
<td>ogonek and macron
<tr><td><code>x:-</code>
<td>diaeresis and macron
<tr><td><code>x-:</code>
<td>macron and diaeresis
<tr><td><code>x-'</code>
<td>macron and acute
<tr><td><code>x-!</code>
<td>macron and grave
<tr><td><code>-x</code>
<td>bar / topbar
<tr><td><code>,x</code>
<td>comma below / left hook
<tr><td><code>x#</code>
<td>double grave
<tr><td><code>x&</code>
<td>hook
<tr><td><code>%x</code>
<td>retroflex hook
<tr><td><code>x)</code>
<td>inverted breve
<tr><td><code>x-?</code> <i>or</i> <code>?x</code>
<td>tilde below
<tr><td><code>x--:</code> <i>or</i> <code>:x</code>
<td>diaeresis below
<tr><td><code>x-0</code> <i>or</i> <code>ox</code>
<td>ring below
<tr><td><code>x-(</code> <i>or</i> <code>(x</code>
<td>breve below
<tr><td><code>x(-.</code> <i>or</i> <code>.x(</code>
<td>breve and dot below
<tr><td><code>x>-.</code> <i>or</i> <code>.x></code>
<td>circumflex and dot below
<tr><td><code>x9-.</code> <i>or</i> <code>.x9</code>
<td>horn and dot below
<tr><td><code>x'.</code>
<td>acute and dot above
<tr><td><code>x('</code>
<td>breve and acute
<tr><td><code>x(!</code>
<td>breve and grave
<tr><td><code>x(2</code>
<td>breve and hook above
<tr><td><code>x(?</code>
<td>breve and tilde
<tr><td><code>x<.</code>
<td>caron and dot above
<tr><td><code>x,'</code>
<td>cedilla and acute
<tr><td><code>x,(</code>
<td>cedilla and breve
<tr><td><code>x>'</code>
<td>circumflex and acute
<tr><td><code>x>!</code>
<td>circumflex and grave
<tr><td><code>x>2</code>
<td>circumflex and hook above
<tr><td><code>x>?</code>
<td>circumflex and tilde
<tr><td><code>x:'</code>
<td>diaeresis and acute
<tr><td><code>x:<</code>
<td>diaeresis and caron
<tr><td><code>x:!</code>
<td>diaeresis and grave
<tr><td><code>x9'</code>
<td>horn and acute
<tr><td><code>x9!</code>
<td>horn and grave
<tr><td><code>x92</code>
<td>horn and hook above
<tr><td><code>x9?</code>
<td>horn and tilde
<tr><td><code>x0'</code>
<td>ring above and acute
<tr><td><code>x/'</code>
<td>stroke and acute
<tr><td><code>x?'</code>
<td>tilde and acute
<tr><td><code>x?:</code>
<td>tilde and diaeresis
</table></dl>
</dl>
</dl>
<dl><dd>
See also the description of the
<a href=#controlv>^V function</a> below for more
input options.
<br>
Two-letter mnemonics can also be entered in reverse order if
this is unambiguous. This and the generic accent mnemonics
" ^ ` ~ (which are available for convenience in
addition to the less intuitive > ! etc) only works with
two-letter short entry "^Vxy", not with full mnemonic
entry "^V xy... ").
<p>
<a href=#mnemonictrans>Mnemonic character substitution commands</a>
(ESC _ and national variants) replace the two characters at
the cursor position with a suitable composite character (e.g.
accented character) if possible.
<a name=vietnamese></a>
<h3> Vietnamese input support</h3>
<dl>
Vietnamese input support is integrated in the two input mechanisms
previously described.
<ul>
<li>Additional accent prefix function keys that cover
Vietnamese accents are assigned to the control/shift digit
keys provided they are configured for this purpose
(see the example configuration file Xdefaults.mined in
the <a href=#support>Mined runtime support library</a>).
<li>Generic accent composition mnemonics also apply to
Vietnamese characters.
</ul>
<p>
<dt>For this purpose, both mechanisms also work with
Vietnamese composite base characters, i.e. characters that
already have an accent and can be further composed to have a
second accent.
These are:
<ul>
<dt><dd>U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
<dt><dd>U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
<dt><dd>U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX
<dt><dd>U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX
<dt><dd>U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
<dt><dd>U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX
<dt><dd>U+0102 LATIN CAPITAL LETTER A WITH BREVE
<dt><dd>U+0103 LATIN SMALL LETTER A WITH BREVE
<dt><dd>U+01A0 LATIN CAPITAL LETTER O WITH HORN
<dt><dd>U+01A1 LATIN SMALL LETTER O WITH HORN
<dt><dd>U+01AF LATIN CAPITAL LETTER U WITH HORN
<dt><dd>U+01B0 LATIN SMALL LETTER U WITH HORN
</ul>
<p>
<dt><i>Examples:</i> Suppose your keyboard is mapped to have
Vietnamese characters like A with circumflex available. Then:
<dl>
<dt>^V ' (Control-V A-circumflex apostrophe)
<dd>enters the composite character U+1EA4 (A with circumflex and acute)
<dt>^V ~ (Control-V O-circumflex tilde)
<dd>enters the composite character U+1ED6 (O with circumflex and tilde)
<dt>Control-6 A
<dd>enters U+00C2 (A with circumflex)
<dt>Alt-4 A
<dd>enters U+1EAA (A with circumflex and tilde)
<dt>Control-Alt-3 A
<dd>enters U+1EB2 (A with breve and hook above)
<dt>Control-Alt-3 O
<dd>enters U+1EDE (O with horn and hook above)
</dl>
<dt><i>Note:</i> In mined 2000.10, the usage of composite
base characters in mined character mnemonics or accent prefix
combinations as just described only works if UTF-8 text
encoding is selected (so not in VISCII or TCVN encoding).
<a name=keymap></a>
<h3> Keyboard Mapping and Input Methods</h3>
Mined supports optional keyboard mapping which is especially
useful for Unicode or CJK editing.
When a keyboard mapping is selected, input characters or
sequences are transformed to other characters or sequences,
typically of a certain Unicode script range.
<br>
Keyboard mappings for Greek, Cyrillic, Hebrew, Arabic, and
major CJK input methods are preconfigured (they have been
ordered in the Input method menu according to the order of
their respective basic ranges in the Unicode character set, or
to the order of the letters of the usual abbreviation CJKV for
East Asian text processing - Chinese, Japanese, Korean,
Vietnamese). The <a href=#radicalstroke>Radical/Stroke input
method</a> provides additional functionality as a special case.
<br>
Mined provides compile-time configuration of additional input
methods; for this aim, further mappings can be generated using the
<a href=#mkkbmap><code>mkkbmap</code></a> script
(from tables in various formats as used by other editors) and
then compiled into mined.
See <a href=#scriptconf>configuration hints</a> below for details.
<p>
Keyboard mapping works as follows: You enter a key sequence
that is mapped to a character sequence in the selected
keyboard mapping table. The transformed character sequence is
used as input.
<br>As some typical keyboard mappings contain ambigous key
sequences where one may be a prefix of another, a short delay
is applied in these cases to allow recognition of any such
sequence to be mapped. After a timeout, the shorter sequence
already matching will be used; the timeout can be cut short by
typing a blank, the blank itself will then be discarded. (The
timeout value is 900 ms by default and can be configured with
the environment variable MAPDELAY.)
<h4>Pick lists</h4>
Some keyboard mappings, especially for CJK input methods,
contain multiple choice mappings. In these cases, a selection
menu is displayed that offers a "pick list" to select a
character from. A character can be picked with a mouse click,
or by navigation to the desired choice with the cursor keys
(down/up, right/left, page down/up) or the '<'/'>' keys , or
by just selecting the menu row first (cursor-up/down), then
typing a digit 1-9 or 0 to select the numbered character.
<br>The space key can be configured to either navigate to the
next choice, the next row, or to select the current choice;
see option <a href=#optionK><code class=option>-K</code></a>.
<img align=right src=picklist.png>
<br>If the pick list is too large to fit on the screen,
the menu will be scrollable or pageable (using cursor keys).
<p>While navigating through the pick list, the line and the
selected item in the line are highlighted accordingly; if
the current item is a CJK character, also its character
information (description and optionally pronunciations as
configured with the <a href=#haninfo>Han info</a> option of
the '?' information flag menu) is displayed on the status
line. If the item is a word comprising multiple CJK characters,
the information for only the first of them is shown. The
available information is derived from the Unihan database.
<p>
Keyboard mapping data are based on Unicode. So in CJK text
mode, the selection menu (the pick list) may contain symbols
that are not mapped to the active CJK text encoding. In a
UTF-8 terminal, these will still be displayed but cannot be
inserted. In a CJK terminal, these are not displayed; an empty
entry is shown instead.
<h4>Input method selection</h4>
An active and a standby keyboard mapping are maintained. They
can be toggled quickly for text input, also on the prompt line.
<br>The current mapping is indicated by its two-letter script
tag in the flags area, showing "<code class=reverse>--</code>"
if no mapping is active.
<p>
The active mapping can be selected in the following ways:
<dl>
<dt>ESC k (or Alt-k)
<dd>toggles between active and standby keyboard mapping
<br>(also on prompt line)
<dt>HOP ESC k (or HOP Alt-k)
<dd>resets keyboard mapping to none (unmapped input)
<dt>ESC K (or Alt-K, or right click on mapping indication in flags area)
<dd>opens the Keyboard Mapping selection menu
<br>(Alt-K also on prompt line)
<dt>HOP ESC K (or HOP Alt-K, or left click on mapping indication in flags area)
<dd>cycles through available keyboard mappings
<dt>environment configuration
<dd>see environment variable
<a href=#MINEDKEYMAP>MINEDKEYMAP</a> below
</dl>
</dl>
</dl>
<dl><dd>
<i>Note:</i> Keyboard mapping is implicitly suppressed temporarily
where it is not useful: during mnemonic character input, HTML
marker input, command letter entry, help selection, yes/no prompting.
</dl>
<dl><dd>
</dl>
<a name=unicode></a>
<p><hr width=95%>
<h2>Unicode support</h2>
<dl><dd>
<h3> Introduction, handled character encodings</h3>
Mined interprets UTF-8 which is a multi-byte character
encoding of the ISO-10646 character set, part of which is also
known as Unicode.
When reading a file, it detects UTF-8 encoding automatically
(unless overridden with <code class=option>-u</code> or
<code class=option>-l</code>).
It also detects UTF-16 with BOM (byte order mark U+FEFF) which
can represent the complete 21 bit Unicode subset of ISO-10646.
Since mined 2000.10, UTF-16 is maintained transparently, i.e.
a UTF-16 encoded file is written back in UTF-16 again (with BOM).
No explicit menu/command line options are currently available
for UTF-16 as internal handling is done in UTF-8.
<h3> UTF-8 internal representation, transparent handling of other text</h3>
Mined handles UTF-8 representation internally and also edits
and keeps illegal UTF-8 sequences. This way, if you
accidentally open a Latin-1 file in UTF-8 mode, like actually
any file interpreting it in a different encoding, or switch
encoding while editing, or edit a file with mixed encoding,
the text contents can still be editied and you will not loose
any character information.
<h3> Character encoding indication</h3>
The upper-right flags area has a character encoding indication
which shows "<code class=reverse>U8</code>" if UTF-8
text interpretation is selected. For Latin-1 text interpretation
"<code class=reverse>L1</code>" is shown, for others see
<a href=#flags>Mode indication flags</a>.
You may click on the indication flag to toggle between the
current and the previous selected encoding.
<h3> Encoding-related commands</h3>
The command ESC u displays character encoding information in the
bottom status line (conforming to ISO 14755); in UTF-8 mode
it includes both the UTF-8 encoding sequence and the ISO-10646
(Unicode) value of the current character, as well as Unicode
script range and character category (based on Unicode 4.0.1
since mined 2000.10), width, and combining information.
The character value is displayed with 4 hexadecimal digits if
the character is in the Unicode BMP (Basic Multilingual Plane,
16 bit), with 6 digits if it is a Unicode character outside of
the BMP, and 8 digits if it is an ISO-10646 character outside
of the Unicode range.
<p>With HOP ESC u, permanent display can be toggled.
Other commands insert the code of the current character or
insert a character taking its encoding from the text.
For details, see the <a href=#codecmds>command summary</a>.
<h3> Character input support</h3>
With ^V, mined's special character input support is invoked
(both while editing text and entering text on the prompt line,
e.g. as a search expression).
With this feature, (in addition to plain control characters)
a composite character can be entered by its accent combination
or other mnemonic character description;
a more-than-two letter character mnemonics would be embedded
in space characters after the ^V.
In addition, numeric character codes or values can be entered
with leading ^V#, octal/decimal with ^V##/^V#=, Unicode with
optional u/U/+.
(For examples, see description of the
<a href=#controlv>^V function</a> below.)
With numeric character input, mined supports <i>successive
multiple character entry</i> according to ISO 14755; if the
numeric code is terminated by a Space key, another numeric
character can be entered subsequently; a Return or Enter key
terminates numeric character input.
<p>
See also the generic section
<a href=#characterinputsupport>Character input support</a> above
for input support for accented characters and Keyboard Mapping.
<h3> Conversion support</h3>
Two functions support interactive character encoding conversion
(Latin-1 / UTF-8) to partially fix files with mixed encoding.
In either UTF-8 or Latin-1 text mode, search for characters
encoded in the other encoding with the command
HOP ESC ( or Alt-F11 .
Then, convert the character with ESC _ or ESC etc.
<br>
For repeated interactive conversion, both functions can be
combined into Alt-Shift-F11 (convert current character, then
search next).
<h3> Case toggle</h3>
The case toggle function (ESC C, HOP ESC C, F11, HOP F11)
handles the full Unicode range, including some special cases
(e.g. Greek final sigma and optionally Turkish "i").
Also Japanese characters are toggled between Hiragana and Katakana.
The case mapping is based on Unicode 4.0.1 (since mined 2000.10).
<a name=smartquotes></a>
<h3> Smart quotes</h3>
Straight (double or single) quote characters " or '
can be replaced automatically with an opening or closing
typographic quotation mark, depending on the text context.
To select the mode (quotation marks style) and choose the
quotation marks to be applied, click the quote marks displayed in
the flags area in the top screen line to cycle through the
international options in both directions, or right-click there
or enter ESC Q or Alt-Q to open the Smart Quotes selection
menu.
<br>
When a file is loaded, mined tries to determine the applicable
quotation marks style in two ways: If mined edited the file
before and noted the last cursor position (in the file @mined.mar,
which can be created using the HOP F2 command, or the File menu
"save position" command), this information also includes the last
selected smart quotes mode for the file.
If that information is not available, mined auto-detects
existing quotation marks in the file and adjusts its smart
quotes mode accordingly.
<br>
The smart quotes left/right selection algorithm considers the
text context to automatically support smart quotes also in CJK text.
<br>
In smart quotes mode, straight quotes can be inserted with
compose pairs (^V ^ " or ^V ^ ').
An apostrophe can be inserted with HOP ' (^G ').
<br>
Smart quotes style can also be preselected with the environment
variable <a href=#smartquotesconf>MINEDQUOTES</a> which should
then contain the opening/closing quote pair or just the
opening quote mark (UTF-8 encoded, double or single quotes);
this overrides both auto-detection and the preference saved
with the cursor position.
<br>
<i>Smart dashes:</i> If smart quotes are active, also an input
sequence of "<code class=option>--</code>" is replaced with an en dash (if preceded by a
blank) or an em dash. A single "-" is replaced with a
Hebrew hyphen mark Maqaf (U+05BE) if an adjacent character is
in the Hebrew script range.
<a name=bidi></a>
<h3> Bidirectional terminal support</h3>
A bidirectional terminal (such as mlterm) will probably
also apply Arabic LAM/ALEF ligature joining. Mined auto-detects
this feature and enables bidi terminal handling automatically.
Otherwise, bidi terminal handling can be configured with the
option <code class=option>+UU</code>.
<br>In this mode, when displaying a menu, underlying text
lines that contain right-to-left characters are cleared first
in order to prevent display confusion between the terminal's
bidi algorithm and the menu position.
<br>Also, with bidi terminal handling enabled, mined assumes
that the terminal applies Arabic LAM/ALEF ligature joining
and properly accounts for this feature in display position
handling.
<br>In separated display mode, the joining part of the ligature
is indicated similarly to the handling of combining characters.
<a name=righttoleft></a>
<h3> Input support for right-to-left scripts ("poor man's bidi" mode)</h3>
This support feature for input of right-to-left text pieces
is enabled by default unless the terminal is detected to be
in bidi mode itself (e.g. mlterm).
"Poor man's bidi" mode is intended for quick entry of
right-to-left text without having a right-to-left terminal;
it is similar to the "revins" (reverse insert) option of vim
and works as follows:
<br>
After entering a right-to-left Unicode character, the cursor
position is moved left of it, so subsequent characters will be
appended left and the text shifted right. Characters are
stored in visual order while input support is implicit, based
on the characters being typed. Entering a left-to-right
character will automatically skip behind the previously
entered right-to-left text on the line (changed in mined 2000.10)
and switch to left-to-right direction; this behaviour
optimises inserting small pieces of right-to-left text into
basically left-to-right text; this priority is justified by
the assumption that this mode (with visual storing order) is
only useful for inserting small right-to-left quotations into
left-to-right text and not for editing right-to-left documents
(which should be stored in logical order).
<br>
Newline, Space, TAB, and combining characters attempt to
behave well according to what was entered before; however,
intermediate cursor movement is not considered.
<a name=unicodelineends></a>
<h3> Unicode line ends</h3>
Mined detects and handles Unicode line separators and
paragraph separators; they are displayed as shown
<a href=#visible>above</a> (unless disabled with <code class=option>+u-u</code>).
<br>HOP Return (HOP Enter) will insert a Unicode paragraph
separator, Return (Enter) in a line that already has a Unicode
line end will insert a Unicode line separator.
Also the keys Shift-Return (Shift-Enter) or Control-Return
(Control-Enter) insert a paragraph separator or line separator
respectively.
<br><i>Configuration:</i> In order to enable shift and control
with the Return or Enter keys, xterm must be configured as
shown in the example configuration file Xdefaults.mined in
the <a href=#support>Mined runtime support library</a>.
<a name=utf8display></a>
<h3> Unicode display</h3>
In UTF-8 terminal mode, mined displays all Unicode characters
if they are contained in the font used by the terminal.
Fonts usually have a substitute glyph to indicate characters
not contained in the font.
Wide characters (double-width glyphs) are displayed in a
double-width character cell of the terminal.
Combining characters are displayed either combined or
separated (see <a href=#combined>Combining characters</a> below).
<p>
Illegal UTF-8 sequences are displayed with highlighted
background, using the following indications.
Furthermore, control characters encoded as a UTF-8 sequence
and control characters in the "C1" range (values 0x80..0x9F)
will be displayed similar to normal control characters but
with coloured highlighting.
<dl><dd><table name=illegalutf8indications border=0>
<tr valign=top><td width=30><code class=uniillegal>8</code>
<td>for an unexpected UTF-8 continuation byte (range 80-BF)
<tr valign=top><td><code class=uniillegal>4</code>
<td>for a 0xFE (254) byte
<tr valign=top><td><code class=uniillegal>5</code>
<td>for a 0xFF (255) byte
<tr valign=top><td><code class=uniillegal></code>
<td>for a too short UTF-8 sequence if followed by a
single-byte character (00..7F)
<tr valign=top><td><code class=uniillegal></code>
<td>for a too short UTF-8 sequence if followed by a
multi-byte character (C0..FF)
</table></dl>
<p>
Legal Unicode characters that cannot be displayed are indicated
with the following replacements:
<dl><dd><table name=utf8indications border=0>
<tr valign=top><td width=30><code class=uniillegal>e</code>
<td>the character code U+FFFE
<tr valign=top><td><code class=unispecial>f</code>
<td>the character code U+FFFF
<tr valign=top><td><code class=unispecial></code> <i>or</i>
<code class=unispecial> </code> <i>(if wide)</i>
<td>a Unicode character that cannot be displayed in the
(non-UTF-8) terminal (non-combining)
<tr valign=top><td><code class=unispecial>'</code> <i>or</i>
<code class=unispecial>' </code>
<td>a Unicode combining character that cannot be
displayed in the (non-UTF-8) terminal
<tr valign=top><td><code class=unispecial>E</code>
<td>the Euro character U+20AC (in a non-UTF-8 terminal)
<tr valign=top><td><code class=unispecial>0 </code>..<code class=unispecial>9 </code>,
<code class=unispecial>A </code>..<code class=unispecial>Z </code>
etc
<td>a corresponding fullwidth ASCII character
(in a non-UTF-8 terminal)
</table></dl>
</dl>
<dl><dd>
<i>Configuration</i>: Display colour of special or illegal
UTF-8 indications can be changed with the environment variable
MINEDUNI, the value should be the numeric part of an ANSI
terminal control sequence; optionally, the value can be
preceded by a character to be used for Unicode character
indication in non-UTF-8 (Latin-1) terminal mode.
<br>(The default configuration value is "<code> 46</code>").
<a name=combined></a>
<h3>Combining characters</h3>
When editing text in Unicode or any encoding that contains
combining characters, mined supports display and editing of
combining and combined characters.
<p>
(<i>Note:</i> Terminal support for combining charcters is
auto-detected; additional command line options are available
in case this fails.)
<br>
If mined operates on a terminal that handles combining
characters, it offers two editing modes: combined or separated.
They can be toggled by clicking the Combining display flag
in the <a href=#flags>Mode indication flags</a> area
(right part of the top screen line),
or by the menu entry "eXtra - combined display";
separated display mode can also be selected by the
command line option <code class=option>-c</code>.
<dl>
<dt><i>Combined display and editing mode</i> (Combining display flag )
<dd>
<img src=combined.png>
Combined characters are displayed as intended (i.e., combined).
<li><i>Micro movement</i> into combined characters:
<ul>
<li>The cursor can be moved into a combined character with
Control-left-arrow and Control-right-arrow,
or ^V left-arrow and ^V right-arrow.
<li>You can determine the exact position of the cursor if permanent
character info is switched on (by HOP ESC u or with HOP "toggle
char info" in the eXtra menu).
<img src=combining.png>
</ul>
<li>Partially editing combined characters:
<ul>
<li>If the cursor is on a combined character, delete next character
will delete the whole combined character, with all combining accents.
<li>If the cursor is within a combined character, delete next
character will delete the current combining accent only.
<li>Control-Backspace behind or within a combined character will only
delete the combining character preceding the cursor position (while
Backspace would delete the whole combined character).
<li>(Since mined 2000.10) If the cursor is right behind a combined
character, Control-Backspace will delete only the rightmost
combining accent, if it is within a combined character,
Control-Backspace will only delete the combining character
preceding the cursor position (while Backspace would delete the
whole combined character).
<li>You can also position the cursor as described above and use
copy-and-paste operations.
</ul>
<dd><i>Note:</i> Control-left-arrow, Control-right-arrow, and
Control-Backspace only work if these keys are configured
to emit distinguished escape sequences with Control key held down.
To enable this in your X configuration, see the example
configuration file <code>Xdefaults.mined</code> in the
<a href=#support>Mined runtime support library</a>.
<p>
<dt><i>Separated display and editing mode</i> (Combining display flag <font class=unispecial>`</font>)
<dd>
<img src=separated.png>
Combined characters are separated into base character and
combining character(s) for display and editing. Combining characters
are indicated with coloured background.
<ul>
<li>In separated display mode, all cursor and text modification
operations work on the combining parts as displayed.
</ul>
</dl>
<a name=joined></a>
<h4>Joining characters</h4>
If mined assumes that the terminal applies LAM/ALEF ligature
joining (either configured with the <code class=option>+UU</code> right-to-left display
option or auto-detected), the joined character width will
be handled correctly in cooperation with the terminal.
<br>
Mined supports ligature joining in both combining character
display modes:
<ul>
<li>In combined display mode, the screen position is accounted
properly.
<li>In separated display mode, the joining part of the ligature
is indicated using the appropriate isolated form on Unicode
special indication background colour (similar to the handling
of combining characters).
</ul>
<h3> Search expression limitations</h3>
Unicode search ranges can not be very large as all
included characters are listed in an internal buffer which is
limited to ca. 1 KB.
<h3> UTF-8 preservation and byte-transparent editing</h3>
When splitting lines that are too long for internal handling,
consistency of UTF-8 sequences is preserved (they are not split);
combining characters may get split off their base characters,
however, they will join seemlessly as lines are joined again
(e.g. when saving the file).
Note that combining characters at the beginning of a line are
not displayed in combined display mode.
<a name=unicodeenv></a>
<h3> Terminal environment</h3>
<dl>
UTF-8 terminal operation can be configured in either of these ways:
<ul>
<li>Auto-detection: If the terminal emits cursor position reports,
mined can uniquely recognise UTF-8 terminal encoding and further
UTF-8 features
(see <a href=#terminalencoding>Terminal encoding support</a> below).
<li>Parameter: <code class=option>+U</code> selects UTF-8 terminal mode.
<li>Environment: One of the locale-related environment variables
LC_ALL, LC_CTYPE, LANG, whichever is found to exist first in that
order, selects UTF-8 terminal mode if its value has a suffix of
".UTF-8" or ".utf8".
The recommended way of configuring the terminal environment
is to set LC_CTYPE implicitly when a UTF-8 terminal session
is started, see the script "<code>uterm</code>" in the
<a href=#support>Mined runtime support library</a>.
For more details, see <a href=#localeconv>Locale configuration</a>.
</ul>
<p>
<dt>See also <a href=#terminalinterworking>Terminal interworking
problems</a> for special hints about certain terminals.
</dl>
</dl>
<a name=cjk></a>
<p><hr width=95%>
<h2>CJK support (Chinese/Japanese/Korean Han characters)</h2>
<dl><dd>
Mined provides CJK support features uniformly in Unicode
and in major CJK encodings. For information relating to
CJK character encoding see <a href=#charencoding>
Character encoding support</a> below.
<a name=cjkinputmethods></a>
<h3> CJK input method support</h3>
<i>Input methods</i> for CJK characters are supported with
the <a href=#keymap>Keyboard mapping</a> mechanism.
A selected number of input methods considered useful
for each CJK script are pre-configured, others can be added
easily at compile-time with the
<a href=#mkkbmap><code>mkkbmap</code></a> script.
<a name=radicalstroke></a>
<h4> Radical/Stroke input method</h4>
Mined 2000.10 implements a Radical/Stroke input method for
CJK characters with specific functionality in addition to
keyboard mapping; it works at two-levels, selecting a radical
first, then a character from a list sorted by stroke count.
If this input method is active, a selection menu for the 214
CJK radicals is displayed (without prior keyboard input).
The menu displays all variations of each radical. After
selecting a radical from this menu, a second-level menu
is displayed, showing all CJK characters based on the
selected radical, sorted by the number of strokes.
Many of these menus will not fit on the screen and can be
scrolled.
Pressing Escape here would return to the radical menu;
pressing Escape there would disable the input method.
To enter a non-mapped character (e.g. a line end), you
need to disable Radical/Stroke input method temporarily;
just toggle it back on with Alt-k (or Esc k) and the radical
menu will be displayed again for continued input.
<a name=cjkdisplay></a>
<h3> CJK character display</h3>
<dd>Combining characters (in both JIS encodings and GB18030)
are handled and the combined characters are displayed properly
in either combined or separated display mode in a UTF-8
terminal (like for UTF-8 encoded text).
<dd>The following special CJK character indications apply:
<dl><dd><table name=cjkindications border=0>
<tr valign=top><td><code class=unispecial> </code>
<td>CJK character that cannot be displayed in (8-bit) terminal
<tr valign=top><td><code class=uniillegal>?</code> <i>or</i>
<code class=uniillegal>? </code>
<td>CJK character code that has no known mapping to Unicode
<br>(to enforce display on CJK terminal use option <code class=option>+C</code>)
<tr valign=top><td><code class=uniillegal>#</code> <i>or</i>
<code class=uniillegal># </code>
<td>invalid CJK character code that is outside of the
code range assigned to the encoding scheme
<br>(to enforce display on CJK terminal use option <code class=option>+CC</code>)
<tr valign=top><td><code class=unilineend>#</code>
<td>CJK character in extended code range
(esp. 3 and 4 byte codes, or codes with 0x80...0x9F
byte range) that cannot be displayed on CJK terminal
due to terminal capability limitations
<br>(to enforce display on CJK terminal use option <code class=option>+CCC</code>)
<tr valign=top><td><code class=uniillegal><</code>
<td>incomplete or otherwise illegal CJK code
</table></dl>
</dl>
<dl><dd>
The environment variables MINEDRET, MINEDTAB, MINEDSHIFT are
ignored in CJK terminal mode.
<a name=haninfo></a>
<h3> Han character information display</h3>
<img align=right src=haninfo-menu.png>
With mined 2000.10, there is a new flag menu, the Info menu
(indicated with "?") that collects all options for information
display, mainly character-related.
If "Han info" is enabled in this menu, when the cursor is
over a Han character and either descriptive or pronunciation
information about this character is available in the Unihan
database (from unicode.org), this information is displayed.
<br>The information can optionally be shown on the status line
(where it may be truncated if too long) or in a pop-up menu next
to the character. Pronunciation information to be displayed
can be selected in the Info menu.
<br>To open the Info Menu, type Alt-F10 or right-click the
"<code>?</code>" flag.
<p>The same information is always shown while you are browsing
an input method pick list (then on the status line).
<br clear=all>
<p>
The information includes the character code (in CJK encoding,
both CJK code and corresponding Unicode value are shown).
The amount of descriptive information (from the Unihan
database) to be shown can also be preconfigured with the
environment variable MINEDHANINFO;
see <a href=#haninfoconf>Han info configuration</a> below.
<img src=haninfo-utf8.png>
<img src=haninfo-big5.png>
</dl>
<a name=charencoding></a>
<p><hr width=95%>
<h2>Character encoding support</h2>
<dl><dd>
<a name=cjkencoding></a>
<h3> CJK and mapped 8 bit encoding support</h3>
Mined supports major CJK encodings.
With mined 2000.10, it also support a selected range of mapped
8 bit encodings (like Windows-ANSI, Cyrillic, and some South Asian
8 bit encodings).
<br>
Handling of character encodings is selected in one of the
following ways:
<ul>
<li>One of the command line options <code class=option>-EX</code>
where X is one of the character encoding tags (see the
<a href=#encodingoption>encoding options</a> above).
<li>From the Encoding Menu (one of the flag menus),
the encoding interpretation can be changed while editing;
to open it, click with the right mouse button on the encoding
indication in the flags area of the top line, or type Alt-E.
See also <a href=#flags>Mode indication flags</a> for an overview.
<li>Auto-detection (by heuristic counting of valid character codes).
<dd><i>Note:</i> The encodings to be taken into account for
auto-detection can be configured with the MINEDDETECT
environment variable. Set it to the list of encoding
indications (capital letters as listed for the
<a href=#encodingoption><code class=option>-E</code>
parameter</a>) to disable auto-detection of other encodings.
UTF-8 auto-detection cannot be disabled this way.
<li>Locale indication in one of the environment variables LANG, LC_ALL or LC_CTYPE
(see <a href=#localeconv>Locale configuration</a>).
<li>The command line option <code class=option>-C</code> lets
mined assume to handle CJK encoded text and to operate in a
CJK terminal (unless auto-detection determines a UTF-8 terminal).
</ul>
<a name=cjkcombining></a>
<h3> Combining characters</h3>
In all character encodings handled by mined that contain
combining characters, mined handles them and provides partial
editing and an optional separated display mode as described
above under Unicode support, section <a href=#combined>
Combining characters</a>.
(CJK encodings EUC-JP, Shift-JIS and GB18030, Vietnamese TCVN
and Thai TIS-620).
<h3> Character code related commands</h3>
The command ESC u displays character encoding information in the
bottom status line (conforming to ISO 14755); this includes
the character code, the mapped Unicode character value,
script and character category, and combining information.
<p>With HOP ESC u, permanent display can be toggled.
Other commands insert the code of the current character or
insert a character taking its encoding from the text.
For details, see the <a href=#codecmds>command summary</a>.
<h3> Terminal environment for CJK encoding support</h3>
<dl>
Mined supports CJK encodings in two terminal environments;
it performs auto-detection of terminal features
(see <a href=#terminalencoding>Terminal encoding support</a>
below).
<dt>CJK terminals:
<dd>For terminals that support native CJK encodings
(e.g. hanterm or cxterm), the terminal encoding assumed by
mined can be specified with the <code class=option>-E</code> option (together with the
<code class=option>-C</code> option in case CJK terminal auto-detection fails) or by a
locale indication in one of the environment variables LC_ALL,
LC_CTYPE or LANG.
For available encodings and usage of the <code class=option>-E</code> option,
see <a href=#flags>Mode indication flags</a>.
For usage of the locale environment variables, see
<a href=#localeconv>Locale configuration</a>.
<br>However, in CJK terminals, mined handling of CJK encoding
is basically transparent:
The font used by the terminal must match the encoding of the
edited files; the user is responsible for setting up the
terminal with the suitable fonts; display of invalid
characters (that are not included in the font being used) may
produce weird screen behaviour (e.g. in cxterm).
Since release 2000.8, mined tries however to detect if certain
CJK codes can be displayed and if it assumes they cannot (e.g.
double-byte codes with bytes in the 0x80-0x9F range, or 3-byte
and 4-byte code sequences) it will display replacement
indications instead. Also, since release 2000.10, CJK encodings
that do not map to Unicode are suppressed for display in order
to avoid screen garbage caused by invalid encoded characters;
this can be overridden by the new option <code class=option>+C</code>. These and
other invalid CJK character codes are displayed with special
indications (see <a href=#cjkdisplay>CJK character display</a> below).
The options <code class=option>+C</code>, <code class=option>+CC</code>, <code class=option>+CCC</code> control the level of display
transparency for unknown character codes on CJK terminals
(see <a href=#options>Command line options</a> above for details).
<dd>Apart from the necessity to set up fonts matching the
encoding, mined uses the encoding information for the following
purposes: determination of invalid/unknown CJK character codes,
selection of appropriate CJK characters for display of line
markers (line end and TAB indications), keyboard mapped input
(CJK input methods, the data of which are configured in
Unicode for all modes).
<dd>Since release 2000.10, CJK-encoded combining characters
(in both JIS encodings and GB18030) are handled on CJK terminals.
<dt>UTF-8 terminal:
<dd>Since release 2000.7, CJK encoding is also supported in
a UTF-8 terminal; mined uses character set mapping tables
for display and input interpretation. The apparently major
encodings for CJK (Chinese/Japanese/Korean) text are supported.
See <a href=#flags>Mode indication flags</a> for a listing.
For Japanese, the JIS encodings that map to two Unicode
characters are supported.
<dd>Since release 2000.10, CJK-encoded combining characters
(in both JIS encodings and GB18030) are handled on UTF-8 terminals.
<dt>8 bit terminal:
<dd>CJK characters are displayed with substitute indications,
so minimal file editing capability is provided; fullwidth ASCII
characters are visible.
<p>
<dt>See also <a href=#terminalinterworking>Terminal interworking
problems</a> for special hints about certain terminals.
</dl>
</dl>
<a name=terminalencoding></a>
<p><hr width=95%>
<h2>Terminal encoding support</h2>
<dl><dd>
<h3> Terminal feature detection</h3>
Since release 2000.8, mined performs auto-detection of
terminal features for UTF-8 terminals (UTF-8 encoding,
different width data versions up to Unicode 4.0.1 (since
mined 2000.10), handling of double-width, combining and
joining characters) and CJK terminals (handling of non-EUC
code points, GB18030, 3-byte and 4-byte encodings).
CJK terminals cannot always be distinguished from 8-bit
terminals however, so that CJK terminal encoding should
still be configured with either an option (<code class=option>-C</code>) or by
proper setting of the locale environment
(LC_ALL, LC_CTYPE or LANG variable).
For usage of the locale environment variables, see
<a href=#localeconv>Locale configuration</a>.
</dl>
<p><hr width=95%>
<table width=110% border=0 cellspacing=0 cellpadding=0>
<tr><td bgcolor=#CCDDEE><font color=black>
<a name=commands></a>
<h2>Mined Command reference (command and key function assignments)</h2>
<dl><dd>
<a name=cmdmotion></a>
<h3> Cursor and screen motion</h3>
<dl>
<dt>^E <i>or</i> cursor-up
<dd>Move cursor 1 line up.
<br><i>with HOP:</i> Go to top of page.
<dt>^X <i>or</i> cursor-down
<dd>Move cursor 1 line down.
<br><i>with HOP:</i> Go to bottom of page.
<dt>^S <i>or</i> cursor-left
<dd>Move cursor 1 character left.
<br><i>with HOP or</i> Control-Home <i>or (with <code class=option>-k</code> option)</i> Home: Go to beginning of line.
<dt>^D <i>or</i> cursor-right
<dd>Move cursor 1 character right.
<br><i>with HOP or</i> Control-End <i>or (with <code class=option>-k</code> option)</i> End: Go to end of line.
<dt>^A <i>or</i> Shift-cursor-left
<dd>Move backward to beginning of previous word.
<br><i>with HOP:</i> Go to beginning of sentence.
<dt>^F <i>or</i> Shift-cursor-right
<dd>Move forward to beginning of next word.
<br><i>with HOP:</i> Go to end of sentence.
<dt>Control-cursor-up
<dd>Move backward to previous beginning of paragraph.
<dt>Control-cursor-down
<dd>Move forward to next beginning of paragraph.
<dt>^R <i>or</i> PgUp <i>or</i> PrevScreen (vt100)
<dd>Scroll backward 1 page (Top line becomes bottom line).
<br><i>with HOP:</i> Go to beginning of text.
<dt>^C <i>or</i> PgDn <i>or</i> NextScreen (vt100)
<dd>Scroll forward 1 page (Bottom line becomes top line).
<br><i>with HOP:</i> Go to end of text.
<dt>Home/Pos1 (on small keypad)
<dd>Move to beginning of line. <i>Only if keypad is configured
to emit different control sequences for the two keypads,
see <a href=#keyconf>Keypad configuration</a> hints below.</i>
<dd><i>(with <code class=option>-k</code> option)</i>: Mark position.
<dt>End (on small keypad)
<dd>Move to end of line. <i>Only if keypad is configured
to emit different control sequences for the two keypads,
see <a href=#keyconf>Keypad configuration</a> hints below.</i>
<dd><i>(with <code class=option>-k</code> option)</i>: Copy text between marked and current position.
<p>
<dt><i>Navigation support for combined Unicode characters</i>
<dd><i>Enabling partial editing of base character and combining
characters (accents) in combined display mode.</i>
<dt>Control-cursor-right <i>or</i> ^V cursor-right
<dd><i>Micro movement:</i>
Move partial character right into Unicode combined character.
<dt>Control-cursor-left <i>or</i> ^V cursor-left
<dd><i>Micro movement:</i>
Move partial character left over Unicode combining character.
<hr align=left width=50%>
<dt>^W <i>or</i> Control-PgUp (PC) <i>or</i> PF3 (vt100)
<dd>Scroll screen backward 1 line.
<br><i>with HOP:</i> Scroll backward half a screen.
<dt>^Z <i>or</i> Control-PgDn (PC) <i>or</i> PF4 (vt100)
<dd>Scroll screen forward 1 line.
<br><i>with HOP:</i> Scroll forward half a screen.
<hr align=left width=50%>
<dt>^G nn <i>or</i> ESC g nn
<dd>Move to a line (prompts for line number).
(Terminate command with Return or Space.)
<dt>^G nn % <i>or</i> ESC g nn %
<dd>Move to position in text determined by percentage.
<dt>^G nn p <i>or</i> ESC g nn p
<dd>Move to page in text (set page length with ESC P).
<dt>^G < command > <i>or</i> ESC g < command >
<dd>If not immediately followed by a digit, the
positioning command works as an alternative HOP key.
<dt>^G N '
<dd>(N=0..9) Go to marker N. ("'", "g", "." may be used.)
<dt>ESC ' N
<dd>(N=0..9) Go to marker N.
<hr align=left width=50%>
<dt>HOP Pos1 <i>or</i> ^G ^] <i>or</i> ESC ] <i>or</i> HOP ESC ^
<dd>Move to the position previously marked by Pos1/ESC ^/^] .
<hr align=left width=50%>
<dt>ESC Return <i>or</i> Alt-Return
<dd>Return backward to the previous position marked in the position stack.
<dt>HOP ESC Return <i>or</i> HOP Alt-Return
<dd>Return forward to the next position marked in the position stack.
<hr align=left width=50%>
<dt>^Q <i>or</i> ^G <i>or</i> "5" (on keypad) <i>or</i> Scroll Lock <i>or</i> Pause <i>or</i> F10 (PC) <i>or</i> ESC (especially PC)
<dd>HOP key (unless ^G followed by a digit).
In order to enable the "5" key, or (for convenience on notebooks)
to assign the HOP function to the Scroll Lock or Pause key,
your X resource configuration may have to be adapted,
see <a href=#keyconf>Keypad configuration</a> below.
<hr align=left width=50%>
<dt><i>left mouse button</i>
<dd>move cursor to position
</dl>
</dl>
<dl><dd>
<a name=cmdenter></a>
<h3> Entering text</h3>
<dl>
<dt>< printable char >
<dd>Insert the character at cursor position.
<dt>< Return > <i>or</i> < Enter > <i>or</i> < LF char >
<dd>Insert a newline at cursor position, clone
line end type. Apply auto-indentation if enabled.
<dt>< Shift-Return > <i>or</i> < Shift-Enter >
<dd>Make a new line by inserting a Unicode paragraph separator
at cursor position (unless disabled with <code class=option>+u-u</code>).
(See also <a href=#unicodelineends>Unicode line ends</a>
for key configuration.)
<dt>< Control-Return > <i>or</i> < Control-Enter >
<dd>Make a new line by inserting a Unicode line separator at
cursor position (unless disabled with <code class=option>+u-u</code>).
(See also <a href=#unicodelineends>Unicode line ends</a>
for key configuration.)
<dt>< TAB char >
<dd>Insert a tab character at cursor position.
<dt>HOP {, HOP (, HOP [, HOP <
<dd>Enter indented pair of matching parentheses.
<dt>HOP /
<dd>Enter an indented Javadoc comment frame.
<dt>HOP '
<dd>Enter an apostrophe.
<dt>HOP -
<dd>Underline the line that starts before the cursor position.
<hr align=left width=50%>
<dt>^O
<dd>Make new line at current position.
If the current line has a "NUL" or "NONE" special
line end type, it will be reproduced for the new line.
(Entering a new-line key always produces a real line end.)
If the current line is terminated by a Unicode
paragraph separator, a line separator is inserted.
<br>Auto-indentation is not applied.
<dt>HOP ^O
<dd>Split a line in two binary-transparently, i.e.
enter a "NONE" virtual line end.
</dl>
</dl>
<dl><dd>
<a name=accentprefixkeys></a>
<h4> Accented character input support by accent prefix keys</h4>
<dl>
<dt><i>function key prefixes for accent compositions</i>
<dd><i>These functions also work on the prompt line (e.g.
to enter search expressions).</i>
<dt>F5 < character >
<dd> Compose character with diaeresis (umlaut accent),
e.g. a
<dt>Shift-F5 < character >
<dd> Compose character with tilde,
e.g. a
<dt>Control-F5 < character >
<dd> Compose character with ring or with cedilla,
e.g. a , c
<dt>F6 < character >
<dd> Compose character with acute accent (accent d'aigu),
e.g. a
<dt>Shift-F6 < character >
<dd> Compose character with grave accent,
e.g. a
<dt>Control-F6 < character >
<dd> Compose character with circumflex accent,
e.g. a
<dt>Control-1 ... Control-9
<dd> Compose character with accent, esp. for Vietnamese
(double) accented characters, see
<a href=#vietnamese>Vietnamese input support</a> above.
<dt>(Control-)Alt-1 ... (Control-)Alt-5
<dd> Compose character with two accents, esp. for Vietnamese
double accented characters, see
<a href=#vietnamese>Vietnamese input support</a> above.
</dl>
</dl>
<dl><dd>
<a name=controlv></a>
<h4> Input support commands</h4>
<dl>
<dt><i>Control-V special input support</i>
<dd><i>These functions also work on the prompt line (e.g.
to enter search expressions).</i>
<dt>^V < control character >
<dd>Enter control character.
<dt>^V [ <i>or</i> ^V \ <i>or</i> ^V ]
<dd>Enter one of the control characters ^[, ^\, ^].
<dt>^V ^ ^ <i>or</i> ^V _ _
<dd>Enter one of the control characters ^^, ^_.
<dt>^V ^ ' <i>or</i> ^V ^ "
<dd>Enter one of the plain quote marks ' or "
(needed in smart quotes mode)
<dt>^V < accent > < character >
<dd>Compose accented character.
<dt>^V # xxxx < Space or Return >
<dd>Enter character defined by a hexadecimal number being input
(depending on applicable encoding, byte value, Unicode
value, or valid CJK code is required).
<dt>^V # # xxxxxx < Space or Return >
<dd>Like ^V # but using an octal number.
<dt>^V # = xxxxx < Space or Return >
<dd>Like ^V # but using a decimal number.
<dt>^V # u <i>or</i> U <i>or</i> +
followed by a numeric input as described above (with optional
# or = for octal or decimal input) interprets the input as a
numeric Unicode value which is converted into the current
text encoding.
<dt>^V # ... Space ...
With numeric character input, mined supports <i>successive
multiple character entry</i> according to ISO 14755 if the
numeric code is terminated by a Space key.
<dt>^V < function key >
<dd><i>This is not an input support function but rather the
function key is invoked as if pressed together with the
control key.</i>
<p>
<dt><i>Mnemonic character input support</i>
<dd><i>Mnemonics recognized include the following:
<ul>
<li>RFC 1345 mnemos (except mappings to Unicode private use areas);
in ambiguous cases, the RFC 1345 mnemos must be entered in
long mnemonic input mode, e.g. with "^V pi " rather than "^Vpi".
<li>HTML mnemos; in ambiguous cases, the HTML mnemos
must be prepended with a "&".
<li>TeX mnemos (macros) and substitutes, leaving out any "\".
<li>Some additional mnemos as listed on the
<a href=mnemodoc.html>mined character mnemos page</a>.
</ul>
Unless there is an ambiguous mapping, all two-letter mnemonics
can also be entered in reverse order.
</i>
<dt>^V < Space > < name > < Space or Return >
<dd>Lookup character mnemonic and enter character. RFC 1345
mnemonics take precedence in ambiguous cases.
<dt>^V < character > < character >
<dd>Compose two characters. Non-RFC 1345 mnemonics take
precedence in ambiguous cases.
<p>
<dt><i>Examples:</i>
<dl compact>
<dt>^V^A
<dd>Enter Control-A.
<dt>^V^[ <i>or</i> ^V[
<dd>Enter the escape character.
<dt>^V__
<dd>Enter Control-_.
<dt>^V'e
<dd>Enter (e with accent d'aigu).
<dt>^Vae
<dd>Enter (the ae ligature).
<dt>^V-,
<dd>Enter (the negation symbol).
<dt>^V neg <i>(terminated by Space or Return)</i>
<dd>Enter (the negation symbol).
<dt>^Va* <i>or</i> ^V a* <i>(terminated by Space or Return)</i>
<dd>Enter the Greek small letter alpha.
<dt>^V ae' <i>(terminated by Space or Return)</i>
<dd>Enter the Latin ligature ae with acute accent.
<dt>^V euro <i>(terminated by Space or Return)</i>
<dd>Enter the Euro character.
<dt>^V#20ac <i>(terminated by Space or Return)</i>
<dd>Enter the character with hexadecimal value 20AC
(which is the Euro character in UTF-8 encoding).
<dt>^V#U20ac <i>(terminated by Space or Return)</i>
<dd>Enter the Euro character (which has the hexadecimal
Unicode value 20AC) encoded in the currently selected
text encoding.
<dt>^V#+20ac < Space > +20ac < Return >
<dd>Enter two Euro characters in
successive multiple character entry mode (ISO 14755).
</dl>
</dl>
</dl>
<dl><dd>
<h4> Input Method (Keyboard Mapping) selection</h4>
<dl>
<dt>ESC k
<dd>toggles between active and standby keyboard mapping
<dd><i>(ESC k/Alt-k also works on prompt line)</i>
<dt>HOP ESC k
<dd>resets keyboard mapping to none (unmapped input)
<dt>ESC K <i>or</i> right click on mapping indication in flags area
<dd>opens the Input Method selection menu
<dd><i>(ESC K/Alt-K also works on prompt line)</i>
<dt>HOP ESC K <i>or</i> left click on mapping indication in flags area
<dd>cycles through available keyboard mappings / input methods
</dl>
</dl>
<dl><dd>
<a name=cmdmodify></a>
<a name=cmddel></a>
<h3> Modifying text</h3>
<dl>
<dt><i>Character deletion with DEL and Backspace (^H) characters</i>
<dd><i>In order to accommodate various usages of these keys,
the function depends on environment
<a href=#backspaceadaptation>settings</a>
and the mined option <code class=option>-B</code>.</i>
<dt>Note that the "Delete character left" function actually applies
the Back-Tab function if there is only white space before the
current position in the current line and the line above.
<p>
<dt><i>If the terminal is set up such that Backspace (^H) deletes a
character left on the command line (stty erase ^H):</i>
<dt>^H
<dd>Delete character left. Apply auto-undent function where
appropriate (delete multiple spaces back to previous level
of indentation).
<dt>DEL <i>(default)</i>
<dd>Delete character right.
<dt>DEL <i>(with <code class=option>-B</code>)</i>
<dd>Delete character left / auto-undent.
<dt>Control-Del
<dd>Delete character right.
<p>
<dt><i>If the terminal is set up such that DEL deletes a character
left on the command line (stty erase ^?):</i>
<dt>DEL
<dd>Delete character left.
<dt>^H <i>(default)</i>
<dd>Delete character left. Apply auto-undent function where
appropriate (delete multiple spaces back to previous level
of indentation).
<dt>^H <i>(with <code class=option>-B</code> option)</i>
<dd>Move left.
<dt>Control-Del
<dd>Delete character right.
<dt>Control-Backspace
<dd>Delete only right-most combining accent of combined character
left of cursor position.
If not next to a combined character: delete character left,
avoiding auto-undent function.
<hr align=left width=50%>
<dt>HOP < delete previous character command >
<dd>Delete the line beginning.
<dt>^B
<dd>Delete character right (next character).
<dt>^T
<dd>Delete next word.
<dt>^^
<dd>Delete previous word.
<dt>^K
<dd>Delete tail of line;
if at end of line, delete line end (joining lines).
<br><i>with HOP:</i> Delete whole line.
<a name=codecmds></a>
<hr align=left width=50%>
<dt>ESC X
<dd>Insert hexadecimal representation of current character code.
(In UTF-8 mode, this is the UTF-8 byte sequence
of the character in hexadecimal notation.)
<br><i>with HOP:</i> Insert character with hexadecimal code
scanned from text at current position.
<dt>ESC U
<dd>Insert (hexadecimal) Unicode value of current character
(with either 4/6/8 hexadecimal digits, depending on the
value); in CJK or mapped 8 bit encoding mode, the
value is transformed from the current text encoding
into Unicode.
<br><i>with HOP or</i> Control-Shift-F11:
Insert character with hexadecimal Unicode value
scanned from text at current position; in CJK or
mapped 8 bit encoding mode, the value is transformed
from Unicode into the current text encoding.
<dt>ESC A
<dd>Like ESC U but inserting an octal Unicode value.
<br><i>with HOP:</i> Like HOP ESC U but scanning an octal Unicode value.
<dt>ESC D
<dd>Like ESC U but inserting a decimal Unicode value.
<br><i>with HOP:</i> Like HOP ESC U but scanning a decimal Unicode value.
<hr align=left width=50%>
<dt>ESC C <i>or</i> F11
<dd>Exchange case (low/capital) of character under cursor.
Applies to Unicode characters. Special behaviour for
some characters: Greek final s, Turkish "i" if the
environment variable LANG or LC_ALL or LC_CTYPE begins
with "tr" or "az".
Also Japanese characters are toggled between
Hiragana and Katakana.
<br><i>with HOP or</i> Shift-F11: Apply to word from cursor.
<a name=mnemonictrans></a>
<hr align=left width=50%>
<dt>ESC _ <i>or</i> Control-F11
<dd>Mnemonic character substitution replaces the two characters
at the cursor position with a suitable composite
character (e.g. accented character) if possible.
With Control-F11, transformations are the same as with
the ^V two-letter character input mnemonics.
With ESC _, language-dependent preferences may take
precedence (see variations below)
according to the current locale environment.
<br><i>As an additional function, the command also transforms
between Latin-1 and UTF-8 encoded characters if an
accordingly encoded character is found at the current
position; the current character encoding mode is used
to determine the target character set.</i>
<br>Example: ae->, oe->œ (oe ligature U+0153, in Unicode mode)
<br><i>Example: (Latin-1 encoded)-> (UTF-8 encoded) or vice versa</i>
<br>With Escape commands with composed letters that occur on
respective national keyboards, the according
preference transformations take precedence:
<dt>ESC <i>or</i> ESC <i>or</i> ESC <i>or</i> ESC
<dd>Similar to ESC _, but with German transformation preferences.
<br>example: ae->, oe->
<dt>ESC <i>or</i> ESC <i>or</i> ESC <i>or</i> ESC <i>or</i> ESC
<dd>Similar to ESC _, but with French transformation preferences.
<br>example: oe->œ (oe ligature U+0153, in Unicode mode)
<dt>ESC <i>or</i> ESC <i>or</i> ESC
<dd>Similar to ESC _, but with Danish transformation preferences.
<br>example: ae->, oe->
<hr align=left width=50%>
<dt>HOP ESC ( <i>or</i> Alt-F11
<dd>Search for a character encoded in the "wrong encoding",
i.e. a UTF-8 character in Latin-1 mode, or a Latin-1 character
in UTF-8 mode.
<dt>ESC _ <i>or</i> ESC etc.
<dd>If invoked on a non-ASCII character, Latin-1 / UTF-8
character conversion is applied; if the character is encoded
in the encoding <i>other</i> than the current text encoding
it is converted into the current text encoding.
<dt>Alt-Shift-F11
<dd>Convert Latin-1 / UTF-8, then search for the next
"wrong encoded" character.
<a name=escj></a>
<hr align=left width=50%>
<dt>ESC j
<dd>("Clever Justify") Format paragraph by word-wrapping
according to the currently set right margin value;
left margins are derived from the contents of the
paragraph and line. Heuristic detection of numbered
items automatically triggers appropriate indentation.
<br>End-of-paragraph is a line without trailing blank.
<br><i>with HOP:</i> Same, but end-of-paragraph is a blank line.
<dt>ESC J
<dd>("Normal Justify") Format paragraph by word-wrapping
according to the currently set left and right margin values.
<br>End-of-paragraph is a line without trailing blank.
<br><i>with HOP:</i> Same, but end-of-paragraph is a blank line.
<dt>ESC <
<dd>Set left margin for justification.
<dt>ESC ;
<dd>Set left margin of first line of paragraph only.
<dt>ESC :
<dd>Set left margin of next lines of paragraph only.
<dt>ESC >
<dd>Set right margin for justification.
<a name=escH></a>
<hr align=left width=50%>
<dt>ESC H <i>(every first time)</i>
<dd>Enter HTML tag (and remember for subsequent ESC H).
(Note that Alt-Shift-H will do the same thing if your terminal
is configured appropriately - see the example configuration file
Xdefaults.mined in the
<a href=#support>Mined runtime support library</a>.)
<dd>The tag can be entered with attributes and values; these
will not be repeated in the closing tag (see next entry
on ESC H).
<dt>ESC H <i>(every second time)</i>
<dd>Enter closing HTML tag.
Any tag attributes and values entered with the tag (see previous
entry on ESC H) will be left out.
<dt>HOP ESC H
<dd>Put text between mark and current position in HTML tags.
The "A" tag gets special treatment.
</dl>
</dl>
<dl><dd>
<a name=cmdbuffer></a>
<h3> Text block and buffer operations</h3>
<dl>
<dt>^] <i>or</i> Control-@ (Control-Space) <i>or</i> ESC @ <i>or</i> ESC ^ <i>or</i> Stop (sun) <i>or</i> Home/Pos1 (on right keypad) <i>or</i> Select (vt100) <i>or</i> Shift-Home
<dd>Set mark (to remember the current location).
<br><i>with HOP:</i> Goto mark.
<hr align=left width=50%>
<dt>^G N m <i>or</i> ESC g N ,
<dd>(N=0..9) Set marker N. (^G N , also works.)
<dt>ESC m N
<dd>(N=0..9) Set marker N.
<dt>^G N ' <i>or</i> ESC g N '
<dd>(N=0..9) Go to marker N. (^G N g <i>or</i> ^G N . also works.)
<dt>ESC ' N
<dd>(N=0..9) Go to marker N.
<hr align=left width=50%>
<dt>^Y <i>or</i> End (on right keypad) <i>or</i> Copy (sun) <i>or</i> Do (vt100) <i>or</i> Shift-End <i>or</i> Control-Ins
<dd>Copy text between mark and current position to buffer.
<br><i>with HOP:</i> Append to buffer.
<dt>^U <i>or</i> Del (on right keypad) <i>or</i> Cut (sun) <i>or</i> Control-End (PC) <i>or</i> Remove (vt100) <i>or</i> Shift-Del
<dd>Cut text between mark and current position; save in buffer.
<br><i>with HOP:</i> Append to buffer.
<dt>^P <i>or</i> Ins <i>or</i> Paste (sun) <i>or</i> InsertHere (vt100)
<dd>Paste contents of buffer to current position.
With ^P, the cursor is always placed before the pasted region.
In emacs mode or with the option <code class=option>+V</code> the cursor is placed behind
the pasted region.
<br><i>with HOP:</i> (e.g. HOP Ins or ^G^P)
Paste from inter-window buffer.
Thus you can quickly copy text from one invocation
of mined to another.
<dt>Alt-Insert <i>or</i> Control-F4
<dd>Replace text just pasted with preceding paste buffer.
This command uses a ring of paste buffers as established with
the emacs editor ("yank ring").
<hr align=left width=50%>
<dt>ESC b <i>or</i> Shift-F4
<dd>Copy contents of paste buffer into a file.
<br><i>with HOP:</i> Append to file.
<dt>ESC i <i>or</i> F4
<dd>Insert file at current position.
<hr align=left width=50%>
<dt><i>(from File menu)</i>
<dd>Print text being edited (to default printer).
<dt>ESC c
<dd>Invoke operating system command (prompted for) with paste buffer as input.
</dl>
</dl>
<dl><dd>
<a name=cmdsearch></a>
<h3> Search</h3>
<dl>
<dt>ESC / <i>or</i> Find <i>or</i> F7 <i>or</i> F8
<dd>Search forward (prompt for regular expression).
<br><i>with HOP:</i> Search for current identifier.
<dt>ESC \
<dd>Search backward (prompt for regular expression).
<dt>HOP F8 <i>or</i> Shift-F9
<dd>Search for current identifier.
<dt>Alt-Shift-F9
<dd>Search for current identifier backward.
<dt>HOP Shift-F8 <i>or</i> ESC t
<dd>Search for definition of current identifier (using tags file).
See ESC t below for further description.
<dt>HOP Control-Shift-F8
<dd>Search for identifier definition (prompts for identifier).
<dt>HOP Control-F8
<dd>Search for current character.
<hr align=left width=50%>
<dt>^N <i>or</i> F9
<dd>Search for next occurence (using previous
search expression and direction).
<br><i>with HOP:</i> Repeat last but one search; two alternating
search expressions can be used with this command.
<dt>Alt-F9
<dd>Search again (for last expression) but in the opposite
direction.
<hr align=left width=50%>
<dt>ESC , <i>or</i> Shift-F8
<dd>(Global) Substitute (prompt for search and replacement strings).
<dt>ESC r <i>or</i> Control-F8
<dd>(Global) Replace with confirmation prompting (first prompt
for strings).
<dt>ESC R <i>or</i> Control-Shift-F8
<dd>(Line Replace) Substitute on current line (prompt for strings).
<hr align=left width=50%>
<dt>ESC ( <i>or</i> ESC ) <i>or</i> ESC { <i>or</i> ESC }
<dd>Search for corresponding bracket matching the bracket
at current position in one of the pairs (), [], {}, <>, .
(Nested matching bracket pairs are skipped.)
<dd>Also works for matching HTML tags.
<dd>In case you are editing a mailbox file, these commands
also work for MIME separators or mail headers; in this case,
the search direction depends on the command character, e.g.
ESC ( searches backward, ESC ) searches forward.
<hr align=left width=50%>
<dt>ESC t <i>or</i> HOP Shift-F8
<dd>Search for and move to the location of the definition of
identifier at the current cursor position. This command
uses the tags file that can be generated with the
<code>ctags</code> command (Unix).
It opens another file if necessary and automatically saves
the current file then.
<br>Like with some commands, ESC t places the current position
on the position marker stack before going to the location of
the identifier definition. The command ESC Return (Alt-Ret)
can move back to that position, even if edited files were
changed with the command.
<dt>HOP ESC t
<dd>Similar, but prompts for identifier.
<hr align=left width=50%>
<dt>HOP ESC ( <i>or</i> Alt-F11
<dd>Search for a character encoded in the "wrong encoding",
i.e. a UTF-8 character in Latin-1 mode, or a Latin-1 character
in UTF-8 mode.
<hr align=left width=50%>
<h4> Special functions in a search string</h4>
<dl compact>
<dt>.
<dd>matches any character.
<dt>^
<dd>(at begin of pattern) restricts match to the begin of a line.
<dt>$
<dd>(at end of pattern) restricts match to the end of a line.
<dt>[< character set >]
<dd>matches any one of a set of characters;
the set may be given by listing elements,
denoting a range < c1 >...< c2 >,
or negating the whole set [^< character set >].
<dt>\< character >
<dd>matches the character literally.
<dt>< pattern >*
<dd>(a star appended to any one of the defined patterns)
matches a (zero or more times) repetition of this pattern.
In a final position within the search expression, however,
it matches one or more times this pattern.
<dt>^V^J <i>or</i> \n
<dd>(a linefeed character or its representation)
searches for newline embedded in the search pattern
</dl>
</dl>
<dl><dd>
<h4> Special functions in a replacement string</h4>
<dl compact>
<dt>&
<dd>is replaced by the matched pattern to be replaced.
<dt>^V^J <i>or</i> \n
<dd>(a linefeed character) embeds a newline
in the replacement string
</dl>
</dl>
</dl>
<dl><dd>
<a name=cmdfile></a>
<h3> File operations</h3>
<dl>
<dt>ESC w <i>or</i> F2
<dd>Save (write back) current text to file (only if modified).
<br><i>with HOP:</i> saves current file position in marker file
@mined.mar, so that subsequent editing sessions will start
at the current position and remember formatting parameters.
<dt>ESC W <i>or</i> Shift-F2
<dd>Save (write back) current text to file (unconditionally).
<dt>Control-F2
<dd>Save As; save current text to file with different name
<dt>F12
<dd>enable memory for file positions in current directory;
saves current file position in marker file @mined.mar,
so that subsequent editing sessions will start at the current
position and remember formatting parameters.
<dt>F3
<dd>Edit another file (prompt for save if current text changed).
<dt>ESC v
<dd>View another file (prompt for save if current text changed).
<hr align=left width=50%>
<dt>ESC V
<dd>Toggle between edit mode and view only mode.
<hr align=left width=50%>
<dt>ESC q
<dd>Quit the editor (prompt for save if current text changed).
<dt>ESC ESC
<dd>Exit editing current text (save first if changed), continue
with next file if multiple files are being edited,
otherwise exit mined.
<hr align=left width=50%>
<dt>ESC +
<dd>Edit the next file in the list of files being edited.
<br><i>with HOP:</i> Edit the last file in the list.
<dt>ESC -
<dd>Edit the previous file in the list of files being edited.
<br><i>with HOP:</i> Edit the first file in the list.
<dt>ESC #
<dd>Ask for index into the list of files and edit that file.
<dt>^G N # <i>or</i> ESC g N #
<dd>Edit Nth file.
(^G N f also works.)
<dt>ESC # #
<dd>Reload file currently being edited.
</dl>
</dl>
<dl><dd>
<a name=cmdmenu></a>
<h3> Menu</h3>
<dl>
<dt>ESC Space <i>or</i> Alt-Space <i>or</i> Shift-F10
<dd>Open Popup menu.
<dt>Alt-F10
<dd>Open first flag menu (Info menu).
<dt>ESC f <i>or</i> Alt-f <i>or</i> F10
<dd>Open File menu.
<dt>ESC < letter > <i>or</i> Alt-< letter >
<dd>Open menu.
<dt>ESC K <i>or</i> Alt-K
<dd>opens the Input Method selection menu
<dd><i>(ESC K/Alt-K also works on prompt line)</i>
<dt>ESC Q <i>or</i> Alt-Q
<dd>opens the Smart Quotes selection menu
<dt>ESC E <i>or</i> Alt-E
<dd>opens the Encoding selection menu
</dl>
</dl>
<dl><dd>
<a name=cmdmisc></a>
<h3> Miscellaneous</h3>
<dl>
<dt>ESC = < count >
<dd>Repeat a command < count > times (prompts for count).
<dd><i>Example:</i> ESC=7< cursor down > moves the cursor
7 lines down.
<dd><i>Note:</i> If the function to be repeated is a character
to be inserted and the input is keyboard mapped to a
multi-character sequence, only the first character of the
sequence is inserted repeatedly.
<dt>ESC < count >
<dd>Repeat a command < count > times (prompts for rest of count);
this short form is only accepted, however, if the repeat count
consists of at least two digits (this is to avoid confusion with
function key escape sequences of certain terminals).
<dd><i>Example:</i> ESC77. enters a line of 77 dots,
ESC07x enters "xxxxxxx".
<hr align=left width=50%>
<dt>^V < function key >
<dd>Invoke function as if pressed together with the control key.
E.g. ^V < cursor-left > moves left into the parts of a
combined character just like Control-cursor-left would do
(the latter may depend on proper terminal setup).
<dt>^\
<dd>Abort current command, e.g. while on prompt line.
<hr align=left width=50%>
<dt>ESC ?
<dd>Show the current status of the file (name, whether modified,
current line, number of lines, characters, and bytes).
<br><i>with HOP:</i> Toggle permanent display of text status line.
<dt>ESC u
<dd>Display the character code of the current character
in the bottom status line.
(In UTF-8 mode, both the UTF-8 byte sequence and the
Unicode value are displayed; in CJK mode,
Han character values and corresponding Unicode values
are displayed when applicable.)
In UTF-8 mode, additional Unicode information is included,
indicating the script, character category, width,
combining, and surrogate properties of the character.
<br><i>with HOP:</i> Toggle permanent character code display.
<hr align=left width=50%>
<dt>ESC T
<dd>Toggle TAB width.
Alternates the width interpretation of TAB characters
between 4 and 8.
<dt>ESC P
<dd>Set page length (number of lines that mined assumes to
be on a page). (Useful for status display.)
<hr align=left width=50%>
<dt>ESC a
<dd>Toggle append mode (append to text buffer/file instead of
overwriting).
<hr align=left width=50%>
<dt>ESC d
<dd>Show current directory / change to another one
(also change drive in MSDOS version).
<dt>ESC n <i>or</i> New Name from File menu
<dd>Change file name associated with edited text (does not
affect the text currently being edited, just detaches it
from the file previously read in).
Assumed text editing properties (encoding, smart
quotes style to be applied, margins, ...) are preserved
(if the file was UTF-16 encoded, this is also preserved
with the new file); this is in contrast to editing
another file (using File/Open or multiple command line
file names) and pasting contents in which case such
information is lost.
<hr align=left width=50%>
<dt>ESC .
<dd>Redraw the screen.
<hr align=left width=50%>
<dt>ESC z
<dd>Suspend editor process; first write back file if modified
(no write if HOPped or given empty file name on prompting).
<dt>ESC !
<dd>Fork off a shell and wait for it to finish.
<hr align=left width=50%>
<dt>ESC h <i>or</i> F1 <i>or</i> Help
<dd>Online help function. Selection of help topics is offered.
<br>The environment variable MINEDHELPFILE can be set
to the file name of the online help file "mined.hlp",
but mined also looks for the file in a couple of typical
installation locations.
<br><i>with HOP:</i> View online help with mined itself instead
of invoking the "less" viewer. (This is the default even
without HOP in the DOS versions.) The text being edited
will automatically be saved (if it was modified) and
any prompting required will be involved. The suspended
editing session will automatically be restored after
help viewing is finished.
<hr align=left width=50%>
<dt>ESC
<dd>While a command is active and prompting, ESC aborts the
current command.
<dt>ESC ' '
<dd>(Escape Space) Do nothing, so Space aborts the ESC command.
<hr align=left width=50%>
<dt>F1 / Shift-F1 / Control-F1 / Alt-F1 (PC)
<dd>Display quick help line explaining assignment of function keys.
</dl>
</dl>
<dl><dd>
<a name=cmdmsdos></a>
<h3> MSDOS only</h3>
<dl>
<dt><i>Screen size change functions</i>
<dd><i>MSDOS screen size changes depend on a
mode table contained in the source file keydefs.c.
<br>In the presence of a TSR driver which can change
fonts and screen modes while running a program
(e.g. the excellent VGAMAX), the actual change
effective may occasionally be unexpected. Mined does
however recognize those changes and adjusts its
conception of screen size appropriately, although
only after the next character being input.</i>
<hr align=left width=50%>
<dt>ESC %
<dd>Change video mode to the mode with the next smaller
total resolution (lines * columns).
<dt>ESC &
<dd>Change video mode to the mode with the next higher
total resolution.
<hr align=left width=50%>
<dt>ESC l
<dd>Change video lines mode to the mode with the next smaller
number of lines but same number of columns.
<i>(The number of lines is first tried to be decreased
within the current video mode. If it is already
the lowest, the next video mode is chosen.)</i>
<dt>ESC L
<dd>Change video lines mode to the mode with the next higher
number of lines but same number of columns.
<hr align=left width=50%>
<dt>Alt-F9 / Control-F9
<dd>Switch between highest and lowest line number modes /
circle through all line number modes within
the current basic screen mode.
<hr align=left width=50%>
<dt>HOP ESC %/&/l/L
<dd>Several other video mode settings are prompted for
(experimental).
</dl>
</dl>
<a name=emacs></a>
<p><hr width=95%>
<dl><dd>
<h3>emacs mode (<code class=option>-e</code>)</h3>
<dl>
<i>This mode is in beta state.</i>
In emacs mode, emacs command key assignments to control keys,
ESC (Meta commands) and ^X (C-X commands) are configured.
In addition, the following emacs-compatible changes apply:
<ul type=circle>
<li>The mined ESC commands can be reached via M-x.
(Function keys remain unaffected.)
<li>The Delete key (on the small keypad) is configured to
delete the previous character.
<li>The control key insertion prefix is ^Q.
<li>The quit character (e.g. for the prompt line) is ^G.
<li>The emacs multiple buffer ring is fully enabled.
<li>Paragraph justification mode is set to consider an empty line
as paragraph separation by default.
<li>mined ESC commands can be reached via M-x (Alt-X).
<li>^^ (Control-^) is configured as an additional HOP key.
<li>keyboard mapping (input method) can be toggled with ^\
</ul>
<p>
Command overview:
<dl compact>
<dt>^A, ^B, ^E, ^F, ^N, ^P, ^V, M-v, M-b, M-f, M-a, M-e, M-< , M->, ^X[, ^X]
<dd>cursor and screen movement
<dt>^D
<dd>delete character
<dt>^O
<dd>insert new line
<dt>^Q
<dd>insert literal character
<p>
<dt>^@
<dd>mark position
<dt>^W / M-w
<dd>cut / copy to buffer
<dt>^K
<dd>delete to end of line / delete line end, and append to buffer
<dt>M-d / M-k
<dd>delete word / delete end of sentence, and append to buffer
<dt>^Y
<dd>paste buffer
<dt>M-y
<dd>paste previous buffer, replacing text just pasted
<p>
<dt>M-u
<dd>transform word upper-case
<dt>M-l
<dd>transform word lower-case
<dt>M-c
<dd>transform word capitalised (initial upper-case)
<p>
<dt>^S, ^R
<dd>search forward / reverse
<dt>M-%
<dd>replace with confirmation
<dt>M-.
<dd>search for identifier definition (using tags file)
<p>
<dt>^X^S, ^Xs
<dd>save file
<dt>^X^W
<dd>save file as (using different name)
<dt>^X^F
<dd>edit other file (prompts for name)
<dt>^X^B
<dd>edit previous file (among those listed on command line)
<dt>^X^C
<dd>exit editor, saving edited text
<dt>^Xk
<dd>quit editor, discard edited text (but confirms)
<dt>^Xi
<dd>insert file
<p>
<dt>^X=
<dd>display file statistics
<dt>^L
<dd>refresh display
<dt>^U, ^X^[
<dd>repeat (not as generic numeric command parameter)
<dt>^H
<dd>help
<dt>^Z, M-z, ^X^Z
<dd>suspend editor
<p>
<dt>^\ <i>(mined add-on)</i>
<dd>toggle keyboard mapping (input method)
<dt>^^ <i>(mined add-on)</i>
<dd>HOP (generic function amplifier / modifier)
<dt>M-x <i>(mined add-on)</i>
<dd>invoke mined ESC command
</dl>
</dl>
</dl>
<a name=wordstar></a>
<p><hr width=95%>
<dl><dd>
<h3>WordStar mode (<code class=option>-W</code>)</h3>
<dl>
The usual Escape commands and function key assignments of mined
also apply in WordStar mode.
<br>
In prefixed two-key commands, the control state and case of the second
key does not matter, e.g. ^K^B, ^KB and ^Kb are identical.
<dl compact>
<dt>^S, ^D, ^E, ^X, ^A, ^F, ^R, ^C, ^W, ^Z, ^H
<dd>cursor and screen movement
<dt>^G
<dd>delete character
<dt>^T
<dd>delete word
<dt>^Y
<dd>delete line
<dt>^Q^Y
<dd>delete to end of line
<dt>^N
<dd>insert new line
<dt>^P
<dd>insert control character
<dt>^Q^W, ^Q^Z
<dd>scroll multiple screen lines
<p>
<dt>^Q^F
<dd>find
<dt>^Q^A
<dd>find and replace (with HOP: with confirm)
<dt>^L
<dd>repeat last search
<p>
<dt>^Q
<dd>HOP key
<dt>^Q, ^K, ^O
<dd>two-key command prefixes
<dt>^Q^Q
<dd>repeat following command
<p>
<dt>^B
<dd>paragraph justification (word wrap)
<dt>^OL
<dd>set left margins
<dt>^OG
<dd>set left margin for first line of paragraph
<dt>^OR
<dd>set right margin
<p>
<dt>^KB
<dd>set marker
<dt>^QB
<dd>goto marker
<dt>^Kn
<dd>(n=0..9) set marker n
<dt>^Qn
<dd>(n=0..9) goto marker n
<p>
<dt>^KK
<dd>copy between here and marker (not exactly WS function)
<dt>^KC
<dd>copy (paste) saved text here (not exactly WS function)
<dt>^KY
<dd>delete between here and marker (not exactly WS function)
<dt>^KV
<dd>copy (paste) saved text here (not exactly WS function)
<dt>^KW
<dd>write paste buffer to file
<dt>^KR
<dd>read (insert) file here
<p>
<dt>^KS
<dd>write (save) edited text to file
<dt>^KD
<dd>write (save) edited text to file, edit next file
<dt>^KX
<dd>exit (and save)
<dt>^KQ
<dd>quit (don't save)
<dt>^KL
<dd>change current directory
</dl>
</dl>
</dl>
</table>
<a name=configuration></a>
<p><hr width=95%>
<h2>Environment interworking and configuration hints</h2>
<dl><dd>
A number of configuration options have already been addressed
throughout the manual page. A few more configuration features
are mentioned here. For more details, examples, and other
display settings see the example script <code>profile.mined</code>
in the Mined runtime support library.
<a name=support></a>
<h3>Mined runtime support library</h3>
The mined distribution provides a collection of runtime support
files (in subdirectory <code>usrshare</code>); if mined is
installed into standard locations, they are copied to one of the
directories <code>/usr/share/mined</code>,
<code>/usr/share/lib/mined</code>,
<code>/usr/local/share/mined</code>,
<code>/opt/mined/share</code>,
<code>$HOME/opt/mined/share</code>
(depending on operating system and installation options).
<p>Mined runtime support includes the following files:
<dl>
<dt><code>README</code>
<dd>mined overview and introduction
<dt><code>CHANGES</code>
<dd>change log
<dt><code>profile.mined</code>
<dd>shell commands to set environment variables for mined,
template for inclusion in $HOME/.profile
<dt><code>Xdefaults.mined</code>
<dd>xterm configuration entries suitable for mined, template
for inclusion in $HOME/.Xdefaults or $HOME/.Xresources
<dt><code>xinitrc.mined</code>
<dd>shell commands to activate Xdefaults.mined,
template for inclusion in $HOME/.profile
<dt><code>mined.hlp</code>
<dd>online help file
<dt><code>minedmar</code>
<dd>script to clean up the @mined.mar file position file
<dt><code>minedmar.bat</code>
<dd>DOS/Windows version of minedmar
<dt><code>uterm</code>
<dd>script to invoke xterm in UTF-8 mode
<dt><code>mterm</code>
<dd>script to invoke mlterm with suitable options
(for bidi support)
<dt><code>umined</code>
<dd>script to start mined in a separate xterm window,
using UTF-8 mode
<dt><code>lmined</code>
<dd>script to start mined in a separate xterm window,
using Latin-1 mode
<dt><code>xmined</code>
<dd>script to start mined in a separate xterm window,
using same encoding mode as currently set
<dt><code>wmined</code>
<dd>script to start mined in a separate rxvt window,
using Windows look-and-feel,
especially on Windows where rxvt is run in stand-alone mode
<dt><code>wmined.bat</code>
<dd>DOS/Windows version of wmined
<dt><code>mined.desktop</code>
<dd>KDE desktop entry to start mined in an xterm
from a menu entry, using the uterm script
<dt><code>configure-xterm</code>
<dd>sample configuration script to build xterm
with recommended configuration options
<dt><code>makeprint</code>
<dd>script to search for or retrieve and build the
uniprint program from the yudit package
<dt><code>uprint</code>
<dd>script for printing a Unicode file, using the
uniprint program from the yudit package
<dt><code>bdf18to20</code>
<dd>script to transform an 18x18 pixel double-width screen font
into a corresponding 20x20 pixel font matching the
10x20 single-width font (which is much nicer than the 9x18)
<dt><code>bdf18to20.sed</code>
<dd>sed script for the above
</dl>
<a name=terminalenv></a>
<h3> Terminal environment</h3>
The Unix terminal type is determined from the environment
variable TERM.
<p>
Recognition of some special terminal features or restrictions
is associated with the setting of TERM (xterm, linux, vt100,
sun*, cygwin, rxvt, *ansi*, hpterm, 97801).
<p>
For detection of function keys and cursor keys,
the escape sequences being used by terminals are often
not known to an operating system environment because they
are poorly and incompletely configured. Because this does
usually not work as expected (see this
<a target=_blank href=https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=16>
bug report</a> just for an example), mined does not rely on
the termcap/terminfo configuration of function key codes;
rather it always accepts a wide variety of typical codes.
A few ambiguous codes are resolved according to the TERM
variable.
<p>
In an xterm, window headline and icon text are set to the
current filename and "(*)" is added if the text has been
modified.
<p>
<i>Special DOS terminal handling (remote login to Unix):</i>
If the environment variable TERM begins with "pcansi", "nansi",
"ansi.", or contains "-emx",
mined assumes the terminal to run the PC character set
(codepage 437) so this supports remote login from a DOS system
or Windows telnet (in a DOS box) to Unix. If the effective
encoding used via the remote connection is rather Windows-ANSI
(codepage 1252), TERM should be "cygwin" instead.
<br><i>Note:</i> The character set or codepage being used depends
on the telnet program; cygwin telnet always emulates Windows
codepage 1252 and sets TERM=cygwin, so mined detects it
correctly; the older Microsoft telnet GUI client uses Windows
codepage 1252 and sets TERM=ansi; the newer Microsoft telnet
console mode client always uses DOS codepage 437 ("pcansi")
(even if started from a cygwin shell with codepage 1252 emulation)
and sets TERM=ansi; so mined cannot detect the encoding based
on TERM=ansi. If you use the newer Microsoft telnet console
mode client, please set TERM=ansi.sys or TERM=pcansi on
the Unix machine to adjust this.
<p>
<i>Native DOS terminal handling:</i>
Cygwin emulates the Latin-1 character encoding in a DOS box
window (unless reconfigured with the CYGWIN variable) instead
of the IBM PC character set that a DOS box runs by default.
This may produce unexpected appearance of non-ASCII characters
when editing DOS files; even editing the same file in the same
DOS box alternatingly with cygwin mined or djgpp mined will
exhibit this change of character display. Mined detects,
however, the environment setting "CYGWIN=codepage:oem" and
behaves accordingly.
<p>
Running mined in a dosemu session (DOS emulator on Linux)
works fine, even in an xterm-embedded session although not
perfect in that case: ^S and ^Q are interpreted for flow
control (thus ^S will hold all output until ^Q is entered),
and the mined option <code class=option>-Qa</code> should be used to tune menu borders right.
<a name=localeconv></a>
<h4> Locale configuration</h4>
For configuration of the character encoding to be used,
environment variables may be defined.
Mined accepts both explicit encoding suffixes (starting with ".")
or, if none are specified, also some region suffixes
(starting with "_").
The following table lists detected encodings in dependence
of recognized suffixes:
<br>
<table border>
<tr valign=top><td><i>Unicode:</i> UTF-8
<td><i>suffixes:</i> .UTF-8 / .utf8
<tr valign=top><td><i>Traditional Chinese (Hongkong):</i> Big5 with HKSCS
<td><i>suffixes:</i> .BIG5* / .Big5* / _HK / _TW (_TW ambiguous, .euctw may follow)
<tr valign=top><td><i>Simplified Chinese:</i> GB18030 (includes GBK and GB2312)
<td><i>suffixes:</i> .GB* / .gb* / .EUC-CN / .euccn / _CN
<tr valign=top><td><i>Traditional Chinese (Taiwan):</i> CNS (EUC-TW)
<td><i>suffixes:</i> .EUC-TW / .euctw
<tr valign=top><td><i>Japanese:</i> JIS / EUC-JP
<td><i>suffixes:</i> .EUC-JP / .eucjp / .euc (.euc ambiguous, kr/tw/cn may follow)
<tr valign=top><td><i>Japanese:</i> Shift-JIS
<td><i>suffixes:</i> .Shift_JIS / .sjis
<tr valign=top><td><i>Korean Unified Hangul:</i> UHC (includes EUC-KR)
<td><i>suffixes:</i> .UHC / .EUC-KR / .euckr
<tr valign=top><td><i>Korean:</i> Johab
<td><i>suffixes:</i> .JOHAB
</table>
<p>
One of the problems with locale conventions is that there is
no explicit distinction between text encoding and terminal
encoding although this is obviously a very different thing and
mixed combinations of both may occur and are actually supported
by mined. For this reason, mined follows a pragmatic approach:
<br>For text encoding, mined checks the variables
LANG, LC_ALL, LC_CTYPE in this order.
<br>For terminal encoding, mined checks the variables
LC_ALL, LC_CTYPE, LANG in this order.
<br>Thus it is possible to specify for example that
mined runs in a UTF-8 terminal and should assume GB text encoding
by default:
<br><code>LC_CTYPE=whatever.UTF-8</code>
<br><code>LANG=zh_CN.gbk</code>
<p>
An encoding specification with the <code class=option>-E</code> parameter takes
precedence over environment configuration.
<p>
If mined performs auto-detection of CJK encoding, it can
be configured which encodings are to be taken into account
for detection.
For this purpose, set the MINEDDETECT environment variable
to the list of encoding indications (capital letters as listed
for the <a href=#encodingoption><code class=option>-E</code> parameter</a>) to
disable auto-detection of other encodings.
UTF-8 auto-detection cannot be disabled this way.
<a name=terminalsetup></a>
<h4> Terminal setup</h4>
The <a href=#support>Mined runtime support library</a>
includes a configuration file Xdefaults.mined which lists
settings that should be applied to the terminal for proper
operation of several features as described throughout this
manual.
Depending on the terminal you use, the resource class
"XTerm" may have to be adapted (copying entries) to apply
to your terminal as well.
<p>
In some terminals, the cursor may not be well visible or not
visible at all if the cursor is on a character
with reverse background (control character, occurs e.g. in xterm)
or highlighted background (invalid character code, occurs e.g.
in xterm and rxvt).
See the X resource parameters for "cursorColor" in the example
configuration file Xdefaults.mined for remedy.
<p>
If your terminal scrolls down one line when you click the left
mouse button in the text area, the terminal type is not
properly set up. This occurs, e.g., when you run inside
a cygwin or rxvt terminal but the environment variable TERM
is incorrectly set to xterm. Set it to the correct value for remedy.
<p>
If mouse wheel movement moves more than expected, especially
if it cannot move by single items in a menu, this is probably
a configuration issue with your mouse driver.
You are probably running a Windows-based X server which is
(often by default) configured to generate multiple mouse
wheel events on each actual mouse wheel movement.
Often not even in the Control Panel mouse section, but only
in a configuration menu of mouse-specific setup software
(e.g. "Browser Mouse Settings"), configure the scroll unit to 1.
<a name=terminalinterworking></a>
<h4> Terminal interworking problems</h4>
With some terminals, problems are known due to missing terminal
features or terminal bugs:
<p><b>any terminal: menu border display</b>
<li>If the borders of mined menus appear as letters rather
than graphic borders, the terminal can unexpectedly not handle
VT100 block graphics. Use the option -Qa to switch to ASCII
borders.
<br>In a UTF-8 terminal, mined uses Unicode graphic characters
by default.
If they don't display they are missing in the font used by the
terminal.
Use the option -Qv to switch to VT100 block graphics or -Qa to
switch to ASCII graphics. If borders are visible but without
corners, use -Qs to switch to rectangular borders.
<p><b>any terminal: slow terminal feature auto-detection</b>
<li>Occasionally, when starting mined, you may receive a message
"Late screen mode response - set ESCDELAY=2000 or higher for proper detection".
<br>This happens if there is a large delay (> 700 ms) in the
interaction mined uses to detect terminal properties.
There are two possible reasons for this:
<ul>
<li>A slow remote terminal connection.
In this case, set up your environment variable ESCDELAY to a
value (in milliseconds) large enough to cover the anticipated
delay, e.g.:
<dd><code>export ESCDELAY; ESCDELAY=3000</code>
<li>Font loading. Especially with rxvt and mlterm, X fonts seem
to be loaded partially on demand. While this speeds up initial
terminal operation, it also results in unexpected delays of
terminal responses. In this case, exiting mined and starting
again will normally resolve the issue for one session of the
terminal. For a more permanent remedy, also use the
environment variable ESCDELAY when using those terminals, e.g.:
<dd><code>export ESCDELAY; ESCDELAY=1200</code>
</ul>
Automatic handling of the situation is planned for the next
release of mined.
<p><b>mlterm</b>
<li>Bidirectional display handling of mlterm is based on the
final display, not regarding any context (such as positioning
control, that's why mined implements a work-around for menu
display on mlterm). This also affects mouse cursor position
reports which do not match over right-to-left text, so the
cursor will be placed somewhere else in the line.
<p><b>hanterm</b>
<li>CJK display is buggy at the line beginning or after a TAB,
often only the second byte of the character code is displayed
as an ASCII character instead of displaying the complete CJK
character.
<li>Character attributes in hanterm are all mapped to reverse,
so there is a work-around to enable a visible position in the
scrollbar which is displayed as blank space. The criteria for
this work-around to apply are: CJK terminal (detected or
configured), TERM=xterm, Korean encoding (UHC or Johab)
configured with parameter or locale.
<p><b>rxvt</b>
<li>The recent rxvt-unicode release provides a CJK terminal
emulation. CJK display is buggy for characters that rxvt
thinks cannot be displayed, especially for GB18030
(LC_CTYPE=zh_CN.gb18030 rxvt); single bytes are then
interpreted instead which amounts to an unpredictable screen
width and cannot be correctly handled.
(This applies to character codes that are not mapped to
Unicode but also to many that are mapped.)
<br>Moreover, CJK width handling is inconsistent for many
characters in rxvt CJK mode (rxvt claims to adhere to the
locale mechanism in this respect but that's not the case here -
character widths are inconsistent with the locale, too).
<br><i>Remedy:</i> Don't use rxvt in CJK-encoded mode; mined
CJK terminal support is tailored to native CJK terminals (such
as cxterm or hanterm) where it works fine - if you use a
UTF-8-capable terminal, use it in UTF-8 mode! Mined can edit
CJK-encoded files well in a UTF-8-encoded terminal.
<li>Due to the scrollbar display work-around for hanterm (see
above), the scrollbar position may be shown as blank space
instead of coloured (only in rxvt CJK mode with Korean encoding
and if you explicitly set TERM=xterm which you shouldn't
anyway in rxvt).
In this case, coloured scrollbar foreground can be enabled
with the environment variable MINEDSCROLLFG="44;36" or
MINEDSCROLLFG="38;5;45".
<li>As a work-around for an xterm bug on cygwin, mined applies
terminal size re-adjustment. This may confuse rxvt (being
resized to an unexpectedly large window) if it pretends to be
xterm. Remedy: in rxvt, make sure that the environment
variable TERM=rxvt; the according X resource (Rxvt.termName: rxvt)
is also listed in the file Xdefaults.mined from the
<a href=#support>Mined runtime support library</a>.
<p><b>cxterm</b>
<li>EUC-JP half-width characters (8EA1-8EDF) are not properly
displayed by cxterm in EUC-JP mode (cxterm -JIS, not available
in "classic" cxterm).
<li>Due to the scrollbar display work-around for hanterm (see
above), the scrollbar position may be shown as blank space
instead of coloured (only in Korean encoding mode which is
probably rarely used with cxterm anyway).
In this case, coloured scrollbar foreground can be enabled
with the environment variable MINEDSCROLLFG="44;36" or
MINEDSCROLLFG="38;5;45".
<p><b>DOS console</b>
<li>With the djgpp-compiled version apparently there is a
Control-C problem on older Windows versions. Every first
Control-C will display ^C on the screen at the current position
without mined noticing it, while every second Control-C will
be passed to mined. This problem does not occur on Windows XP.
It does occur on Windows ME in a DOS box.
It does not occur with the cygwin-compiled version.
<h4> Work-around support to enable 8-bit character set on weird terminals</h4>
There exist some exceptionally weird 7 bit terminals that
have an alternative character set containing composed character
which can be displayed simultaneously with the default character
set. For those there is optional output translation which
embeds non-ASCII characters into the respective code switching
sequences. To enable output character transformation, set the
environment variable MINEDOUT to contain the upper half (with
respect to an 8 bit character set) of the translation table
into the terminal's alternate character set.
(Character set switching will be done as specified in the
termcap (as/ae) or terminfo (smacs/rmacs) entry.)
An example setting of MINEDOUT is included in the environment
sample file <code>profile.mined</code> in the
<a href=#support>Mined runtime support library</a>
for Siemens 9780x terminals.
<h4> Concerning some especially stupid terminal drivers</h4>
There used to be terminal drivers which make use of the
soft handshake mechanism by exchange of ^S and ^Q characters but
yet pass them through to application programs which is quite stupid.
If it is necessary to ignore such hazardous ^S and ^Q keys,
the environment variable NoCtrlSQ or NoControlSQ must be set.
Mined will then not disable the tty channel soft handshake
setting either.
<a name=MINEDKEYMAP></a>
<h3> Keyboard Mapping / Input Method pre-selection</h3>
With the environment variable MINEDKEYMAP the active or
standby mapping or both can be preselected. The value is a
two-letter script tag to set the active mapping, or it is
prepended with "-" to set the standby mapping, or a combination.
<br><i>Example:</i>
<dd>
<code>export MINEDKEYMAP=-gr</code>
will set Greek keyboard mapping standby.
<dd>
<code>export MINEDKEYMAP=py-rs</code>
will set Pinyin input method active and Radical/Stroke
input method standby.
<br>The respective tags attached to the keyboard mappings can be
looked up in the Input Method flag menu; the HOP function
toggles between display of the full input method name and its tag.
<a name=smartquotesconf></a>
<h3> Smart Quotes style configuration</h3>
Smart quotes style can also be preselected with the environment
variable MINEDQUOTES which should then contain the
opening/closing quote pair or just the opening quote mark
(double or single quotes).
<br><i>Example:</i>
<dd>
<code>export MINEDQUOTES=""</code>
sets these inward quotes and corresponding single smart quotes.
<dd>
<code>export MINEDQUOTES=""</code>
sets these Swedish quotes and corresponding single smart quotes.
<br>The value of the MINEDQUOTES variable must be encoded in UTF-8.
<a name=haninfoconf></a>
<h3> Han info configuration</h3>
With the environment variable MINEDHANINFO, the information
shown for Han characters can be preselected.
If the variable is defined, Han info mode is enabled.
It may contain letters to select description, pronunciation
information, and display mode to be used:
<dl><dd><table border=0>
<tr><td width=30>M
<td>show Mandarin pronunciation
<tr><td>C
<td>show Cantonese pronunciation
<tr><td>J
<td>show Japanese pronunciation
<tr><td>S
<td>show Sino-Japanese pronunciation
<tr><td>K
<td>show Korean pronunciation
<tr><td>V
<td>show Vietnamese pronunciation
<tr><td>D
<td>show character description
<tr><td>F
<td>display full information (in popup-menu form);
without F, the information will be shown on the status line
where it is subject to truncation
</table></dl>
<a name=bufferconf></a>
<h3> Common paste buffer configuration</h3>
The paste buffers, used for cut/copy/paste operations, as well as
the inter-window paste buffer, are located in a temporary
directory, using system conventions by default.
To maintain the inter-window paste functionality even remotely,
mined uses the environement variables MINEDTMP and MINEDUSER
which, in combination, point to a user-defined temporary directory
and file name pattern to be used for buffer files:
<ul>
<li>Set MINEDTMP to refer to a common mounted network directory
on all machines which means that the value of $MINEDTMP may have
to be different to reflect different mount points across the network.
<li>Set MINEDUSER to the same name within the network even if
using different user name accounts.
</ul>
For details, see also the <a href=#files>FILES</a> section below.
<a name=keyconf></a>
<h3> Keypad configuration</h3>
In order to enable the Alt key modifier for quicker entry of
"ESC" commands, or the keypad "5" key as a HOP key,
or the Scroll Lock or Pause key as a HOP key (for convenience
on notebooks), you may have to add some X configuration.
Also you may want to distinguish "Home" and "End" keys on the
two keypads of PC keyboards in order to enhance keypad value
(double assignment of functions to keypads is a waste of
resources).
And you may want to enable control and shift modifiers for
keypad and function keys.
See the example file Xdefaults.mined in the
<a href=#support>Mined runtime support library</a> for suggestions.
<a name=printconf></a>
<h3> Printing configuration</h3>
Mined uses the script <code>uprint</code> from the
<a href=#support>Mined runtime support library</a>
to print the current contents of the text being edited
in any selected encoding (unless the environment variable
MINEDPRINT is set to direct mined to use a different print command).
<br>If the support library is not installed in one of its
standard locations (system-dependent), it should be made
available in the usual command search path. Furthermore, the
script uses the program <code>uniprint</code> for actual print
preprocessing. This program is part of the yudit distribution;
if you don't have it installed on your system, there is another
script <code>makeprint</code> in the support library which can
be used to download and build the needed uniprint program.
<br>The font to be used with uprint can be configured with
the environment variables FONT, FONTPATH, FONTSIZE.
Also the printer can be configured as usual with PRINTER.
In addition, uprint checks an environment variable LPR for
an alternative for the system printing command (lpr/lp) if
that is needed.
See <a href=#printenv>Environment variables to configure Printing</a>
for further details.
<h3> Display of contents indications and scrollbar</h3>
<h4> Line ends</h4>
The line end is usually marked by a "" double left angle character.
This can be changed with the environment variable MINEDRET, its
content (one character) is used as an indicator at the end of
every text line on screen (so you can see how many blanks there are).
If MINEDRET contains another character it is used to fill the rest of
the screen line, and a third character would terminate the indication
line at the screen border. "" is a nice setting for people who
used to work at Siemens terminals.
<h4> Paragraph ends</h4>
With the option "p", mined displays different indicators for
line ends and paragraph ends. As with word-wrap, a paragraph
is defined to continue while a line ends with a space character.
The default display character is "". It can be changed with
the environment variable MINEDPARA.
<h4> TAB characters</h4>
TAB characters are usually indicated by a sequence of '' characters.
This can be changed by the environment variable MINEDTAB. More than
one indication is possible.
<h4> UTF-8 indicators</h4>
The contents of the special indicator variables are taken
to be Latin-1 encoded, even if mined runs in UTF-8 modes.
To use UTF-8 characters for these indications, additional variables
MINEDUTFRET, MINEDUTFTAB, MINEDUTFPARA may be used.
For details, see the example script <code>profile.mined</code>
in the <a href=#support>Mined runtime support library</a>.
<h4> Long lines</h4>
Lines which are too long for the screen are usually indicated
by a '' double right angle (guillemot) character. This marker
can be changed by setting the environment variable MINEDSHIFT.
If MINEDSHIFT contains a second character, that one will be used
to indicate lines shifted out left off the screen.
<h4> Display mode of indicators</h4>
It is recommended to display these indicator characters in a dim
display mode to prevent distraction from the text contents. The
default is a red colour which is a moderate dark red in xterm.
The display mode can be used by placing the code part of an ANSI
display control sequence in the environment variable MINEDDIM.
E.g., MINEDDIM=31 would select the default mode, red foreground;
MINEDDIM="32;40" would display indicators in green on black.
<h4> Unicode characters</h4>
For a description of special display indications in UTF-8 text
editing mode see "<a href=#utf8display>Unicode display</a>" above.
The highlighting mode of UTF-8 display in a Latin-1 terminal,
or of illegal UTF-8 sequences in general,
can be configured with the variable MINEDUNI.
<h4> Scrollbar colour</h4>
The foreground and background colours of the scrollbar can
be configured with MINEDSCROLLFG and MINEDSCROLLBG, respectively,
using ANSI modes; if only the background is configured,
the foreground is the reverse of it. In general, to support
fine-grained scrollbar display in UTF-8 terminals, the
foreground and background colour settings should be the
reverse of each other.
The default for the background is "46;34;48;5;45" if
use of 256 colour mode is enabled, or "46;34" if it is disabled.
The default for the forground is "", meaning that the reverse
background is used, with a work-around for hanterm (see above).
<h3> Online Help access</h3>
Mined can be told where to find its online help file by
the environment variables MINEDHELPFILE (for display,
the program "less" is used).
Mined also looks for the file in a couple of typical
installation locations so online help may be available without
this variable configured. It also tries to find it in the
directory where it was loaded from; this is especially useful
for the DOS/Windows version.
<a name=scriptconf></a>
<p><hr width=95%>
<h3> Compile-time configuration</h3>
<h4> Script highlighting</h4>
The the mined distribution contains a file
<code>src/colours.cfg</code>; it contains entries with the
script name (as listed in the Unicode data file
<code>Scripts.txt</code>), white space, and a colour index
into the xterm 256-colour mode. (To make good use of 256
colour mode, the terminal program should be compiled with 256
colour support enabled. Configure xterm with
<code>configure --enable-256-color</code> .)
<br>Edit <code>colours.cfg</code> before building mined to
adapt coloured script display to your preferences.
<a name=mkkbmap></a>
<h4> Keyboard Mapping (Input Method)</h4>
The mined distribution contains a file <code>src/keymaps.cfg</code>
and a script <code>mkkbmap</code>; go into the
<code>src</code> directory and use the script to generate
additional keyboard mappings:
The parameter to the <code>mkkbmap</code> script can be one of
<ul>
<dt>path.../name.kmap
<dd>a keyboard mapping file of the yudit text editor
<dt>path.../name.vim
<dd>a keyboard mapping file of the vim text editor
<dt>path.../name.cit
<dd>an input method mapping file of the cxterm terminal,
binary form; only works if the cxterm binary/text
conversion utility cit2tit is accessible
<dt>path.../name.tit
<dd>an input method mapping file of the cxterm terminal,
text form; only works if the character set
conversion utility iconv is accessible and
works on the mapping file
<dt>path.../name.utf
<dd>an input method mapping file of the cxterm terminal,
already converted to UTF-8 encoding; converted
versions can be downloaded from the mined download
web page
<dt>Cangjie
<dd>with this tag, a keyboard mapping for the Cangjie input method
will be generated,
taking information from the Unihan database (unicode.org)
<dt>MainlandTelegraph , TaiwanTelegraph
<dd>with one of these tags, a keyboard mapping will be generated
using one of these telegraph codes as an input method,
taking information from the Unihan database (unicode.org)
<dt>Cantonese , HanyuPinlu , Mandarin , Tang
<dd>with one of these tags, a keyboard mapping will be generated
using the according Chinese pronunciation as an input method,
taking information from the Unihan database (unicode.org)
<dt>JapaneseKun , JapaneseOn
<dd>with one of these tags, a keyboard mapping will be generated
using Japanese or Sino-Japanese pronunciation as an input method,
taking information from the Unihan database (unicode.org)
<dt>Korean , Vietnamese
<dd>with one of these tags, a keyboard mapping will be generated
using Korean or Vietnamese pronunciation as an input method,
taking information from the Unihan database (unicode.org)
<dt>VIQR , VNI , Vtelex
<dd>with one of these tags, a keyboard mapping will be generated
for the respective Vietnamese input methods,
taking character information from the Unicode database (unicode.org)
<dt><i>script tag</i>
<dd>for many scripts listed in the UnicodeData.txt database,
character names listed there can build a useful
keyboard mapping;
<code>mkkbmap</code> will then generate an according
keyboard mapping file, e.g. for Bopomofo
</ul>
Each successful generation of a mapping table adds an entry
to the configuration file <code>keymaps.cfg</code>; the
entry is however initially disabled as it usually needs manual
adjustment: edit the configuration file; enable the new
entry by removing the leading '#' character, check the first
element which will be the name of the mapping to appear in the
Input Method menu, check the last element of the entry
which is a two-letter shortcut and must be unique for all
mappings, then move the entry to the position where you want
it to appear in the menu. You can also group mappings by
adding "-" lines in this configuration file.
<br>
With mined 2000.10, all included keyboard mappings are based
on Unicode 4.0.1 data.
<br>
For the keyboard mappings generated from Unihan data,
characters are sorted according to the priorities of their
Unicode ranges (assigning lower priority to "Supplement" and
"Extension" and "Compatibility" ranges).
So for some input mnemos, the "pick list" for the Cangjie
input method is displayed more in order of relevance (since
mined 2000.10).
<br>
For keyboard mappings for CJK encodings, mkkbmap will add
appropriate punctuation mapping entries for Chinese, Japanese,
Korean, respectively, in addition to the entries derived from
the respective data source.
<a name=msdos></a>
<p><hr width=95%>
<h3> MSDOS-only notes</h3>
<p>
<i>DOS binaries:</i> Two DOS-based versions, compiled with djgpp
and with cygwin, are available for download from the
mined web site
<a target=_top href=http://towo.net/mined/>http://towo.net/mined/</a>
for users who want a quick binary on DOS-based systems.
The djgpp binary is a "dual-mode" executable which runs on
plain DOS and also supports long file names in a Windows
98/2000/... DOS box (not NT4.0).
<p>
<i>Highlight mode:</i>
The ANSI codes for selecting normal and exposed display can be
chosen with the environment variable MINEDCOL. The two
selections are separated by a space. Each selection is a
semicolon-separated list of the code values.
The default behaviour corresponds to the setting
<ul>
<dt><dd> set MINEDCOL=7 27
</ul>
Example: Green on red text, red on green status:
<ul>
<dt><dd> set MINEDCOL=34;42 32;44
</ul>
<p>
For command line options, "<code class=option>/</code>" can be used instead of "<code class=option>-</code>".
<p>
The "ESC -" command cannot go back within a group of
files named by the same wildcard expression. It goes to
the previous file name (or wildcard expression) instead.
<p>
<i>Enabling the keypad HOP key:</i> If you have a very old and
crappy BIOS, you may have to enable use of the cursor block
"5" key (for use as a HOP key) with a TSR driver (ENHKBD.COM)
or an enhanced keyboard driver.
(Older PC keyboard drivers were often so ignorant
to forbid you to use that key.)
<p>
Immediate adjustment to changed window size does not work in
the DOS version if the size change is caused by a TSR (e.g.
VGAMAX using a hotkey).
<p>
The cygwin terminal environment (cygwin in a DOS box window)
provides an emulation of a Unix 8 bit character set so
non-ASCII characters entered in this version are different
from those entered in other DOS-based versions.
Editing UTF-8 text, on the other hand, works transparently in
all DOS-based versions.
See <a href=#terminalenv>Terminal environment</a> for more details.
<a name=dosmouse></a>
<p>
In order to enable mouse use in a DOS box, deactivate
"QuickEdit mode" in the properties menu.
<font color=gray>
<p> The following only applies if DOS ANSI driver output is used
which is currently not the case in any configuration:
<p> The default colour setting depends on an extended ANSI driver
(like NNANSI) as does the scroll down function anyway.
Unfortunately, there is no way to find out the current colour
setting nor is there an inverse video mode in many ANSI
drivers (only a fixed black on white mode) so that it is
impossible to implement just inverse display for highlighting.
Therefore, if mined thinks to see an ANSI driver of the
simpler kind, it will change its colour setting defaults. In
any case, these can be overridden with the MINEDCOL variable.
<p> <dl>
<i>Recommended ANSI drivers:</i>
<dt><dd> NNANSI by Tom Almy (very capable, but needs some
installation effort), or
<dt><dd> ANSI.COM by Michael J. Mefford (small, works well at
usual screen sizes).
</dl>
Mined tries to analyse the ANSI drivers capabilities by
checking some control sequences. This works, however, only if
the ANSI driver is at least able to send cursor position
reports.
For primitive ANSI drivers that cannot even do that, mined's
operation can be ensured with an emergency procedure:
A faked pseudo-report should be stuffed into mined as its
first input (with some key-stuffing program) and mined will
use no further cursor position requests. It will also assume a
simple ANSI driver then. The faked report should consist of
the screen size in lines and columns, embedded at the
positions of the ANSI cursor report sequence but with
different surrounding characters. For an invocation of mined
on a 25 lines and 80 columns screen a batch file for this
would look like:
<ul>
<dt><dd> keypress xx25x80xx
<dt><dd> mined %1 %2 %3 %4 %5 %6 %7 %8 %9
</ul>
</font>
<p>
The remaining remarks apply to the Turbo-C version only
which is no longer supported (use djgpp instead):
<ul>
<li>The file size being edited is limited to 200KB to 500KB
(depending on average line length and number of lines).
<li>Typing of Control-P while display output is active
(i.e., during screen paging) can hang the system. Typing of
Control-C or Control-Break while display output is active can
at least leave some garbage on the screen. Control-S may stop
screen output until Control-Q is typed. Typing of
Control-P, Control-C, or Control-Break while a search
operation is active can be desastrous. (Can anyone tell me how
to disable BIOS/MSDOS interpretation of these characters from
Turbo-C?)
<li>The Turbo-C version is configured to handle screen output
using the "conio" module. (It used to use an ANSI driver.)
The disadvantage of conio is that it doesn't handle arbitrary
screen modes and sizes whereas good ANSI drivers support them
all.
</ul>
</dl>
<a name=envvar></a>
<p><hr width=95%>
<h2>ENVIRONMENT VARIABLES</h2>
<dl><dd>
Environment variables for configuration of mined are listed
in the script file <code>profile.mined</code>
in the <a href=#support>Mined runtime support library</a>
together with explanations and suggested values.
<br> Further variables used by mined in the usual meaning are:
<dl>
<dt> HOME
<dt> USER
<dt> SHELL
<dt> SYS$SCRATCH (VMS)
<dt> TEMP <i>(MSDOS)</i>
<dt> TMP
<dt> TMPDIR
<dt> TERM
<dd>Terminal type to be assumed.
<dt> ESCDELAY
<dd>Delay after an ESCAPE character that mined waits for
recognition of a function key control sequence. Default is 450 ms.
<dt> MAPDELAY <i>(non-standard)</i>
<dd>Similar delay that mined applies to wait for subsequent
input characters when applying keyboard mapping for an
input method. Default is 900 ms.
<font color=gray>
<dt> LINES, COLUMNS <i>(MSDOS ANSI mode only)</i>
<dd>Line / column count of terminal to be assumed.
</font>
<dt> windir
<dd>Used to determine if it runs under MS Windows and set some
defaults (screen output delay) accordingly.
</dl>
<dl>
<a name=printenv></a>
<h4>Environment variables to configure Printing</h4>
<dt> MINEDPRINT
<dd>Print command to use instead of uprint; the value must
contain an embedded "%s" which is replaced with the file name.
<dt> FONT
<dd>Name of a font file, e.g. LucidaBrightRegular or bodoni.ttf
for use with uprint/uniprint;
the file must reside in the configured font path.
<dt> FONTPATH
<dd>Directory search path (separate directory names with ":")
for use with uprint/uniprint which uses Truetype fonts.
<dt> FONTSIZE
<dd>Font size to be used with uprint/uniprint.
<dt> LPR
<dd>Print spooling command to be used by uprint/uniprint (or
mined itself if uprint does not work) instead of the
system-specific print spooling command (e.g. lpr).
<dt> PRINTER
<dd>Name of printer to be spooled to.
</dl>
</dl>
<a name=files></a>
<h2>FILES</h2>
<dl><dd>
<h3> Unix</h3>
<dl>
<dt>$MINEDHELPFILE
<dd>online help file as configured, first attempt (to find it)
<dt>$0/mined.hlp
<dd>online help file in mined program directory, next attempt
<dt>/usr/share/mined/mined.hlp
<dd>online help file, next attempt
<dt>/usr/local/share/mined/mined.hlp
<dd>online help file, next attempt
<dt>/usr/share/lib/mined/mined.hlp
<dd>online help file, next attempt
<dt>/opt/mined/share/mined.hlp
<dd>online help file, next attempt
<dt>/usr/share/doc/packages/mined/mined.hlp
<dd>online help file, next attempt
<hr align=left width=50%>
<dt>$MINEDTMP
<dd>directory for auxiliary files, first attempt
<dd>Using this variable and $MINEDUSER (see below), you can
establish copy and paste among machines that share network
directories but are normally configured to use separate
(usually local) temporary directories.
<dt>$TMPDIR
<dd>directory for auxiliary files, next attempt
<dt>$TMP
<dd>directory for auxiliary files, next attempt
<dt>$TEMP
<dd>directory for auxiliary files, next attempt
<dt>/usr/tmp
<dd>directory for auxiliary files, next attempt
<dt>/tmp
<dd>directory for auxiliary files, next attempt
<dt>$MINEDUSER
<dd>user name assumed instead of $USER for building
auxiliary file names; using this, common copy-and-paste buffers
can be used on a network file system from different machines
where the user possibly has different user names
<hr align=left width=50%>
<dt>minedbuf.< USER >.< PID >.< NN >
<dd>temporary file for paste buffer;
USER is either $MINEDUSER or $USER
<dt>minedbuf.< USER >
<dd>file for inter-window paste buffer;
USER is either $MINEDUSER or $USER;
see descriptions of $MINEDTMP and $MINEDUSER above for
how to set up a common inter-window paste buffer in a
heterogeneous network
<dt>minedpanic.< USER >.< PID >
<dd>panic file to rescue text in case of crash or external signal caught
</dl>
</dl>
<dl><dd>
<hr align=left width=50%>
<h3> VMS</h3>
<dl>
<dt>SYS$MINEDTMP:$MINEDBUF$user.pid.nn
<dd>paste buffer, first attempt
<dt>SYS$SCRATCH:$MINEDBUF$user.pid.nn
<dd>paste buffer, next attempt
<dt>SYS$SCRATCH:$MINEDPANIC$user.pid
<dd>panic file, first attempt
<dt>SYS$MINEDTMP:$MINEDBUF$user
<dd>inter-window paste buffer, first attempt
<dt>SYS$SCRATCH:$MINEDBUF$user
<dd>inter-window paste buffer, next attempt
<dt>SYS$SCRATCH:$MINEDPANIC$user.pid
<dd>panic file, next attempt
<dt><i>If SYS$SCRATCH is not available, SYS$LOGIN is used instead.</i>
</dl>
</dl>
<dl><dd>
<hr align=left width=50%>
<h3> MSDOS / Windows</h3>
<dl>
<dt>%MINEDHELPFILE%
<dd>online help file as configured, first attempt (to find it)
<dt>mined.hlp <i>(in mined program directory)</i>
<dd>online help file, next attempt
<dt>\bin\mined.hlp
<dd>online help file, next attempt
<dt>%MINEDTMP%\minedbuf.nn
<dd>paste buffer
<dt>%MINEDTMP%\minedbuf
<dd>inter-window paste buffer
<dt>%MINEDTMP%\minedbuf.%MINEDUSER%
<dd>inter-window paste buffer, as configured to use the same
file as other mined versions in a heterogeneous network;
note, however, that %MINEDUSER% will be shortened to 3 characters
in pure DOS
<dt>%MINEDTMP%\mined-pa.nic
<dd>panic file
<dt><i>If %MINEDTMP% is not available, %TEMP% or %TMP% or \ are used.</i>
</dl>
</dl>
<p><hr width=95%>
<h2>DIAGNOSTICS</h2>
<dl><dd>
In all cases where it is considered sensible, the appropriate
message of a system error occurred is displayed (instead of
printing numerical hieroglyphs or indistinguished commonplace
messages as many other UNIX tools do).
</dl>
<p><hr width=95%>
<h2>BUGS</h2>
<dl><dd>
In an extremely narrow terminal window (less than 8 characters),
if lines are shifted out of the display, moving the cursor around
may cause positioning errors and display garbage.
<p>
(Unix:) Mined cannot edit a pipe or device file and hangs if
you try to do so. (But it can insert from, or write to, a pipe.)
<br>This restriction does not refer to editing from standard
input in a piped command like <code>cmd | mined</code>
which works of course.
<p>
(MSDOS:) Piped editing from standard input does not work for
unknown reason. This restriction does not apply to the
cygwin version.
<p>
(MSDOS, xterm:) Non-cygwin versions (djgpp etc.) do not work
in an xterm for unknown reason. The cygwin version does of course
work in xterm.
</dl>
<p><hr width=95%>
<a name=acknowledgements></a>
<h2>AUTHOR AND ACKNOWLEDGEMENTS</h2>
<dl><dd>
Long ago, the initial version of mined was written for the Minix
educational operating system by Michiel Huisjes.
It was adapted to Unix by Achim Mller who added termcap support.
Mined was later debugged, partly rewritten and enhanced and
is now maintained by Thomas Wolff.
<br>
Please send comments, suggestions, bug reports to
<a href=mailto:mined@towo.net>mined@towo.net</a>.
<h3>Mailing list</h3>
Mined is also hosted as a
<a target=sourceforge href=http://sourceforge.net/projects/mined>
sourceforge project (sf.net/projects/mined)</a> where a
mailing list is available. To subscribe for information about
updates, or discussion, error reports, and feature requests,
or to send a mail, please go to the
<a target=sourceforge href=http://lists.sourceforge.net/lists/listinfo/mined-editor>
Mined mailing list page</a>.
<h3>Acknowledgements</h3>
<ul>
<li>
Thanks to Nadim Shaikli < shaikli @ yahoo.com > for discussion
of right-to-left issues and interworking with mlterm.
<li>
Thanks to Mike Fabian < mfabian @ suse.de >
for making the RPM package included in the SuSE distribution.
<li>
Thanks to Ziying Sherwin < sherwin @ nlm.nih.gov >
and R. P. Channing Rodgers < rodgers @ nlm.nih.gov >
for suggestions and information about CJK input method support
and multiple choice handling (pick lists).
<li>
Thanks to Tobias Ernst < tobias_ernst @ eml.cc > for
providing a Mac OS X makefile and suggestion and information
to implement Emacs command mode.
<li>
Thanks to 吴咏炜 (Wu Yongwei)
< yongwei @ eastday.com >
for suggestions and information about Pinyin input methods,
for discussion about keyboard mappings for CJK punctuation,
and for further maintaining the Pinyin input method.
<li>
Thanks to Ramakrishnan Muthukrishnan < rkrishnan @ debian.org >
for making the Debian package.
<li>
Thanks to Thierry Thomas < thierry @ FreeBSD.org >
for making the FreeBSD package.
</ul>
</dl>
<p><hr width=95%>
</body>
|