/usr/share/doc/nedit/nedit.html is in nedit 1:5.6~cvs20081118-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 | <HTML>
<HEAD>
<TITLE>Nirvana Editor (NEdit) Help Documentation</TITLE>
</HEAD>
<BODY>
<P>
<A NAME="Nirvana_Editor_(NEdit)_Help_Documentation"></A>
<H1> Nirvana Editor (NEdit) Help Documentation </H1>
</P><P>
<A NAME="Table_of_Contents"></A>
<H2> Table of Contents </H2>
</P><P>
<PRE>
<A HREF="#Getting_Started">Getting Started</A>
</PRE>
</P><P>
<PRE>
Basic Operation Macro/Shell Extensions
<A HREF="#Selecting_Text">Selecting Text</A> <A HREF="#Shell_Commands_and_Filters">Shell Commands and Filters</A>
<A HREF="#Finding_and_Replacing_Text">Finding and Replacing Text</A> <A HREF="#Learn/Replay">Learn/Replay</A>
<A HREF="#Cut_and_Paste">Cut and Paste</A> <A HREF="#Macro_Language">Macro Language</A>
<A HREF="#Using_the_Mouse">Using the Mouse</A> <A HREF="#Macro_Subroutines">Macro Subroutines</A>
<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A> <A HREF="#Highlighting_Information">Highlighting Information</A>
<A HREF="#Shifting_and_Filling">Shifting and Filling</A> <B><font color=red>--> Range Sets <-- NO HREF!!</font></B>
<A HREF="#Tabbed_Editing">Tabbed Editing</A> <A HREF="#Action_Routines">Action Routines</A>
<A HREF="#File_Format">File Format</A>
Customizing
Features for Programming <A HREF="#Customizing_NEdit">Customizing NEdit</A>
<A HREF="#Programming_with_NEdit">Programming with NEdit</A> <A HREF="#Preferences">Preferences</A>
<A HREF="#Tabs/Emulated_Tabs">Tabs/Emulated Tabs</A> <A HREF="#X_Resources">X Resources</A>
<A HREF="#Auto/Smart_Indent">Auto/Smart Indent</A> <A HREF="#Key_Binding">Key Binding</A>
<A HREF="#Syntax_Highlighting">Syntax Highlighting</A> <A HREF="#Highlighting_Patterns">Highlighting Patterns</A>
<A HREF="#Finding_Declarations_(ctags)">Finding Declarations (ctags)</A> <A HREF="#Smart_Indent_Macros">Smart Indent Macros</A>
<A HREF="#Calltips">Calltips</A>
</PRE>
</P><P>
<PRE>
Regular Expressions <A HREF="#NEdit_Command_Line">NEdit Command Line</A>
<A HREF="#Basic_Regular_Expression_Syntax">Basic Regular Expression Syntax</A> <A HREF="#Client/Server_Mode">Client/Server Mode</A>
<A HREF="#Metacharacters">Metacharacters</A> <A HREF="#Crash_Recovery">Crash Recovery</A>
<A HREF="#Parenthetical_Constructs">Parenthetical Constructs</A> <A HREF="#Version">Version</A>
<A HREF="#Advanced_Topics">Advanced Topics</A> <A HREF="#GNU_General_Public_License">GNU General Public License</A>
<A HREF="#Example_Regular_Expressions">Example Regular Expressions</A> <A HREF="#Mailing_Lists">Mailing Lists</A>
<A HREF="#Problems/Defects">Problems/Defects</A>
</PRE>
</P><P>
<A NAME="Getting_Started"></A>
<H2> Getting Started </H2>
</P><P>
Welcome to NEdit!
</P><P>
NEdit is a standard GUI (Graphical User Interface) style text editor for
programs and plain-text files. Users of Macintosh and MS Windows based text
editors should find NEdit a familiar and comfortable environment. NEdit
provides all of the standard menu, dialog, editing, and mouse support, as
well as all of the standard shortcuts to which the users of modern GUI based
environments are accustomed. For users of older style Unix editors, welcome
to the world of mouse-based editing!
</P><P>
Help sections of interest to new users are listed under the "Basic Operation"
heading in the top-level Help menu:
</P><P>
<PRE>
<A HREF="#Selecting_Text">Selecting Text</A>
<A HREF="#Finding_and_Replacing_Text">Finding and Replacing Text</A>
<A HREF="#Cut_and_Paste">Cut and Paste</A>
<A HREF="#Using_the_Mouse">Using the Mouse</A>
<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A>
<A HREF="#Shifting_and_Filling">Shifting and Filling</A>
</PRE>
</P><P>
Programmers should also read the introductory section under the "Features for
Programming" section:
</P><P>
<PRE>
<A HREF="#Programming_with_NEdit">Programming with NEdit</A>
</PRE>
</P><P>
If you get into trouble, the Undo command in the Edit menu can reverse any
modifications that you make. NEdit does not change the file you are editing
until you tell it to Save.
</P><P>
<H3>Editing an Existing File</H3>
</P><P>
To open an existing file, choose Open... from the file menu. Select the file
that you want to open in the pop-up dialog that appears and click on OK. You
may open any number of files at the same time. Depending on your settings
(cf. "<A HREF="#Tabbed_Editing">Tabbed Editing</A>") each file can appear in its own editor window, or it
can appear under a tab in the same editor window. Using Open... rather than
re-typing the NEdit command and running additional copies of NEdit, will give
you quick access to all of the files you have open via the Windows menu, and
ensure that you don't accidentally open the same file twice. NEdit has no
"main" window. It remains running as long as at least one editor window is
open.
</P><P>
<H3>Creating a New File</H3>
</P><P>
If you already have an empty (Untitled) window displayed, just begin typing
in the window. To create a new Untitled window, choose New Window or New Tab
from the File menu. To give the file a name and save its contents to the
disk, choose Save or Save As... from the File menu.
</P><P>
<H3>Backup Files</H3>
</P><P>
NEdit maintains periodic backups of the file you are editing so that you can
recover the file in the event of a problem such as a system crash, network
failure, or X server crash. These files are saved under the name `~filename`
(on Unix) or `_filename` (on VMS), where filename is the name of the file you
were editing. If an NEdit process is killed, some of these backup files may
remain in your directory. (To remove one of these files on Unix, you may
have to prefix the `~' (tilde) character with a (backslash) to prevent the
shell from interpreting it as a special character.)
</P><P>
<H3>Shortcuts</H3>
</P><P>
As you become more familiar with NEdit, substitute the control and function
keys shown on the right side of the menus for pulling down menus with the
mouse.
</P><P>
Dialogs are also streamlined so you can enter information quickly and without
using the mouse*. To move the keyboard focus around a dialog, use the tab
and arrow keys. One of the buttons in a dialog is usually drawn with a
thick, indented, outline. This button can be activated by pressing Return or
Enter. The Cancel or Dismiss button can be activated by pressing escape.
For example, to replace the string "thing" with "things" type:
</P><P>
<PRE>
<ctrl-r>thing<tab>things<return>
</PRE>
</P><P>
To open a file named "whole_earth.c", type:
</P><P>
<PRE>
<ctrl-o>who<return>
</PRE>
</P><P>
(how much of the filename you need to type depends on the other files in the
directory). See the section called "<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A>" for more details.
</P><P>
* Users who have set their keyboard focus mode to "pointer" should set
"Popups Under Pointer" in the Default Settings menu to avoid the additional
step of moving the mouse into the dialog.
<P><HR>
</P><P>
<A NAME="Basic_Operation"></A>
<H1> Basic Operation </H1>
</P><P>
<A NAME="Selecting_Text"></A>
<H2> Selecting Text </H2>
</P><P>
NEdit has two general types of selections, primary (highlighted text), and
secondary (underlined text). Selections can cover either a simple range of
text between two points in the file, or they can cover a rectangular area of
the file. Rectangular selections are only useful with non-proportional (fixed
spacing) fonts.
</P><P>
To select text for copying, deleting, or replacing, press the left mouse
button with the pointer at one end of the text you want to select, and drag
it to the other end. The text will become highlighted. To select a whole
word, double click (click twice quickly in succession). Double clicking and
then dragging the mouse will select a number of words. Similarly, you can
select a whole line or a number of lines by triple clicking or triple
clicking and dragging. Quadruple clicking selects the whole file. After
releasing the mouse button, you can still adjust a selection by holding down
the shift key and dragging on either end of the selection. To delete the
selected text, press delete or backspace. To replace it, begin typing.
</P><P>
To select a rectangle or column of text, hold the Ctrl key while dragging the
mouse. Rectangular selections can be used in any context that normal
selections can be used, including cutting and pasting, filling, shifting,
dragging, and searching. Operations on rectangular selections automatically
fill in tabs and spaces to maintain alignment of text within and to the right
of the selection. Note that the interpretation of rectangular selections by
Fill Paragraph is slightly different from that of other commands, the section
titled "<A HREF="#Shifting_and_Filling">Shifting and Filling</A>" has details.
</P><P>
The middle mouse button can be used to make an additional selection (called
the secondary selection). As soon as the button is released, the contents of
this selection will be copied to the insert position of the window where the
mouse was last clicked (the destination window). This position is marked by a
caret shaped cursor when the mouse is outside of the destination window. If
there is a (primary) selection, adjacent to the cursor in the window, the new
text will replace the selected text. Holding the shift key while making the
secondary selection will move the text, deleting it at the site of the
secondary selection, rather than copying it.
</P><P>
Selected text can also be dragged to a new location in the file using the
middle mouse button. Holding the shift key while dragging the text will copy
the selected text, leaving the original text in place. Holding the control
key will drag the text in overlay mode.
</P><P>
Normally, dragging moves text by removing it from the selected position at
the start of the drag, and inserting it at a new position relative to the
mouse. Dragging a block of text over existing characters, displaces the
characters to the end of the selection. In overlay mode, characters which are
occluded by blocks of text being dragged are simply removed. When dragging
non-rectangular selections, overlay mode also converts the selection to
rectangular form, allowing it to be dragged outside of the bounds of the
existing text.
</P><P>
The section "<A HREF="#Using_the_Mouse">Using the Mouse</A>" summarizes the mouse commands for making primary
and secondary selections. Primary selections can also be made via keyboard
commands, see "<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A>".
<P><HR>
</P><P>
<A NAME="Finding_and_Replacing_Text"></A>
<H2> Finding and Replacing Text </H2>
</P><P>
The Search menu contains a number of commands for finding and replacing text.
</P><P>
The Find... and Replace... commands present dialogs for entering text for
searching and replacing. These dialogs also allow you to choose whether you
want the search to be sensitive to upper and lower case, or whether to use
the standard Unix pattern matching characters (regular expressions).
Searches begin at the current text insertion position.
</P><P>
Find Again and Replace Again repeat the last find or replace command without
prompting for search strings. To selectively replace text, use the two
commands in combination: Find Again, then Replace Again if the highlighted
string should be replaced, or Find Again again to go to the next string.
</P><P>
Find Selection searches for the text contained in the current primary
selection (see <A HREF="#Selecting_Text">Selecting Text</A>). The selected text does not have to be in the
current editor window, it may even be in another program. For example, if
the word dog appears somewhere in a window on your screen, and you want to
find it in the file you are editing, select the word dog by dragging the
mouse across it, switch to your NEdit window and choose Find Selection from
the Search menu.
</P><P>
Find Incremental, which opens the interactive search bar, is yet another variation
on searching, where every character typed triggers a new search. After you've
completed the search string, the next occurrence in the buffer is found by hitting
the Return key, or by clicking on the icon to the left (magnifying glass). Holding
a Shift key down finds the previous occurrences. To the right there is a clear
button with an icon resembling "|<". Clicking on it empties the search text widget
without disturbing selections. A middle click on the clear button copies the
content of any existing selection into the search text widget and triggers a new
search.
</P><P>
<H3>Searching Backwards</H3>
</P><P>
Holding down the shift key while choosing any of the search or replace
commands from the menu (or using the keyboard shortcut), will search in the
reverse direction. Users who have set the search direction using the buttons
in the search dialog, may find it a bit confusing that Find Again and Replace
Again don't continue in the same direction as the original search (for
experienced users, consistency of the direction implied by the shift key is
more important).
</P><P>
<H3>Selective Replacement</H3>
</P><P>
To replace only some occurrences of a string within a file, choose Replace...
from the Search menu, enter the string to search for and the string to
substitute, and finish by pressing the Find button. When the first
occurrence is highlighted, use either Replace Again (^T) to replace it, or
Find Again (^G) to move to the next occurrence without replacing it, and
continue in such a manner through all occurrences of interest.
</P><P>
To replace all occurrences of a string within some range of text, select the
range (see <A HREF="#Selecting_Text">Selecting Text</A>), choose Replace... from the Search menu, type the
string to search for and the string to substitute, and press the "R. in
Selection" button in the dialog. Note that selecting text in the Replace...
dialog will unselect the text in the window.
</P><P>
<H3>Replacement in Multiple Documents</H3>
</P><P>
You can do the same replacement in more than one document at the same time.
To do that, enter the search and replacement string in the replacement dialog
as usual, then press the 'Multiple Documents...' button. NEdit will open
another dialog where you can pick any document in which the replacement should
take place. Then press 'Replace' in this dialog to do the replacement. All
attributes (Regular Expression, Case, etc.) are used as selected in the main
dialog.
</P><P>
<P><HR>
</P><P>
<A NAME="Cut_and_Paste"></A>
<H2> Cut and Paste </H2>
</P><P>
The easiest way to copy and move text around in your file or between windows,
is to use the clipboard, an imaginary area that temporarily stores text and
data. The Cut command removes the selected text (see <A HREF="#Selecting_Text">Selecting Text</A>) from
your file and places it in the clipboard. Once text is in the clipboard, the
Paste command will copy it to the insert position in the current window. For
example, to move some text from one place to another, select it by dragging
the mouse over it, choose Cut to remove it, click the pointer to move the
insert point where you want the text inserted, then choose Paste to insert
it. Copy copies text to the clipboard without deleting it from your file.
You can also use the clipboard to transfer text to and from other Motif
programs and X programs which make proper use of the clipboard.
</P><P>
There are many other methods for copying and moving text within NEdit windows
and between NEdit and other programs. The most common such method is
clicking the middle mouse button to copy the primary selection (to the
clicked position). Copying the selection by clicking the middle mouse button
in many cases is the only way to transfer data to and from many X programs.
Holding the Shift key while clicking the middle mouse button moves the text,
deleting it from its original position, rather than copying it. Other
methods for transferring text include secondary selections, primary selection
dragging, keyboard-based selection copying, and drag and drop. These are
described in detail in the sections: "<A HREF="#Selecting_Text">Selecting Text</A>", "<A HREF="#Using_the_Mouse">Using the Mouse</A>",
and "<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A>".
<P><HR>
</P><P>
<A NAME="Using_the_Mouse"></A>
<H2> Using the Mouse </H2>
</P><P>
Mouse-based editing is what NEdit is all about, and learning to use the more
advanced features like secondary selections and primary selection dragging
will be well worth your while.
</P><P>
If you don't have time to learn everything, you can get by adequately with
just the left mouse button: Clicking the left button moves the cursor.
Dragging with the left button makes a selection. Holding the shift key while
clicking extends the existing selection, or begins a selection between the
cursor and the mouse. Double or triple clicking selects a whole word or a
whole line.
</P><P>
This section will make more sense if you also read the section called,
"<A HREF="#Selecting_Text">Selecting Text</A>", which explains the terminology of selections, that is,
what is meant by primary, secondary, rectangular, etc.
</P><P>
<H3>Button and Modifier Key Summary</H3>
</P><P>
General meaning of mouse buttons and modifier keys:
</P><P>
<H4> Buttons</H4>
</P><P>
<PRE>
Button 1 (left) Cursor position and primary selection
</PRE>
</P><P>
<PRE>
Button 2 (middle) Secondary selections, and dragging and
copying the primary selection
</PRE>
</P><P>
<PRE>
Button 3 (right) Quick-access programmable menu and pan
scrolling
</PRE>
</P><P>
<H4> Modifier keys</H4>
</P><P>
<PRE>
Shift On primary selections, (left mouse button):
Extends selection to the mouse pointer
On secondary and copy operations, (middle):
Toggles between move and copy
</PRE>
</P><P>
<PRE>
Ctrl Makes selection rectangular or insertion
columnar
</PRE>
</P><P>
<PRE>
Alt* (on release) Exchange primary and secondary
selections.
</PRE>
</P><P>
<H3>Left Mouse Button</H3>
</P><P>
The left mouse button is used to position the cursor and to make primary
selections.
</P><P>
<PRE>
Click Moves the cursor
</PRE>
</P><P>
<PRE>
Double Click Selects a whole word
</PRE>
</P><P>
<PRE>
Triple Click Selects a whole line
</PRE>
</P><P>
<PRE>
Quad Click Selects the whole file
</PRE>
</P><P>
<PRE>
Shift Click Adjusts (extends or shrinks) the
selection, or if there is no existing
selection, begins a new selection
between the cursor and the mouse.
</PRE>
</P><P>
<PRE>
Ctrl+Shift+ Adjusts (extends or shrinks) the
Click selection rectangularly.
</PRE>
</P><P>
<PRE>
Drag Selects text between where the mouse
was pressed and where it was released.
</PRE>
</P><P>
<PRE>
Ctrl+Drag Selects rectangle between where the
mouse was pressed and where it was
released.
</PRE>
</P><P>
<H3>Right Mouse Button</H3>
</P><P>
The right mouse button posts a programmable menu for frequently used commands.
</P><P>
<PRE>
Click/Drag Pops up the background menu (programmed
from Preferences -> Default Settings ->
Customize Menus -> Window Background).
</PRE>
</P><P>
<PRE>
Ctrl+Drag Pan scrolling. Scrolls the window
both vertically and horizontally, as if
you had grabbed it with your mouse.
</PRE>
</P><P>
<H3>Middle Mouse Button</H3>
</P><P>
The middle mouse button is for making secondary selections, and copying and
dragging the primary selection.
</P><P>
<PRE>
Click Copies the primary selection to the
clicked position.
</PRE>
</P><P>
<PRE>
Shift+Click Moves the primary selection to the
clicked position, deleting it from its
original position.
</PRE>
</P><P>
<PRE>
Drag 1) Outside of the primary selection:
Begins a secondary selection.
2) Inside of the primary selection:
Moves the selection by dragging.
</PRE>
</P><P>
<PRE>
Ctrl+Drag 1) Outside of the primary selection:
Begins a rectangular secondary
selection.
2) Inside of the primary selection:
Drags the selection in overlay
mode (see below).
</PRE>
</P><P>
When the mouse button is released after creating a secondary selection:
</P><P>
<PRE>
No Modifiers If there is a primary selection,
replaces it with the secondary
selection. Otherwise, inserts the
secondary selection at the cursor
position.
</PRE>
</P><P>
<PRE>
Shift Move the secondary selection, deleting
it from its original position. If
there is a primary selection, the move
will replace the primary selection
with the secondary selection.
Otherwise, moves the secondary
selection to the cursor position.
</PRE>
</P><P>
<PRE>
Alt* Exchange the primary and secondary
selections.
</PRE>
</P><P>
While moving the primary selection by dragging with the middle mouse button:
</P><P>
<PRE>
Shift Leaves a copy of the original
selection in place rather than
removing it or blanking the area.
</PRE>
</P><P>
<PRE>
Ctrl Changes from insert mode to overlay
mode (see below).
</PRE>
</P><P>
<PRE>
Escape Cancels drag in progress.
</PRE>
</P><P>
Overlay Mode: Normally, dragging moves text by removing it from the selected
position at the start of the drag, and inserting it at a new position
relative to the mouse. When you drag a block of text over existing
characters, the existing characters are displaced to the end of the
selection. In overlay mode, characters which are occluded by blocks of text
being dragged are simply removed. When dragging non-rectangular selections,
overlay mode also converts the selection to rectangular form, allowing it to
be dragged outside of the bounds of the existing text.
</P><P>
Mouse buttons 4 and 5 are usually represented by a mouse wheel nowadays.
They are used to scroll up or down in the text window.
</P><P>
* The Alt key may be labeled Meta or Compose-Character on some keyboards.
Some window managers, including default configurations of mwm, bind
combinations of the Alt key and mouse buttons to window manager operations.
In NEdit, Alt is only used on button release, so regardless of the window
manager bindings for Alt-modified mouse buttons, you can still do the
corresponding NEdit operation by using the Alt key AFTER the initial mouse
press, so that Alt is held while you release the mouse button. If you find
this difficult or annoying, you can re-configure most window managers to skip
this binding, or you can re-configure NEdit to use a different key
combination.
<P><HR>
</P><P>
<A NAME="Keyboard_Shortcuts"></A>
<H2> Keyboard Shortcuts </H2>
</P><P>
Most of the keyboard shortcuts in NEdit are shown on the right hand sides of
the pull-down menus. However, there are more which are not as obvious. These
include; dialog button shortcuts; menu and dialog mnemonics; labeled keyboard
keys, such as the arrows, page-up, page-down, and home; and optional Shift
modifiers on accelerator keys, like [Shift]Ctrl+F.
</P><P>
<H3>Menu Accelerators</H3>
</P><P>
Pressing the key combinations shown on the right of the menu items is a
shortcut for selecting the menu item with the mouse. Some items have the shift
key enclosed in brackets, such as [Shift]Ctrl+F. This indicates that the shift
key is optional. In search commands, including the shift key reverses the
direction of the search. In Shift commands, it makes the command shift the
selected text by a whole tab stop rather than by single characters.
</P><P>
<H3>Menu Mnemonics</H3>
</P><P>
Pressing the Alt key in combination with one of the underlined characters in
the menu bar pulls down that menu. Once the menu is pulled down, typing the
underlined characters in a menu item (without the Alt key) activates that
item. With a menu pulled down, you can also use the arrow keys to select menu
items, and the Space or Enter keys to activate them.
</P><P>
<H3>Keyboard Shortcuts within Dialogs</H3>
</P><P>
One button in a dialog is usually marked with a thick indented outline.
Pressing the Return or Enter key activates this button.
</P><P>
All dialogs have either a Cancel or Dismiss button. This button can be
activated by pressing the Escape (or Esc) key.
</P><P>
Pressing the tab key moves the keyboard focus to the next item in a dialog.
Within an associated group of buttons, the arrow keys move the focus among the
buttons. Shift+Tab moves backward through the items.
</P><P>
Most items in dialogs have an underline under one character in their name.
Pressing the Alt key along with this character, activates a button as if you
had pressed it with the mouse, or moves the keyboard focus to the associated
text field or list.
</P><P>
You can select items from a list by using the arrow keys to move the
selection and space to select.
</P><P>
In file selection dialogs, you can type the beginning characters of the file
name or directory in the list to select files
</P><P>
<H3>Labeled Function Keys</H3>
</P><P>
The labeled function keys on standard workstation and PC keyboards, like the
arrows, and page-up and page-down, are active in NEdit, though not shown in the
pull-down menus.
</P><P>
Holding down the control key while pressing a named key extends the scope of
the action that it performs. For example, Home normally moves the insert
cursor the beginning of a line. Ctrl+Home moves it to the beginning of the
file. Backspace deletes one character, Ctrl+Backspace deletes one word.
</P><P>
Holding down the shift key while pressing a named key begins or extends a
selection. Combining the shift and control keys combines their actions. For
example, to select a word without using the mouse, position the cursor at the
beginning of the word and press Ctrl+Shift+RightArrow. The Alt key modifies
selection commands to make the selection rectangular.
</P><P>
Under X and Motif, there are several levels of translation between keyboard
keys and the actions they perform in a program. The "<A HREF="#Customizing_NEdit">Customizing NEdit</A>", and
"<A HREF="#X_Resources">X Resources</A>" sections of the Help menu have more information on this subject.
Because of all of this configurability, and since keyboards and standards for
the meaning of some keys vary from machine to machine, the mappings may be
changed from the defaults listed below.
</P><P>
<H3>Modifier Keys (in general)</H3>
</P><P>
<PRE>
Ctrl Extends the scope of the action that the key
would otherwise perform. For example, Home
normally moves the insert cursor to the beginning
of a line. Ctrl+Home moves it to the beginning of
the file. Backspace deletes one character, Ctrl+
Backspace deletes one word.
</PRE>
</P><P>
<PRE>
Shift Extends the selection to the cursor position. If
there's no selection, begins one between the old
and new cursor positions.
</PRE>
</P><P>
<PRE>
Alt When modifying a selection, makes the selection
rectangular.
</PRE>
</P><P>
(For the effects of modifier keys on mouse button presses, see the section
titled "<A HREF="#Using_the_Mouse">Using the Mouse</A>")
</P><P>
<H3>All Keyboards</H3>
</P><P>
<PRE>
Escape Cancels operation in progress: menu
selection, drag, selection, etc. Also
equivalent to cancel button in dialogs.
</PRE>
</P><P>
<PRE>
Backspace Delete the character before the cursor
</PRE>
</P><P>
<PRE>
Ctrl+BS Delete the word before the cursor
</PRE>
</P><P>
<PRE>
Arrows --
</PRE>
</P><P>
<PRE>
Left Move the cursor to the left one character
</PRE>
</P><P>
<PRE>
Ctrl+Left Move the cursor backward one word
(Word delimiters are settable, see
"<A HREF="#Customizing_NEdit">Customizing NEdit</A>", and "<A HREF="#X_Resources">X Resources</A>")
</PRE>
</P><P>
<PRE>
Right Move the cursor to the right one character
</PRE>
</P><P>
<PRE>
Ctrl+Right Move the cursor forward one word
</PRE>
</P><P>
<PRE>
Up Move the cursor up one line
</PRE>
</P><P>
<PRE>
Ctrl+Up Move the cursor up one paragraph.
(Paragraphs are delimited by blank lines)
</PRE>
</P><P>
<PRE>
Down Move the cursor down one line.
</PRE>
</P><P>
<PRE>
Ctrl+Down Move the cursor down one paragraph.
</PRE>
</P><P>
<PRE>
Ctrl+Return Return with automatic indent, regardless
of the setting of Auto Indent.
</PRE>
</P><P>
<PRE>
Shift+Return Return without automatic indent,
regardless of the setting of Auto Indent.
</PRE>
</P><P>
<PRE>
Ctrl+Tab Insert an ASCII tab character, without
processing emulated tabs.
</PRE>
</P><P>
<PRE>
Alt+Ctrl+<c> Insert the control-code equivalent of
a key <c>
</PRE>
</P><P>
<PRE>
Ctrl+/ Select everything (same as Select
All menu item or ^A)
</PRE>
</P><P>
<PRE>
Ctrl+\ Unselect
</PRE>
</P><P>
<PRE>
Ctrl+U Delete to start of line
</PRE>
</P><P>
<H3>PC Standard Keyboard</H3>
</P><P>
<PRE>
Ctrl+Insert Copy the primary selection to the
clipboard (same as Copy menu item or ^C)
for compatibility with Motif standard key
binding
Shift+Ctrl+
Insert Copy the primary selection to the cursor
location.
</PRE>
</P><P>
<PRE>
Delete Delete the character before the cursor.
(Can be configured to delete the character
after the cursor, see "<A HREF="#Customizing_NEdit">Customizing NEdit</A>",
and "<A HREF="#X_Resources">X Resources</A>")
</PRE>
</P><P>
<PRE>
Ctrl+Delete Delete to end of line.
</PRE>
</P><P>
<PRE>
Shift+Delete Cut, remove the currently selected text
and place it in the clipboard. (same as
Cut menu item or ^X) for compatibility
with Motif standard key binding
Shift+Ctrl+
Delete Cut the primary selection to the cursor
location.
</PRE>
</P><P>
<PRE>
Home Move the cursor to the beginning of the
line
</PRE>
</P><P>
<PRE>
Ctrl+Home Move the cursor to the beginning of the
file
</PRE>
</P><P>
<PRE>
End Move the cursor to the end of the line
</PRE>
</P><P>
<PRE>
Ctrl+End Move the cursor to the end of the file
</PRE>
</P><P>
<PRE>
PageUp Scroll and move the cursor up by one page.
</PRE>
</P><P>
<PRE>
PageDown Scroll and move the cursor down by one
page.
</PRE>
</P><P>
<PRE>
F10 Make the menu bar active for keyboard
input (Arrow Keys, Return, Escape,
and the Space Bar)
</PRE>
</P><P>
<PRE>
Alt+Home Switch to the previously active document.
</PRE>
</P><P>
<PRE>
Ctrl+PageUp Switch to the previous document.
</PRE>
</P><P>
<PRE>
Ctrl+PageDown Switch to the next document.
</PRE>
</P><P>
<H3>Specialty Keyboards</H3>
</P><P>
On machines with different styles of keyboards, generally, text editing
actions are properly matched to the labeled keys, such as Remove,
Next-screen, etc.. If you prefer different key bindings, see the section
titled "<A HREF="#Key_Binding">Key Binding</A>" under the Customizing heading in the Help menu.
<P><HR>
</P><P>
<A NAME="Shifting_and_Filling"></A>
<H2> Shifting and Filling </H2>
</P><P>
<H3>Shift Left, Shift Right</H3>
</P><P>
While shifting blocks of text is most important for programmers (See Features
for Programming), it is also useful for other tasks, such as creating
indented paragraphs.
</P><P>
To shift a block of text one tab stop to the right, select the text, then
choose Shift Right from the Edit menu. Note that the accelerator keys for
these menu items are Ctrl+9 and Ctrl+0, which correspond to the right and
left parenthesis on most keyboards. Remember them as adjusting the text in
the direction pointed to by the parenthesis character. Holding the Shift key
while selecting either Shift Left or Shift Right will shift the text by one
character.
</P><P>
It is also possible to shift blocks of text by selecting the text
rectangularly, and dragging it left or right (and up or down as well). Using
a rectangular selection also causes tabs within the selection to be
recalculated and substituted, such that the non-whitespace characters remain
stationary with respect to the selection.
</P><P>
<H3>Filling</H3>
</P><P>
Text filling using the Fill Paragraph command in the Edit menu is one of the
most important concepts in NEdit. And it will be well worth your while to
understand how to use it properly.
</P><P>
In plain text files, unlike word-processor files, there is no way to tell
which lines are continuations of other lines, and which lines are meant to be
separate, because there is no distinction in meaning between newline
characters which separate lines in a paragraph, and ones which separate
paragraphs from other text. This makes it impossible for a text editor like
NEdit to tell parts of the text which belong together as a paragraph from
carefully arranged individual lines.
</P><P>
In continuous wrap mode (Preferences -> Wrap -> Continuous), lines
automatically wrap and unwrap themselves to line up properly at the right
margin. In this mode, you simply omit the newlines within paragraphs and let
NEdit make the line breaks as needed. Unfortunately, continuous wrap mode is
not appropriate in the majority of situations, because files with extremely
long lines are not common under Unix and may not be compatible with all
tools, and because you can't achieve effects like indented sections, columns,
or program comments, and still take advantage of the automatic wrapping.
</P><P>
Without continuous wrapping, paragraph filling is not entirely automatic.
Auto-Newline wrapping keeps paragraphs lined up as you type, but once
entered, NEdit can no longer distinguish newlines which join wrapped text,
and newlines which must be preserved. Therefore, editing in the middle of a
paragraph will often leave the right margin messy and uneven.
</P><P>
Since NEdit can't act automatically to keep your text lined up, you need to
tell it explicitly where to operate, and that is what Fill Paragraph is for.
It arranges lines to fill the space between two margins, wrapping the lines
neatly at word boundaries. Normally, the left margin for filling is inferred
from the text being filled. The first line of each paragraph is considered
special, and its left indentation is maintained separately from the remaining
lines (for leading indents, bullet points, numbered paragraphs, etc.).
Otherwise, the left margin is determined by the furthest left non-whitespace
character. The right margin is either the Wrap Margin, set in the
preferences menu (by default, the right edge of the window), or can also be
chosen on the fly by using a rectangular selection (see below).
</P><P>
There are three ways to use Fill Paragraph. The simplest is, while you are
typing text, and there is no selection, simply select Fill Paragraph (or type
Ctrl+J), and NEdit will arrange the text in the paragraph adjacent to the
cursor. A paragraph, in this case, means an area of text delimited by blank
lines.
</P><P>
The second way to use Fill Paragraph is with a selection. If you select a
range of text and then chose Fill Paragraph, all of the text in the selection
will be filled. Again, continuous text between blank lines is interpreted as
paragraphs and filled individually, respecting leading indents and blank
lines.
</P><P>
The third, and most versatile, way to use Fill Paragraph is with a
rectangular selection. Fill Paragraph treats rectangular selections
differently from other commands. Instead of simply filling the text inside
the rectangular selection, NEdit interprets the right edge of the selection
as the requested wrap margin. Text to the left of the selection is not
disturbed (the usual interpretation of a rectangular selection), but text to
the right of the selection is included in the operation and is pulled in to
the selected region. This method enables you to fill text to an arbitrary
right margin, without going back and forth to the wrap-margin dialog, as well
as to exclude text to the left of the selection such as comment bars or other
text columns.
<P><HR>
</P><P>
<A NAME="Tabbed_Editing"></A>
<H2> Tabbed Editing </H2>
</P><P>
NEdit is able to display files in distinct editor windows, or to display files
under tabs in the same editor window. The Options for controlling the tabbed
interface are found under Preferences -> Default Settings -> Tabbed Editing
(cf. "<A HREF="#Preferences">Preferences</A>", also "<A HREF="#NEdit_Command_Line">NEdit Command Line</A>").
</P><P>
Notice that you can re-group tabs at any time by detaching and attaching them,
or moving them, to other windows. This can be done using the Windows menu, or
using the context menu, which pops up when right clicking on a tab.
</P><P>
You can switch to a tab by simply clicking on it, or you can use the keyboard.
The default keybindings to switch tabs (which are Ctrl+PageUp/-Down and Alt+Home,
see "<A HREF="#Keyboard_Shortcuts">Keyboard Shortcuts</A>") can be changed using the actions previous_document(),
next_document() and last_document().
</P><P>
<P><HR>
</P><P>
<A NAME="File_Format"></A>
<H2> File Format </H2>
</P><P>
While plain-text is probably the simplest and most interchangeable file
format in the computer world, there is still variation in what plain-text
means from system to system. Plain-text files can differ in character set,
line termination, and wrapping.
</P><P>
While character set differences are the most obvious and pose the most
challenge to portability, they affect NEdit only indirectly via the same font
and localization mechanisms common to all X applications. If your system is
set up properly, you will probably never see character-set related problems
in NEdit. NEdit cannot display Unicode text files, nor any multi-byte
character set.
</P><P>
The primary difference between an MS DOS format file and a Unix format file,
is how the lines are terminated. Unix uses a single newline character. MS
DOS uses a carriage-return and a newline. NEdit can read and write both file
formats, but internally, it uses the single character Unix standard. NEdit
auto-detects MS DOS format files based on the line termination at the start
of the file. Files are judged to be DOS format if all of the first five line
terminators, within a maximum range, are DOS-style. To change the format in
which NEdit writes a file from DOS to Unix or visa versa, use the Save As...
command and check or un-check the MS DOS Format button.
</P><P>
Wrapping within text files can vary among individual users, as well as from
system to system. Both Windows and MacOS make frequent use of plain text
files with no implicit right margin. In these files, wrapping is determined
by the tool which displays them. Files of this style also exist on Unix
systems, despite the fact that they are not supported by all Unix utilities.
To display this kind of file properly in NEdit, you have to select the wrap
style called Continuous. Wrapping modes are discussed in the sections:
Customizing -> Preferences, and Basic Operation -> Shifting and Filling.
</P><P>
The last and most minute of format differences is the terminating newline.
Some Unix compilers and utilities require a final terminating newline on all
files they read and fail in various ways on files which do not have it. Vi
and approximately half of Unix editors enforce the terminating newline on all
files that they write; Emacs does not enforce this rule. Users are divided
on which is best. NEdit makes the final terminating newline optional
(Preferences -> Default Settings -> Terminate with Line Break on Save).
<P><HR>
</P><P>
<A NAME="Features_for_Programming"></A>
<H1> Features for Programming </H1>
</P><P>
<A NAME="Programming_with_NEdit"></A>
<H2> Programming with NEdit </H2>
</P><P>
Though general in appearance, NEdit has many features intended specifically
for programmers. Major programming-related topics are listed in separate
sections under the heading: "Features for Programming": <A HREF="#Syntax_Highlighting">Syntax Highlighting</A>,
<A HREF="#Tabs/Emulated_Tabs">Tabs/Emulated Tabs</A>, <A HREF="#Finding_Declarations_(ctags)">Finding Declarations (ctags)</A>, <A HREF="#Calltips">Calltips</A>, and
<A HREF="#Auto/Smart_Indent">Auto/Smart Indent</A>. Minor topics related to programming are discussed below:
</P><P>
<H3>Language Modes</H3>
</P><P>
When NEdit initially reads a file, it attempts to determine whether the file
is in one of the computer languages that it knows about. Knowing what language
a file is written in allows NEdit to assign highlight patterns and smart indent
macros, and to set language specific preferences like word delimiters, tab
emulation, and auto-indent. Language mode can be recognized from both the file
name and from the first 200 characters of content. Language mode recognition
and language-specific preferences are configured in: Preferences -> Default
Settings -> Language Modes....
</P><P>
You can set the language mode manually for a window, by selecting it from the
menu: Preferences -> Language Modes.
</P><P>
<H3>Backlighting [EXPERIMENTAL]</H3>
</P><P>
NEdit can be made to set the background color of particular classes of
characters to allow easy identification of those characters. This is
particularly useful if you need to be able to distinguish between tabs
and spaces in a file where the difference is important. The colors used
for backlighting are specified by a resource, "nedit*backlightCharTypes".
You can turn backlighting on and off through the
Preferences -> Apply Backlighting menu entry.
</P><P>
If you prefer to have backlighting turned on for all new windows, use
the Preferences -> Default Settings -> Apply Backlighting menu entry.
This settings can be saved along with other preferences using
Preferences -> Save Defaults.
</P><P>
<B>Important:</B> In future versions of NEdit, the backlighting feature will be
extended and reworked such that it becomes easier to configure. The current
way of controlling it through a resource is generally considered to be below
NEdit's usability standards. These future changes are likely to be
incompatible with the current format of the "nedit*backlightCharTypes"
resource, though. Therefore, it is expected that there will be no automatic
migration path for users who customize the resource.
</P><P>
<H3>Line Numbers</H3>
</P><P>
To find a particular line in a source file by line number, choose Goto Line
#... from the Search menu. You can also directly select the line number text
in the compiler message in the terminal emulator window (xterm, decterm,
winterm, etc.) where you ran the compiler, and choose Goto Selected from the
Search menu.
</P><P>
To find out the line number of a particular line in your file, turn on
Statistics Line in the Preferences menu and position the insertion point
anywhere on the line. The statistics line continuously updates the line number
of the line containing the cursor.
</P><P>
To go to a specific column on a given line, choose Goto Line #... from the
Search menu and enter a line number and a column number separated by a
comma. (e.g. Enter "100,12" for line 100 column 12.) If you want to go to
a column on the current line just leave out the line number. (e.g. Enter
",45" to go the column 45 on the current line.)
</P><P>
<H3>Matching Parentheses</H3>
</P><P>
To help you inspect nested parentheses, brackets, braces, quotes, and other
characters, NEdit has both an automatic parenthesis matching mode, and a Goto
Matching command. Automatic parenthesis matching is activated when you type,
or move the insertion cursor after a parenthesis, bracket, or brace. It
momentarily highlights either the opposite character ('Delimiter') or the
entire expression ('Range') when the opposite character is visible in the
window. To find a matching character anywhere in the file, select it or
position the cursor after it, and choose Goto Matching from the Search menu.
If the character matches itself, such as a quote or slash, select the first
character of the pair. NEdit will match {, (, [, <, ", ', `, /, and \.
Holding the Shift key while typing the accelerator key (Shift+Ctrl+M, by
default), will select all of the text between the matching characters.
</P><P>
When syntax highlighting is enabled, the matching routines can optionally
make use of the syntax information for improved accuracy. In that case,
a brace inside a highlighted string will not match a brace inside a comment,
for instance.
</P><P>
<H3>Opening Included Files</H3>
</P><P>
The Open Selected command in the File menu understands the C preprocessor's
#include syntax, so selecting an #include line and invoking Open Selected will
generally find the file referred to, unless doing so depends on the settings of
compiler switches or other information not available to NEdit.
</P><P>
<H3>Interface to Programming Tools</H3>
</P><P>
Integrated software development environments such as SGI's CaseVision and
Centerline Software's Code Center, can be interfaced directly with NEdit via
the client server interface. These tools allow you to click directly on
compiler and runtime error messages and request NEdit to open files, and select
lines of interest. The easiest method is usually to use the tool's interface
for character-based editors like vi, to invoke nc, but programmatic interfaces
can also be derived using the source code for nc.
</P><P>
There are also some simple compile/review, grep, ctree, and ctags browsers
available in the NEdit contrib directory on ftp.nedit.org.
<P><HR>
</P><P>
<A NAME="Tabs/Emulated_Tabs"></A>
<H2> Tabs/Emulated Tabs </H2>
</P><P>
<H3>Changing the Tab Distance</H3>
</P><P>
Tabs are important for programming in languages which use indentation to show
nesting, as short-hand for producing white-space for leading indents. As a
programmer, you have to decide how to use indentation, and how or whether tab
characters map to your indentation scheme.
</P><P>
Ideally, tab characters map directly to the amount of indent that you use to
distinguish nesting levels in your code. Unfortunately, the Unix standard
for interpretation of tab characters is eight characters (probably dating
back to mechanical capabilities of the original teletype), which is usually
too coarse for a single indent.
</P><P>
Most text editors, NEdit included, allow you to change the interpretation of
the tab character, and many programmers take advantage of this, and set their
tabs to 3 or 4 characters to match their programming style. In NEdit you set
the hardware tab distance in Preferences -> Tabs... for the current window,
or Preferences -> Default Settings -> Tabs... (general), or Preferences ->
Default Settings -> Language Modes... (language-specific) to change the
defaults for future windows.
</P><P>
Changing the meaning of the tab character makes programming much easier while
you're in the editor, but can cause you headaches outside of the editor,
because there is no way to pass along the tab setting as part of a plain-text
file. All of the other tools which display, print, and otherwise process
your source code have to be made aware of how the tabs are set, and must be
able to handle the change. Non-standard tabs can also confuse other
programmers, or make editing your code difficult for them if their text
editors don't support changes in tab distance.
</P><P>
<H3>Emulated Tabs</H3>
</P><P>
An alternative to changing the interpretation of the tab character is tab
emulation. In the Tabs... dialog(s), turning on Emulated Tabs causes the Tab
key to insert the correct number of spaces and/or tabs to bring the cursor
the next emulated tab stop, as if tabs were set at the emulated tab distance
rather than the hardware tab distance. Backspacing immediately after entering
an emulated tab will delete the fictitious tab as a unit, but as soon as you
move the cursor away from the spot, NEdit will forget that the collection of
spaces and tabs is a tab, and will treat it as separate characters. To enter
a real tab character with "Emulate Tabs" turned on, use Ctrl+Tab.
</P><P>
It is also possible to tell NEdit not to insert ANY tab characters at all in
the course of processing emulated tabs, and in shifting and rectangular
insertion/deletion operations, for programmers who worry about the
misinterpretation of tab characters on other systems.
<P><HR>
</P><P>
<A NAME="Auto/Smart_Indent"></A>
<H2> Auto/Smart Indent </H2>
</P><P>
Programmers who use structured languages usually require some form of
automatic indent, so that they don't have to continually re-type the
sequences of tabs and/or spaces needed to maintain lengthy running indents.
NEdit therefore offers "smart" indent, in addition to the traditional
automatic indent which simply lines up the cursor position with the previous
line.
</P><P>
<H3>Smart Indent</H3>
</P><P>
Smart indent macros are only available by default for C and C++, and while
these can easily be configured for different default indentation distances,
they may not conform to everyone's exact C programming style. Smart indent
is programmed in terms of macros in the NEdit macro language which can be
entered in: Preferences -> Default Settings -> Indent -> Program Smart
Indent. Hooks are provided for intervening at the point that a newline is
entered, either via the user pressing the Enter key, or through
auto-wrapping; and for arbitrary type-in to act on specific characters typed.
</P><P>
To type a newline character without invoking smart-indent when operating in
smart-indent mode, hold the Shift key while pressing the Return or Enter key.
</P><P>
<H3>Auto-Indent</H3>
</P><P>
With Indent set to Auto (the default), NEdit keeps a running indent. When
you press the Return or Enter key, spaces and tabs are inserted to line up
the insert point under the start of the previous line.
</P><P>
Regardless of indent-mode, Ctrl+Return always does the automatic indent;
Shift+Return always does a return without indent.
</P><P>
<H3>Block Indentation Adjustment</H3>
</P><P>
The Shift Left and Shift Right commands as well as rectangular dragging can
be used to adjust the indentation for several lines at once. To shift a
block of text one character to the right, select the text, then choose Shift
Right from the Edit menu. Note that the accelerator keys for these menu
items are Ctrl+9 and Ctrl+0, which correspond to the right and left
parenthesis on most keyboards. Remember them as adjusting the text in the
direction pointed to by the parenthesis character. Holding the Shift key
while selecting either Shift Left or Shift Right will shift the text by one
tab stop (or by one emulated tab stop if tab emulation is turned on). The
help section "Shifting and Filling" under "Basic Operation" has details.
<P><HR>
</P><P>
<A NAME="Syntax_Highlighting"></A>
<H2> Syntax Highlighting </H2>
</P><P>
Syntax Highlighting means using colors and fonts to help distinguish language
elements in programming languages and other types of structured files.
Programmers use syntax highlighting to understand code faster and better, and
to spot many kinds of syntax errors more quickly.
</P><P>
To use syntax highlighting in NEdit, select Highlight Syntax in the
Preferences menu. If NEdit recognizes the computer language that you are
using, and highlighting rules (patterns) are available for that language, it
will highlight your text, and maintain the highlighting, automatically, as
you type.
</P><P>
If NEdit doesn't correctly recognize the type of the file you are editing,
you can manually select a language mode from Language Modes in the
Preferences menu. You can also program the method that NEdit uses to
recognize language modes in Preferences -> Default Settings -> Language
Modes....
</P><P>
If no highlighting patterns are available for the language that you want to
use, you can create new patterns relatively quickly. The Help section
"<A HREF="#Highlighting_Patterns">Highlighting Patterns</A>" under "Customizing", has details.
</P><P>
If you are satisfied with what NEdit is highlighting, but would like it to
use different colors or fonts, you can change these by selecting Preferences
-> Default Settings -> Syntax Highlighting -> Text Drawing Styles.
Highlighting patterns are connected with font and color information through a
common set of styles so that colorings defined for one language will be
similar across others, and patterns within the same language which are meant
to appear identical can be changed in the same place. To understand which
styles are used to highlight the language you are interested in, you may need
to look at "<A HREF="#Highlighting_Patterns">Highlighting Patterns</A>" section, as well.
</P><P>
Syntax highlighting is CPU intensive, and under some circumstances can affect
NEdit's responsiveness. If you have a particularly slow system, or work with
very large files, you may not want to use it all of the time. Syntax
highlighting introduces two kinds of delays. The first is an initial parsing
delay, proportional to the size of the file. This delay is also incurred
when pasting large sections of text, filtering text through shell commands,
and other circumstances involving changes to large amounts of text. The
second kind of delay happens when text which has not previously been visible
is scrolled in to view. Depending on your system, and the highlight patterns
you are using, this may or may not be noticeable. A typing delay is also
possible, but unlikely if you are only using the built-in patterns.
<P><HR>
</P><P>
<A NAME="Finding_Declarations_(ctags)"></A>
<H2> Finding Declarations (ctags) </H2>
</P><P>
<A NAME="ctags"></A>
NEdit can process tags files generated using the Unix ctags command or the
Exuberant Ctags program. Ctags creates index files correlating names of
functions and declarations with their locations in C, Fortran, or Pascal source
code files. (See the ctags manual page for more information). Ctags produces a
file called "tags" which can be loaded by NEdit. NEdit can manage any number
of tags files simultaneously. Tag collisions are handled with a popup menu to
let the user decide which tag to use. In 'Smart' mode NEdit will automatically
choose the desired tag based on the scope of the file or module. Once loaded,
the information in the tags file enables NEdit to go directly to the
declaration of a highlighted function or data structure name with a single
command. To load a tags file, select "Load Tags File" from the File menu and
choose a tags file to load, or specify the name of the tags file on the NEdit
command line:
</P><P>
<PRE>
nedit -tags tags
</PRE>
</P><P>
NEdit can also be set to load a tags file automatically when it starts up.
Setting the X resource nedit.tagFile to the name of a tag file tells NEdit to
look for that file at startup time (see "<A HREF="#Customizing_NEdit">Customizing NEdit</A>"). The file name
can be either a complete path name, in which case NEdit will always load the
same tags file, or a file name without a path or with a relative path, in
which case NEdit will load it starting from the current directory. The
second option allows you to have different tags files for different projects,
each automatically loaded depending on the directory you're in when you start
NEdit. Setting the name to "tags" is an obvious choice since this is the
name that ctags uses. NEdit normally evaluates relative path tag file
specifications every time a file is opened. All accessible tag files are
loaded at this time. To disable the automatic loading of tag files specified
as relative paths, set the X resource nedit.alwaysCheckRelativeTagsSpecs to
False.
</P><P>
To unload a tags file, select "Un-load Tags File" from the File menu and
choose from the list of tags files. NEdit will keep track of tags file updates
by checking the timestamp on the files, and automatically update the tags
cache.
</P><P>
To find the definition of a function or data structure once a tags file is
loaded, select the name anywhere it appears in your program (see
"<A HREF="#Selecting_Text">Selecting Text</A>") and choose "Find Definition" from the Search menu.
<P><HR>
</P><P>
<A NAME="Calltips"></A>
<H2> Calltips </H2>
</P><P>
Calltips are little yellow boxes that pop up to remind you what the arguments
and return type of a function are. More generally, they're a UI mechanism to
present a small amount of crucial information in a prominent location. To
display a calltip, select some text and choose "Show Calltip" from the Search
menu. To kill a displayed calltip, hit Esc.
</P><P>
Calltips get their information from one of two places -- either a tags file (see
"<A HREF="#Finding_Declarations_(ctags)">Finding Declarations (ctags)</A>") or a calltips file. First, any loaded calltips
files are searched for a definition, and if nothing is found then the tags
database is searched. If a tag is found that matches the highlighted text then
a calltip is displayed with the first few lines of the definition -- usually
enough to show you what the arguments of a function are.
</P><P>
You can load a calltips file by using choosing "Load Calltips File" from the
File menu. You can unload a calltips file by selecting it from the
"Unload Calltips File" submenu of the File menu. You can also choose one or
more default calltips files to be loaded for each language mode using the
"Default calltips file(s)" field of the Language Modes dialog.
</P><P>
The calltips file format is very simple. calltips files are organized in blocks
separated by blank lines. The first line of the block is the key, which is the
word that is matched when a calltip is requested. The rest of the block is
displayed as the calltip.
</P><P>
Almost any text at all can appear in a calltip key or a calltip. There are no
special characters that need to be escaped. The only issues to note are that
trailing whitespace is ignored, and you cannot have a blank line inside a
calltip. (Use a single period instead -- it'll be nearly invisible.) You should
also avoid calltip keys that begin and end with '*' characters, since those are
used to mark special blocks.
</P><P>
There are five special block types--comment, include, language, alias, and
version--which are distinguished by their first lines, "* comment *",
"* include *", "* language *", "* alias *", and "* version *" respectively
(without quotes).
</P><P>
Comment blocks are ignored when reading calltips files.
</P><P>
Include blocks specify additional calltips files to load, one per line. The ~
character can be used for your $HOME directory, but other shell shortcuts like
* and ? can't be used. Include blocks allow you to make a calltips file for your
project that includes, say, the calltips files for C, Motif, and Xt.
</P><P>
Language blocks specify which language mode the calltips should be used with.
When a calltip is requested it won't match tips from languages other than the
current language mode. Language blocks only affect the tips listed after the
block.
</P><P>
Alias blocks allow a calltip to have multiple keys. The first line of the block
is the key for the calltip to be displayed, and the rest of the lines are
additional keys, one per line, that should also show the calltip.
</P><P>
Version blocks are ignored for the time being.
</P><P>
You can use calltips in your own macros using the calltip() and kill_calltip()
macro subroutines and the $calltip_ID macro variable. See the
<A HREF="#Macro_Subroutines">Macro Subroutines</A> section for details.
<P><HR>
</P><P>
<A NAME="Regular_Expressions"></A>
<H1> Regular Expressions </H1>
</P><P>
<A NAME="Basic_Regular_Expression_Syntax"></A>
<H2> Basic Regular Expression Syntax </H2>
</P><P>
Regular expressions (regex's) are useful as a way to match inexact sequences
of characters. They can be used in the `Find...' and `Replace...' search
dialogs and are at the core of Color Syntax Highlighting patterns. To specify
a regular expression in a search dialog, simply click on the `Regular
Expression' radio button in the dialog.
</P><P>
A regex is a specification of a pattern to be matched in the searched text.
This pattern consists of a sequence of tokens, each being able to match a
single character or a sequence of characters in the text, or assert that a
specific position within the text has been reached (the latter is called an
anchor.) Tokens (also called atoms) can be modified by adding one of a number
of special quantifier tokens immediately after the token. A quantifier token
specifies how many times the previous token must be matched (see below.)
</P><P>
Tokens can be grouped together using one of a number of grouping constructs,
the most common being plain parentheses. Tokens that are grouped in this way
are also collectively considered to be a regex atom, since this new larger
atom may also be modified by a quantifier.
</P><P>
A regex can also be organized into a list of alternatives by separating each
alternative with pipe characters, `|'. This is called alternation. A match
will be attempted for each alternative listed, in the order specified, until a
match results or the list of alternatives is exhausted (see <A HREF="#alternation">Alternation</A>
section below.)
</P><P>
<H3>The 'Any' Character</H3>
</P><P>
If a dot (`.') appears in a regex, it means to match any character exactly
once. By default, dot will not match a newline character, but this behavior
can be changed (see help topic <A HREF="#Parenthetical_Constructs">Parenthetical Constructs</A>, under the
heading, Matching Newlines).
</P><P>
<H3>Character Classes</H3>
</P><P>
A character class, or range, matches exactly one character of text, but the
candidates for matching are limited to those specified by the class. Classes
come in two flavors as described below:
</P><P>
<PRE>
[...] Regular class, match only characters listed.
[^...] Negated class, match only characters <I>not</I> listed.
</PRE>
</P><P>
As with the dot token, by default negated character classes do not match
newline, but can be made to do so.
</P><P>
The characters that are considered special within a class specification are
different than the rest of regex syntax as follows. If the first character in
a class is the `]' character (second character if the first character is `^')
it is a literal character and part of the class character set. This also
applies if the first or last character is `-'. Outside of these rules, two
characters separated by `-' form a character range which includes all the
characters between the two characters as well. For example, `[^f-j]' is the
same as `[^fghij]' and means to match any character that is not `f', `g',
`h', `i', or `j'.
</P><P>
<H3>Anchors</H3>
</P><P>
Anchors are assertions that you are at a very specific position within the
search text. NEdit regular expressions support the following anchor tokens:
</P><P>
<PRE>
^ Beginning of line
$ End of line
< Left word boundary
> Right word boundary
\B Not a word boundary
</PRE>
</P><P>
Note that the \B token ensures that neither the left nor the right character
are delimiters, <B>or</B> that both left and right characters are delimiters.
The left word anchor checks whether the previous character is a delimiter and
the next character is not. The right word anchor works in a similar way.
</P><P>
Note that word delimiters are user-settable, and defined by the X resource
wordDelimiters, cf. <A HREF="#X_Resources">X Resources</A>.
</P><P>
<H3>Quantifiers</H3>
</P><P>
Quantifiers specify how many times the previous regular expression atom may
be matched in the search text. Some quantifiers can produce a large
performance penalty, and can in some instances completely lock up NEdit. To
prevent this, avoid nested quantifiers, especially those of the maximal
matching type (see below.)
</P><P>
The following quantifiers are maximal matching, or "greedy", in that they
match as much text as possible (but don't exclude shorter matches if that
is necessary to achieve an overall match).
</P><P>
<PRE>
* Match zero or more
+ Match one or more
? Match zero or one
</PRE>
</P><P>
The following quantifiers are minimal matching, or "lazy", in that they match
as little text as possible (but don't exclude longer matches if that is
necessary to achieve an overall match).
</P><P>
<PRE>
*? Match zero or more
+? Match one or more
?? Match zero or one
</PRE>
</P><P>
One final quantifier is the counting quantifier, or brace quantifier. It
takes the following basic form:
</P><P>
<PRE>
{min,max} Match from `min' to `max' times the
previous regular expression atom.
</PRE>
</P><P>
If `min' is omitted, it is assumed to be zero. If `max' is omitted, it is
assumed to be infinity. Whether specified or assumed, `min' must be less
than or equal to `max'. Note that both `min' and `max' are limited to
65535. If both are omitted, then the construct is the same as `*'. Note
that `{,}' and `{}' are both valid brace constructs. A single number
appearing without a comma, e.g. `{3}' is short for the `{min,min}' construct,
or to match exactly `min' number of times.
</P><P>
The quantifiers `{1}' and `{1,1}' are accepted by the syntax, but are
optimized away since they mean to match exactly once, which is redundant
information. Also, for efficiency, certain combinations of `min' and `max'
are converted to either `*', `+', or `?' as follows:
</P><P>
<PRE>
{} {,} {0,} *
{1,} +
{,1} {0,1} ?
</PRE>
</P><P>
Note that {0} and {0,0} are meaningless and will generate an error message at
regular expression compile time.
</P><P>
Brace quantifiers can also be "lazy". For example {2,5}? would try to match
2 times if possible, and will only match 3, 4, or 5 times if that is what is
necessary to achieve an overall match.
</P><P>
<H3>Alternation</H3>
</P><P>
A series of alternative patterns to match can be specified by separating them
<A NAME="alternation"></A>
with vertical pipes, `|'. An example of alternation would be `a|be|sea'.
This will match `a', or `be', or `sea'. Each alternative can be an
arbitrarily complex regular expression. The alternatives are attempted in
the order specified. An empty alternative can be specified if desired, e.g.
`a|b|'. Since an empty alternative can match nothingness (the empty string),
this guarantees that the expression will match.
</P><P>
<H3>Comments</H3>
</P><P>
Comments are of the form `(?#<comment text>)' and can be inserted anywhere
and have no effect on the execution of the regular expression. They can be
handy for documenting very complex regular expressions. Note that a comment
begins with `(?#' and ends at the first occurrence of an ending parenthesis,
or the end of the regular expression... period. Comments do not recognize
any escape sequences.
<P><HR>
</P><P>
<A NAME="Metacharacters"></A>
<H2> Metacharacters </H2>
</P><P>
<H3>Escaping Metacharacters</H3>
</P><P>
In a regular expression (regex), most ordinary characters match themselves.
For example, `ab%' would match anywhere `a' followed by `b' followed by `%'
appeared in the text. Other characters don't match themselves, but are
metacharacters. For example, backslash is a special metacharacter which
'escapes' or changes the meaning of the character following it. Thus, to
match a literal backslash would require a regular expression to have two
backslashes in sequence. NEdit provides the following escape sequences so
that metacharacters that are used by the regex syntax can be specified as
ordinary characters.
</P><P>
<PRE>
\( \) \- \[ \] \< \> \{ \}
\. \| \^ \$ \* \+ \? \& \\
</PRE>
</P><P>
<H3>Special Control Characters</H3>
</P><P>
There are some special characters that are difficult or impossible to type.
Many of these characters can be constructed as a sort of metacharacter or
sequence by preceding a literal character with a backslash. NEdit recognizes
the following special character sequences:
</P><P>
<PRE>
\a alert (bell)
\b backspace
\e ASCII escape character (***)
\f form feed (new page)
\n newline
\r carriage return
\t horizontal tab
\v vertical tab
</PRE>
</P><P>
<PRE>
*** For environments that use the EBCDIC character set,
when compiling NEdit set the EBCDIC_CHARSET compiler
symbol to get the EBCDIC equivalent escape
character.)
</PRE>
</P><P>
<H3>Octal and Hex Escape Sequences</H3>
</P><P>
Any ASCII (or EBCDIC) character, except null, can be specified by using
either an octal escape or a hexadecimal escape, each beginning with \0 or \x
(or \X), respectively. For example, \052 and \X2A both specify the `*'
character. Escapes for null (\00 or \x0) are not valid and will generate an
error message. Also, any escape that exceeds \0377 or \xFF will either cause
an error or have any additional character(s) interpreted literally. For
example, \0777 will be interpreted as \077 (a `?' character) followed by `7'
since \0777 is greater than \0377.
</P><P>
An invalid digit will also end an octal or hexadecimal escape. For example,
\091 will cause an error since `9' is not within an octal escape's range of
allowable digits (0-7) and truncation before the `9' yields \0 which is
invalid.
</P><P>
<H3>Shortcut Escape Sequences</H3>
</P><P>
NEdit defines some escape sequences that are handy shortcuts for commonly
used character classes.
</P><P>
<PRE>
\d digits 0-9
\l letters a-z, A-Z, and locale dependent letters
\s whitespace \t, \r, \v, \f, and space
\w word characters letters, digits, and underscore, `_'
</PRE>
</P><P>
\D, \L, \S, and \W are the same as the lowercase versions except that the
resulting character class is negated. For example, \d is equivalent to
`[0-9]', while \D is equivalent to `[^0-9]'.
</P><P>
These escape sequences can also be used within a character class. For
example, `[\l_]' is the same as `[a-zA-Z_]', extended with possible locale
dependent letters. The escape sequences for special characters, and octal
and hexadecimal escapes are also valid within a class.
</P><P>
<H3>Word Delimiter Tokens</H3>
</P><P>
Although not strictly a character class, the following escape sequences
behave similarly to character classes:
</P><P>
<PRE>
\y Word delimiter character
\Y Not a word delimiter character
</PRE>
</P><P>
The `\y' token matches any single character that is one of the characters
that NEdit recognizes as a word delimiter character, while the `\Y' token
matches any character that is <I>not</I> a word delimiter character. Word
delimiter characters are dynamic in nature, meaning that the user can change
them through preference settings. For this reason, they must be handled
differently by the regular expression engine. As a consequence of this,
`\y' and `\Y' cannot be used within a character class specification.
<P><HR>
</P><P>
<A NAME="Parenthetical_Constructs"></A>
<H2> Parenthetical Constructs </H2>
</P><P>
<H3>Capturing Parentheses</H3>
</P><P>
Capturing Parentheses are of the form `(<regex>)' and can be used to group
arbitrarily complex regular expressions. Parentheses can be nested, but the
total number of parentheses, nested or otherwise, is limited to 50 pairs.
The text that is matched by the regular expression between a matched set of
parentheses is captured and available for text substitutions and
backreferences (see below.) Capturing parentheses carry a fairly high
overhead both in terms of memory used and execution speed, especially if
quantified by `*' or `+'.
</P><P>
<H3>Non-Capturing Parentheses</H3>
</P><P>
Non-Capturing Parentheses are of the form `(?:<regex>)' and facilitate
grouping only and do not incur the overhead of normal capturing parentheses.
They should not be counted when determining numbers for capturing parentheses
which are used with backreferences and substitutions. Because of the limit
on the number of capturing parentheses allowed in a regex, it is advisable to
use non-capturing parentheses when possible.
</P><P>
<H3>Positive Look-Ahead</H3>
</P><P>
Positive look-ahead constructs are of the form `(?=<regex>)' and implement a
zero width assertion of the enclosed regular expression. In other words, a
match of the regular expression contained in the positive look-ahead
construct is attempted. If it succeeds, control is passed to the next
regular expression atom, but the text that was consumed by the positive
look-ahead is first unmatched (backtracked) to the place in the text where
the positive look-ahead was first encountered.
</P><P>
One application of positive look-ahead is the manual implementation of a
first character discrimination optimization. You can include a positive
look-ahead that contains a character class which lists every character that
the following (potentially complex) regular expression could possibly start
with. This will quickly filter out match attempts that cannot possibly
succeed.
</P><P>
<H3>Negative Look-Ahead</H3>
</P><P>
Negative look-ahead takes the form `(?!<regex>)' and is exactly the same as
positive look-ahead except that the enclosed regular expression must NOT
match. This can be particularly useful when you have an expression that is
general, and you want to exclude some special cases. Simply precede the
general expression with a negative look-ahead that covers the special cases
that need to be filtered out.
</P><P>
<H3>Positive Look-Behind</H3>
</P><P>
Positive look-behind constructs are of the form `(?<=<regex>)' and implement
a zero width assertion of the enclosed regular expression in front of the
current matching position. It is similar to a positive look-ahead assertion,
except for the fact that the match is attempted on the text preceding the
current position, possibly even in front of the start of the matching range
of the entire regular expression.
</P><P>
A restriction on look-behind expressions is the fact that the expression
must match a string of a bounded size. In other words, `*', `+', and `{n,}'
quantifiers are not allowed inside the look-behind expression. Moreover,
matching performance is sensitive to the difference between the upper and
lower bound on the matching size. The smaller the difference, the better the
performance. This is especially important for regular expressions used in
highlight patterns.
</P><P>
Positive look-behind has similar applications as positive look-ahead.
</P><P>
<H3>Negative Look-Behind</H3>
</P><P>
Negative look-behind takes the form `(?<!<regex>)' and is exactly the same as
positive look-behind except that the enclosed regular expression must
<I>not</I> match. The same restrictions apply.
</P><P>
Note however, that performance is even more sensitive to the distance
between the size boundaries: a negative look-behind must not match for
<B>any</B> possible size, so the matching engine must check <B>every</B> size.
</P><P>
<H3>Case Sensitivity</H3>
</P><P>
There are two parenthetical constructs that control case sensitivity:
</P><P>
<PRE>
(?i<regex>) Case insensitive; `AbcD' and `aBCd' are
equivalent.
</PRE>
</P><P>
<PRE>
(?I<regex>) Case sensitive; `AbcD' and `aBCd' are
different.
</PRE>
</P><P>
Regular expressions are case sensitive by default, that is, `(?I<regex>)' is
assumed. All regular expression token types respond appropriately to case
insensitivity including character classes and backreferences. There is some
extra overhead involved when case insensitivity is in effect, but only to the
extent of converting each character compared to lower case.
</P><P>
<H3>Matching Newlines</H3>
</P><P>
NEdit regular expressions by default handle the matching of newlines in a way
that should seem natural for most editing tasks. There are situations,
however, that require finer control over how newlines are matched by some
regular expression tokens.
</P><P>
By default, NEdit regular expressions will <I>not</I> match a newline character for
the following regex tokens: dot (`.'); a negated character class (`[^...]');
and the following shortcuts for character classes:
</P><P>
<PRE>
`\d', `\D', `\l', `\L', `\s', `\S', `\w', `\W', `\Y'
</PRE>
</P><P>
The matching of newlines can be controlled for the `.' token, negated
character classes, and the `\s' and `\S' shortcuts by using one of the
following parenthetical constructs:
</P><P>
<PRE>
(?n<regex>) `.', `[^...]', `\s', `\S' match newlines
</PRE>
</P><P>
<PRE>
(?N<regex>) `.', `[^...]', `\s', `\S' don't match
newlines
</PRE>
</P><P>
`(?N<regex>)' is the default behavior.
</P><P>
<H3>Notes on New Parenthetical Constructs</H3>
</P><P>
Except for plain parentheses, none of the parenthetical constructs capture
text. If that is desired, the construct must be wrapped with capturing
parentheses, e.g. `((?i<regex))'.
</P><P>
All parenthetical constructs can be nested as deeply as desired, except for
capturing parentheses which have a limit of 50 sets of parentheses,
regardless of nesting level.
</P><P>
<H3>Back References</H3>
</P><P>
Backreferences allow you to match text captured by a set of capturing
parenthesis at some later position in your regular expression. A
backreference is specified using a single backslash followed by a single
digit from 1 to 9 (example: \3). Backreferences have similar syntax to
substitutions (see below), but are different from substitutions in that they
appear within the regular expression, not the substitution string. The number
specified with a backreference identifies which set of text capturing
parentheses the backreference is associated with. The text that was most
recently captured by these parentheses is used by the backreference to
attempt a match. As with substitutions, open parentheses are counted from
left to right beginning with 1. So the backreference `\3' will try to match
another occurrence of the text most recently matched by the third set of
capturing parentheses. As an example, the regular expression `(\d)\1' could
match `22', `33', or `00', but wouldn't match `19' or `01'.
</P><P>
A backreference must be associated with a parenthetical expression that is
complete. The expression `(\w(\1))' contains an invalid backreference since
the first set of parentheses are not complete at the point where the
backreference appears.
</P><P>
<H3>Substitution</H3>
</P><P>
Substitution strings are used to replace text matched by a set of capturing
parentheses. The substitution string is mostly interpreted as ordinary text
except as follows.
</P><P>
The escape sequences described above for special characters, and octal and
hexadecimal escapes are treated the same way by a substitution string. When
the substitution string contains the `&' character, NEdit will substitute the
entire string that was matched by the `Find...' operation. Any of the first
nine sub-expressions of the match string can also be inserted into the
replacement string. This is done by inserting a `\' followed by a digit from
1 to 9 that represents the string matched by a parenthesized expression
within the regular expression. These expressions are numbered left-to-right
in order of their opening parentheses.
</P><P>
The capitalization of text inserted by `&' or `\1', `\2', ... `\9' can be
altered by preceding them with `\U', `\u', `\L', or `\l'. `\u' and `\l'
change only the first character of the inserted entity, while `\U' and `\L'
change the entire entity to upper or lower case, respectively.
<P><HR>
</P><P>
<A NAME="Advanced_Topics"></A>
<H2> Advanced Topics </H2>
</P><P>
<H3>Substitutions</H3>
</P><P>
Regular expression substitution can be used to program automatic editing
operations. For example, the following are search and replace strings to find
occurrences of the `C' language subroutine `get_x', reverse the first and
second parameters, add a third parameter of NULL, and change the name to
`new_get_x':
</P><P>
<PRE>
Search string: `get_x *\( *([^ ,]*), *([^\)]*)\)'
Replace string: `new_get_x(\2, \1, NULL)'
</PRE>
</P><P>
<H3>Ambiguity</H3>
</P><P>
If a regular expression could match two different parts of the text, it will
match the one which begins earliest. If both begin in the same place but
match different lengths, or match the same length in different ways, life
gets messier, as follows.
</P><P>
In general, the possibilities in a list of alternatives are considered in
left-to-right order. The possibilities for `*', `+', and `?' are considered
longest-first, nested constructs are considered from the outermost in, and
concatenated constructs are considered leftmost-first. The match that will be
chosen is the one that uses the earliest possibility in the first choice that
has to be made. If there is more than one choice, the next will be made in
the same manner (earliest possibility) subject to the decision on the first
choice. And so forth.
</P><P>
For example, `(ab|a)b*c' could match `abc' in one of two ways. The first
choice is between `ab' and `a'; since `ab' is earlier, and does lead to a
successful overall match, it is chosen. Since the `b' is already spoken for,
the `b*' must match its last possibility, the empty string, since it must
respect the earlier choice.
</P><P>
In the particular case where no `|'s are present and there is only one `*',
`+', or `?', the net effect is that the longest possible match will be
chosen. So `ab*', presented with `xabbbby', will match `abbbb'. Note that
if `ab*' is tried against `xabyabbbz', it will match `ab' just after `x', due
to the begins-earliest rule. (In effect, the decision on where to start the
match is the first choice to be made, hence subsequent choices must respect
it even if this leads them to less-preferred alternatives.)
</P><P>
<H3>References</H3>
</P><P>
An excellent book on the care and feeding of regular expressions is
</P><P>
<PRE>
Mastering Regular Expressions, 3rd Edition
Jeffrey E. F. Friedl
August 2006, O'Reilly & Associates
ISBN 0-596-52812-4
</PRE>
</P><P>
The first end second editions of this book are still useful for basic
introduction to regexes and contain many useful tips and tricks.
<P><HR>
</P><P>
<A NAME="Example_Regular_Expressions"></A>
<H2> Example Regular Expressions </H2>
</P><P>
The following are regular expression examples which will match:
</P><P>
<UL>
<li>An entire line.</li>
</UL>
<PRE>
^.*$
</PRE>
</P><P>
<UL>
<li>Blank lines.</li>
</UL>
<PRE>
^$
</PRE>
</P><P>
<UL>
<li>Whitespace on a line.</li>
</UL>
<PRE>
\s+
</PRE>
</P><P>
<UL>
<li>Whitespace across lines.</li>
</UL>
<PRE>
(?n\s+)
</PRE>
</P><P>
<UL>
<li>Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.</li>
</UL>
<PRE>
(?n\s*?\n\s*)
</PRE>
</P><P>
<UL>
<li>IP address (not robust).</li>
</UL>
<PRE>
(?:\d{1,3}(?:\.\d{1,3}){3})
</PRE>
</P><P>
<UL>
<li>Two character US Postal state abbreviations (includes territories).</li>
</UL>
<PRE>
[ACDF-IK-PR-W][A-Z]
</PRE>
</P><P>
<UL>
<li>Web addresses.</li>
</UL>
<PRE>
(?:http://)?www\.\S+
</PRE>
</P><P>
<UL>
<li>Case insensitive double words across line breaks.</li>
</UL>
<PRE>
(?i(?n<(\S+)\s+\1>))
</PRE>
</P><P>
<UL>
<li>Upper case words with possible punctuation.</li>
</UL>
<PRE>
<[A-Z][^a-z\s]*>
</PRE>
</P><P>
<P><HR>
</P><P>
<A NAME="Macro/Shell_Extensions"></A>
<H1> Macro/Shell Extensions </H1>
</P><P>
<A NAME="Shell_Commands_and_Filters"></A>
<H2> Shell Commands and Filters </H2>
</P><P>
The Shell menu (Unix versions only) allows you to execute Unix shell commands
from within NEdit. You can add items to the menu to extend NEdit's command
set or to incorporate custom automatic editing features using shell commands
or editing languages like awk and sed. To add items to the menu, select
Preferences -> Default Settings Customize Menus -> Shell Menu. NEdit comes
pre-configured with a few useful Unix commands like spell and sort, but we
encourage you to add your own custom extensions.
</P><P>
Filter Selection... prompts you for a Unix command to use to process the
currently selected text. The output from this command replaces the contents
of the selection.
</P><P>
Execute Command... prompts you for a Unix command and replaces the current
selection with the output of the command. If there is no selection, it
deposits the output at the current insertion point. In the Shell Command
field, the % character expands to the name (including directory path), and
the # character expands to the current line number of the file in the window.
To include a % or # character in the command, use %% or ##, respectively.
</P><P>
Execute Command Line uses the position of the cursor in the window to
indicate a line to execute as a shell command line. The cursor may be
positioned anywhere on the line. This command allows you to use an NEdit
window as an editable command window for saving output and saving commands
for re-execution. Note that the same character expansions described above
in Execute Command also occur with this command.
</P><P>
The X resource called nedit.shell (See "<A HREF="#Customizing_NEdit">Customizing NEdit</A>") determines which
Unix shell is used to execute commands. The default value for this resource
is the user's login shell.
<P><HR>
</P><P>
<A NAME="Learn/Replay"></A>
<H2> Learn/Replay </H2>
</P><P>
Selecting Learn Keystrokes from the Macro menu puts NEdit in learn mode. In
learn mode, keystrokes and menu commands are recorded, to be played back
later, using the Replay Keystrokes command, or pasted into a macro in the
Macro Commands dialog of the Default Settings menu in Preferences.
</P><P>
Note that only keyboard and menu commands are recorded, not mouse clicks or
mouse movements since these have no absolute point of reference, such as
cursor or selection position. When you do a mouse-based operation in learn
mode, NEdit will beep (repeatedly) to remind you that the operation was not
recorded.
</P><P>
Learn mode is also the quickest and easiest method for writing macros. The
dialog for creating macro commands contains a button labeled "Paste Learn /
Replay Macro", which will deposit the last sequence learned into the body of
the macro.
</P><P>
<H3>Repeating Actions and Learn/Replay Sequences</H3>
</P><P>
You can repeat the last (keyboard-based) command, or learn/replay sequence
with the Repeat... command in the Macro menu. To repeat an action, first do
the action (that is, insert a character, do a search, move the cursor), then
select Repeat..., decide how or how many times you want it repeated, and
click OK. For example, to move down 30 lines through a file, you could type:
<Down Arrow> Ctrl+, 29 <Return>. To repeat a learn/replay sequence, first
learn it, then select Repeat..., click on Learn/Replay and how you want it
repeated, then click OK.
</P><P>
If the commands you are repeating advance the cursor through the file, you
can also repeat them within a range of characters, or from the current cursor
position to the end of the file. To iterate over a range of characters, use
the primary selection (drag the left mouse button over the text) to mark the
range you want to operate on, and select "In Selection" in the Repeat dialog.
</P><P>
When using In "Selection" or "To End" with a learned sequence, try to do
cursor movement as the last step in the sequence, since testing of the cursor
position is only done at the end of the sequence execution. If you do cursor
movement first, for example searching for a particular word then doing a
modification, the position of the cursor won't be checked until the sequence
has potentially gone far beyond the end of your desired range.
</P><P>
It's easy for a repeated command to get out of hand, and you can easily
generate an infinite loop by using range iteration on a command which doesn't
progress. To cancel a repeating command in progress, type Ctrl+. (period),
or select Cancel Macro from the Macro menu.
<P><HR>
</P><P>
<A NAME="Macro_Language"></A>
<H2> Macro Language </H2>
</P><P>
Macros can be called from Macro menu commands, window background menu
commands, within the smart-indent framework, from the autoload macro file,
cf. <A HREF="#Preferences">Preferences</A>, and from the command line.
Macro menu and window background menu commands are defined under Preferences
-> Default Settings -> Customize Menus. Help on creating items in these
menus can be found in the section <A HREF="#Preferences">Preferences</A>.
</P><P>
NEdit's macro language is a simple interpreter with integer arithmetic,
dynamic strings, and C-style looping constructs (very similar to the
procedural portion of the Unix awk program). From the macro language, you
can call the same action routines which are bound to keyboard keys and menu
items, as well additional subroutines for accessing and manipulating editor
data, which are specific to the macro language (these are listed in the
sections titled "<A HREF="#Macro_Subroutines">Macro Subroutines</A>", and "<A HREF="#Action_Routines">Action Routines</A>").
</P><P>
<H3>Syntax</H3>
</P><P>
An NEdit macro language program consists of a list of statements, each
terminated by a newline. Groups of statements which are executed together
conditionally, such as the body of a loop, are surrounded by curly braces
"{}".
</P><P>
Blank lines and comments are also allowed. Comments begin with a "#" and end
with a newline, and can appear either on a line by themselves, or at the end
of a statement.
</P><P>
Statements which are too long to fit on a single line may be split across
several lines, by placing a backslash "\" character at the end of each line
to be continued.
</P><P>
<H3>Data Types</H3>
</P><P>
The NEdit macro language recognizes only three data types, dynamic character
strings, integer values and associative arrays. In general strings and
integers can be used interchangeably. If a string represents an integer
value, it can be used as an integer. Integers can be compared and
concatenated with strings. Arrays may contain integers, strings, or arrays.
Arrays are stored key/value pairs. Keys are always stored as strings.
</P><P>
<H4>Integer Constants</H4>
</P><P>
Integers are non-fractional numbers in the range of -2147483647 to
2147483647. Integer constants must be in decimal. For example:
</P><P>
<PRE>
a = -1
b = 1000
</PRE>
</P><P>
<H4>Character String Constants</H4>
</P><P>
Character string constants are enclosed in double quotes. For example:
</P><P>
<PRE>
a = "a string"
dialog("Hi there!", "OK")
</PRE>
</P><P>
Strings may also include C-language style escape sequences:
</P><P>
<PRE>
\\ Backslash \t Tab \f Form feed
\" Double quote \b Backspace \a Alert
\n Newline \r Carriage return \v Vertical tab
</PRE>
</P><P>
Also allowed is the escape control character sequence:
</P><P>
<PRE>
\e Escape (ASCII or EBCDIC,
depending on NEdit compilation settings)
</PRE>
</P><P>
For example, to send output to the terminal from which NEdit was started, a
newline character is necessary because, like printf, t_print requires
explicit newlines, and also buffers its output on a per-line basis:
</P><P>
<PRE>
t_print("a = " a "\n")
</PRE>
</P><P>
Other characters can be expressed as backslash-escape sequences in macro
strings. The format is the same as for regular expressions, described in the
paragraphs headed "Octal and Hex Escape Sequences" of the section
"<A HREF="#Metacharacters">Metacharacters</A>", except that an octal escape sequence can start with any
octal digit, not just 0, so the single character string "\0033" is the same
as "\33", "\x1B" and "\e" (for an ASCII version of NEdit).
</P><P>
Note that if you want to define a regular expression in a macro string,
you need to "double-up" the backslashes for the metacharacters with
special meaning in regular expressions. For example, the expression
</P><P>
<PRE>
(?N(\s|/\*(?n(?:(?!\*/).)*)\*/|//.*\n|\n)+)
</PRE>
</P><P>
which matches whitespace or C/C++/Java-style comments, should be written as
a macro string as
</P><P>
<PRE>
"(?N(\\s|/\\*(?n(?:(?!\\*/).)*)\\*/|//.*\n|\n)+)"
</PRE>
</P><P>
(The "\n"s towards the end add literal newline characters to the string. The
regular expression interpretation treats the newlines as themselves. It can
also interpret the sequence "\\n" as a newline, although the macro string here
would then contain a literal backslash followed by a lowercase `N'.)
</P><P>
<H3>Variables</H3>
</P><P>
Variable names must begin either with a letter (local variables), or a $
(global variables). Beyond the first character, variables may also contain
numbers and underscores `_'. Variables are called in to existence just by
setting them (no explicit declarations are necessary).
</P><P>
Local variables are limited in scope to the subroutine (or menu item
definition) in which they appear. Global variables are accessible from all
routines, and their values persist beyond the call which created them, until
reset.
</P><P>
<H4>Built-in Variables</H4>
</P><P>
NEdit has a number of permanently defined variables, which are used to access
global editor information and information about the window in which the
macro is executing. These are listed along with the built in functions in
the section titled "<A HREF="#Macro_Subroutines">Macro Subroutines</A>".
</P><P>
<H3>Functions and Subroutines</H3>
</P><P>
The syntax of a function or subroutine call is:
</P><P>
<PRE>
function_name(arg1, arg2, ...)
</PRE>
</P><P>
where arg1, arg2, etc. represent the argument values which are passed to
the routine being called. A function or subroutine call can be on a line by
itself, as above, or if it returns a value, can be invoked within a character
or numeric expression:
</P><P>
<PRE>
a = fn1(b, c) + fn2(d)
dialog("fn3 says: " fn3())
</PRE>
</P><P>
Arguments are passed by value. This means that you cannot return values via
the argument list, only through the function value or indirectly through
agreed-upon global variables.
</P><P>
<H4>Built-in Functions</H4>
</P><P>
NEdit has a wide range of built in functions which can be called from the
macro language. These routines are divided into two classes, macro-language
functions, and editor action routines. Editor action routines are more
flexible, in that they may be called either from the macro language, or bound
directly to keys via translation tables. They are also limited, however, in
that they cannot return values. Macro language routines can return values,
but cannot be bound to keys in translation tables.
</P><P>
Nearly all of the built-in subroutines operate on an implied window, which is
initially the window from which the macro was started. To manipulate the
contents of other windows, use the focus_window subroutine to change the
focus to the ones you wish to modify. focus_window can also be used to
iterate over all of the currently open windows, using the special keyword
names, "last" and "next".
</P><P>
For backwards compatibility, hyphenated action routine names are allowed, and
most of the existing action routines names which contain underscores have an
equivalent version containing hyphens ('-') instead of underscores. Use of
these names is discouraged. The macro parser resolves the ambiguity between
'-' as the subtraction/negation operator, and - as part of an action routine
name by assuming subtraction unless the symbol specifically matches an action
routine name.
</P><P>
<H4>User Defined Functions</H4>
</P><P>
Users can define their own macro subroutines, using the define keyword:
</P><P>
<PRE>
define subroutine_name {
< body of subroutine >
}
</PRE>
</P><P>
Subroutine definitions cannot appear within other definitions, nor within
macro menu item definitions. They can only appear in (macro) files, such as
the autoload macro file, cf. <A HREF="#Preferences">Preferences</A>. Macro files can be loaded with
File -> Load Macro File or with the load_macro_file() action.
</P><P>
The arguments with which a user-defined subroutine or function was invoked,
are presented as $1, $2, ... , $9 or $args[expr], where expr can be evaluated
to an integer from 1 to the number of arguments. The number of arguments can
be read from $n_args or $args[]. The array $args[expr] is the only way to
access arguments beyond the first 9.
</P><P>
To return a value from a subroutine, and/or to exit from the subroutine
before the end of the subroutine body, use the return statement:
</P><P>
<PRE>
return <value to return>
</PRE>
</P><P>
<H3>Operators and Expressions</H3>
</P><P>
Operators have the same meaning and precedence that they do in C, except for
^, which raises a number to a power (y^x means y to the x power), rather than
bitwise exclusive OR. The table below lists operators in decreasing order of
precedence.
</P><P>
<PRE>
Operators Associativity
()
^ right to left
- ! ++ -- (unary)
* / % left to right
+ - left to right
> >= < <= == != left to right
& left to right
| left to right
&& left to right
|| left to right
(concatenation) left to right
= += -= *= /= %=, &= |= right to left
</PRE>
</P><P>
The order in which operands are evaluated in an expression is undefined,
except for && and ||, which like C, evaluate operands left to right, but stop
when further evaluation would no longer change the result.
</P><P>
<H4>Numerical Operators</H4>
</P><P>
The numeric operators supported by the NEdit macro language are listed below:
</P><P>
<PRE>
+ addition
- subtraction or negation
* multiplication
/ division
% modulo
^ power
& bitwise and
| bitwise or
</PRE>
</P><P>
Increment (++) and decrement (--) operators can also be appended or prepended
to variables within an expression. Prepended increment/decrement operators
act before the variable is evaluated. Appended increment/decrement operators
act after the variable is evaluated.
</P><P>
<H4>Logical and Comparison Operators</H4>
</P><P>
Logical operations produce a result of 0 (for false) or 1 (for true). In a
logical operation, any non-zero value is recognized to mean true. The
logical and comparison operators allowed in the NEdit macro language are
listed below:
</P><P>
<PRE>
&& logical and
|| logical or
! not
> greater
< less
>= greater or equal
<= less or equal
== equal (integers and/or strings)
!= not equal (integers and/or strings)
</PRE>
</P><P>
<H4>Character String Operators</H4>
</P><P>
The "operator" for concatenating two strings is the absence of an operator.
Adjoining character strings with no operator in between means concatenation:
</P><P>
<PRE>
d = a b "string" c
t_print("the value of a is: " a)
</PRE>
</P><P>
Comparison between character strings is done with the == and != operators,
(as with integers). There are a number of useful built-in routines for
working with character strings, which are listed in the section called
"<A HREF="#Macro_Subroutines">Macro Subroutines</A>".
</P><P>
<H4>Arrays and Array Operators</H4>
</P><P>
Arrays may contain either strings, integers, or other arrays. Arrays are
associative, which means that they relate two pieces of information, the key
and the value. The key is always a string; if you use an integer it is
converted to a string.
</P><P>
To determine if a given key is in an array, use the 'in' keyword.
</P><P>
<PRE>
if ("6" in x)
<body>
</PRE>
</P><P>
If the left side of the in keyword is an array, the result is true if every
key in the left array is in the right array. Array values are not compared.
</P><P>
To iterate through all the keys of an array use the 'for' looping construct.
Keys are not guaranteed in any particular order:
</P><P>
<PRE>
for (aKey in x)
<body>
</PRE>
</P><P>
Elements can be removed from an array using the delete command:
</P><P>
<PRE>
delete x[3] # deletes element with key 3
delete x[] # deletes all elements
</PRE>
</P><P>
The number of elements in an array can be determined by referencing the
array with no indices:
</P><P>
<PRE>
dialog("array x has " x[] " elements", "OK")
</PRE>
</P><P>
Arrays can be combined with some operators. All the following operators only
compare the keys of the arrays.
</P><P>
<PRE>
result = x + y (Merge arrays)
</PRE>
</P><P>
The 'result' is a new array containing keys from both x and y. If
duplicates are present values from y are used.
</P><P>
<PRE>
result = x - y (Remove keys)
</PRE>
</P><P>
The 'result' is a new array containing all keys from x that are not in y.
</P><P>
<PRE>
result = x & y (Common keys)
</PRE>
</P><P>
The 'result' is a new array containing all keys which are in both x and y.
The values from y are used.
</P><P>
<PRE>
result = x | y (Unique keys)
</PRE>
</P><P>
The 'result' is a new array containing keys which exist in either x or y,
but not both.
</P><P>
When duplicate keys are encountered using the + and & operators, the values
from the array on the right side of the operators are used for the result.
All of the above operators are array only, meaning both the left and right
sides of the operator must be arrays. The results are also arrays.
</P><P>
Array keys can also contain multiple dimensions:
</P><P>
<PRE>
x[1, 1, 1] = "string"
</PRE>
</P><P>
These are used in the expected way, e.g.:
</P><P>
<PRE>
for (i = 1; i < 3; i++)
{
for (j = 1; j < 3; j++)
{
x[i, j] = k++
}
}
</PRE>
</P><P>
gives the following array:
</P><P>
<PRE>
x[1, 1] = 0
x[1, 2] = 1
x[2, 1] = 2
x[2, 2] = 3
</PRE>
</P><P>
Internally all indices are part of one string, separated by the string
$sub_sep (ASCII 0x1c, 'FS'). The first key in the above example is in
fact:
</P><P>
<PRE>
["1" $sub_sep "1"]
</PRE>
</P><P>
If you need to extract one of the keys, you can use split(), using
$sub_sep as the separator.
</P><P>
You can also check for the existence of multi-dimensional array by
looking for $sub_sep in the key.
</P><P>
Last, you need $sub_sep if you want to use the 'in' keyword.
</P><P>
<PRE>
if ((1,2) in myArray)
{..}
</PRE>
</P><P>
doesn't work, but
</P><P>
<PRE>
if (("1" $sub_sep "2") in myArray)
{..}
</PRE>
</P><P>
does work.
</P><P>
<H3>Looping and Conditionals</H3>
</P><P>
NEdit supports looping constructs: for and while, and conditional statements:
if and else, with essentially the same syntax as C:
</P><P>
<PRE>
for (<init>, ...; <condition>; <increment>, ...) <body>
</PRE>
</P><P>
<PRE>
while (<condition>) <body>
</PRE>
</P><P>
<PRE>
if (<condition>) <body>
</PRE>
</P><P>
<PRE>
if (<condition>) <body> else <body>
</PRE>
</P><P>
<body>, as in C, can be a single statement, or a list of statements enclosed
in curly braces ({}). <condition> is an expression which must evaluate to
true for the statements in <body> to be executed. for loops may also contain
initialization statements, <init>, executed once at the beginning of the
loop, and increment/decrement statements (or any arbitrary statement), which
are executed at the end of the loop, before the condition is evaluated again.
</P><P>
Examples:
</P><P>
<PRE>
for (i=0; i<100; i++)
j = i * 2
</PRE>
</P><P>
<PRE>
for (i=0, j=20; i<20; i++, j--) {
k = i * j
t_print(i, j, k)
}
</PRE>
</P><P>
<PRE>
while (k > 0)
{
k = k - 1
t_print(k)
}
</PRE>
</P><P>
<PRE>
for (;;) {
if (i-- < 1)
break
}
</PRE>
</P><P>
Loops may contain break and continue statements. A <B>break</B> statement
causes an exit from the innermost loop, a <B>continue</B> statement transfers
control to the end of the loop.
<P><HR>
</P><P>
<A NAME="Macro_Subroutines"></A>
<H2> Macro Subroutines </H2>
</P><P>
<H3>Built in Variables</H3>
</P><P>
These variables are read-only and cannot be changed by direct assignment.
</P><P>
<PRE>
<B>$1</B>, <B>$2</B>, <B>$3</B>, <B>$4</B>, <B>$5</B>, <B>$6</B>, <B>$7</B>, <B>$8</B>, <B>$9</B>
<B>$args</B>[<I>expr</I>]
<B>$n_args</B>
</PRE>
Argument information. The first 9 arguments (if there are that many) can
be referenced as read-only values using the shorthand form. All arguments
can be accessed as values in the <B>$args</B> array, using a numeric index
starting at 1. The total number of arguments received by a function is
given by <B>$n_args</B> or <B>$args[]</B>.
</P><P>
<PRE>
<B>$active_pane</B>
</PRE>
Index of the current pane.
</P><P>
<PRE>
<B>$auto_indent</B>
</PRE>
Contains the current preference for auto indent.
Can be "off", "on", or "smart".
</P><P>
<PRE>
<B>$calltip_ID</B>
</PRE>
Equals the ID of the currently displayed calltip, or 0 if no calltip is
being displayed.
</P><P>
<PRE>
<B>$cursor</B>
</PRE>
Position of the cursor in the current window.
</P><P>
<PRE>
<B>$column</B>
</PRE>
Column number of the cursor position in the current window.
</P><P>
<PRE>
<B>$display_width</B>
</PRE>
Width of the current pane in pixels.
</P><P>
<PRE>
<B>$em_tab_dist</B>
</PRE>
If tab emulation is turned on in the Tabs...
dialog of the Preferences menu, the value is the
distance between emulated tab stops. If tab
emulation is turned off, the value is 0.
</P><P>
<PRE>
<B>$empty_array</B>
</PRE>
An array with no elements. This can be used to initialize
an array to an empty state.
</P><P>
<PRE>
<B>$file_format</B>
</PRE>
Current newline format that the file will be saved with. Can
be "unix", "dos" or "macintosh".
</P><P>
<PRE>
<B>$file_name</B>
</PRE>
Name of the file being edited in the current
window, stripped of directory component.
</P><P>
<PRE>
<B>$file_path</B>
</PRE>
Directory component of file being edited in the current window.
</P><P>
<PRE>
<B>$font_name</B>
</PRE>
Contains the current plain text font name.
</P><P>
<PRE>
<B>$font_name_bold</B>
</PRE>
Contains the current bold text font name.
</P><P>
<PRE>
<B>$font_name_bold_italic</B>
</PRE>
Contains the current bold-italic text font name.
</P><P>
<PRE>
<B>$font_name_italic</B>
</PRE>
Contains the current italic text font name.
</P><P>
<PRE>
<B>$highlight_syntax</B>
</PRE>
Whether syntax highlighting is turned on.
</P><P>
<PRE>
<B>$incremental_backup</B>
</PRE>
Contains 1 if incremental auto saving is on, otherwise 0.
</P><P>
<PRE>
<B>$incremental_search_line</B>
</PRE>
Has a value of 1 if the preference is
selected to always show the incremental search line, otherwise 0.
</P><P>
<PRE>
<B>$language_mode</B>
</PRE>
Name of language mode set in the current window.
</P><P>
<PRE>
<B>$line</B>
</PRE>
Line number of the cursor position in the current window.
</P><P>
<PRE>
<B>$locked</B>
</PRE>
True if the file has been locked by the user.
</P><P>
<PRE>
<B>$make_backup_copy</B>
</PRE>
Has a value of 1 if original file is kept in a
backup file on save, otherwise 0.
</P><P>
<PRE>
<B>$max_font_width</B>
</PRE>
The maximum font width of all the active styles.
Syntax highlighting styles are only considered if syntax highlighting
is turned on.
</P><P>
<PRE>
<B>$min_font_width</B>
</PRE>
The minimum font width of all the active styles.
Syntax highlighting styles are only considered if syntax highlighting
is turned on.
</P><P>
<PRE>
<B>$modified</B>
</PRE>
True if the file in the current window has
been modified and the modifications have not
yet been saved.
</P><P>
<PRE>
<B>$VERSION</B>
</PRE>
Returns NEdit's version number ('5006' for NEdit 5.6).
</P><P>
<PRE>
<B>$n_display_lines</B>
</PRE>
The number of lines visible in the currently active pane.
</P><P>
<PRE>
<B>$n_panes</B>
</PRE>
The number of panes in the current window.
</P><P>
<PRE>
<B>$overtype_mode</B>
</PRE>
True if in Overtype mode.
</P><P>
<PRE>
<B>$read_only</B>
</PRE>
True if the file is read only.
</P><P>
<PRE>
<B>$selection_start, $selection_end</B>
</PRE>
Beginning and ending positions of the
primary selection in the current window, or
-1 if there is no text selected in the current window.
</P><P>
<PRE>
<B>$selection_left, $selection_right</B>
</PRE>
Left and right character offsets of the rectangular (primary) selection in
the current window, or -1 if there is no selection or it is not rectangular.
</P><P>
<PRE>
<B>$server_name</B>
</PRE>
Name of the current NEdit server.
</P><P>
<PRE>
<B>$show_line_numbers</B>
</PRE>
Whether line numbers are shown next to the text.
</P><P>
<PRE>
<B>$show_matching</B>
</PRE>
Contains the current preference for showing matching pairs,
such as "[]" and "{}" pairs. Can be "off", "delimiter", or "range".
</P><P>
<PRE>
<B>$match_syntax_based</B>
</PRE>
Whether pair matching should use syntax information, if available.
</P><P>
<PRE>
<B>$statistics_line</B>
</PRE>
Has a value of 1 if the statistics line is shown, otherwise 0.
</P><P>
<PRE>
<B>$sub_sep</B>
</PRE>
Contains the value of the array sub-script separation string.
</P><P>
<PRE>
<B>$tab_dist</B>
</PRE>
The distance between tab stops for a
hardware tab character, as set in the
Tabs... dialog of the Preferences menu.
</P><P>
<PRE>
<B>$text_length</B>
</PRE>
The length of the text in the current document.
</P><P>
<PRE>
<B>$top_line</B>
</PRE>
The line number of the top line of the currently active pane.
</P><P>
<PRE>
<B>$use_tabs</B>
</PRE>
Whether the user is allowing the NEdit to insert tab characters to maintain
spacing in tab emulation and rectangular dragging operations. (The setting of
the "Use tab characters in padding and emulated tabs" button in the Tabs...
dialog of the Preferences menu.)
</P><P>
<PRE>
<B>$wrap_margin</B>
</PRE>
The right margin in the current window for text wrapping and filling.
</P><P>
<PRE>
<B>$wrap_text</B>
</PRE>
The current wrap text mode. Values are "none", "auto" or "continuous".
</P><P>
<H3>Built-in Subroutines</H3>
</P><P>
<PRE>
<B>append_file( string, filename )</B>
</PRE>
Appends a string to a named file. Returns 1 on successful write, or 0 if
unsuccessful.
</P><P>
<PRE>
<B>beep()</B>
</PRE>
Ring the bell.
</P><P>
<PRE>
<B>calltip( "text_or_key" [, pos [, mode or position_modifier, ...]] )</B>
</PRE>
Pops up a calltip. <pos> is an optional position in the buffer where the tip
will be displayed. Passing -1 for <pos> is equivalent to not specifying a
position, and it guarantees that the tip will appear on-screen somewhere even
if the cursor is not. The upper-left corner of the calltip will appear below
where the cursor would appear if it were at this position.
</P><P>
<mode> is one of "tipText" (default), "tipKey", or "tagKey". "tipText"
displays the text as-is, "tagKey" uses it as the key to look up a tag, then
converts the tag to a calltip, and "tipKey" uses it as the key to look up a
calltip, then falls back to "tagKey" behavior if that fails. You'll usually
use "tipKey" or "tipText".
</P><P>
Finally, you can modify the placement of the calltip relative to the cursor
position (or <pos>) with one or more of these optional position modifiers:
"center" aligns the center of the calltip with the position. "right" aligns
the right edge of the calltip with the position. ("center" and "right" may
not both be used.) "above" places the calltip above the position. "strict"
does not allow the calltip to move from its position in order to avoid going
off-screen or obscuring the cursor.
</P><P>
Returns the ID of the calltip if it was found and/or displayed correctly,
0 otherwise.
</P><P>
<PRE>
<B>clipboard_to_string()</B>
</PRE>
Returns the contents of the clipboard as a macro string. Returns empty
string on error.
</P><P>
<PRE>
<B>dialog( message, btn_1_label, btn_2_label, ... )</B>
</PRE>
Pop up a dialog for querying and presenting information to the user. First
argument is a string to show in the message area of the dialog.
Additional optional arguments represent labels for buttons to appear along
the bottom of the dialog. Returns the number of the button pressed (the
first button is number 1), or 0 if the user closed the dialog via the window
close box.
</P><P>
<PRE>
<B>filename_dialog( [title[, mode[, defaultPath[, filter[, defaultName]]]]] )</B>
</PRE>
Presents a file selection dialog with the given title to the user that
prompts for a new or existing file.
</P><P>
Options are: <I>title</I> will be the title of the dialog, defaults to "Choose
file". If <I>mode</I> is set to "exist" (default), the "New File Name"TextField
of the FSB will be unmanaged. If "new", the TextField will be managed.
<I>defaultPath</I> is the default path to use. Default (or "") will use the
active document's directory. <I>filter</I> is the file glob which determines
which files to display. Is set to "*" if filter is "" and by default.
<I>defaultName</I> is the default filename that is filled in automatically.
(<B>Note</B> that the default_filename argument does not work on all Motif
implementations.)
</P><P>
Returns "" if the user cancelled the dialog, otherwise returns the
fully-qualified path, including the filename.
</P><P>
<PRE>
<B>focus_window( window_name )</B>
</PRE>
Sets the window on which subsequent macro commands operate. window_name can
be either a fully qualified file name, or a relative filename (which will
be completed from NEdit's working directory) or one of "last" for the last
window created, or "next" for the next window in the chain from the currently
focused window (the first window being the one returned from calling
focus_window("last"). Returns the name of the newly-focused window, or an
empty string if the requested window was not found.
</P><P>
<PRE>
<B>get_character( position )</B>
</PRE>
Returns the single character at the position
indicated by the first argument to the routine from the current window.
</P><P>
<PRE>
<B>get_range( start, end )</B>
</PRE>
Returns the text between a starting and ending position from the current
window.
</P><P>
<PRE>
<B>get_selection()</B>
</PRE>
Returns a string containing the text currently selected by the primary
selection either from the current window (no keyword), or from anywhere on
the screen (keyword "any").
</P><P>
<PRE>
<B>getenv( name )</B>
</PRE>
Gets the value of an environment variable.
</P><P>
<PRE>
<B>kill_calltip( [calltip_ID] )</B>
</PRE>
Kills any calltip that is being displayed in the window in which the macro is
running. If there is no displayed calltip this does nothing. If a calltip
ID is supplied then the calltip is killed only if its ID is calltip_ID.
</P><P>
<PRE>
<B>length( string )</B>
</PRE>
Returns the length of a string
</P><P>
<PRE>
<B>list_dialog( message, text, btn_1_label, btn_2_label, ... )</B>
</PRE>
Pop up a dialog for prompting the user to choose a line from the given text
string. The first argument is a message string to be used as a title for the
fixed text describing the list. The second string provides the list data:
this is a text string in which list entries are separated by newline
characters. Additional optional arguments represent labels for
buttons to appear along the bottom of the dialog. Returns the line of text
selected by the user as the function value (without any newline separator) or
the empty string if none was selected, and number of the button pressed (the
first button is number 1), in $list_dialog_button. If the user closes the
dialog via the window close box, the function returns the empty string, and
$list_dialog_button returns 0.
</P><P>
<PRE>
<B>max( n1, n2, ... )</B>
</PRE>
Returns the maximum value of all of its arguments
</P><P>
<PRE>
<B>min( n1, n2, ... )</B>
</PRE>
Returns the minimum value of all of its arguments
</P><P>
<PRE>
<B>read_file( filename )</B>
</PRE>
Reads the contents of a text file into a string. On success, returns 1 in
$read_status, and the contents of the file as a string in the subroutine
return value. On failure, returns the empty string "" and an 0 $read_status.
</P><P>
<PRE>
<B>replace_in_string( string, search_for, replace_with [, type, "copy"] )</B>
</PRE>
Replaces all occurrences of a search string in a string with a replacement
string. Arguments are 1: string to search in, 2: string to search for, 3:
replacement string. There are two optional arguments. One is a search type,
either "literal", "case", "word", "caseWord", "regex", or "regexNoCase".
The default search type is "literal". If the optional "copy" argument is
specified, a copy of the input string is returned when no replacements were
performed. By default an empty string ("") will be returned in this case.
Returns a new string with all of the replacements done.
</P><P>
<PRE>
<B>replace_range( start, end, string )</B>
</PRE>
Replaces all the text between two positions in the current window. If the
cursor position is between start and end it will be set to start.
</P><P>
<PRE>
<B>replace_selection( string )</B>
</PRE>
Replaces the primary-selection selected text in the current window.
</P><P>
<PRE>
<B>replace_substring( string, start, end, replace_with )</B>
</PRE>
Replacing a substring between two positions in a string within another string.
</P><P>
<PRE>
<B>revert_to_saved()</B>
</PRE>
Reloads the file, discarding all changes done to the document by the user
since the last save.
</P><P>
<PRE>
<B>search( search_for, start [, search_type, wrap, direction] )</B>
</PRE>
Searches silently in a window without dialogs, beeps, or changes to the
selection. Arguments are: 1: string to search for, 2: starting position.
Optional arguments may include the strings: "wrap" to make the search wrap
around the beginning or end of the string, "backward" or "forward" to change
the search direction ("forward" is the default), "literal", "case", "word",
"caseWord", "regex", or "regexNoCase" to change the search type (default is
"literal"). Returns the starting position of the match, or -1 if nothing
matched. Also returns the ending position of the match in $search_end.
</P><P>
<PRE>
<B>search_string( string, search_for, start [, search_type, direction] )</B>
</PRE>
Built-in macro subroutine for searching a string. Arguments are 1: string to
search in, 2: string to search for, 3: starting position. Optional arguments
may include the strings: "wrap" to make the search wrap around the beginning
or end of the string, "backward" or "forward" to change the search direction
("forward" is the default), "literal", "case", "word", "caseWord", "regex",
or "regexNoCase" to change the search type (default is "literal"). Returns
the starting position of the match, or -1 if nothing matched. Also returns
the ending position of the match in $search_end.
</P><P>
<PRE>
<B>select( start, end )</B>
</PRE>
Selects (with the primary selection) text in the current buffer between a
starting and ending position.
</P><P>
<PRE>
<B>select_rectangle( start, end, left, right )</B>
</PRE>
Selects a rectangular area of text between a starting and ending position,
and confined horizontally to characters displayed between positions "left",
and "right".
</P><P>
<PRE>
<B>set_cursor_pos( position )</B>
</PRE>
Set the cursor position for the current window.
</P><P>
<PRE>
<B>shell_command( command, input_string )</B>
</PRE>
Executes a shell command, feeding it input from input_string. On completion,
output from the command is returned as the function value, and the command's
exit status is returned in the global variable $shell_cmd_status.
</P><P>
<PRE>
<B>split(string, separation_string [, search_type])</B>
</PRE>
Splits a string using the separator specified. Optionally the search_type
argument can specify how the separation_string is interpreted. The default
is "literal". The returned value is an array with keys beginning at 0.
</P><P>
<PRE>
<B>string_dialog( message, btn_1_label, btn_2_label, ... )</B>
</PRE>
Pops up a dialog prompting the user to enter information. The first argument
is a string to show in the message area of the dialog. Additional
optional arguments represent labels for buttons to appear along the bottom of
the dialog. Returns the string entered by the user as the function value,
and number of the button pressed (the first button is number 1), in
$string_dialog_button. If the user closes the dialog via the window close
box, the function returns the empty string, and $string_dialog_button returns
0.
</P><P>
<PRE>
<B>string_compare(string1, string2 [, consider-case])</B>
</PRE>
Compare two strings and return 0 if they are equal, -1 if string1 is less
than string2 or 1 if string1 is greater than string2. The values for the
optional consider-case argument is either "case" or "nocase". The default
is to do a case sensitive comparison.
</P><P>
<PRE>
<B>string_to_clipboard( string )</B>
</PRE>
Copy the contents of a macro string to the clipboard.
</P><P>
<PRE>
<B>substring( string, start [, end] )</B>
</PRE>
Returns the portion of a string between a start and end position (with the
position of the beginning of the string being 0). If end is missing, the
position of the end of the string is used. If either of the positions are
negative, they are treated as relative to the end of the string. A position
specified either before the start of the string or after the end of the string
is repositioned to the nearest valid string position. If the start position
is beyond the end position, the empty string is returned.
</P><P>
<PRE>
<B>t_print( string1, string2, ... )</B>
</PRE>
Writes strings to the terminal (stdout) from which NEdit was started.
</P><P>
<PRE>
<B>tolower( string )</B>
</PRE>
Return an all lower-case version of string.
</P><P>
<PRE>
<B>toupper( string )</B>
</PRE>
Return an all upper-case version of string.
</P><P>
<PRE>
<B>valid_number( string )</B>
</PRE>
Returns 1 if the string can be converted to a number without error
following the same rules that the implicit conversion would. Otherwise 0.
</P><P>
<PRE>
<B>write_file( string, filename )</B>
</PRE>
Writes a string (parameter 1) to a file named in parameter 2. Returns 1 on
successful write, or 0 if unsuccessful.
</P><P>
<H3>Deprecated Functions</H3>
</P><P>
Some functions are included only for supporting legacy macros. You should not
use any of these functions in any new macro you write. Among these are all
action routines with hyphens in their names; use underscores instead
('find-dialog' -> 'find_dialog').
</P><P>
<PRE>
<B>match()</B>
</PRE>
<B>DEPRECATED</B> Use select_to_matching() instead.
</P><P>
<P><HR>
</P><P>
<A NAME="Rangesets"></A>
<H2> Rangesets </H2>
</P><P>
Rangesets are a tool of the macro language to tag parts, or ranges, of the
text, which shall be viewed as a group. A range is merely a contiguous range
of characters between a start and an end position in the document, and a set
of ranges belonging together is called a rangeset. So, a rangeset is nothing
but an in general non-contiguous part of the text.
</P><P>
Rangesets can be assigned a background color to make them visible: characters
within all ranges of a rangeset will have the background color of the
rangeset. (If more than one rangeset includes a given character, its
background color will be that of the most recently created rangeset which has
a color defined.)
</P><P>
Applications of rangesets are for example:
</P><P>
<UL>
<li>Showing differences between two versions of a file. Then, one rangeset would be those parts of the current file that are not in the prior version.</li>
<li>Highlighting all occurrences of a particular pattern, e.g. showing all the strings 'foobar' in the file.</li>
<li>Highlighting spelling mistakes found by a spell-checker.</li>
</UL>
</P><P>
Rangesets are manipulated only through macro routines. Rangesets must be
created first using the rangeset_create() function, which will return an
identifier for the newly-created (empty) rangeset. This identifier is then
passed to the other rangeset functions to manipulate the rangeset. For
example, ranges are added to a rangeset with the rangeset_add() function.
</P><P>
Notice that the ranges inside a rangeset do not have a particular identity.
Only, they are given a (dynamically changing) numeric index, counting from 1,
in the order of appearance in the text buffer. The ranges are adjusted when
modifications are made to the text buffer: they shift around when characters
are added or deleted staying with the original strings of characters.
However, ranges within a set will coalesce if the characters between them are
removed, or a new range is added to the set which bridges or overlaps
others. For more on this, see "How rangesets change with modifications".
</P><P>
There is a limit to the number of rangesets which can exist at any time -
currently up to 63 in each document. Care should be taken to destroy any
rangesets which are no longer needed, by using the rangeset_destroy()
function, if this limit is attained.
</P><P>
Rangesets can be named: this is useful for macros which need a fixed
identification for rangesets which are used for the same purpose in different
documents. Although a new rangeset's number is arbitrary, its name can be
fixed. This is done using the rangeset_set_name() function. Note that
rangeset names within a particular document may not be unique. For this
reason, the rangeset_get_by_name() function returns an array of identifiers,
which will be empty if the name has not been associated with a rangeset.
</P><P>
<H4>How rangesets change with modifications</H4>
</P><P>
When changes are made to the document text, ranges within each set are altered
with it, according to their behavioral mode. If changes are made outside of
the ranges in a rangeset, each range simply maintains its size and adjusts its
position to match the changes. When text within a range is deleted, the
range's length is reduced by the same amount. When changes involving new text
are made within a range of the set, or to one of the extremities of a range,
different behaviours may be desirable. The rangeset_set_mode() function allows
these modes to be chosen.
</P><P>
Note that the precise behaviour of these modes may change in future versions
of NEdit.
</P><P>
The available modes are:
</P><P>
<B>maintain</B> or <B>ins_del</B> -
Both these modes have the same behaviour. New text added at the front of a
range in a set is not added to the range; new text added within the range or
at the end extends the range. Replacement overlapping an extremity of the
set acts as if the new text were added first, then the old text deleted.
This causes curtailment at the front of the range, extension at the end.
Replacement of the full text of the range removes the range from the set.
The default behaviour for a newly created rangeset is <B>maintain</B>.
</P><P>
<B>del_ins</B> -
New text added at the front or end of a range in a set is not added to the
range; new text added within the range extends the range. Replacement
overlapping an extremity of the set acts as if the old text were deleted
first, then the new text added. This causes curtailment at either end.
Replacement of the full text of the range removes the range from the set.
</P><P>
<B>include</B> -
New text added at the front or end of a range in a set extends the range, as
does new text added within the range. Replacement overlapping an extremity
of the set acts as if the new text were added first, then the old text
deleted. This causes curtailment at the front of the range, extension at
the end. Replacement of the full text of the range adds the new text to the
range if the start position of the replacement is at the range's start
point.
</P><P>
<B>exclude</B> -
New text added at the front or end of a range in a set does not extend the
range; new text added within the range extends the range. Replacement
overlapping an extremity causes curtailment of the range. Replacement of
the full text of the range removes the range from the set.
</P><P>
<B>break</B> -
New text added at the front or end of a range in a set does not extend the
range; new text added within the range will split the range. Replacement
overlapping an extremity causes curtailment of the range. Replacement of
the full text of the range removes the range from the set.
</P><P>
<H4>Notes</H4>
</P><P>
A rangeset is manipulated <I>only</I> through macro routines. Rangesets
can easily become very large, and may exceed the capacity of the running
process. Coloring relies on proper color names or specifications (such as
the "#rrggbb" hexadecimal digit strings), and appropriate hardware support. If
an invalid color name is given, the default background color is used instead.
Behaviours set using rangeset_set_mode() are subject to change in future
versions.
</P><P>
<H3>Rangeset read-only variables</H3>
</P><P>
<PRE>
<B>$rangeset_list</B>
</PRE>
array of active rangeset identifiers, with integer keys starting at 0,
in the order the rangesets were defined.
</P><P>
<H3>Rangeset functions</H3>
</P><P>
<PRE>
<B>rangeset_create()</B>
<B>rangeset_create( n )</B>
</PRE>
Creates one or more new rangesets. The first form creates a single range
set and returns its identifier; if there are no rangesets available it
returns 0. The second form creates n new rangesets, and returns an array
of the rangeset identifiers with keys beginning at 0. If the requested
number of rangesets is not available it returns an empty array.
</P><P>
<PRE>
<B>rangeset_destroy( r )</B>
<B>rangeset_destroy( array )</B>
</PRE>
Deletes all information about a rangeset or a number of rangesets. The
first form destroys the rangeset identified by r. The second form should
be passed an array of rangeset identifiers with keys beginning at 0 (i.e.
the same form of array returned by rangeset_create(n); it destroys all the
rangesets appearing in the array. If any of the rangesets do not exist,
the function continues without errors. Does not return a value.
</P><P>
<PRE>
<B>rangeset_add( r )</B>
<B>rangeset_add( r, start, end )</B>
<B>rangeset_add( r, r0 )</B>
</PRE>
Adds to the rangeset r. The first form adds the range identified by the
current primary selection to the rangeset, unless the selection is
rectangular. The second form adds the range defined by the start and end
positions given. The third form adds all ranges in the rangeset r0 to the
rangeset r, and returns 0.
</P><P>
Returns the index of the newly-added range within the rangeset.
</P><P>
<PRE>
<B>rangeset_subtract( r, [start, end] )</B>
<B>rangeset_subtract( r, r0 )</B>
</PRE>
Removes from the rangeset r. The first form removes the range identified by
the current primary selection from the rangeset, unless start and end are
defined, in which case the range they define is removed. The second form
removes all ranges in the rangeset r0 from the rangeset r. Does not return
a value.
</P><P>
<PRE>
<B>rangeset_invert( r )</B>
</PRE>
Changes the rangeset r so that it contains all ranges not in r. Does not
return a value.
</P><P>
<PRE>
<B>rangeset_get_by_name( name )</B>
</PRE>
Returns an array of active rangeset identifiers, with integer keys starting at 0,
whose name matches name.
</P><P>
<PRE>
<B>rangeset_info( r )</B>
</PRE>
Returns an array containing information about the rangeset r. The array
has the following keys: <B>defined</B> (whether a rangeset with identifier
r is defined), <B>count</B> (the number of ranges in the rangeset), <B>color</B>
(the current background color of the rangeset, an empty string if the
rangeset has no color), <B>name</B> (the user supplied name of the rangeset,
an empty string if the rangeset has no name), and <B>mode</B> (the name of the
modify-response mode of the rangeset).
</P><P>
<PRE>
<B>rangeset_range( r, [index] )</B>
</PRE>
Returns details of a specific range in the rangeset r. The range is
specified by index, which should be between 1 and n (inclusive), where
n is the number of ranges in the rangeset. The return value is an array
containing the keys <B>start</B> (the start position of the range) and <B>end</B>
(the end position of the range). If index is not supplied, the region
returned is the span of the entire rangeset (the region starting at the
start of the first range and ending at the end of the last). If index
is outside the correct range of values, the function returns an empty array.
</P><P>
<PRE>
<B>rangeset_includes( r, pos )</B>
</PRE>
Returns the index of the range in rangeset r which includes pos; returns
0 if pos is not contained in any of the ranges of r. This can also be used
as a simple true/false function which returns true if pos is contained in
the rangeset.
</P><P>
<PRE>
<B>rangeset_set_color( r, color )</B>
</PRE>
Attempts to apply the color as a background color to the ranges of r. If
color is at empty string, removes the coloring of r. No check is made
regarding the validity of color: if the color is invalid (a bad name,
or not supported by the hardware) this has unpredictable effects.
</P><P>
<PRE>
<B>rangeset_set_name( r, name )</B>
</PRE>
Apply the name to the rangeset r.
</P><P>
<PRE>
<B>rangeset_set_mode( r, type )</B>
</PRE>
Changes the behaviour of the rangeset r when modifications to the text
buffer occur. type can be one of the following: "maintain" (the default),
"break", "include", "exclude", "ins_del" or "del_ins". (These modes are
described above.)
</P><P>
<A NAME="Highlighting_Information"></A>
<H2> Highlighting Information </H2>
</P><P>
The user can interrogate the current window to determine the color
highlighting used on a particular piece of text. The following functions
provide information on the highlighting pattern against which text at a
particular position has been matched, its style, color and font attributes
(whether the font is supposed to be bold and/or italic).
</P><P>
These macro functions permit macro writers to generate formatted output which
allows NEdit highlighting to be reproduced. This is suitable for the
generation of HTML or Postscript output, for example.
</P><P>
Note that if any of the functions is used while in Plain mode or while syntax
highlighting is off, the behaviour is undefined.
</P><P>
<PRE>
<B>get_pattern_by_name( pattern_name )</B>
</PRE>
Returns an array containing the pattern attributes for pattern 'pattern_name'.
The elements in this array are:
</P><P>
<UL>
<li><B>style</B> -- Highlight style name</li>
</UL>
</P><P>
If 'pattern_name' is invalid, an empty array is returned.
</P><P>
<PRE>
<B>get_pattern_at_pos( pos )</B>
</PRE>
Returns an array containing the pattern attributes of the character at
position 'pos'. The elements in this array are:
</P><P>
<UL>
<li><B>pattern</B> -- Highlight pattern name</li>
<li><B>style</B> -- Highlight style name</li>
<li><B>extent</B> -- The length in the text which uses the same highlighting pattern</li>
</UL>
</P><P>
The 'extent' value is measured from position 'pos' going right/down (forward
in the file) only.
</P><P>
If 'pos' is invalid, an empty array is returned.
</P><P>
<PRE>
<B>get_style_by_name( style_name )</B>
</PRE>
Returns an array containing the style attributes for style 'style_name'.
The elements in this array are:
</P><P>
<UL>
<li><B>bold</B> -- '1' if style is bold, '0' otherwise</li>
<li><B>italic</B> -- '1' if style is italic, '0' otherwise</li>
<li><B>color</B> -- Name of the style's color</li>
<li><B>background</B> -- Name of the background color, if any</li>
</UL>
</P><P>
The colors use the names specified in the color definitions for the style.
These will either be names matching those the X server recognises, or RGB
(red/green/blue) specifications.
</P><P>
If 'style_name' is invalid, an empty array is returned.
</P><P>
<PRE>
<B>get_style_at_pos( pos )</B>
</PRE>
Returns an array containing the style attributes of the character at
position 'pos'. The elements in this array are:
</P><P>
<UL>
<li><B>style</B> -- Name of the highlight style</li>
<li><B>bold</B> -- '1' if style is bold, '0' otherwise</li>
<li><B>italic</B> -- '1' if style is italic, '0' otherwise</li>
<li><B>color</B> -- Name of the style's color</li>
<li><B>rgb</B> -- Color's RGB values ('#rrggbb')</li>
<li><B>background</B> -- Name of the background color, if any</li>
<li><B>back_rgb</B> -- Background color's RGB values ('#rrggbb')</li>
<li><B>extent</B> -- The length in the text which uses the same highlight style</li>
</UL>
</P><P>
The colors use the names specified in the color definitions for the style.
These will either be names matching those the X server recognises, or RGB
specifications. The values for 'rgb' and 'back_rgb' contain the actual color
values allocated by the X server for the window. If the X server cannot
allocate the specified (named) color exactly, the RGB values in these
entries may not match the specified ones.
</P><P>
The 'extent' value is measured from position 'pos' going right/down (forward
in the file) only.
</P><P>
If 'pos' is invalid, an empty array is returned.
</P><P>
<P><HR>
</P><P>
<A NAME="Action_Routines"></A>
<H2> Action Routines </H2>
</P><P>
All of the editing capabilities of NEdit are represented as a special type of
subroutine, called an action routine, which can be invoked from both macros
and translation table entries (see "<A HREF="#Key_Binding">Key Binding</A>" in the
Customizing section of the Help menu).
</P><P>
<H3>Actions Representing Menu Commands</H3>
</P><P>
<PRE>
File Menu Search Menu
----------------------- -------------------------
new() find()
open() find_dialog()
open_dialog() find_again()
open_selected() find_selection()
close() replace()
save() replace_dialog()
save_as() replace_all()
save_as_dialog() replace_in_selection()
revert_to_saved_dialog() replace_again()
include_file() goto_line_number()
include_file_dialog() goto_line_number_dialog()
load_macro_file() goto_selected()
load_macro_file_dialog() mark()
load_tags_file() mark_dialog()
load_tags_file_dialog() goto_mark()
unload_tags_file() goto_mark_dialog()
load_tips_file() goto_matching()
load_tips_file_dialog() select_to_matching()
unload_tips_file() find_definition()
print() show_tip()
print_selection()
exit() Shell Menu
-------------------------
Edit Menu filter_selection_dialog()
----------------------- filter_selection()
undo() execute_command()
redo() execute_command_dialog()
delete() execute_command_line()
select_all() shell_menu_command()
shift_left()
shift_left_by_tab() Macro Menu
shift_right() -------------------------
shift_right_by_tab() macro_menu_command()
uppercase() repeat_macro()
lowercase() repeat_dialog()
fill_paragraph()
control_code_dialog() Windows Menu
-------------------------
split_pane()
close_pane()
detach_document()
move_document_dialog()
</PRE>
</P><P>
An action representing a menu command is usually named the same as its
corresponding menu item except that all punctuation is removed, all letters
are changed to lower case, and spaces are replaced with underscores. To
present a dialog to ask the user for input, use the actions with the
`_dialog` suffix. Actions without the `_dialog` suffix take the information
from the routine's arguments (see below).
</P><P>
<H3>Menu Action Routine Arguments</H3>
</P><P>
Arguments are text strings enclosed in quotes. Below are the menu action
routines which take arguments. Optional arguments are enclosed in [].
</P><P>
<PRE>
<B>new</B>( ["tab" | "window" | "prefs" | "opposite"] )
</PRE>
</P><P>
<PRE>
<B>close</B>( ["prompt" | "save" | "nosave"] )
</PRE>
</P><P>
<PRE>
<B>execute_command</B>( shell-command )
</PRE>
</P><P>
<PRE>
<B>filter_selection</B>( shell-command )
</PRE>
</P><P>
<PRE>
<B>find</B>( search-string [, <I>search-direction</I>] [, <I>search-type</I>]
[, <I>search-wrap</I>] )
</PRE>
</P><P>
<PRE>
<B>find_again</B>( [<I>search-direction</I>] [, <I>search-wrap</I>] )
</PRE>
</P><P>
<PRE>
<B>find_definition</B>( [tag-name] )
</PRE>
</P><P>
<PRE>
<B>find_dialog</B>( [<I>search-direction</I>] [, <I>search-type</I>]
[, <I>keep-dialog</I>] )
</PRE>
</P><P>
<PRE>
<B>find_selection</B>( [<I>search-direction</I>] [, <I>search-wrap</I>]
[, <I>non-regex-search-type</I>] )
</PRE>
</P><P>
<PRE>
<B>goto_line_number</B>( [<I>line-number</I>] [, <I>column-number</I>] )
</PRE>
</P><P>
<PRE>
<B>goto_mark</B>( <I>mark-letter</I> )
</PRE>
</P><P>
<PRE>
<B>include_file</B>( <I>filename</I> )
</PRE>
</P><P>
<PRE>
<B>load_tags_file</B>( <I>filename</I> )
</PRE>
</P><P>
<PRE>
<B>macro_menu_command</B>( <I>macro-menu-item-name</I> )
</PRE>
</P><P>
<PRE>
<B>mark</B>( <I>mark-letter</I> )
</PRE>
</P><P>
<PRE>
<B>open</B>( <I>filename</I> )
</PRE>
</P><P>
<PRE>
<B>replace</B>( search-string, replace-string,
[, <I>search-direction</I>] [, <I>search-type</I>] [, <I>search-wrap</I>] )
</PRE>
</P><P>
<PRE>
<B>replace_again</B>( [<I>search-direction</I>] [, <I>search-wrap</I>] )
</PRE>
</P><P>
<PRE>
<B>replace_all</B>( search-string, replace-string [, <I>search-type</I>] )
</PRE>
</P><P>
<PRE>
<B>replace_dialog</B>( [<I>search-direction</I>] [, <I>search-type</I>]
[, <I>keep-dialog</I>] )
</PRE>
</P><P>
<PRE>
<B>replace_in_selection</B>( search-string,
replace-string [, <I>search-type</I>] )
</PRE>
</P><P>
<PRE>
<B>save_as</B>( <I>filename</I> )
</PRE>
</P><P>
<PRE>
<B>shell_menu_command</B>( <I>shell-menu-item-name</I> )
</PRE>
</P><P>
<PRE>
<B>unload_tags_file</B>( <I>filename</I> )
</PRE>
</P><P>
<PRE>
<B>----------- Some notes on argument types above -----------</B>
</PRE>
</P><P>
<PRE>
<I>Arguments to new()</I>
"tab": Open a new tab
"window": Open a new window
"prefs": Follow the user's tab/window
preference
"opposite": Opposite of user's tab/window
preference
Default behaviour is "prefs".
</PRE>
</P><P>
<PRE>
<I>filename</I> Path names are relative to the directory from
which NEdit was started. Shell interpreted
wildcards and `~' are not expanded.
</PRE>
</P><P>
<PRE>
<I>keep-dialog</I> Either "keep" or "nokeep".
</PRE>
</P><P>
<PRE>
<I>mark-letter</I> The mark command limits users to single letters. Inside
of macros, single digits are allowed as marks. These
won't interfere with marks set by the user.
</PRE>
</P><P>
<PRE>
<I>macro-menu-item-name</I>
Name of the command exactly as specified in
the Macro Menu dialogs.
</PRE>
</P><P>
<PRE>
<I>non-regex-search-type</I>
Either "literal", "case", "word", or
"caseWord".
</PRE>
</P><P>
<PRE>
<I>search-direction</I>
Either "forward" or "backward".
</PRE>
</P><P>
<PRE>
<I>search-type</I> Either "literal", "case", "word",
"caseWord", "regex", or "regexNoCase".
</PRE>
</P><P>
<PRE>
<I>search-wrap</I> Either "wrap" or "nowrap".
</PRE>
</P><P>
<PRE>
<I>shell-menu-item-name</I>
Name of the command exactly as specified in
the Shell Menu dialogs.
</PRE>
</P><P>
<H3>Window Preferences Actions</H3>
</P><P>
<PRE>
<B>set_auto_indent( "off" | "on" | "smart" )</B>
</PRE>
Set auto indent mode for the current window.
</P><P>
<PRE>
<B>set_em_tab_dist( em-tab-distance )</B>
</PRE>
Set the emulated tab size. An em-tab-distance value of
0 or less translates to no emulated tabs. Em-tab-distance must
be smaller than 1000.
</P><P>
<PRE>
<B>set_fonts( font-name, italic-font-name, bold-font-name, bold-italic-font-name )</B>
</PRE>
Set all the fonts used for the current window.
</P><P>
<PRE>
<B>set_highlight_syntax( [0 | 1] )</B>
</PRE>
Set syntax highlighting mode for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_incremental_backup( [0 | 1] )</B>
</PRE>
Set incremental backup mode for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_incremental_search_line( [0 | 1] )</B>
</PRE>
Show or hide the incremental search line for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_language_mode( language-mode )</B>
</PRE>
Set the language mode for the current window. If the language mode is
"" or unrecognized, it will be set to Plain.
</P><P>
<PRE>
<B>set_locked( [0 | 1] )</B>
</PRE>
This only affects the locked status of a file, not its read-only
status. Permissions are <I>not</I> changed.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_make_backup_copy( [0 | 1] )</B>
</PRE>
Set whether backup copies are made during saves for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_overtype_mode( [0 | 1] )</B>
</PRE>
Set overtype mode for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_show_line_numbers( [0 | 1] )</B>
</PRE>
Show or hide line numbers for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_show_matching( "off" | "delimiter" | "range" )</B>
</PRE>
Set show matching (...) mode for the current window.
</P><P>
<PRE>
<B>set_match_syntax_based( [0 | 1] )</B>
</PRE>
Set whether matching should be syntax based for the current window.
</P><P>
<PRE>
<B>set_statistics_line( [0 | 1] )</B>
</PRE>
Show or hide the statistics line for the current window.
A value of 0 turns it off and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_tab_dist( tab-distance )</B>
</PRE>
Set the size of hardware tab spacing. Tab-distance must
be a value greater than 0 and no greater than 20.
</P><P>
<PRE>
<B>set_use_tabs( [0 | 1] )</B>
</PRE>
Set whether tab characters are used for the current window. A value of 0
turns it off (using space characters instead) and a value of 1 turns it on.
If no parameters are supplied the option is toggled.
</P><P>
<PRE>
<B>set_wrap_margin( wrap-width )</B>
</PRE>
Set the wrap width for text wrapping of the current window. A value
of 0 means to wrap at window width.
</P><P>
<PRE>
<B>set_wrap_text( "none" | "auto" | "continuous" )</B>
</PRE>
Set wrap text mode for the current window.
</P><P>
<H3>Keyboard-Only Actions</H3>
</P><P>
In addition to the arguments listed in the call descriptions below, any
routine involving cursor movement can take the argument "extend", meaning,
adjust the primary selection to the new cursor position. Routines which take
the "extend" argument as well as mouse dragging operations for both primary
and secondary selections can take the optional keyword "rect", meaning, make
the selection rectangular. Any routine that accepts the "scrollbar" argument
will move the display but not the cursor or selection. Routines that accept
the "nobell" argument will fail silently without beeping, when that argument
is supplied.
</P><P>
<PRE>
<B>backward_character( ["nobell"] )</B>
</PRE>
Moves the cursor one character to the left.
</P><P>
<PRE>
<B>backward_paragraph(["nobell"] )</B>
</PRE>
Moves the cursor to the beginning of the paragraph, or
if the cursor is already at the beginning of a paragraph, moves the cursor to
the beginning of the previous paragraph. Paragraphs are defined as regions
of text delimited by one or more blank lines.
</P><P>
<PRE>
<B>backward_word( ["nobell"] )</B>
</PRE>
Moves the cursor to the beginning of a word, or, if the
cursor is already at the beginning of a word, moves the cursor to the
beginning of the previous word. Word delimiters are user-settable, and
defined by the X resource wordDelimiters.
</P><P>
<PRE>
<B>beginning_of_file( ["scrollbar"] )</B>
</PRE>
Moves the cursor to the beginning of the file.
</P><P>
<PRE>
<B>beginning_of_line( ["absolute"] )</B>
</PRE>
Moves the cursor to the beginning of the line. If
"absolute" is given, always moves to the absolute beginning of line,
regardless of the text wrapping mode.
</P><P>
<PRE>
<B>beginning_of_selection()</B>
</PRE>
Moves the cursor to the beginning of the selection
without disturbing the selection.
</P><P>
<PRE>
<B>copy_clipboard()</B>
</PRE>
Copies the current selection to the clipboard.
</P><P>
<PRE>
<B>copy_primary()</B>
</PRE>
Copies the primary selection to the cursor.
</P><P>
<PRE>
<B>copy_to()</B>
</PRE>
If a secondary selection exists, copies the secondary selection to
the cursor. If no secondary selection exists, copies the primary selection
to the pointer location.
</P><P>
<PRE>
<B>copy_to_or_end_drag()</B>
</PRE>
Completes either a secondary selection operation, or a
primary drag. If the user is dragging the mouse to adjust a secondary
selection, the selection is copied and either inserted at the cursor
location, or, if pending-delete is on and a primary selection exists in the
window, replaces the primary selection. If the user is dragging a block of
text (primary selection), completes the drag operation and leaves the text at
its current location.
</P><P>
<PRE>
<B>cut_clipboard()</B>
</PRE>
Deletes the text in the primary selection and places it in
the clipboard.
</P><P>
<PRE>
<B>cut_primary()</B>
</PRE>
Copies the primary selection to the cursor and deletes it at
its original location.
</P><P>
<PRE>
<B>delete_selection()</B>
</PRE>
Deletes the contents of the primary selection.
</P><P>
<PRE>
<B>delete_next_character( ["nobell"] )</B>
</PRE>
If a primary selection exists, deletes its contents.
Otherwise, deletes the character following the cursor.
</P><P>
<PRE>
<B>delete_previous_character( ["nobell"] )</B>
</PRE>
If a primary selection exists, deletes its
contents. Otherwise, deletes the character before the cursor.
</P><P>
<PRE>
<B>delete_next_word( ["nobell"] )</B>
</PRE>
If a primary selection exists, deletes its contents.
Otherwise, deletes the word following the cursor.
</P><P>
<PRE>
<B>delete_previous_word( ["nobell"] )</B>
</PRE>
If a primary selection exists, deletes its contents.
Otherwise, deletes the word before the cursor.
</P><P>
<PRE>
<B>delete_to_start_of_line( ["nobell", "wrap"] )</B>
</PRE>
If a primary selection exists, deletes its contents. Otherwise, deletes the
characters between the cursor and the start of the line. If "wrap" is
given, deletes to the previous wrap point or beginning of line, whichever
is closest.
</P><P>
<PRE>
<B>delete_to_end_of_line( ["nobell", "absolute"] )</B>
</PRE>
If a primary selection exists, deletes its contents.
Otherwise, deletes the characters between the cursor and the end of the line.
If "absolute" is given, always deletes to the absolute end of line, regardless
of the text wrapping mode.
</P><P>
<PRE>
<B>deselect_all()</B>
</PRE>
De-selects the primary selection.
</P><P>
<PRE>
<B>end_of_file( ["scrollbar"] )</B>
</PRE>
Moves the cursor to the end of the file.
</P><P>
<PRE>
<B>end_of_line( ["absolute"] )</B>
</PRE>
Moves the cursor to the end of the line. If
"absolute" is given, always moves to the absolute end of line, regardless
of the text wrapping mode.
</P><P>
<PRE>
<B>end_of_selection()</B>
</PRE>
Moves the cursor to the end of the selection without
disturbing the selection.
</P><P>
<PRE>
<B>exchange( ["nobell"] )</B>
</PRE>
Exchange the primary and secondary selections.
</P><P>
<PRE>
<B>extend_adjust()</B>
</PRE>
Attached mouse-movement events to begin a selection between
the cursor and the mouse, or extend the primary selection to the mouse
position.
</P><P>
<PRE>
<B>extend_end()</B>
</PRE>
Completes a primary drag-selection operation.
</P><P>
<PRE>
<B>extend_start()</B>
</PRE>
Begins a selection between the cursor and the mouse. A
drag-selection operation can be started with either extend_start or
grab_focus.
</P><P>
<PRE>
<B>focus_pane( [relative-pane] | [positive-index] | [negative-index] )</B>
</PRE>
Move the focus to the requested pane.
Arguments can be specified in the form of a relative-pane
("first", "last", "next", "previous"), a positive-index
(numbers greater than 0, 1 is the same as "first") or a
negative-index (numbers less than 0, -1 is the same as "last").
</P><P>
<PRE>
<B>forward_character()</B>
</PRE>
Moves the cursor one character to the right.
</P><P>
<PRE>
<B>forward_paragraph( ["nobell"] )</B>
</PRE>
Moves the cursor to the beginning of the next paragraph.
Paragraphs are defined as regions of text delimited by one or more blank
lines.
</P><P>
<PRE>
<B>forward_word( ["tail"] ["nobell"] )</B>
</PRE>
Moves the cursor to the beginning of the next word. Word
delimiters are user-settable, and defined by the X resource wordDelimiters.
If the "tail" argument is supplied the cursor will be moved to
the end of the current word or the end of the next word, if the
cursor is between words.
</P><P>
<PRE>
<B>grab_focus()</B>
</PRE>
Moves the cursor to the mouse pointer location, and prepares for
a possible drag-selection operation (bound to extend_adjust), or multi-click
operation (a further grab_focus action). If a second invocation of grab
focus follows immediately, it selects a whole word, or a third, a whole line.
</P><P>
<PRE>
<B>insert_string( "string" )</B>
</PRE>
If pending delete is on and the cursor is inside the
selection, replaces the selection with "string". Otherwise, inserts "string"
at the cursor location.
</P><P>
<PRE>
<B>key_select( "direction" [,"nobell"] )</B>
</PRE>
Moves the cursor one character in "direction"
("left", "right", "up", or "down") and extends the selection. Same as
forward/backward-character("extend"), or process-up/down("extend"), for
compatibility with previous versions.
</P><P>
<PRE>
<B>move-destination()</B>
</PRE>
Moves the cursor to the pointer location without
disturbing the selection. (This is an unusual way of working. We left it in
for compatibility with previous versions, but if you actually use this
capability, please send us some mail, otherwise it is likely to disappear in
the future.
</P><P>
<PRE>
<B>move_to()</B>
</PRE>
If a secondary selection exists, deletes the contents of the
secondary selection and inserts it at the cursor, or if pending-delete is on
and there is a primary selection, replaces the primary selection. If no
secondary selection exists, moves the primary selection to the pointer
location, deleting it from its original position.
</P><P>
<PRE>
<B>move_to_or_end_drag()</B>
</PRE>
Completes either a secondary selection operation, or a
primary drag. If the user is dragging the mouse to adjust a secondary
selection, the selection is deleted and either inserted at the cursor
location, or, if pending-delete is on and a primary selection exists in the
window, replaces the primary selection. If the user is dragging a block of
text (primary selection), completes the drag operation and deletes the text
from its current location.
</P><P>
<PRE>
<B>newline()</B>
</PRE>
Inserts a newline character. If Auto Indent is on, lines up the
indentation of the cursor with the current line.
</P><P>
<PRE>
<B>newline_and_indent()</B>
</PRE>
Inserts a newline character and lines up the indentation
of the cursor with the current line, regardless of the setting of Auto
Indent.
</P><P>
<PRE>
<B>newline_no_indent()</B>
</PRE>
Inserts a newline character, without automatic
indentation, regardless of the setting of Auto Indent.
</P><P>
<PRE>
<B>next_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )</B>
</PRE>
Moves the cursor and scroll forward one page.
The parameter "stutter" moves the cursor to the bottom of the display,
unless it is already there, otherwise it will page down.
The parameter "column" will maintain the preferred column while
moving the cursor.
</P><P>
<PRE>
<B>page_left( ["scrollbar"] ["nobell"] )</B>
</PRE>
Move the cursor and scroll left one page.
</P><P>
<PRE>
<B>page_right( ["scrollbar"] ["nobell"] )</B>
</PRE>
Move the cursor and scroll right one page.
</P><P>
<PRE>
<B>paste_clipboard()</B>
</PRE>
Insert the contents of the clipboard at the cursor, or if
pending delete is on, replace the primary selection with the contents of the
clipboard.
</P><P>
<PRE>
<B>previous_page( ["stutter"] ["column"] ["scrollbar"] ["nobell"] )</B>
</PRE>
Moves the cursor and scroll backward one page.
The parameter "stutter" moves the cursor to the top of the display,
unless it is already there, otherwise it will page up.
The parameter "column" will maintain the preferred column while
moving the cursor.
</P><P>
<PRE>
<B>process_bdrag()</B>
</PRE>
Same as secondary_or_drag_start for compatibility with previous versions.
</P><P>
<PRE>
<B>process_cancel()</B>
</PRE>
Cancels the current extend_adjust, secondary_adjust, or
secondary_or_drag_adjust in progress.
</P><P>
<PRE>
<B>process_down( ["nobell", "absolute"] )</B>
</PRE>
Moves the cursor down one line. If "absolute" is given, always moves to the
next line in the text buffer, regardless of wrapping.
</P><P>
<PRE>
<B>process_return()</B>
</PRE>
Same as newline for compatibility with previous versions.
</P><P>
<PRE>
<B>process_shift_down( ["nobell", "absolute"] )</B>
</PRE>
Same as process_down("extend") for compatibility with previous versions.
</P><P>
<PRE>
<B>process_shift_up( ["nobell", "absolute"] )</B>
</PRE>
Same as process_up("extend") for compatibility with previous versions.
</P><P>
<PRE>
<B>process_tab()</B>
</PRE>
If tab emulation is turned on, inserts an emulated tab,
otherwise inserts a tab character.
</P><P>
<PRE>
<B>process_up( ["nobell", "absolute"] )</B>
</PRE>
Moves the cursor up one line. If "absolute" is given, always moves to the
previous line in the text buffer, regardless of wrapping.
</P><P>
<PRE>
<B>raise_window([relative-window] | [positive-index] | [negative-index] [, "focus" | "nofocus"])</B>
</PRE>
Raise the current focused window to the front if no argument is supplied.
Arguments can be specified in the form of a relative-window
("first", "last", "next", "previous"), a positive-index
(numbers greater than 0, 1 is the same as "last") or a
negative-index (numbers less than 0, -1 is the same as "first").
</P><P>
Moreover, it can be specified whether or not the raised window should
request the X input focus. By default, it depends on the setting of the
nedit.focusOnRaise resource (see the section "<A HREF="#X_Resources">X Resources</A>") whether or not
the input focus is requested.
</P><P>
<PRE>
<B>scroll_down( nUnits, ["lines" | "pages"] )</B>
</PRE>
Scroll the display down (towards the end of the file) by a given
number of units, units being lines or pages. Default units are lines.
</P><P>
<PRE>
<B>scroll_left( nPixels )</B>
</PRE>
Scroll the display left by nPixels.
</P><P>
<PRE>
<B>scroll_right( nPixels )</B>
</PRE>
Scroll the display right by nPixels.
</P><P>
<PRE>
<B>scroll_up( nUnits, ["lines" | "pages"] )</B>
</PRE>
Scroll the display up (towards the beginning of the file) by a given
number of units, units being lines or pages. Default units are lines.
</P><P>
<PRE>
<B>scroll_to_line( lineNum )</B>
</PRE>
Scroll to position line number lineNum at the top of
the pane. The first line of a file is line 1.
</P><P>
<PRE>
<B>secondary_adjust()</B>
</PRE>
Attached mouse-movement events to extend the secondary
selection to the mouse position.
</P><P>
<PRE>
<B>secondary_or_drag_adjust()</B>
</PRE>
Attached mouse-movement events to extend the
secondary selection, or reposition the primary text being dragged. Takes two
optional arguments, "copy", and "overlay". "copy" leaves a copy of the
dragged text at the site at which the drag began. "overlay" does the drag in
overlay mode, meaning the dragged text is laid on top of the existing text,
obscuring and ultimately deleting it when the drag is complete.
</P><P>
<PRE>
<B>secondary_or_drag_start()</B>
</PRE>
To be attached to a mouse down event. Begins drag
selecting a secondary selection, or dragging the contents of the primary
selection, depending on whether the mouse is pressed inside of an existing
primary selection.
</P><P>
<PRE>
<B>secondary_start()</B>
</PRE>
To be attached to a mouse down event. Begin drag selecting
a secondary selection.
</P><P>
<PRE>
<B>select_all()</B>
</PRE>
Select the entire file.
</P><P>
<PRE>
<B>self_insert()</B>
</PRE>
To be attached to a key-press event, inserts the character
equivalent of the key pressed.
</P><P>
<P><HR>
</P><P>
<A NAME="Customizing"></A>
<H1> Customizing </H1>
</P><P>
<A NAME="Customizing_NEdit"></A>
<H2> Customizing NEdit </H2>
</P><P>
NEdit can be customized in many different ways. The most important
user-settable options are presented in the Preferences menu, including all
options that users might need to change during an editing session. Options
set in the Default Settings sub-menu of the Preferences menu can be preserved
between sessions by selecting Save Defaults, which writes the changes to the
preferences file. See the section titled "<A HREF="#Preferences">Preferences</A>" for more details.
</P><P>
User defined commands can be added to NEdit's Shell, Macro, and window
background menus. Dialogs for creating items in these menus can be found
under Customize Menus in the Default Settings sub menu of the Preferences
menu.
</P><P>
For users who depend on NEdit every day and want to tune every excruciating
detail, there are also X resources for tuning a vast number of such details,
down to the color of each individual button. See the section "<A HREF="#X_Resources">X Resources</A>"
for more information, as well as a list of selected resources.
</P><P>
The most common reason for customizing your X resources for NEdit, however, is
key binding. While limited key binding can be done through Preferences
settings (Preferences -> Default Settings -> Customize Menus), you can really
only add keys this way, and each key must have a corresponding menu item.
Any significant changes to key binding should be made via the Translations
resource and menu accelerator resources. The sections titled "<A HREF="#Key_Binding">Key Binding</A>"
and "<A HREF="#X_Resources">X Resources</A>" have more information.
<P><HR>
</P><P>
<A NAME="Preferences"></A>
<H2> Preferences </H2>
</P><P>
The Preferences menu allows you to set options for both the current editing
window, and default values for newly created windows and future NEdit
sessions. Options in the Preferences menu itself (not in the Default
Settings sub-menu) take effect immediately and refer to the current window
only. Options in the Default Settings sub-menu provide initial settings for
future windows created using the New or Open commands; options affecting all
windows are also set here.
</P><P>
Preferences set in the Default Settings sub-menu are saved in a file that
NEdit reads at startup time, cf. <A HREF="#automatically">Autoload Files</A>, by selecting Save Defaults.
</P><P>
<H3>Preferences Menu</H3>
</P><P>
<PRE>
<B>Default Settings</B>
</PRE>
Menu of initial settings for future windows. Generally the same as the
options in the main part of the menu, but apply as defaults for future
windows created during this NEdit session. These settings can be saved using
the Save Defaults command below, to be loaded automatically each time NEdit
is started.
</P><P>
<PRE>
<B>Save Defaults</B>
</PRE>
Save the default options as set under Default Settings for future NEdit
sessions.
</P><P>
<PRE>
<B>Statistics Line</B>
</PRE>
Show the full file name, line number, and length of the file being edited.
</P><P>
<PRE>
<B>Incremental Search Line</B>
</PRE>
Keep the incremental search bar (Search -> Find Incremental) permanently
displayed at the top of the window.
</P><P>
<PRE>
<B>Show Line Numbers</B>
</PRE>
Display line numbers to the right of the text.
</P><P>
<PRE>
<B>Language Mode</B>
</PRE>
Tells NEdit what language (if any) to assume, for selecting language-specific
features such as highlight patterns and smart indent macros, and setting
language specific preferences like word delimiters, tab emulation, and
auto-indent. See <A HREF="#Programming_with_NEdit">Programming with NEdit</A> for more information.
</P><P>
<PRE>
<B>Auto Indent</B>
</PRE>
Setting Auto Indent "on" maintains a running indent (pressing the Return key
will line up the cursor with the indent level of the previous line). If
smart indent macros are available for the current language mode, smart indent
can be selected and NEdit will attempt to guess proper language indentation
for each new line, cf. <A HREF="#Auto/Smart_Indent">Auto/Smart Indent</A>.
</P><P>
<PRE>
<B>Wrap</B>
</PRE>
Choose between two styles of automatic wrapping or none. Auto Newline wrap,
wraps text at word boundaries when the cursor reaches the right margin, by
replacing the space or tab at the last word boundary with a newline
character. Continuous Wrap wraps long lines which extend past the right
margin. Continuous Wrap mode is typically used to produce files where
newlines are omitted within paragraphs, to make text filling automatic (a
kind of poor-man's word processor). Text of this style is common on Macs and
PCs but is not necessarily supported very well under Unix (except in programs
which deal with e-mail, for which it is often the format of choice).
</P><P>
<PRE>
<B>Wrap Margin</B>
</PRE>
Set margin for Auto Newline Wrap, Continuous Wrap, and Fill Paragraph. Lines
may, be wrapped at the right margin of the window, or the margin can be set
at a specific column.
</P><P>
<PRE>
<B>Tab Stops</B>
</PRE>
Set the tab distance (number of characters between tab stops) for tab
characters, and control tab emulation and use of tab characters in padding
and emulated tabs.
</P><P>
<PRE>
<B>Text Font...</B>
</PRE>
Change the font(s) used to display text (fonts for menus and dialogs must be
set using X resources for the text area of the window). See below for more
information.
</P><P>
<PRE>
<B>Highlight Syntax</B>
</PRE>
If NEdit recognizes the language being edited, and highlighting patterns are
available for that language, use fonts and colors to enhance viewing of the
file. (See <A HREF="#Syntax_Highlighting">Syntax Highlighting</A> for more information.)
</P><P>
<PRE>
<B>Make Backup Copy</B>
</PRE>
On Save, write a backup copy of the file as it existed before the Save
command with the extension .bck (Unix only).
</P><P>
<PRE>
<B>Incremental Backup</B>
</PRE>
Periodically make a backup copy of the file being edited under the name
`~filename` on Unix or `_filename` on VMS (see <A HREF="#Crash_Recovery">Crash Recovery</A>).
</P><P>
<PRE>
<B>Show Matching (..)</B>
</PRE>
Momentarily highlight matching parenthesis, brackets, and braces, or the
range between them, when one of these characters is typed, or when the
insertion cursor is positioned after it. Delimiter only highlights the
matching delimiter, while Range highlights the whole range of text between
the matching delimiters.
</P><P>
Optionally, the matching can make use of syntax information if syntax
highlighting is enabled. Alternatively, the matching is purely character
based. In general, syntax based matching results in fewer false matches.
</P><P>
<PRE>
<B>Overtype</B>
</PRE>
In overtype mode, new characters entered replace the characters in front of
the insertion cursor, rather than being inserted before them.
</P><P>
<PRE>
<B>Read Only</B>
</PRE>
Lock the file against accidental modification. This temporarily prevents the
file from being modified in this NEdit session. Note that this is different
from setting the file protection.
</P><P>
<H3>Preferences -> Default Settings Menu</H3>
</P><P>
Options in the Preferences -> Default Settings menu have the same meaning as
those in the top-level Preferences menu, except that they apply to future
NEdit windows and future NEdit sessions if saved with the Save Defaults
command. Additional options which appear in this menu are:
</P><P>
<PRE>
<B>Language Modes</B>
</PRE>
Define language recognition information (for determining language mode from
file name or content) and set language specific preferences.
</P><P>
<PRE>
<B>Tag Collisions</B>
</PRE>
How to react to multiple tags for the same name. Tags are described in the
section: <A HREF="#Finding_Declarations_(ctags)">Finding Declarations (ctags)</A>. In Show All mode, all matching tags
are displayed in a dialog. In Smart mode, if one of the matching tags is in
the current window, that tag is chosen, without displaying the dialog.
</P><P>
<PRE>
<B>Command Shell...</B>
</PRE>
Set the shell used to run programs from the shell_command() macro function
and from the Shell menu. This defaults to the user's login shell.
</P><P>
<PRE>
<B>Colors...</B>
</PRE>
Change the colors used to display text. The "Matching (..)" fields change the
colors that matching parens, brackets and braces are flashed when the "Show
Matching (..)" option is enabled. Note that the foreground colors for plain
text, selected text, and matching paren flashing only apply when syntax
highlighting is disabled. When syntax highlighting is enabled, text (even
text that appears plain) will always be colored according to its highlighting
style. (For information on changing syntax highlighting styles and matching
patterns use see <A HREF="#Syntax_Highlighting">Syntax Highlighting</A>.)
</P><P>
<PRE>
<B>Customize Menus</B>
</PRE>
Add/remove items from the Shell, Macro, and window background menus (see
below).
</P><P>
<PRE>
<B>Customize Window Title</B>
</PRE>
Opens a dialog where the information to be displayed in the window's title
field can be defined and tested. The dialog contains a Help button, providing
further information about the options available.
</P><P>
<PRE>
<B>Searching</B>
</PRE>
Options for controlling the behavior of Find and Replace commands:
</P><P>
<I>Verbose</I> -
Presents search results in dialog form, asks before wrapping a
search back around the beginning (or end) of the file
(unless Beep On Search Wrap is turned on).
</P><P>
<I>Wrap Around</I> -
Search and Replace operations wrap around the beginning (or end) of the file.
</P><P>
<I>Beep On Search Wrap</I> -
Beep when Search and Replace operations wrap around the beginning (or end) of
the file (only if Wrap Around is turned on).
</P><P>
<I>Keep Dialogs Up</I> -
Don't pop down Replace and Find boxes after searching.
</P><P>
<I>Default Search Style</I> -
Initial setting for search type in Find and Replace dialogs.
</P><P>
<I>Default Replace Scope</I> -
[THIS OPTION IS ONLY PRESENT WHEN NEDIT WAS COMPILED WITH THE
<PRE>
-DREPLACE_SCOPE FLAG TO SELECT AN ALTERNATIVE REPLACE DIALOG LAYOUT.]
</PRE>
</P><P>
Initial setting for the scope in the Replace/Find dialog, when a selection
exists. It can be either "In Window", "In Selection", or "Smart". "Smart"
results in "In Window" if the size of the selection is smaller than 1 line,
and to "In Selection" otherwise.
</P><P>
<PRE>
<B>Syntax Highlighting</B>
</PRE>
Program and configure enhanced text display for new or supported languages.
(See <A HREF="#Syntax_Highlighting">Syntax Highlighting</A>.)
</P><P>
<PRE>
<B>Tabbed Editing</B>
</PRE>
Options for controlling the tabbed interface:
</P><P>
<I>Open File in New Tab</I> -
Open files in new tabs, else open files in new windows.
</P><P>
<I>Show Tab Bar</I> -
Show/Hide the tab bar.
</P><P>
<I>Hide Tab Bar when only one Document is open</I>
</P><P>
<I>Next/Prev Tabs Across Windows</I> -
Suppose there are two windows with three tabs in the first window and two tabs in
the second window. Enabling this option, if you are on the third tab in the
first window, hitting Ctrl+PageDown would switch to the first tab in the second
window (instead of switching to the first tab in the first window).
</P><P>
<I>Sort Tabs Alphabetically</I>
</P><P>
<PRE>
<B>Show Tooltips</B>
</PRE>
Show file name and path in a tooltip when moving the mouse pointer over a tab.
(See <A HREF="#Tabbed_Editing">Tabbed Editing</A>.)
</P><P>
<PRE>
<B>Terminate with Line Break on Save</B>
</PRE>
Some UNIX tools expect that files end with a line feed. If this option is
activated, NEdit will append one if required.
</P><P>
<PRE>
<B>Sort Open Prev. Menu</B>
</PRE>
Option to order the File -> Open Previous menu alphabetically, versus in
order of last access.
</P><P>
<PRE>
<B>Popups Under Pointer</B>
</PRE>
Display pop-up dialogs centered on the current mouse position, as opposed to
centered on the parent window. This generally speeds interaction, and is
essential for users who set their window managers so keyboard focus
follows the mouse.
</P><P>
<PRE>
<B>Auto-Scroll Near Window Top/Bottom</B>
</PRE>
When this option is enabled the window will automatically scroll when the
cursor comes 4 lines from the top or bottom of the window (except at the
beginning of the file). The number of lines can be customized with the
nedit.autoScrollVPadding resource.
</P><P>
<PRE>
<B>Warnings</B>
</PRE>
Options for controlling the popping up of warning dialogs:
</P><P>
<I>File Modified Externally</I> -
Pop up a warning dialog when files get changed external to NEdit.
</P><P>
<I>Check Modified File Contents</I> -
If external file modification warnings are requested, also check the file
contents iso. only the modification date.
</P><P>
<I>On Exit</I> -
Ask before exiting when two or more files are open in an NEdit session
or before closing a window with two or more tabs.
</P><P>
<PRE>
<B>Initial Window Size</B>
</PRE>
Default size for new windows.
</P><P>
<H3>Changing Font(s)</H3>
</P><P>
The font used to display text in NEdit is set under Preferences -> Text Font
(for the current window), or Preferences -> Default Settings Text Font (for
future windows). These dialogs also allow you to set fonts for syntax
highlighting. If you don't intend to use syntax highlighting, you can ignore
most of the dialog, and just set the field labeled Primary Font.
</P><P>
Unless you are absolutely certain about the types of files that you will be
editing with NEdit, you should choose a fixed-spacing font. Many, if not
most, plain-text files are written expecting to be viewed with fixed
character spacing, and will look wrong with proportional spacing. NEdit's
filling, wrapping, and rectangular operations will also work strangely if you
choose a proportional font.
</P><P>
Note that in the font browser (the dialog brought up by the Browse...
button), the subset of fonts which are shown is narrowed depending on the
characteristics already selected. It is therefore important to know that you
can unselect characteristics from the lists by clicking on the selected items
a second time.
</P><P>
Fonts for syntax highlighting should ideally match the primary font in both
height and spacing. A mismatch in spacing will result in similar distortions
as choosing a proportional font: column alignment will sometimes look wrong,
and rectangular operations, wrapping, and filling will behave strangely. A
mismatch in height will cause windows to re-size themselves slightly when
syntax highlighting is turned on or off, and increase the inter-line spacing
of the text. Unfortunately, on some systems it is hard to find sets of fonts
which match exactly in height.
</P><P>
<H3>Customizing Menus</H3>
</P><P>
You can add or change items in the Shell, Macro, and window background menus
under Preferences -> Default Settings -> Customize Menus. When you choose
one of these, you will see a dialog with a list of the current
user-configurable items from the menu on the left. To change an existing
item, select it from the list, and its properties will appear in the
remaining fields of the dialog, where you may change them. Selecting the
item "New" from the list allows you to enter new items in the menu.
</P><P>
Hopefully most of the characteristics are self explanatory, but here are a
few things to note:
</P><P>
Accelerator keys are keyboard shortcuts which appear on the right hand side
of the menus, and allow you avoid pulling down the menu and activate the
command with a single keystroke. Enter accelerators by typing the keys
exactly as you would to activate the command.
</P><P>
Mnemonics are a single letter which should be part of the menu item name,
which allow users to traverse and activate menu items by typing keys when the
menu is pulled down.
</P><P>
In the Shell Command field of the Shell Commands dialog, the % character
expands to the name (including directory path) of the file in the window. To
include a % character in the command, use %%.
</P><P>
The Menu Entry field can contain special characters for constructing
hierarchical sub-menus, and for making items which appear only in certain
language modes. The right angle bracket character ">" creates a sub-menu.
The name of the item itself should be the last element of the path formed
from successive sub-menu names joined with ">". Menu panes are called in to
existence simply by naming them as part of a Menu Entry name. To put several
items in the same sub-menu, repeat the same hierarchical sequence for each.
For example, in the Macro Commands dialog, two items with menu entries: a>b>c
and a>b>d would create a single sub menu under the macro menu called "a",
which would contain a single sub-menu, b, holding the actual items, c and d:
</P><P>
<PRE>
+---++---++---+
|a >||b >||c |
+---++---+|d |
+---+
</PRE>
</P><P>
To qualify a menu entry with a language mode, simply add an at-sign "@" at
the end of the menu command, followed (no space) by a language mode name. To
make a menu item which appears in several language modes, append additional
@s and language mode names. For example, an item with the menu entry:
</P><P>
<PRE>
Make C Prototypes@C@C++
</PRE>
</P><P>
would appear only in C and C++ language modes, and:
</P><P>
<PRE>
Make Class Template@C++
</PRE>
</P><P>
would appear only in C++ mode.
</P><P>
Menu items with no qualification appear in all language modes.
</P><P>
If a menu item is followed by the single language qualification "@*", that
item will appear only if there are no applicable language-specific items of
the same name in the same submenu. For example, if you have the following
three entries in the same menu:
</P><P>
<PRE>
Make Prototypes@C@C++
Make Prototypes@Java
Make Prototypes@*
</PRE>
</P><P>
The first will be available when the language mode is C or C++, the second
when the language mode is Java, and for all other language modes (including
the "Plain" non-language mode). If the entry:
</P><P>
<PRE>
Make Prototypes
</PRE>
</P><P>
also exists, this will always appear, meaning that the menu will always have
two "Make Prototypes" entries, whatever the language mode.
</P><P>
<H3>The NEdit Autoload Files</H3>
</P><P>
<A NAME="automatically"></A>
At startup time, NEdit automatically reads the preferences file
`nedit.rc', the autoload macro file `autoload.nm', and the history data base
`nedit.history'. The preferences file contains saved preferences (menu
settings) in the format of an X resource file. The autoload macro file is a
macro file containing macro commands and definitions that NEdit will
execute at startup. (NEdit doesn't create this file automatically.)
Moreover, NEdit saves a list of the recently opened files, which appear under
the Open Previous menu, in the history data base.
</P><P>
By default the location of these files is '$HOME/.nedit/'. A different
directory can be given by letting the environment variable NEDIT_HOME
point to it.
</P><P>
Notice that NEdit still supports the older names for these files, which are
`$HOME/.nedit', `$HOME/.neditmacro', and `$HOME/.neditdb', respectively. This
old naming scheme will be used if NEdit detects that `$HOME/.nedit' is a
regular file and NEDIT_HOME isn't set.
</P><P>
(For VMS, the location of these files is '$NEDIT_HOME/' if NEDIT_HOME is set,
and 'SYS$LOGIN:' otherwise.)
</P><P>
The contents of the preferences file can be moved into another X resource
file (see <A HREF="#X_Resources">X Resources</A>). One reason for doing so would be to attach server
specific preferences, such as a default font, to a particular X server.
Another reason for moving preferences into an X resource file would be to
keep preferences menu options and X resource settable options together in
one place. Though the files are the same format, additional resources
should not be added to the preferences file, since NEdit modifies that file
by overwriting it completely. Note also that the contents of the
preferences file takes precedence over the values in an X resource file.
Using Save Defaults after moving the contents of your preferences file to
your .Xdefaults file will re-create the preferences file, interfering with
the options that you have moved.
</P><P>
<H3>Sharing Customizations with Other NEdit Users</H3>
</P><P>
If you have written macro or shell menu commands, highlight patterns, or
smart-indent macros that you want to share with other NEdit users, you can
make a file which they can load into their NEdit environment.
</P><P>
To load such a file, start NEdit with the command:
</P><P>
<PRE>
nedit -import <file>
</PRE>
</P><P>
In the new NEdit session, verify that the imported patterns or macros do what
you want, then select Preferences -> Save Defaults. Saving incorporates the
changes into the NEdit preferences file, so the next time you run NEdit, you
will not have to import the distribution file.
</P><P>
Loading a customization file is automated, but creating one is not. To
produce a file to be imported by other users, you must make a copy of your own
preferences file, and edit it, by hand, to remove everything but the
few items of interest to the recipient. Leave only the individual
resource(s), and within those resources, only the particular macro, pattern,
style, etc, that you wish to exchange.
</P><P>
For example, to share a highlighting pattern set, you would include the
patterns, any new styles you added, and language mode information only if the
patterns are intended to support a new language rather than updating an
existing one. For example:
</P><P>
<PRE>
nedit.highlightPatterns:\
My Language:1:0{\n\
Comment:"#":"$"::Comment::\n\
Loop Header:"^[ \\t]*loop:":::Loop::\n\
}
nedit.languageModes: My Language:.my::::::
nedit.styles: Loop:blue:Bold
</PRE>
</P><P>
Resources are in the format of X resource files, but the format of text
within multiple-item resources like highlight patterns, language modes,
macros, styles, etc., are private to NEdit. Each resource is a string which
ends at the first newline character not escaped with \, so you must be
careful about how you treat ends of lines. While you can generally just cut
and paste indented sections, if something which was originally in the middle
of a resource string is now at the end, you must remove the \ line
continuation character(s) so it will not join the next line into the
resource. Conversely, if something which was originally at the end of a
resource is now in the middle, you'll have to add continuation character(s)
to make sure that the resource string is properly continued from beginning to
end, and possibly newline character(s) (\n) to make sure that it is properly
separated from the next item.
<P><HR>
</P><P>
<A NAME="X_Resources"></A>
<H2> X Resources </H2>
</P><P>
NEdit has additional options to those provided in the Preferences menu which
are set using X resources. Like most other X programs, NEdit can be
customized to vastly unnecessary proportions, from initial window positions
down to the font and shadow colors of each individual button (A complete
discussion of how to do this is left to books on the X Window System). Key
binding (see "<A HREF="#Key_Binding">Key Binding</A>" is one of the most useful of these resource
settable options.
</P><P>
X resources are usually specified in a file called .Xdefaults or .Xresources
in your home directory (on VMS this is sys$login:decw$xdefaults.dat). On
some systems, this file is read and its information attached to the X server
(your screen) when you start X. On other systems, the .Xdefaults file is
read each time you run an X program. When X resource values are attached to
the X server, changes to the resource file are not available to application
programs until you either run the xrdb program with the appropriate file as
input, or re-start the X server.
</P><P>
<H3>Selected X Resource Names</H3>
</P><P>
The following are selected NEdit resource names and default values for NEdit
options not settable via the Preferences menu (for preference resource names,
see your NEdit preference file):
</P><P>
<PRE>
<B>nedit.tagFile</B>: (not defined)
</PRE>
</P><P>
This can be the name of a file, or multiple files separated by a colon (:)
character, of the type produced by Exuberant Ctags or the Unix ctags
command, which NEdit will load at startup time (see <A HREF="#ctags">ctags support</A>). The tag
file provides a database from which NEdit can automatically open files
containing the definition of a particular subroutine or data type.
</P><P>
<PRE>
<B>nedit.alwaysCheckRelativeTagsSpecs: True</B>
</PRE>
</P><P>
When this resource is set to True, and there are tag files specified (with
the nedit.tagFile resource, see above) as relative paths, NEdit will evaluate
these tag value paths whenever a file is opened. All accessible tag files
will be loaded at this time. When this resource value is False, relative path
tag specifications will only be evaluated at NEdit startup time.
</P><P>
<PRE>
<B>nedit.wordDelimiters</B>: .,/\\`'!@#%^&*()-=+{}[]":;<>?
</PRE>
</P><P>
The set of characters which mark the boundaries between words. In addition
to these, spaces, tabs, and newlines are always word boundaries.
</P><P>
These boundaries take effect for the move-by-word (Ctrl+Arrow) and
select-word (double click) commands, and for doing regex searches using the
\B, < and > tokens.
</P><P>
Note that this default value may be overridden by the setting in
Preferences -> Default Settings -> Language Modes....
</P><P>
<PRE>
<B>nedit.remapDeleteKey</B>: False
</PRE>
</P><P>
Setting this resource to True forcibly maps the delete key to backspace. This
can be helpful on systems where the bindings have become tangled, and in
environments which mix systems with PC style keyboards and systems with DEC
and Macintosh keyboards. Theoretically, these bindings should be made using
the standard X/Motif mechanisms, outside of NEdit. In practice, some
environments where users access several different systems remotely, can be
very hard to configure. If you've given up and are using a backspace key
halfway off the keyboard because you can't figure out the bindings, set this
to True.
</P><P>
<PRE>
<B>nedit.typingHidesPointer</B>: False
</PRE>
</P><P>
Setting this resource to True causes the mouse pointer to be hidden when you
type in the text area. As soon as the mouse pointer is moved, it will
reappear. This is useful to stop the mouse pointer from obscuring text.
</P><P>
<PRE>
<B>nedit.overrideDefaultVirtualKeyBindings</B>: Auto
</PRE>
</P><P>
Motif uses a virtual key binding mechanism that shares the bindings between
different Motif applications. When a first Motif application is started, it
installs some default virtual key bindings and any other Motif application
that runs afterwards, simply reuses them. Obviously, if the first
application installs an invalid set, all others applications may have
problems.
</P><P>
In the past, NEdit has been the victim of invalid bindings installed by other
applications several times. Through this resource, NEdit can be instructed
to ignore the bindings installed by other applications, and use its own
private bindings. By default, NEdit tries to detect invalid bindings
and ignore them automatically (Auto). Optionally, NEdit can be told to
always keep the installed bindings (Never), or to always override them
(Always).
</P><P>
<PRE>
<B>nedit.stdOpenDialog</B>: False
</PRE>
</P><P>
Setting this resource to True restores the standard Motif style of Open
dialog. NEdit file open dialogs are missing a text field at the bottom of
the dialog, where the file name can be entered as a string. The field is
removed in NEdit to encourage users to type file names in the list, a
non-standard, but much faster method for finding files.
</P><P>
<PRE>
<B>nedit.bgMenuButton</B>: ~Shift~Ctrl~Meta~Alt<Btn3Down>
</PRE>
</P><P>
Specification for mouse button / key combination to post the background menu
(in the form of an X translation table event specification). The event
specification should be as specific as possible, since it will override less
specific translation table entries.
</P><P>
<PRE>
<B>nedit.maxPrevOpenFiles</B>: 30
</PRE>
</P><P>
Number of files listed in the Open Previous sub-menu of the File menu.
Setting this to zero disables the Open Previous menu item and maintenance of
the NEdit file history file.
</P><P>
<PRE>
<B>nedit.printCommand</B>: (system specific)
</PRE>
</P><P>
Command used by the print dialog to print a file, such as, lp, lpr, etc..
The command must be capable of accepting input via stdin (standard input).
</P><P>
<PRE>
<B>nedit.printCopiesOption</B>: (system specific)
</PRE>
</P><P>
Option name used to specify multiple copies to the print command. If the
option should be separated from its argument by a space, leave a trailing
space. If blank, no "Number of Copies" item will appear in the print dialog.
</P><P>
<PRE>
<B>nedit.printQueueOption</B>: (system specific)
</PRE>
</P><P>
Option name used to specify a print queue to the print command. If the
option should be separated from its argument by a space, leave a trailing
space. If blank, no "Queue" item will appear in the print dialog.
</P><P>
<PRE>
<B>nedit.printNameOption</B>: (system specific)
</PRE>
</P><P>
Option name used to specify a job name to the print command. If the option
should be separated from its argument by a space, leave a trailing space. If
blank, no job or file name will be attached to the print job or banner page.
</P><P>
<PRE>
<B>nedit.printHostOption</B>: (system specific)
</PRE>
</P><P>
Option name used to specify a host name to the print command. If the option
should be separated from its argument by a space, leave a trailing space. If
blank, no "Host" item will appear in the print dialog.
</P><P>
<PRE>
<B>nedit.printDefaultQueue</B>: (system specific)
</PRE>
</P><P>
The name of the default print queue. Used only to display in the print
dialog, and has no effect on printing.
</P><P>
<PRE>
<B>nedit.printDefaultHost</B>: (system specific)
</PRE>
</P><P>
The node name of the default print host. Used only to display in the print
dialog, and has no effect on printing.
</P><P>
<PRE>
<B>nedit.visualID</B>: Best
</PRE>
</P><P>
If your screen supports multiple visuals (color mapping models), this
resource allows you to manually choose among them. The default value of
"Best" chooses the deepest (most colors) visual available. Since NEdit does
not depend on the specific characteristics of any given color model, Best
probably IS the best choice for everyone, and the only reason for setting
this resource would be to patch around some kind of X server problem. The
resource may also be set to "Default", which chooses the screen's default
visual (often a color-mapped, PseudoColor, visual for compatibility with
older X applications). It may also be set to a numeric visual-id value (use
xdpyinfo to see the list of visuals supported by your display), or a visual
class name: PseudoColor, DirectColor, TrueColor, etc..
</P><P>
If you are running under a themed environment (like KDE or CDE) that places
its colors in a shallow visual, and you'd rather have that color scheme
instead of more colors available, then you may need set the visual to
"Default" so that NEdit doesn't choose one with more colors. (The reason
for this is: if the "best" visual is not the server's default, then NEdit
cannot use the colors provided by your environment. NEdit will fall back to
its own default color scheme.)
</P><P>
<PRE>
<B>nedit.installColormap</B>: False
</PRE>
</P><P>
Force the installation of a private colormap. If you have a humble 8-bit
color display, and netscape is hogging all of the color cells, you may want
to try turning this on. On most systems, this will result in colors flashing
wildly when you switch between NEdit and other applications. But a few
systems (SGI) have hardware support for multiple simultaneous colormaps, and
applications with installed colormaps are well behaved.
</P><P>
<PRE>
<B>nedit.findReplaceUsesSelection</B>: False
</PRE>
</P><P>
Controls if the Find and Replace dialogs are automatically loaded with the
contents of the primary selection.
</P><P>
<PRE>
<B>nedit.stickyCaseSenseButton</B>: True
</PRE>
</P><P>
Controls if the "Case Sensitive" buttons in the Find and Replace dialogs and
the incremental search bar maintain a separate state for literal and regular
expression searches. Moreover, when set to True, by default literal searches
are case insensitive and regular expression searches are case sensitive. When
set to False, the "Case Sensitive" buttons are independent of the "Regular
Expression" toggle.
</P><P>
<PRE>
<B>nedit.multiClickTime</B>: (system specific)
</PRE>
</P><P>
Maximum time in milliseconds allowed between mouse clicks within double and
triple click actions.
</P><P>
<PRE>
<B>nedit.undoModifiesSelection</B>: True
</PRE>
</P><P>
By default, NEdit selects any text inserted or changed through a undo/redo
action. Set this resource to False if you don't want your selection to be
touched.
</P><P>
<PRE>
<B>nedit*scrollBarPlacement</B>: BOTTOM_RIGHT
</PRE>
</P><P>
How scroll bars are placed in NEdit windows, as well as various lists and
text fields in the program. Other choices are: BOTTOM_LEFT, TOP_LEFT, or
TOP_RIGHT.
</P><P>
<PRE>
<B>nedit*text.autoWrapPastedText</B>: False
</PRE>
</P><P>
When Auto Newline Wrap is turned on, apply automatic wrapping (which
normally only applies to typed text) to pasted text as well.
</P><P>
<PRE>
<B>nedit*text.heavyCursor</B>: False
</PRE>
</P><P>
For monitors with poor resolution or users who have difficulty seeing the
cursor, makes the cursor in the text editing area of the window heavier and
darker.
</P><P>
<PRE>
<B>nedit.autoScrollVPadding</B>: 4
</PRE>
</P><P>
Number of lines to keep the cursor away from the top or bottom line of the
window when the "Auto-Scroll Near Window Top/Bottom" feature is enabled.
Keyboard operations that would cause the cursor to get closer than
this distance cause the window to scroll up or down instead, except at the
beginning of the file. Mouse operations are not affected.
</P><P>
<PRE>
<B>nedit*text.blinkRate</B>: 500
</PRE>
</P><P>
Blink rate of the text insertion cursor in milliseconds. Set to zero to stop
blinking.
</P><P>
<PRE>
<B>nedit*text.Translations</B>:
</PRE>
</P><P>
Modifies key bindings (see "<A HREF="#Key_Binding">Key Binding</A>").
</P><P>
<PRE>
<B>nedit*foreground</B>: black
</PRE>
</P><P>
Default foreground color for menus, dialogs, scroll bars, etc..
</P><P>
<PRE>
<B>nedit*background</B>: #b3b3b3
</PRE>
</P><P>
Default background color for menus, dialogs, scroll bars, etc..
</P><P>
<PRE>
<B>nedit*calltipForeground</B>: black
</PRE>
</P><P>
Foreground color for calltips
</P><P>
<PRE>
<B>nedit*calltipBackground</B>: LemonChiffon1
</PRE>
</P><P>
Background color for calltips
</P><P>
<PRE>
<B>nedit*XmLFolder.inactiveForeground</B>: #666
</PRE>
</P><P>
Foreground color for inactive tabs.
</P><P>
<PRE>
<B>nedit*fontList</B>: helvetica medium 12 points
</PRE>
</P><P>
Default font for menus, dialogs, scroll bars, etc..
</P><P>
<PRE>
<B>nedit.helpFont</B>: helvetica medium 12 points
</PRE>
</P><P>
Font used for displaying online help.
</P><P>
<PRE>
<B>nedit.boldHelpFont</B>: helvetica bold 12 points
</PRE>
</P><P>
Bold font for online help.
</P><P>
<PRE>
<B>nedit.italicHelpFont</B>: helvetica italic 12 points
</PRE>
</P><P>
Italic font for online help.
</P><P>
<PRE>
<B>nedit.fixedHelpFont</B>: courier medium 12 points
</PRE>
</P><P>
Fixed font for online help.
</P><P>
<PRE>
<B>nedit.boldFixedHelpFont</B>: courier bold 12 points
</PRE>
</P><P>
Fixed bold for online help.
</P><P>
<PRE>
<B>nedit.italicFixedHelpFont</B>: courier italic 12 points
</PRE>
</P><P>
Fixed italic font for online help.
</P><P>
<PRE>
<B>nedit.h1HelpFont</B>: helvetica bold 14 points
</PRE>
</P><P>
Font for level-1 titles in help text.
</P><P>
<PRE>
<B>nedit.h2HelpFont</B>: helvetica bold italic 12 points
</PRE>
</P><P>
Font for level-2 titles in help text.
</P><P>
<PRE>
<B>nedit.h3HelpFont</B>: courier bold 12 points
</PRE>
</P><P>
Font for level-3 titles in help text.
</P><P>
<PRE>
<B>nedit.helpLinkFont</B>: helvetica medium 12 points
</PRE>
</P><P>
Font for hyperlinks in the help text
</P><P>
<PRE>
<B>nedit.helpLinkColor</B>: #009900
</PRE>
</P><P>
Color for hyperlinks in the help text
</P><P>
<PRE>
<B>nedit.backlightCharTypes</B>: 0-8,10-31,127:red;9:#dedede;32,160-255:#f0f0f0;128-159:orange
</PRE>
</P><P>
<B>NOTE: backlighting is <I>experimental</I></B> (see "<A HREF="#Programming_with_NEdit">Programming with NEdit</A>").
</P><P>
A string specifying character classes as ranges of ASCII values followed by
the color to be used as their background colors. The format is:
</P><P>
low[-high]{,low[-high]}:color{;low-high{,low[-high]}:color}
</P><P>
where low and high are ASCII values.
</P><P>
For example:
<PRE>
32-255:#f0f0f0;1-31,127:red;128-159:orange;9-13:#e5e5e5
</PRE>
</P><P>
<PRE>
<B>nedit.focusOnRaise</B>: False
</PRE>
</P><P>
This resource determines whether new text windows and text windows that are
raised, should also request the input focus. Conventionally, it is the task
of the window manager to decide on which window gets the input focus.
Therefore, NEdit's default behaviour is not to request the input focus
explicitly.
</P><P>
<PRE>
<B>nedit.forceOSConversion</B>: True
</PRE>
</P><P>
By default, NEdit converts texts in DOS or Mac format to an internal
format using simple newlines as line dividers. This is sometimes not
wanted by the user and can be prevented by setting this resource to
False.
</P><P>
Note: Setting this to False would supress newlines in Mac files entirely,
leaving the control character <cr> where every line feed would be. Mac OS
X uses Unix files and is not affected.
</P><P>
Note: Setting this to False while the option 'Terminate with Line Break
on Save' is active could lead to file corruption.
</P><P>
<PRE>
<B>nedit.truncSubstitution</B>: Fail
</PRE>
</P><P>
NEdit has a fixed limit on substitution result string length. This
resource modifies the behaviour if this limit is exceeded. Possible
values are <I>Silent</I> (will silently fail the operation), <I>Fail</I> (will fail
the operation and pop up a dialog informing the user), <I>Warn</I> (pops up a
dialog warning the user, offering to cancel the operation) and <I>Ignore</I>
(will silently conclude the operation).
</P><P>
<B>WARNING</B>: Setting this to 'Ignore' will destroy data without warning!
</P><P>
<PRE>
<B>nedit.honorSymlinks</B>: True
</PRE>
</P><P>
If set to True, NEdit will open a requested file on disk even if it is a
symlink pointing to a file already opened in another window. If set to false,
NEdit will try to detect these cases and just pop up the already opened
document.
</P><P>
<PRE>
<B>nc.autoStart</B>: True
</PRE>
</P><P>
Whether the nc program should automatically start an NEdit server (without
prompting the user) if an appropriate server is not found.
</P><P>
<PRE>
<B>nc.serverCommand</B>: nedit -server
</PRE>
</P><P>
Command used by the nc program to start an NEdit server.
</P><P>
<PRE>
<B>nc.timeOut</B>: 10
</PRE>
</P><P>
Basic time-out period used in communication with an NEdit server (seconds).
</P><P>
<P><HR>
<I>The following are Selected widget names (to which you may append</I>
<I>.background, .foreground, .fontList, etc., to change colors, fonts</I>
<I> and other characteristics):</I>
</P><P>
<PRE>
<B>nedit*statsAreaForm</B>
</PRE>
</P><P>
Statistics line and incremental search bar. To get consistent results across
the entire stats line and the incremental search bar, use '*' rather than '.'
to separate the resource name. For example, to set the foreground color of
both components use:
<PRE>
nedit*statsAreaForm*foreground
</PRE>
instead of:
<PRE>
nedit*statsAreaForm.foreground
</PRE>
</P><P>
<PRE>
<B>nedit*menuBar</B>
</PRE>
</P><P>
Top-of-window menu-bar.
</P><P>
<PRE>
<B>nedit*textHorScrollBar</B>
</PRE>
</P><P>
Horizontal scroll bar.
</P><P>
<PRE>
<B>nedit*textVertScrollBar</B>
</PRE>
</P><P>
Vertical scroll bar.
<P><HR>
</P><P>
<A NAME="Key_Binding"></A>
<H2> Key Binding </H2>
</P><P>
There are several ways to change key bindings in NEdit. The easiest way to
add a new key binding in NEdit is to define a macro in Preferences -> Default
Settings -> Customize Menus -> Macro Menu. However, if you want to change
existing bindings or add a significant number of new key bindings you will
need to do so via X resources.
</P><P>
Before reading this section, you must understand how to set X resources (see
the help section "<A HREF="#X_Resources">X Resources</A>"). Since setting X resources is tricky, it is
also helpful when working on key-binding, to set some easier-to-verify
resource at the same time, as a simple check that the NEdit program is
actually seeing your changes. The appres program is also very helpful in
checking that the resource settings that you make, actually reach the program
for which they are intended in the correct form.
</P><P>
<H3>Key Binding in General</H3>
</P><P>
Keyboard commands are associated with editor action routines through two
separate mechanisms in NEdit. Commands which appear in pull-down menus have
individual resources designating a keyboard equivalent to the menu command,
called an accelerator key. Commands which do not have an associated menu
item are bound to keys via the X toolkit translation mechanism. The methods
for changing these two kinds of bindings are quite different.
</P><P>
<H3>Key Binding Via Translations</H3>
</P><P>
The most general way to bind actions to keys in NEdit is to use the
translation table associated with the text widget. To add a binding to Alt+Y
to insert the string "Hi!", for example, add lines similar to the following
to your X resource file:
</P><P>
<PRE>
NEdit*text.Translations: #override \n\
Alt<Key>y: insert_string("Hi!") \n
</PRE>
</P><P>
The Help topic "<A HREF="#Action_Routines">Action Routines</A>" lists the actions available to be bound.
</P><P>
Translation tables map key and mouse presses, window operations, and other
kinds of events, to actions. The syntax for translation tables is
simplified here, so you may need to refer to a book on the X window system
for more detailed information.
</P><P>
Note that accelerator resources (discussed below) override translations, and
that most Ctrl+letter and Alt+letter combinations are already bound to an
accelerator key. To use one of these combinations from a translation table,
therefore, you must first un-bind the original menu accelerator.
</P><P>
A resource for changing a translation table consists of a keyword; #override,
#augment, or #replace; followed by lines (separated by newline characters)
pairing events with actions. Events begin with modifiers, like Ctrl, Shift,
or Alt, followed by the event type in <>. BtnDown, Btn1Down, Btn2Down,
Btn1Up, Key, KeyUp are valid event types. For key presses, the event type is
followed by the name of the key. You can specify a combination of events,
such as a sequence of key presses, by separating them with commas. The other
half of the event/action pair is a set of actions. These are separated from
the event specification by a colon and from each other by spaces. Actions
are names followed by parentheses, optionally containing one or more
parameters separated by comas.
</P><P>
<H3>Changing Menu Accelerator Keys</H3>
</P><P>
The menu shortcut keys shown at the right of NEdit menu items can also be
changed via X resources. Each menu item has two resources associated with
it, accelerator, the event to trigger the menu item; and acceleratorText, the
string shown in the menu. The form of the accelerator resource is the same
as events for translation table entries discussed above, though multiple keys
and other subtleties are not allowed. The resource name for a menu is the
title in lower case, followed by "Menu", the resource name of menu item is
the name in lower case, run together, with words separated by caps, and all
punctuation removed. For example, to change Cut to Ctrl+X, you would add the
following to your .Xdefaults file:
</P><P>
<PRE>
nedit*editMenu.cut.accelerator: Ctrl<Key>x
nedit*editMenu.cut.acceleratorText: Ctrl+X
</PRE>
</P><P>
Accelerator keys with optional shift key modifiers, like Find..., have an
additional accelerator resource with Shift appended to the name. For
example:
</P><P>
<PRE>
nedit*searchMenu.find.acceleratorText: [Shift]Alt+F
nedit*searchMenu.find.accelerator: Alt<Key>f
nedit*searchMenu.findShift.accelerator: Shift Alt<Key>f
</PRE>
</P><P>
<A NAME="Highlighting_Patterns"></A>
<H2> Highlighting Patterns </H2>
</P><P>
<H3>Writing Syntax Highlighting Patterns</H3>
</P><P>
Patterns are the mechanism by which language syntax highlighting is
implemented in NEdit (see <A HREF="#Syntax_Highlighting">Syntax Highlighting</A> under the heading of Features
for Programming). To create syntax highlighting patterns for a new
language, or to modify existing patterns, select "Recognition Patterns" from
"Syntax Highlighting" sub-section of the "Default Settings" sub-menu of the
"Preferences" menu.
</P><P>
First, a word of caution. As with regular expression matching in general, it
is quite possible to write patterns which are so inefficient that they
essentially lock up the editor as they recursively re-examine the entire
contents of the file thousands of times. With the multiplicity of patterns,
the possibility of a lock-up is significantly increased in syntax
highlighting. When working on highlighting patterns, be sure to save your
work frequently.
</P><P>
NEdit's syntax highlighting is unusual in that it works in real-time (as you
type), and yet is completely programmable using standard regular expression
notation. Other syntax highlighting editors usually fall either into the
category of fully programmable but unable to keep up in real-time, or
real-time but limited programmability. The additional burden that NEdit
places on pattern writers in order to achieve this speed/flexibility mix, is
to force them to state self-imposed limitations on the amount of context that
patterns may examine when re-parsing after a change. While the "Pattern
Context Requirements" heading is near the end of this section, it is not
optional, and must be understood before making any serious effort at
pattern writing.
</P><P>
In its simplest form, a highlight pattern consists of a regular expression to
match, along with a style representing the font an color for displaying any
text which matches that expression. To bold the word, "highlight", wherever
it appears the text, the regular expression simply would be the word
"highlight". The style (selected from the menu under the heading of
"Highlight Style") determines how the text will be drawn. To bold the text,
either select an existing style, such as "Keyword", which bolds text, or
create a new style and select it under Highlight Style.
</P><P>
The full range of regular expression capabilities can be applied in such a
pattern, with the single caveat that the expression must conclusively match
or not match, within the pre-defined context distance (as discussed below
under Pattern Context Requirements).
</P><P>
To match longer ranges of text, particularly any constructs which exceed the
requested context, you must use a pattern which highlights text between a
starting and ending regular expression match. To do so, select "Highlight
text between starting and ending REs" under "Matching", and enter both a
starting and ending regular expression. For example, to highlight everything
between double quotes, you would enter a double quote character in both the
starting and ending regular expression fields. Patterns with both a
beginning and ending expression span all characters between the two
expressions, including newlines.
</P><P>
Again, the limitation for automatic parsing to operate properly is that both
expressions must match within the context distance stated for the pattern
set.
</P><P>
With the ability to span large distances, comes the responsibility to recover
when things go wrong. Remember that syntax highlighting is called upon to
parse incorrect or incomplete syntax as often as correct syntax. To stop a
pattern short of matching its end expression, you can specify an error
expression, which stops the pattern from gobbling up more than it should.
For example, if the text between double quotes shouldn't contain newlines,
the error expression might be "$". As with both starting and ending
expressions, error expressions must also match within the requested context
distance.
</P><P>
<H4>Coloring Sub-Expressions</H4>
</P><P>
It is also possible to color areas of text within a regular expression
match. A pattern of this type associates a style with sub-expressions
references of the parent pattern (as used in regular expression substitution
patterns, see the NEdit Help menu item on <A HREF="#Regular_Expressions">Regular Expressions</A>).
Sub-expressions of both the starting and ending patterns may be colored. For
example, if the parent pattern has a starting expression "\<", and end
expression "\>", (for highlighting all of the text contained within angle
brackets), a sub-pattern using "&" in both the starting and ending expression
fields could color the brackets differently from the intervening text. A
quick shortcut to typing in pattern names in the Parent Pattern field is to
use the middle mouse button to drag them from the Patterns list.
</P><P>
In some cases, there can be interference between coloring sub-patterns and
hierarchical sub-patterns (discussed next). How this is resolved, is
explained below.
</P><P>
<H4>Hierarchical Patterns</H4>
</P><P>
A hierarchical sub-pattern, is identical to a top level pattern, but is
invoked only between the starting and ending expression matches of its
parent pattern or, in case the parent pattern consists of a single
expression, inside the text area matching that expression. Like the
sub-expression coloring patterns discussed above, it is associated with a
parent pattern using the Parent Pattern field in the pattern specification.
Pattern names can be dragged from the pattern list with the middle mouse
button to the Parent Pattern field.
</P><P>
The matching behaviour for sub-patterns is slightly different, depending on
whether the parent pattern consists of a single expression or has both a
starting and an ending expression.
</P><P>
In case the parent pattern consists of a single expression, and the syntax
highlighting parser finds a match for that expression, sub-patterns are
matched between the start and the end of the parent match. Sub-patterns
cannot extend beyond the boundaries of the parent's match nor can they
affect those boundaries (the latter can happen for starting/ending parent
patterns, see below). Note that sub-patterns can <I>peek</I> beyond the
parent's matching boundaries by means of look-ahead or look-behind
expressions.
</P><P>
In case the parent pattern is a starting/ending style pattern, after the
start expression of the parent pattern matches, the syntax highlighting
parser searches for either the parent's end pattern or a matching
sub-pattern. When a sub-pattern matches, control is not returned to the
parent pattern until the entire sub-pattern has been parsed, regardless of
whether the parent's end pattern appears in the text matched by the
sub-pattern. In this way, matching of the parent's ending pattern can be
postponed, in contrast to the case where the parent pattern consists of a
single expression. Note that, in this case, parsing of sub-patterns starts
<B>after</B> the match of the parent pattern's starting expression, also in
contrast to the single-expression case.
</P><P>
The most common use for this capability is for coloring sub-structure of
language constructs (smaller patterns embedded in larger patterns).
Hierarchical patterns can also simplify parsing by having sub-patterns "hide"
special syntax from parent patterns, such as special escape sequences or
internal comments.
</P><P>
There is no depth limit in nesting hierarchical sub-patterns, but beyond the
third level of nesting, automatic re-parsing will sometimes have to re-parse
more than the requested context distance to guarantee a correct parse (which
can slow down the maximum rate at which the user can type if large sections
of text are matched only by deeply nested patterns).
</P><P>
While this is obviously not a complete hierarchical language parser it is
still useful in many text coloring situations. As a pattern writer, your
goal is not to completely cover the language syntax, but to generate
colorings that are useful to the programmer. Simpler patterns are usually
more efficient and also more robust when applied to incorrect code.
</P><P>
Note that in case of a single-expression parent pattern, there is a
potential for conflicts between coloring-only sub-patterns and hierarchical
sub-patterns (which cannot happen for starting/ending type of patterns,
because sub-patterns are matched <B>between</B> the starting and ending pattern
(not included)). Due to the different nature of these two kinds of
sub-patterns, it is technically infeasible to follow the standard matching
precedence rules, where a sub-pattern has precedence over the sub-patterns
following it. Instead, coloring-only sub-patterns are always colored last,
ie., they may override the coloring for overlapping sibling sub-patterns in
the overlapping parts of the matches.
</P><P>
<H4>Deferred (Pass-2) Parsing</H4>
</P><P>
NEdit does pattern matching for syntax highlighting in two passes. The first
pass is applied to the entire file when syntax highlighting is first turned
on, and to new ranges of text when they are initially read or pasted in. The
second pass is applied only as needed when text is exposed (scrolled in to
view).
</P><P>
If you have a particularly complex set of patterns, and parsing is beginning
to add a noticeable delay to opening files or operations which change large
regions of text, you can defer some of that parsing from startup time, to
when it is actually needed for viewing the text. Deferred parsing can only
be used with single expression patterns, or begin/end patterns which match
entirely within the requested context distance. To defer the parsing of a
pattern to when the text is exposed, click on the Pass-2 pattern type button
in the highlight patterns dialog.
</P><P>
Sometimes a pattern can't be deferred, not because of context requirements,
but because it must run concurrently with pass-1 (non-deferred) patterns. If
they didn't run concurrently, a pass-1 pattern might incorrectly match some
of the characters which would normally be hidden inside of a sequence matched
by the deferred pattern. For example, C has character constants enclosed in
single quotes. These typically do not cross line boundaries, meaning they
can be parsed entirely within the context distance of the C pattern set and
should be good candidates for deferred parsing. However, they can't be
deferred because they can contain sequences of characters which can trigger
pass-one patterns. Specifically, the sequence, '\"', contains a double quote
character, which would be matched by the string pattern and interpreted as
introducing a string.
</P><P>
<H4>Pattern Context Requirements</H4>
</P><P>
The context requirements of a pattern set state how much additional text
around any change must be examined to guarantee that the patterns will match
what they are intended to match. Context requirements are a promise by NEdit
to the pattern writer, that the regular expressions in his/her patterns will
be matched against at least <line context> lines and <character context>
characters, around any modified text. Combining line and character
requirements guarantee that both will be met.
</P><P>
Automatic re-parsing happens on EVERY KEYSTROKE, so the amount of context
which must be examined is very critical to typing efficiency. The more
complicated your patterns, the more critical the context becomes. To cover
all of the keywords in a typical language, without affecting the maximum rate
at which users can enter text, you may be limited to just a few lines and/or
a few hundred characters of context.
</P><P>
The default context distance is 1 line, with no minimum character
requirement. There are several benefits to sticking with this default. One
is simply that it is easy to understand and to comply with. Regular
expression notation is designed around single line matching. To span lines
in a regular expression, you must explicitly mention the newline character
"\n", and matches which are restricted to a single line are virtually immune
to lock-ups. Also, if you can code your patterns to work within a single
line of context, without an additional character-range context requirement,
the parser can take advantage the fact that patterns don't cross line
boundaries, and nearly double its efficiency over a one-line and 1-character
context requirement. (In a single line context, you are allowed to match
newlines, but only as the first and/or last character.)
<P><HR>
</P><P>
<A NAME="Smart_Indent_Macros"></A>
<H2> Smart Indent Macros </H2>
</P><P>
Smart indent macros can be written for any language, but are usually more
difficult to write than highlighting patterns. A good place to start, of
course, is to look at the existing macros for C and C++.
</P><P>
Smart indent macros for a language mode consist of standard NEdit macro
language code attached to any or all of the following three activation
conditions: 1) When smart indent is first turned on for a text window
containing code of the language, 2) When a newline is typed and smart indent
is expected, 3) after any character is typed. To attach macro code to any of
these code "hooks", enter it in the appropriate section in the Preferences ->
Default Settings -> Auto Indent -> Program Smart Indent dialog.
</P><P>
Typically most of the code should go in the initialization section, because
that is the appropriate place for subroutine definitions, and smart indent
macros are complicated enough that you are not likely to want to write them
as one monolithic run of code. You may also put code in the Common/Shared
Initialization section (accessible through the button in the upper left
corner of the dialog). Unfortunately, since the C/C++ macros also reside in
the common/shared section, when you add code there, you run some risk of
missing out on future upgrades to these macros, because your changes will
override the built-in defaults.
</P><P>
The newline macro is invoked after the user types a newline, but before the
newline is entered in the buffer. It takes a single argument ($1) which is
the position at which the newline will be inserted. It must return the
number of characters of indentation the line should have, or -1. A return
value of -1 means to do a standard auto-indent. You must supply a newline
macro, but the code: "return -1" (auto-indent), or "return 0" (no indent) is
sufficient.
</P><P>
The type-in macro takes two arguments. $1 is the insert position, and $2 is
the character just typed, and does not return a value. It also is invoked
before the character is inserted into the buffer. You can do just about
anything here, but keep in mind that this macro is executed for every
keystroke typed, so if you try to get too fancy, you may degrade performance.
<P><HR>
</P><P>
<A NAME="NEdit_Command_Line"></A>
<H2> NEdit Command Line </H2>
</P><P>
<PRE>
<B>nedit</B> [-<B>read</B>] [-<B>create</B>] [-<B>line</B> n | +n] [-<B>server</B>]
[-<B>do</B> command] [-<B>tags</B> file] [-<B>tabs</B> n] [-<B>wrap</B>]
[-<B>nowrap</B>] [-<B>autowrap</B>] [-<B>autoindent</B>] [-<B>noautoindent</B>]
[-<B>autosave</B>] [-<B>noautosave</B>] [-<B>rows</B> n] [-<B>columns</B> n]
[-<B>font</B> font] [-<B>lm</B> languagemode] [-<B>geometry</B> geometry]
[-<B>iconic</B>] [-<B>noiconic</B>] [-<B>display</B> [host]:server[.screen]
[-<B>xrm</B> resourcestring] [-<B>svrname</B> name] [-<B>import</B> file]
[-<B>background</B> color] [-<B>foreground</B> color] [-<B>h</B>|-<B>help</B>]
[-<B>tabbed</B>] [-<B>untabbed</B>] [-<B>group</B>] [-<B>V</B>|-<B>version</B>]
[--] [file...]
</PRE>
</P><P>
<PRE>
<B>-read</B>
</PRE>
Open the file Read Only regardless of the actual file protection.
</P><P>
<PRE>
<B>-create</B>
</PRE>
Don't warn about file creation when a file doesn't exist.
</P><P>
<PRE>
<B>-line n (or +n)</B>
</PRE>
Go to line number n
</P><P>
<PRE>
<B>-server</B>
</PRE>
Designate this session as an NEdit server, for processing commands from the
nc program. nc can be used to interface NEdit to code development
environments, mailers, etc., or just as a quick way to open files from the
shell command line without starting a new NEdit session.
</P><P>
<PRE>
<B>-do command</B>
</PRE>
Execute an NEdit macro or action on the file following the -do argument on
the command line. -do is particularly useful from the nc program, where
nc -do can remotely execute commands in an NEdit -server session.
</P><P>
<PRE>
<B>-tags file</B>
</PRE>
Load a file of directions for finding definitions of program subroutines and
data objects. The file must be of the format generated by Exuberant Ctags,
or the standard Unix ctags command.
</P><P>
<PRE>
<B>-tabs n</B>
</PRE>
Set tab stops every n characters.
</P><P>
<PRE>
<B>-wrap, -nowrap</B>
</PRE>
Wrap long lines at the right edge of the window rather than continuing them
past it. (Continuous Wrap mode)
</P><P>
<PRE>
<B>-autowrap, -noautowrap</B>
</PRE>
Wrap long lines when the cursor reaches the right edge of the window by
inserting newlines at word boundaries. (Auto Newline Wrap mode)
</P><P>
<PRE>
<B>-autoindent, -noautoindent</B>
</PRE>
Maintain a running indent.
</P><P>
<PRE>
<B>-autosave, -noautosave</B>
</PRE>
Maintain a backup copy of the file being edited under the name '~filename'.
</P><P>
<PRE>
<B>-rows n</B>
</PRE>
Default height in characters for an editing window.
</P><P>
<PRE>
<B>-columns n</B>
</PRE>
Default width in characters for an editing window.
</P><P>
<PRE>
<B>-font font (or -fn font)</B>
</PRE>
Font for text being edited (Font for menus and dialogs can be set with -xrm
"*fontList:font").
</P><P>
<PRE>
<B>-lm languagemode</B>
</PRE>
Initial language mode used for editing succeeding files.
</P><P>
<PRE>
<B>-geometry geometry (or -g geometry)</B>
</PRE>
The initial size and/or location of editor windows. The argument geometry
has the form:
</P><P>
<PRE>
[<width>x<height>][+|-][<xoffset>[+|-]<yoffset>]
</PRE>
</P><P>
where <width> and <height> are the desired width and height of the window,
and <xoffset> and <yoffset> are the distance from the edge of the screen to
the window, + for top or left, - for bottom or right. -geometry can be
specified for individual files on the command line.
</P><P>
<PRE>
<B>-iconic, -noiconic</B>
</PRE>
Initial window state for succeeding files.
</P><P>
<PRE>
<B>-display [host]:server[.screen]</B>
</PRE>
The name of the X server to use. host specifies the machine, server
specifies the display server number, and screen specifies the screen number.
host or screen can be omitted and default to the local machine, and screen 0.
</P><P>
<PRE>
<B>-background color (or -bg color)</B>
</PRE>
User interface background color. (Background color for text can be set
separately with -xrm "nedit.textBgColor: color" or using the Preferences ->
Colors dialog).
</P><P>
<PRE>
<B>-foreground color (or -fg color)</B>
</PRE>
User interface foreground color. (Foreground color for text can be set
separately with -xrm "nedit.textFgColor: color" or using the Preferences
-> Colors dialog).
</P><P>
<PRE>
<B>-tabbed</B>
</PRE>
Open all subsequent files in new tabs. Resets -group option.
</P><P>
<PRE>
<B>-untabbed</B>
</PRE>
Open all subsequent files in new windows. Resets -group option. Note
that this only works on subsequent files in this command and does not put
NEdit in tab-less mode; for that you can use the command
<PRE>
nedit -xrm "nedit.openInTab: False" -xrm "nedit.tabBarHideOne: True"
</PRE>
This will affect your default settings for the session, and will be saved
if Preferences->Save Defaults... is used, which may not be desired.
</P><P>
<PRE>
<B>-group</B>
</PRE>
Open all subsequent files as tabs in a new window.
</P><P>
<PRE>
<B>-xrm resourcestring</B>
</PRE>
Set the value of an X resource to override a default
value (see "<A HREF="#Customizing_NEdit">Customizing NEdit</A>").
</P><P>
<PRE>
<B>-svrname name</B>
</PRE>
When starting NEdit in server mode, name the server, such that it responds to
requests only when nc is given a corresponding -svrname argument. By naming
servers, you can run several simultaneously, and direct files and commands
specifically to any one. Specifying a non-empty name automatically designates
this session as an NEdit server, as though -server were specified.
</P><P>
<PRE>
<B>-import file</B>
</PRE>
Loads an additional preferences file on top of the existing defaults saved in
your preferences file. To incorporate macros, language modes, and highlight
patterns and styles written by other users, run NEdit with -import <file>,
then re-save your preferences file with Preferences -> Save Defaults.
</P><P>
<PRE>
<B>-version</B>
</PRE>
Prints out the NEdit version information. The -V option is synonymous.
</P><P>
<PRE>
<B>-help</B>
</PRE>
Prints out the NEdit command line help. The -h option is synonymous.
</P><P>
<PRE>
<B>--</B>
</PRE>
Treats all subsequent arguments as file names, even if they start with a
dash. This is so NEdit can access files that begin with the dash character.
</P><P>
<P><HR>
</P><P>
<A NAME="Client/Server_Mode"></A>
<H2> Client/Server Mode </H2>
</P><P>
NEdit can be operated on its own, or as a two-part client/server
application. Client/server mode is useful for integrating NEdit with
software development environments, mailers, and other programs; or just as a
quick way to open files from the shell command line without starting a new
NEdit session.
</P><P>
To run NEdit in server mode, type:
</P><P>
<PRE>
nedit -server
</PRE>
</P><P>
NEdit can also be started in server mode via the NEdit Client program
(<B>nc</B>) when no servers are available.
</P><P>
The nc program, which is distributed along with NEdit, sends commands to
an NEdit server to open files or execute editor actions. It can also be
used on files that are already opened.
</P><P>
Listing a file on the nc command line means: Open it if it is not already
open and bring the window to the front.
</P><P>
nc supports the following command line options:
</P><P>
<PRE>
<B>nc</B> [<B>-read</B>] [<B>-create</B>]
[<B>-line</B> n | <B>+</B>n] [<B>-do</B> command] [<B>-lm</B> languagemode]
[<B>-svrname</B> name] [<B>-svrcmd</B> command]
[<B>-ask</B>] [<B>-noask</B>] [<B>-timeout</B> seconds]
[<B>-geometry</B> geometry | <B>-g</B> geometry] [<B>-icon</B> | <B>-iconic</B>]
[-<B>tabbed</B>] [-<B>untabbed</B>] [-<B>group</B>] [<B>-wait</B>]
[<B>-V</B> | <B>-version</B>]
[<B>-xrm</B> resourcestring] [<B>-display</B> [host]:server[.screen]]
[<B>-</B>-] [file...]
</PRE>
</P><P>
<PRE>
<B>-read</B>
</PRE>
Open the file read-only regardless of its actual permissions. There is no
effect if the file is already open.
</P><P>
<PRE>
<B>-create</B>
</PRE>
Don't warn about file creation when a file doesn't exist.
</P><P>
<PRE>
<B>-line</B> n, <B>+</B>n
</PRE>
Go to line number n. This will also affect files which are already open.
</P><P>
<PRE>
<B>-do</B> command
</PRE>
Execute an NEdit macro or action on the file following the -do argument
on the command line.
</P><P>
If you use this command without a filename, nc would randomly choose one
window to focus and execute the macro in.
</P><P>
<PRE>
<B>-lm</B> languagemode
</PRE>
Initial language mode used.
</P><P>
<PRE>
<B>-svrname</B> name
</PRE>
Explicitly instructs nc which server to connect to, an instance of
nedit(1) with a corresponding -svrname argument. By naming servers, you
can run several simultaneously, and direct files and commands
specifically to any one.
</P><P>
<PRE>
<B>-svrcmd</B> command
</PRE>
The command which nc uses to start an NEdit server. It is also settable
via the X resource `nc.serverCommand' (see <A HREF="#X_Resources">X Resources</A>). Defaults to
"nedit -server".
</P><P>
<PRE>
<B>-ask</B>, <B>-noask</B>
</PRE>
Instructs nc to automatically start a server if one is not available. This
overrides the X resource `nc.autoStart' (see <A HREF="#X_Resources">X Resources</A>).
</P><P>
<PRE>
<B>-timeout</B> seconds
</PRE>
Basic time-out period used in communication with an NEdit server. The
default is 10 seconds. Also settable via the X resource `nc.timeOut'.
</P><P>
Under rare conditions (such as a slow connection), it may be necessary to
increase the time-out period. In most cases, the default is fine.
</P><P>
<PRE>
<B>-geometry</B> geometry, <B>-g</B> geometry
</PRE>
The initial size and/or location of editor windows. See
<A HREF="#NEdit_Command_Line">NEdit Command Line</A> for details.
</P><P>
<PRE>
<B>-icon</B>, <B>-iconic</B>
</PRE>
Initial window state.
</P><P>
<PRE>
<B>-tabbed</B>
</PRE>
Open all subsequent files in new tabs. Resets -group option.
</P><P>
<PRE>
<B>-untabbed</B>
</PRE>
Open all subsequent files in new windows. Resets -group option.
</P><P>
<PRE>
<B>-group</B>
</PRE>
Open all subsequent files as tabs in a new window.
</P><P>
<PRE>
<B>-wait</B>
</PRE>
Instructs nc not to return to the shell until all files given are closed.
</P><P>
Normally, nc returns once the files given in its command line are opened
by the server. When this option is given, nc returns only after the last
file given in this call is closed.
</P><P>
Note that this option affects all files in the command line, not only the
ones following this option.
</P><P>
Note that nc will wait for all files given in the command line, even if
the files were already opened.
</P><P>
<PRE>
<B>-version</B>, <B>-V</B>
</PRE>
Prints nc's version and build information.
</P><P>
<PRE>
<B>-xrm</B> resourcestring
</PRE>
Contains the resourcestring passed to a newly started server. This option
has no effect if the server is already started.
</P><P>
<PRE>
<B>-display</B> [<host>]:<server>[.<screen>]
</PRE>
The name of the X server to use. See <A HREF="#NEdit_Command_Line">NEdit Command Line</A> for details.
</P><P>
<H4>Command Line Arguments</H4>
</P><P>
In typical Unix style, arguments affect the files which follow them on the
command line, for example:
</P><P>
<PRE>
incorrect: nc file.c -line 25
correct: nc -line 25 file.c
</PRE>
</P><P>
-read, -create, and -line affect all of the files which follow them on the
command line.
</P><P>
The -do macro is executed only once, on the next file on the line. -do
without a file following it on the command line, executes the macro on the
first available window (presumably when you give a -do command without a
corresponding file or window, you intend it to do something independent of
the window in which it happens to execute).
</P><P>
The -wait option affects all files named in the command line.
</P><P>
<H4>Multiple Servers</H4>
</P><P>
Sometimes it is useful to have more than one NEdit server running, for
example to keep mail and programming work separate. The option, -svrname, to
both nedit and nc, allows you to start, and communicate with, separate named
servers. A named server responds only to requests with the corresponding
-svrname argument. If you use ClearCase and are within a ClearCase view, the
server name will default to the name of the view (based on the value of the
CLEARCASE_ROOT environment variable).
</P><P>
<H4>Communication</H4>
</P><P>
Communication between nc and nedit is done through the X display. So as long
as the X Window System is set up and working properly, nc will work properly
as well. nc uses the DISPLAY environment variable, the machine name and your
user name to find the appropriate server, meaning, if you have several
machines sharing a common file system, nc will not be able to find a server
that is running on a machine with a different host name, even though it may
be perfectly appropriate for editing a given file.
</P><P>
The command which nc uses to start an nedit server is settable via the X
resource nc.serverCommand, by default, "nedit -server".
<P><HR>
</P><P>
<A NAME="Crash_Recovery"></A>
<H2> Crash Recovery </H2>
</P><P>
If a system crash, network failure, X server crash, or program error should
happen while you are editing a file, you can still recover most of your
work. NEdit maintains a backup file which it updates periodically (every 8
editing operations or 80 characters typed). This file has the same name
as the file that you are editing, but with the character `~' (tilde) on Unix
or `_' (underscore) on VMS prefixed to the name. To recover a file after a
crash, simply rename the file to remove the tilde or underscore character,
replacing the older version of the file. (Because several of the Unix shells
consider the tilde to be a special character, you may have to prefix the
character with a `\' (backslash) when you move or delete an NEdit backup
file.)
</P><P>
Example, to recover the file called "help.c" on Unix type the command:
</P><P>
<PRE>
mv \~help.c help.c
</PRE>
</P><P>
A minor caveat, is that if the file you were editing was in MS DOS format,
the backup file will be in Unix format, and you will need to open the backup
file in NEdit and change the file format back to MS DOS via the Save As...
dialog (or use the Unix unix2dos command outside of NEdit).
<P><HR>
</P><P>
<A NAME="Version"></A>
<H2> Version </H2>
</P><P>
<PRE>
NEdit NEdit 5.6 CVS checkout release by Debian on Nov 18, 2008
May 31, 2013
</PRE>
</P><P>
Active developers: Tony Balinski, Arne Førlie, Nathaniel Gray, Eddy De
Greef, Thorsten Haude, Andrew Hood, Scott Tringali, and TK Soh.
</P><P>
Retired developers: Mark Edel, Joy Kyriakopulos, Christopher Conrad, Jim
Clark, Arnulfo Zepeda-Navratil, Suresh Ravoor, Max Vohlken, Yunliang Yu,
Donna Reid, Steve Haehn, Steve LoBasso, and Alexander Mai.
</P><P>
The regular expression matching routines used in NEdit are adapted (with
permission) from original code written by Henry Spencer at the
University of Toronto.
</P><P>
The Microline widgets are inherited from the Mozilla project.
</P><P>
Syntax highlighting patterns and smart indent macros were contributed by:
Simon T. MacDonald, Maurice Leysens, Matt Majka, Alfred Smeenk,
Alain Fargues, Christopher Conrad, Scott Markinson, Konrad Bernloehr,
Ivan Herman, Patrice Venant, Christian Denat, Philippe Couton,
Max Vohlken, Markus Schwarzenberg, Himanshu Gohel, Steven C. Kapp,
Michael Turomsha, John Fieber, Chris Ross, Nathaniel Gray, Joachim Lous,
Mike Duigou, Seak Teng-Fong, Joor Loohuis, Mark Jones,
and Niek van den Berg.
</P><P>
NEdit sources, executables, additional documentation, and contributed
software are available from the NEdit web site at <A HREF="http://www.nedit.org">http://www.nedit.org</A>.
</P><P>
This program is free software; you can redistribute it and/or
modify it under the terms of the <A HREF="#GNU_General_Public_License">GNU General Public License</A>
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
</P><P>
In addition, as a special exception to the GNU GPL, the copyright holders
give permission to link the code of this program with the Motif and Open
Motif libraries (or with modified versions of these that use the same
license), and distribute linked combinations including the two. You must
obey the GNU General Public License in all respects for all of the code
used other than linking with Motif/Open Motif. If you modify this file,
you may extend this exception to your version of the file, but you are
not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
</P><P>
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
section on the <A HREF="#GNU_General_Public_License">GNU General Public License</A> for more details.
<P><HR>
</P><P>
<A NAME="GNU_General_Public_License"></A>
<H2> GNU General Public License </H2>
</P><P>
GNU GENERAL PUBLIC LICENSE
</P><P>
Version 2, June 1991
</P><P>
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave,
Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute
verbatim copies of this license document, but changing it is not allowed.
</P><P>
Preamble
</P><P>
The licenses for most software are designed to take away your freedom to
share and change it. By contrast, the GNU General Public License is intended
to guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program
whose authors commit to using it. (Some other Free Software Foundation
software is covered by the GNU Library General Public License instead.) You
can apply it to your programs, too.
</P><P>
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish), that you receive source code or can get it if you want it, that you
can change the software or use pieces of it in new free programs; and that
you know you can do these things.
</P><P>
To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you distribute
copies of the software, or if you modify it.
</P><P>
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You
must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights.
</P><P>
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
</P><P>
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
</P><P>
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent must be
licensed for everyone's free use or not licensed at all.
</P><P>
The precise terms and conditions for copying, distribution and modification
follow.
</P><P>
GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
MODIFICATION
</P><P>
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms
of this General Public License. The "Program", below, refers to any such
program or work, and a "work based on the Program" means either the Program
or any derivative work under copyright law: that is to say, a work containing
the Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in the term "modification".) Each licensee is addressed as
"you".
</P><P>
Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program
is not restricted, and the output from the Program is covered only if its
contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the
Program does.
</P><P>
1. You may copy and distribute verbatim copies of the Program's source code
as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
License and to the absence of any warranty; and give any other recipients of
the Program a copy of this License along with the Program.
</P><P>
You may charge a fee for the physical act of transferring a copy, and you may
at your option offer warranty protection in exchange for a fee.
</P><P>
2. You may modify your copy or copies of the Program or any portion of it,
thus forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions:
</P><P>
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
</P><P>
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License.
</P><P>
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
</P><P>
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Program, the distribution of the whole must be
on the terms of this License, whose permissions for other licensees extend to
the entire whole, and thus to each and every part regardless of who wrote it.
</P><P>
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program.
</P><P>
In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
</P><P>
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1
and 2 above provided that you also do one of the following:
</P><P>
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
</P><P>
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
</P><P>
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only for
noncommercial distribution and only if you received the program in object
code or executable form with such an offer, in accord with Subsection b
above.)
</P><P>
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and
installation of the executable. However, as a special exception, the source
code distributed need not include anything that is normally distributed (in
either source or binary form) with the major components (compiler, kernel,
and so on) of the operating system on which the executable runs, unless that
component itself accompanies the executable.
</P><P>
If distribution of executable or object code is made by offering access to
copy from a designated place, then offering equivalent access to copy the
source code from the same place counts as distribution of the source code,
even though third parties are not compelled to copy the source along with the
object code.
</P><P>
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically
terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
</P><P>
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of
this License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it.
</P><P>
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor to
copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of
the rights granted herein. You are not responsible for enforcing compliance
by third parties to this License.
</P><P>
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not excuse
you from the conditions of this License. If you cannot distribute so as to
satisfy simultaneously your obligations under this License and any other
pertinent obligations, then as a consequence you may not distribute the
Program at all. For example, if a patent license would not permit
royalty-free redistribution of the Program by all those who receive copies
directly or indirectly through you, then the only way you could satisfy both
it and this License would be to refrain entirely from distribution of the
Program.
</P><P>
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
</P><P>
It is not the purpose of this section to induce you to infringe any patents
or other property right claims or to contest validity of any such claims;
this section has the sole purpose of protecting the integrity of the free
software distribution system, which is implemented by public license
practices. Many people have made generous contributions to the wide range of
software distributed through that system in reliance on consistent
application of that system; it is up to the author/donor to decide if he or
she is willing to distribute software through any other system and a licensee
cannot impose that choice.
</P><P>
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
</P><P>
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an
explicit geographical distribution limitation excluding those countries, so
that distribution is permitted only in or among countries not thus excluded.
In such case, this License incorporates the limitation as if written in the
body of this License.
</P><P>
9. The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to address
new problems or concerns.
</P><P>
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of this License,
you may choose any version ever published by the Free Software Foundation.
</P><P>
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software
Foundation, write to the Free Software Foundation; we sometimes make
exceptions for this. Our decision will be guided by the two goals of
preserving the free status of all derivatives of our free software and of
promoting the sharing and reuse of software generally.
</P><P>
<B>NO WARRANTY</B>
</P><P>
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
</P><P>
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
</P><P>
END OF TERMS AND CONDITIONS
<P><HR>
</P><P>
<A NAME="Mailing_Lists"></A>
<H2> Mailing Lists </H2>
</P><P>
There are two separate mailing lists for nedit users, and one for developers.
Users may post to the developer mailing list to report defects and communicate
with the nedit developers. Remember that nedit is entirely a volunteer
effort, so please ask questions first to the discussion list, and do your
share to answer other users questions as well.
</P><P>
<PRE>
<A HREF="mailto:discuss@nedit.org">discuss@nedit.org</A>
</PRE>
</P><P>
General discussion, questions and answers among NEdit users and developers.
</P><P>
<PRE>
<A HREF="mailto:announce@nedit.org">announce@nedit.org</A>
</PRE>
</P><P>
A low-volume mailing list for announcing new versions.
</P><P>
<PRE>
<A HREF="mailto:develop@nedit.org">develop@nedit.org</A>
</PRE>
</P><P>
Communication among and with NEdit developers.
Developers should also subscribe to the discuss list.
</P><P>
To subscribe, send mail to one of the following addresses:
</P><P>
<PRE>
<A HREF="mailto:announce-request@nedit.org">announce-request@nedit.org</A>
<A HREF="mailto:discuss-request@nedit.org">discuss-request@nedit.org</A>
<A HREF="mailto:develop-request@nedit.org">develop-request@nedit.org</A>
</PRE>
</P><P>
with the body consisting of the single word
</P><P>
<PRE>
subscribe
</PRE>
</P><P>
<A NAME="Problems/Defects"></A>
<H2> Problems/Defects </H2>
</P><P>
<H3>Solutions to Common Problems</H3>
</P><P>
For a much more comprehensive list of common problems and solutions, see the
NEdit FAQ. The latest version of the FAQ can always be found on the NEdit
web site at:
</P><P>
<PRE>
<A HREF="http://www.nedit.org">http://www.nedit.org</A>.
</PRE>
</P><P>
<B>P: No files are shown in the "Files" list in the Open... dialog.</B>
</P><P>
S: When you use the "Filter" field, include the file specification or a
complete directory specification, including the trailing "/" on Unix.
(See Help in the Open... dialog).
</P><P>
<B>P: Find Again and Replace Again don't continue in the same direction as the original Find or Replace.</B>
</P><P>
S: Find Again and Replace Again don't use the direction of the original
search. The Shift key controls the direction: Ctrl+G means forward,
Shift+Ctrl+G means backward.
</P><P>
<B>P: Preferences specified in the Preferences menu don't seem to get saved when I select Save Defaults.</B>
</P><P>
S: NEdit has two kinds of preferences: 1) per-window preferences, in the
Preferences menu, and 2) default settings for preferences in newly created
windows, in the Default Settings sub-menu of the Preferences menu.
Per-window preferences are not saved by Save Defaults, only Default
Settings.
</P><P>
<B>P: Columns and indentation don't line up.</B>
</P><P>
S: NEdit is using a proportional width font. Set the font to a fixed style
(see Preferences menu).
</P><P>
<B>P: NEdit performs poorly on very large files.</B>
</P><P>
S: Turn off Incremental Backup. With Incremental Backup on, NEdit
periodically writes a full copy of the file to disk.
</P><P>
<B>P: Commands added to the Shell Commands menu (Unix only) don't output anything until they are finished executing.</B>
</P><P>
S: If the command output is directed to a dialog, or the input is from a
selection, output is collected together and held until the command
completes. De-select both of the options and the output will be shown
incrementally as the command executes.
</P><P>
<B>P: Dialogs don't automatically get keyboard focus when they pop up.</B>
</P><P>
S: Most X Window managers allow you to choose between two categories of
keyboard focus models: pointer focus, and explicit focus. Pointer focus
means that as you move the mouse around the screen, the window under the
mouse automatically gets the keyboard focus. NEdit users who use this
focus model should set "Popups Under Pointer" in the Default Settings sub
menu of the preferences menu in NEdit. Users with the explicit focus
model, in some cases, may have problems with certain dialogs, such as Find
and Replace. In MWM this is caused by the mwm resource startupKeyFocus
being set to False (generally a bad choice for explicit focus users).
NCDwm users should use the focus model "click" instead of "explicit",
again, unless you have set it that way to correct specific problems, this
is the appropriate setting for most explicit focus users.
</P><P>
<B>P: The Backspace key doesn't work, or deletes forward rather than backward.</B>
</P><P>
S: While this is an X/Motif binding problem, and should be solved outside of
NEdit in the Motif virtual binding layer (or possibly xmodmap or
translations), NEdit provides an out. If you set the resource:
nedit.remapDeleteKey to True, NEdit will forcibly map the delete key to
backspace. The default setting of this resource recently changed, so
users who have been depending on this remapping will now have to set it
explicitly (or fix their bindings).
</P><P>
<B>P: NEdit crashes when I try to paste text in to a text field in a dialog (like Find or Replace) on my SunOS system.</B>
</P><P>
S: On many SunOS systems, you have to set up an nls directory before various
inter-client communication features of Motif will function properly.
There are instructions in README.sun in /pub/v5_0_2/individual/README.sun on
ftp.nedit.org, as well as a tar file containing a complete nls
directory: ftp://ftp.nedit.org/pub/v5_0_2/nls.tar.
README.sun contains directions for setting up an nls directory, which
is required by Motif for handling copy and paste to Motif text fields.
</P><P>
<H3>Known Defects</H3>
</P><P>
Below is the list of known defects which affect NEdit. The defects your copy
of NEdit will exhibit depend on which system you are running and with which
Motif libraries it was built. Note that there are now Motif 1.2 and/or 2.0
libraries available on ALL supported platforms, and as you can see below
there are far fewer defects in Motif 1.2, so it is in your best interest to
upgrade your system.
</P><P>
<H4>All Versions</H4>
</P><P>
<PRE>
<B>DEFECT</B>
</PRE>
Operations between rectangular selections on overlapping lines do nothing.
</P><P>
<PRE>
<I>Work Around</I>
</PRE>
None. These operations are very complicated and rarely used.
</P><P>
<PRE>
<B>DEFECT</B>
</PRE>
Cut and Paste menu items fail, or possibly crash,
for very large (multi-megabyte) selections.
</P><P>
<PRE>
<I>Work Around</I>
</PRE>
Use selection copy (middle mouse button click)
for transferring larger quantities of data.
Cut and Paste save the copied text in server
memory, which is usually limited.
</P><P>
<H3>Reporting Defects</H3>
</P><P>
Submit bugs through the web at:
</P><P>
<PRE>
http://sf.net/tracker/?func=add&group_id=11005&atid=111005
</PRE>
</P><P>
Please include the first few lines from Help > Version, which identifies
NEdit's version and other system attributes important for diagnosing your
problem.
</P><P>
The NEdit developers subscribe to both discuss@nedit.org and
develop@nedit.org, either of which may be used for reporting defects. If
you're not sure, or you think the report might be of interest to the general
NEdit user community, send the report to <A HREF="mailto:discuss@nedit.org">discuss@nedit.org</A>. If it's
something obvious and boring, like we misspelled "anemometer" in the on-line
help, send it to <A HREF="mailto:develop@nedit.org">develop@nedit.org</A>. If you don't want to subscribe to the
<A HREF="#Mailing_Lists">Mailing Lists</A>, please add a note to your mail about cc'ing you on responses.
</P><P>
</P>
</BODY>
</HTML>
|