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
|
.TH DTERC 5 "March 2021"
.nh
.ad l
.
.SH NAME
dterc \- Command and configuration language used by \fBdte\fR(1)
.SH SYNOPSIS
.P
Commands:
.br
.P
Configuration Commands:
.br
\fBalias\fR \fIname\fR \fIcommand\fR
.br
\fBbind\fR \fIkey\fR [\fIcommand\fR]
.br
\fBset\fR [\fB\-gl\fR] \fIoption\fR [\fIvalue\fR] ...
.br
\fBsetenv\fR \fIname\fR [\fIvalue\fR]
.br
\fBhi\fR [\fB\-c\fR] \fIname\fR [\fIfg\-color\fR [\fIbg\-color\fR]] [\fIattribute\fR]...
.br
\fBft\fR [\fB\-b\fR|\fB\-c\fR|\fB\-f\fR|\fB\-i\fR] \fIfiletype\fR \fIstring\fR...
.br
\fBoption\fR [\fB\-r\fR] \fIfiletype\fR \fIoption\fR \fIvalue\fR...
.br
\fBinclude\fR [\fB\-bq\fR] \fIfile\fR
.br
\fBerrorfmt\fR [\fB\-i\fR] \fIcompiler\fR \fIregexp\fR [file|line|column|message|_]...
.br
\fBload\-syntax\fR \fIfilename\fR|\fIfiletype\fR
.br
.P
Editor Commands:
.br
\fBquit\fR [\fB\-f\fR|\fB\-p\fR] [\fIexitcode\fR]
.br
\fBsuspend\fR
.br
\fBcd\fR \fIdirectory\fR
.br
\fBcommand\fR [\fItext\fR]
.br
\fBsearch\fR [\fB\-Hnprw\fR] [\fIpattern\fR]
.br
\fBrefresh\fR
.br
.P
Buffer Management Commands:
.br
\fBopen\fR [\fB\-g\fR|\fB\-t\fR] [\fB\-e\fR \fIencoding\fR] [\fIfilename\fR]...
.br
\fBsave\fR [\fB\-fp\fR] [\fB\-d\fR|\fB\-u\fR] [\fB\-b\fR|\fB\-B\fR] [\fB\-e\fR \fIencoding\fR] [\fIfilename\fR]
.br
\fBclose\fR [\fB\-qw\fR] [\fB\-f\fR|\fB\-p\fR]
.br
\fBnext\fR
.br
\fBprev\fR
.br
\fBview\fR \fIN\fR|\fBlast\fR
.br
\fBmove\-tab\fR \fIN\fR|\fBleft\fR|\fBright\fR
.br
.P
Window Management Commands:
.br
\fBwsplit\fR [\fB\-bghnrt\fR] [\fIfilename\fR]...
.br
\fBwclose\fR [\fB\-f\fR|\fB\-p\fR]
.br
\fBwnext\fR
.br
\fBwprev\fR
.br
\fBwresize\fR [\fB\-h\fR|\fB\-v\fR] [\fIN\fR|+\fIN\fR|\-\- \-\fIN\fR]
.br
\fBwflip\fR
.br
\fBwswap\fR
.br
.P
Movement Commands:
.br
\fBleft\fR [\fB\-c\fR]
.br
\fBright\fR [\fB\-c\fR]
.br
\fBup\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBdown\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBpgup\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBpgdown\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBblkup\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBblkdown\fR [\fB\-c\fR|\fB\-l\fR]
.br
\fBword\-fwd\fR [\fB\-cs\fR]
.br
\fBword\-bwd\fR [\fB\-cs\fR]
.br
\fBbol\fR [\fB\-cs\fR]
.br
\fBeol\fR [\fB\-c\fR]
.br
\fBbof\fR
.br
\fBeof\fR
.br
\fBbolsf\fR
.br
\fBeolsf\fR
.br
\fBscroll\-up\fR
.br
\fBscroll\-down\fR
.br
\fBscroll\-pgup\fR
.br
\fBscroll\-pgdown\fR
.br
\fBcenter\-view\fR
.br
\fBmatch\-bracket\fR
.br
\fBline\fR \fInumber\fR
.br
\fBtag\fR [\fB\-r\fR] [\fItag\fR]
.br
\fBmsg\fR [\fB\-n\fR|\fB\-p\fR]
.br
.P
Editing Commands:
.br
\fBcut\fR
.br
\fBcopy\fR [\fB\-k\fR]
.br
\fBpaste\fR [\fB\-c\fR]
.br
\fBundo\fR
.br
\fBredo\fR [\fIchoice\fR]
.br
\fBclear\fR
.br
\fBjoin\fR
.br
\fBnew\-line\fR
.br
\fBdelete\fR
.br
\fBerase\fR
.br
\fBdelete\-eol\fR [\fB\-n\fR]
.br
\fBerase\-bol\fR
.br
\fBdelete\-word\fR [\fB\-s\fR]
.br
\fBerase\-word\fR [\fB\-s\fR]
.br
\fBdelete\-line\fR
.br
\fBcase\fR [\fB\-l\fR|\fB\-u\fR]
.br
\fBinsert\fR [\fB\-km\fR] \fItext\fR
.br
\fBreplace\fR [\fB\-bcgi\fR] \fIpattern\fR \fIreplacement\fR
.br
\fBshift\fR \fIcount\fR
.br
\fBwrap\-paragraph\fR [\fIwidth\fR]
.br
\fBselect\fR [\fB\-bkl\fR]
.br
\fBunselect\fR
.br
.P
External Commands:
.br
\fBfilter\fR [\fB\-l\fR] \fIcommand\fR [\fIparameter\fR]...
.br
\fBpipe\-from\fR [\fB\-ms\fR] \fIcommand\fR [\fIparameter\fR]...
.br
\fBpipe\-to\fR [\fB\-l\fR] \fIcommand\fR [\fIparameter\fR]...
.br
\fBrun\fR [\fB\-ps\fR] \fIcommand\fR [\fIparameters\fR]...
.br
\fBcompile\fR [\fB\-1ps\fR] \fIerrorfmt\fR \fIcommand\fR [\fIparameters\fR]...
.br
\fBeval\fR \fIcommand\fR [\fIparameter\fR]...
.br
\fBexec\-open\fR [\fB\-s\fR] \fIcommand\fR [\fIparameter\fR]...
.br
\fBexec\-tag\fR [\fB\-s\fR] \fIcommand\fR [\fIparameter\fR]...
.br
.P
Other Commands:
.br
\fBrepeat\fR \fIcount\fR \fIcommand\fR [\fIparameters\fR]...
.br
\fBtoggle\fR [\fB\-gv\fR] \fIoption\fR [\fIvalues\fR]...
.br
\fBshow\fR [\fB\-c\fR] \fItype\fR [\fIkey\fR]
.br
\fBmacro\fR \fIaction\fR
.br
.P
Options:
.br
.P
Global options:
.br
\fBcase\-sensitive\-search\fR [true]
.br
\fBdisplay\-invisible\fR [false]
.br
\fBdisplay\-special\fR [false]
.br
\fBesc\-timeout\fR [100] 0...2000
.br
\fBfilesize\-limit\fR [250]
.br
\fBlock\-files\fR [true]
.br
\fBnewline\fR [unix]
.br
\fBselect\-cursor\-char\fR [true]
.br
\fBscroll\-margin\fR [0]
.br
\fBset\-window\-title\fR [false]
.br
\fBshow\-line\-numbers\fR [false]
.br
\fBstatusline\-left\fR [" %f%s%m%r%s%M"]
.br
\fBstatusline\-right\fR [" %y,%X %u %E%s%b%s%n %t %p "]
.br
\fBtab\-bar\fR [true]
.br
\fButf8\-bom\fR [false]
.br
.P
Local options:
.br
\fBbrace\-indent\fR [false]
.br
\fBfiletype\fR [none]
.br
\fBindent\-regex\fR [""]
.br
.P
Local and global options:
.br
\fBauto\-indent\fR [true]
.br
\fBdetect\-indent\fR [""]
.br
\fBemulate\-tab\fR [false]
.br
\fBexpand\-tab\fR [false]
.br
\fBfile\-history\fR [true]
.br
\fBindent\-width\fR [8]
.br
\fBsyntax\fR [true]
.br
\fBtab\-width\fR [8]
.br
\fBtext\-width\fR [72]
.br
\fBws\-error\fR [special]
.br
.SH DESCRIPTION
dterc is the language used in \fBdte\fR(1) configuration files (\fB~/.dte/rc\fR)
and also in the command mode of the editor (Alt+x). The syntax of the
language is quite similar to shell, but much simpler.
.P
Commands are separated either by a newline or \fB;\fR character. To make a
command span multiple lines in an rc file, escape the newline (put \fB\\\fR
at the end of the line).
.P
Rc files can contain comments at the start of a line. Comments begin
with a \fB#\fR character and can be indented, but they can't be put on the
same line as a command.
.P
Commands can contain environment variables. Variables always expand into
a single argument even if they contain whitespace. Variables inside
single or double quotes are NOT expanded. This makes it possible to bind
keys to commands that contain variables (inside single or double
quotes), which will be expanded just before the command is executed.
.P
Example:
.P
.IP
.nf
\f[C]
alias\ x\ "run\ chmod\ 755\ $FILE"
\f[]
.fi
.PP
\fB$FILE\fR is expanded when the alias \fIx\fR is executed. The command works even
if \fB$FILE\fR contains whitespace.
.P
.SS Special variables
These variables are always defined and override environment variables of
the same name.
.P
\fB$FILE\fR
.RS
The filename of the current buffer (or an empty string if unsaved).
.P
.RE
\fB$FILETYPE\fR
.RS
The value of the \fBfiletype\fR option for the current buffer.
.P
.RE
\fB$LINENO\fR
.RS
The line number of the cursor in the current buffer.
.P
.RE
\fB$WORD\fR
.RS
The selected text or the word under the cursor.
.P
.RE
\fB$DTE_HOME\fR
.RS
The user configuration directory. This is either the value of \fB$DTE_HOME\fR
when the editor first started, or the default value (\fB$HOME/.dte\fR).
.P
.RE
.SS Single quoted strings
Single quoted strings can't contain single quotes or escaped characters.
.P
.SS Double quoted strings
Double quoted strings may contain the following escapes:
.P
.TP
\fB\\a\fR, \fB\\b\fR, \fB\\t\fR, \fB\\n\fR, \fB\\v\fR, \fB\\f\fR, \fB\\r\fR
Control characters (same as in C)
.PP
.TP
\fB\\e\fR
Escape character
.PP
.TP
\fB\\\\\fR
Backslash
.PP
.TP
\fB\\"\fR
Double quote
.PP
.TP
\fB\\x0a\fR
Hexadecimal byte value 0x0a. Note that \fB\\x00\fR is not supported
because strings are NUL\-terminated.
.PP
.TP
\fB\\u20ac\fR
Four hex digit Unicode code point U+20AC.
.PP
.TP
\fB\\U000020ac\fR
Eight hex digit Unicode code point U+20AC.
.PP
.SH COMMANDS
.SS Configuration Commands
Configuration commands are used to customize certain aspects of the
editor, for example adding key bindings, setting options, etc. These
are the only commands allowed in user config files.
.P
\fBalias\fR \fIname\fR \fIcommand\fR
.RS
Create an alias \fIname\fR for \fIcommand\fR.
.P
Example:
.P
.IP
.nf
\f[C]
alias\ read\ 'pipe\-from\ cat'
\f[]
.fi
.PP
Now you can run \fBread file.txt\fR to insert \fBfile.txt\fR into the current
buffer.
.P
.RE
\fBbind\fR \fIkey\fR [\fIcommand\fR]
.RS
Bind \fIcommand\fR to \fIkey\fR. If no \fIcommand\fR is given then any existing
binding for \fIkey\fR is removed.
.P
Special keys:
.P
\(bu \fBleft\fR
.br
\(bu \fBright\fR
.br
\(bu \fBup\fR
.br
\(bu \fBdown\fR
.br
\(bu \fBinsert\fR
.br
\(bu \fBdelete\fR
.br
\(bu \fBhome\fR
.br
\(bu \fBend\fR
.br
\(bu \fBpgup\fR
.br
\(bu \fBpgdown\fR
.br
\(bu \fBbegin\fR (keypad "5" with Num Lock off)
.br
\(bu \fBenter\fR
.br
\(bu \fBtab\fR
.br
\(bu \fBspace\fR
.br
\(bu \fBF1\fR..\fBF12\fR
.br
.P
Modifiers:
.P
.TP
Ctrl:
\fBC\-X\fR or \fB^X\fR
.PP
.TP
Alt:
\fBM\-X\fR
.PP
.TP
Shift:
\fBS\-left\fR
.PP
.RE
\fBset\fR [\fB\-gl\fR] \fIoption\fR [\fIvalue\fR] ...
.RS
Set \fIvalue\fR for \fIoption\fR. Value can be omitted for boolean option to set
it true. Multiple options can be set at once but then \fIvalue\fR must be
given for every option.
.P
There are three kinds of options.
.P
1. Global options.
.P
.
.br
2. Local options. These are file specific options. Each open file has
its own copies of the option values.
.P
.
.br
3. Options that have both global and local values. The Global value is
just a default local value for opened files and is never used for
anything else. Changing the global value does not affect any already
opened files.
.P
.
.br
.P
By default \fBset\fR changes both global and local values.
.P
.TP
\fB\-g\fR
Change only global option value
.PP
.TP
\fB\-l\fR
Change only local option value of current file
.PP
In configuration files only global options can be set (no need
to specify the \fB\-g\fR flag).
.P
See also: \fBtoggle\fR and \fBoption\fR commands.
.P
.RE
\fBsetenv\fR \fIname\fR [\fIvalue\fR]
.RS
Set (or unset) environment variable.
.P
.RE
\fBhi\fR [\fB\-c\fR] \fIname\fR [\fIfg\-color\fR [\fIbg\-color\fR]] [\fIattribute\fR]...
.RS
Set highlight color.
.P
The \fIname\fR argument can be a token name defined by a \fBdte\-syntax\fR(5) file
or one of the following, built\-in highlight names:
.P
\(bu \fBdefault\fR
.br
\(bu \fBnontext\fR
.br
\(bu \fBnoline\fR
.br
\(bu \fBwserror\fR
.br
\(bu \fBselection\fR
.br
\(bu \fBcurrentline\fR
.br
\(bu \fBlinenumber\fR
.br
\(bu \fBstatusline\fR
.br
\(bu \fBcommandline\fR
.br
\(bu \fBerrormsg\fR
.br
\(bu \fBinfomsg\fR
.br
\(bu \fBtabbar\fR
.br
\(bu \fBactivetab\fR
.br
\(bu \fBinactivetab\fR
.br
\(bu \fBdialog\fR
.br
.P
The \fIfg\-color\fR and \fIbg\-color\fR arguments can be one of the following:
.P
\(bu No value (equivalent to \fBdefault\fR)
.br
\(bu A numeric value between \fB\-2\fR and \fB255\fR
.br
\(bu A 256\-color palette value in R/G/B notation (e.g. \fB0/3/5\fR)
.br
\(bu A true color value in CSS\-style #RRGGBB notation (e.g. \fB#ab90df\fR)
.br
\(bu \fBkeep\fR (\fB\-2\fR)
.br
\(bu \fBdefault\fR (\fB\-1\fR)
.br
\(bu \fBblack\fR (\fB0\fR)
.br
\(bu \fBred\fR (\fB1\fR)
.br
\(bu \fBgreen\fR (\fB2\fR)
.br
\(bu \fByellow\fR (\fB3\fR)
.br
\(bu \fBblue\fR (\fB4\fR)
.br
\(bu \fBmagenta\fR (\fB5\fR)
.br
\(bu \fBcyan\fR (\fB6\fR)
.br
\(bu \fBgray\fR (\fB7\fR)
.br
\(bu \fBdarkgray\fR (\fB8\fR)
.br
\(bu \fBlightred\fR (\fB9\fR)
.br
\(bu \fBlightgreen\fR (\fB10\fR)
.br
\(bu \fBlightyellow\fR (\fB11\fR)
.br
\(bu \fBlightblue\fR (\fB12\fR)
.br
\(bu \fBlightmagenta\fR (\fB13\fR)
.br
\(bu \fBlightcyan\fR (\fB14\fR)
.br
\(bu \fBwhite\fR (\fB15\fR)
.br
.P
Colors \fB16\fR to \fB231\fR correspond to R/G/B colors. Colors \fB232\fR to \fB255\fR
are grayscale values.
.P
If the terminal has limited support for rendering colors, the \fIfg\-color\fR
and \fIbg\-color\fR arguments will fall back to the nearest supported color
(unless the \fB\-c\fR flag is used).
.P
The \fIattribute\fR argument(s) can be any combination of the following:
.P
\(bu \fBbold\fR
.br
\(bu \fBdim\fR
.br
\(bu \fBitalic\fR
.br
\(bu \fBunderline\fR
.br
\(bu \fBstrikethrough\fR
.br
\(bu \fBblink\fR
.br
\(bu \fBreverse\fR
.br
\(bu \fBinvisible\fR
.br
\(bu \fBkeep\fR
.br
.P
The color and attribute value \fBkeep\fR is useful in selected text
to keep \fIfg\-color\fR and attributes and change only \fIbg\-color\fR.
.P
NOTE: Because \fBkeep\fR is both a color and an attribute you need to
specify both \fIfg\-color\fR and \fIbg\-color\fR if you want to set the \fBkeep\fR
\fIattribute\fR.
.P
Unset fg/bg colors are inherited from highlight color \fBdefault\fR.
If you don't set fg/bg for the highlight color \fBdefault\fR then
terminal's default fg/bg is used.
.P
.TP
\fB\-c\fR
Do nothing at all if the terminal can't display \fIfg\-color\fR and/or
\fIbg\-color\fR with full precision
.PP
.RE
\fBft\fR [\fB\-b\fR|\fB\-c\fR|\fB\-f\fR|\fB\-i\fR] \fIfiletype\fR \fIstring\fR...
.RS
Add a filetype association. Filetypes are used to determine which
syntax highlighter and local options to use when opening files.
.P
By default \fIstring\fR is interpreted as one or more filename extensions.
.P
.TP
\fB\-b\fR
Interpret \fIstring\fR as a file basename
.PP
.TP
\fB\-c\fR
Interpret \fIstring\fR as a \fBregex\fR(7) pattern and match against the
contents of the first line of the file
.PP
.TP
\fB\-f\fR
Interpret \fIstring\fR as a \fBregex\fR(7) pattern and match against the
full (absolute) filename
.PP
.TP
\fB\-i\fR
Interpret \fIstring\fR as a command interpreter name and match against
the Unix shebang line (after removing any path prefix and/or version
suffix)
.PP
Examples:
.P
.IP
.nf
\f[C]
ft\ c\ c\ h
ft\ \-b\ make\ Makefile\ GNUmakefile
ft\ \-c\ xml\ '<\\?xml'
ft\ \-f\ mail\ '/tmpmsg\-.*\\.txt$'
ft\ \-i\ lua\ lua\ luajit
\f[]
.fi
.PP
See also:
.P
\(bu The \fBoption\fR command (below)
.br
\(bu The \fBfiletype\fR option (below)
.br
\(bu The \fBdte\-syntax\fR(5) man page
.br
.P
.RE
\fBoption\fR [\fB\-r\fR] \fIfiletype\fR \fIoption\fR \fIvalue\fR...
.RS
Add automatic \fIoption\fR for \fIfiletype\fR (as previously registered
with the \fBft\fR command). Automatic options are set when files are
are opened.
.P
.TP
\fB\-r\fR
Interpret \fIfiletype\fR argument as a \fBregex\fR(7) pattern instead of a
filetype and match against full filenames
.PP
.RE
\fBinclude\fR [\fB\-bq\fR] \fIfile\fR
.RS
Read and execute commands from \fIfile\fR.
.P
.TP
\fB\-b\fR
Read built\-in \fIfile\fR instead of reading from the filesystem
.PP
.TP
\fB\-q\fR
Don't show an error message if \fIfile\fR doesn't exist
.PP
Note: "built\-in files" are config files bundled into the program binary.
See the \fB\-B\fR and \fB\-b\fR flags in the \fBdte\fR(1) man page for more information.
.P
.RE
\fBerrorfmt\fR [\fB\-i\fR] \fIcompiler\fR \fIregexp\fR [file|line|column|message|_]...
.RS
Register a \fBregex\fR(7) pattern, for later use with the \fBcompile\fR command.
.P
When the \fBcompile\fR command is invoked with a specific \fIcompiler\fR name,
the \fIregexp\fR pattern(s) previously registered with that name are used to
parse messages from it's program output.
.P
The \fIregexp\fR pattern should contain as many capture groups as there are
extra arguments. These capture groups are used to parse the file, line,
message, etc. from the output and, if possible, jump to the corresponding
file position. To use parentheses in \fIregexp\fR but ignore the capture, use
\fB_\fR as the extra argument.
.P
Running \fBerrorfmt\fR multiple times with the same \fIcompiler\fR name appends
each \fIregexp\fR to a list. When running \fBcompile\fR, the entries in the
specified list are checked for a match in the same order they were added.
.P
For a basic example of usage, see the output of \fBdte \-b compiler/go\fR.
.P
.TP
\fB\-i\fR
Ignore this error
.PP
.RE
\fBload\-syntax\fR \fIfilename\fR|\fIfiletype\fR
.RS
Load a \fBdte\-syntax\fR(5) file into the editor. If the argument contains a
\fB/\fR character it's considered a filename.
.P
Note: this command only loads a syntax file ready for later use. To
actually apply a syntax highlighter to the current buffer, use the
\fBset\fR command to change the \fBfiletype\fR of the buffer instead, e.g.
\fBset filetype html\fR.
.P
.RE
.SS Editor Commands
\fBquit\fR [\fB\-f\fR|\fB\-p\fR] [\fIexitcode\fR]
.RS
Quit the editor.
.P
The exit status of the process is set to \fIexitcode\fR, which can be
in the range \fB0\fR..\fB125\fR, or defaults to \fB0\fR if unspecified.
.P
.TP
\fB\-f\fR
Force quit, even if there are unsaved files
.PP
.TP
\fB\-p\fR
Prompt for confirmation if there are unsaved files
.PP
.RE
\fBsuspend\fR
.RS
Suspend the editor (run \fBfg\fR in the shell to resume).
.P
.RE
\fBcd\fR \fIdirectory\fR
.RS
Change the working directory and update \fB$PWD\fR and \fB$OLDPWD\fR. Running
\fBcd \-\fR changes to the previous directory (\fB$OLDPWD\fR).
.P
.RE
\fBcommand\fR [\fItext\fR]
.RS
Enter command mode. If \fItext\fR is given then it is written to the command
line (see the default \fB^L\fR key binding for why this is useful).
.P
.RE
\fBsearch\fR [\fB\-Hnprw\fR] [\fIpattern\fR]
.RS
If no flags or just \fB\-r\fR and no \fIpattern\fR given then dte changes to
search mode where you can type a regular expression to search.
.P
.TP
\fB\-H\fR
Don't add \fIpattern\fR to search history
.PP
.TP
\fB\-n\fR
Search next
.PP
.TP
\fB\-p\fR
Search previous
.PP
.TP
\fB\-r\fR
Start searching backwards
.PP
.TP
\fB\-w\fR
Search word under cursor
.PP
.RE
\fBrefresh\fR
.RS
Trigger a full redraw of the screen.
.P
.RE
.SS Buffer Management Commands
\fBopen\fR [\fB\-g\fR|\fB\-t\fR] [\fB\-e\fR \fIencoding\fR] [\fIfilename\fR]...
.RS
Open file. If \fIfilename\fR is omitted, a new file is opened.
.P
.TP
\fB\-e\fR \fIencoding\fR
Set file \fIencoding\fR. See \fBiconv \-l\fR for list of supported encodings.
.PP
.TP
\fB\-g\fR
Perform \fBglob\fR(7) expansion on \fIfilename\fR.
.PP
.TP
\fB\-t\fR
Mark buffer as "temporary" (always closeable, without warnings for
"unsaved changes")
.PP
.RE
\fBsave\fR [\fB\-fp\fR] [\fB\-d\fR|\fB\-u\fR] [\fB\-b\fR|\fB\-B\fR] [\fB\-e\fR \fIencoding\fR] [\fIfilename\fR]
.RS
Save current buffer.
.P
.TP
\fB\-b\fR
Write byte order mark (BOM)
.PP
.TP
\fB\-B\fR
Don't write byte order mark
.PP
.TP
\fB\-d\fR
Save with DOS/CRLF line\-endings
.PP
.TP
\fB\-f\fR
Force saving read\-only file
.PP
.TP
\fB\-u\fR
Save with Unix/LF line\-endings
.PP
.TP
\fB\-p\fR
Open a command prompt if there's no specified or existing \fIfilename\fR
.PP
.TP
\fB\-e\fR \fIencoding\fR
Set file \fIencoding\fR. See \fBiconv \-l\fR for list of supported encodings.
.PP
See also: \fBnewline\fR and \fButf8\-bom\fR global options
.P
.RE
\fBclose\fR [\fB\-qw\fR] [\fB\-f\fR|\fB\-p\fR]
.RS
Close file.
.P
.TP
\fB\-f\fR
Force close file, even if it has unsaved changes
.PP
.TP
\fB\-p\fR
Prompt for confirmation if the file has unsaved changes
.PP
.TP
\fB\-q\fR
Quit if closing the last open file
.PP
.TP
\fB\-w\fR
Close parent window if closing its last contained file
.PP
.RE
\fBnext\fR
.RS
Display next file.
.P
.RE
\fBprev\fR
.RS
Display previous file.
.P
.RE
\fBview\fR \fIN\fR|\fBlast\fR
.RS
Display \fIN\fRth or last open file.
.P
.RE
\fBmove\-tab\fR \fIN\fR|\fBleft\fR|\fBright\fR
.RS
Move current tab to position \fIN\fR or 1 position left or right.
.P
.RE
.SS Window Management Commands
\fBwsplit\fR [\fB\-bghnrt\fR] [\fIfilename\fR]...
.RS
Split the current window.
.P
\fIfilename\fR arguments will be opened in a manner similar to the \fBopen\fR
command. If there are no arguments, the contents of the new window will
be an additional view of the current buffer.
.P
.TP
\fB\-b\fR
Add new window before current instead of after.
.PP
.TP
\fB\-g\fR
Perform \fBglob\fR(7) expansion on \fIfilename\fR.
.PP
.TP
\fB\-h\fR
Split horizontally instead of vertically.
.PP
.TP
\fB\-n\fR
Create a new, empty buffer.
.PP
.TP
\fB\-r\fR
Split root instead of current window.
.PP
.TP
\fB\-t\fR
Mark buffer as "temporary" (always closeable, without warnings
for "unsaved changes")
.PP
.RE
\fBwclose\fR [\fB\-f\fR|\fB\-p\fR]
.RS
Close window.
.P
.TP
\fB\-f\fR
Force close window, even if it contains unsaved files
.PP
.TP
\fB\-p\fR
Prompt for confirmation if there are unsaved files in the window
.PP
.RE
\fBwnext\fR
.RS
Next window.
.P
.RE
\fBwprev\fR
.RS
Previous window.
.P
.RE
\fBwresize\fR [\fB\-h\fR|\fB\-v\fR] [\fIN\fR|+\fIN\fR|\-\- \-\fIN\fR]
.RS
If no parameter given, equalize window sizes in current frame.
.P
.TP
\fB\-h\fR
Resize horizontally
.PP
.TP
\fB\-v\fR
Resize vertically
.PP
.TP
\fIN\fR
Set size of current window to \fIN\fR characters.
.PP
.TP
\fB+\fR\fIN\fR
Increase size of current window by \fIN\fR characters.
.PP
.TP
\fB\-\fR\fIN\fR
Decrease size of current window by \fIN\fR characters. Use \fB\-\-\fR to
prevent the minus symbol being parsed as an option flag, e.g.
\fBwresize \-\- \-5\fR.
.PP
.RE
\fBwflip\fR
.RS
Change from vertical layout to horizontal and vice versa.
.P
.RE
\fBwswap\fR
.RS
Swap positions of this and next frame.
.P
.RE
.SS Movement Commands
Movement commands are used to move the cursor position.
.P
Several of these commands also have \fB\-c\fR and \fB\-l\fR flags to allow
creating character/line selections. These 2 flags are noted in the
command summaries below, but are only described once, as follows:
.P
.TP
\fB\-c\fR
Select characters
.PP
.TP
\fB\-l\fR
Select whole lines
.PP
\fBleft\fR [\fB\-c\fR]
.RS
Move one column left.
.P
.RE
\fBright\fR [\fB\-c\fR]
.RS
Move one column right.
.P
.RE
\fBup\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one line up.
.P
.RE
\fBdown\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one line down.
.P
.RE
\fBpgup\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one page up.
.P
.RE
\fBpgdown\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one page down.
.P
.RE
\fBblkup\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one block up.
.P
Note: a "block", in this context, is somewhat akin to a paragraph.
Blocks are delimited by one or more blank lines
.P
.RE
\fBblkdown\fR [\fB\-c\fR|\fB\-l\fR]
.RS
Move one block down.
.P
.RE
\fBword\-fwd\fR [\fB\-cs\fR]
.RS
Move forward one word.
.P
.TP
\fB\-s\fR
Skip special characters
.PP
.RE
\fBword\-bwd\fR [\fB\-cs\fR]
.RS
Move backward one word.
.P
.TP
\fB\-s\fR
Skip special characters
.PP
.RE
\fBbol\fR [\fB\-cs\fR]
.RS
Move to beginning of current line.
.P
.TP
\fB\-s\fR
Move to beginning of indented text or beginning of line, depending
on current cursor position.
.PP
.RE
\fBeol\fR [\fB\-c\fR]
.RS
Move to end of current line.
.P
.RE
\fBbof\fR
.RS
Move to beginning of file.
.P
.RE
\fBeof\fR
.RS
Move to end of file.
.P
.RE
\fBbolsf\fR
.RS
Incrementally move to beginning of line, then beginning of screen, then
beginning of file.
.P
.RE
\fBeolsf\fR
.RS
Incrementally move to end of line, then end of screen, then end of file.
.P
.RE
\fBscroll\-up\fR
.RS
Scroll view up one line. Keeps cursor position unchanged if possible.
.P
.RE
\fBscroll\-down\fR
.RS
Scroll view down one line. Keeps cursor position unchanged if possible.
.P
.RE
\fBscroll\-pgup\fR
.RS
Scroll one page up. Cursor position relative to top of screen is
maintained. See also \fBpgup\fR.
.P
.RE
\fBscroll\-pgdown\fR
.RS
Scroll one page down. Cursor position relative to top of screen is
maintained. See also \fBpgdown\fR.
.P
.RE
\fBcenter\-view\fR
.RS
Center view to cursor.
.P
.RE
\fBmatch\-bracket\fR
.RS
Move to the bracket character paired with the one under the cursor.
The character under the cursor should be one of \fB{}[]()<>\fR.
.P
.RE
\fBline\fR \fInumber\fR
.RS
Go to line.
.P
.RE
\fBtag\fR [\fB\-r\fR] [\fItag\fR]
.RS
Save the current location and jump to the location of \fItag\fR. If no \fItag\fR
argument is specified then the word under the cursor is used instead.
.P
This command requires a \fBtags\fR file generated by \fBctags\fR(1). \fBtags\fR files
are searched for in the current working directory and its parent
directories.
.P
.TP
\fB\-r\fR
jump back to the previous location
.PP
See also: \fBmsg\fR command.
.P
.RE
\fBmsg\fR [\fB\-n\fR|\fB\-p\fR]
.RS
Show latest, next (\fB\-n\fR) or previous (\fB\-p\fR) message. If its location
is known (compile error or tag message) then the file will be
opened and cursor moved to the location.
.P
.TP
\fB\-n\fR
Next message
.PP
.TP
\fB\-p\fR
Previous message
.PP
See also: \fBcompile\fR and \fBtag\fR commands.
.P
.RE
.SS Editing Commands
\fBcut\fR
.RS
Cut current line or selection.
.P
.RE
\fBcopy\fR [\fB\-k\fR]
.RS
Copy current line or selection.
.P
.TP
\fB\-k\fR
Keep selection (by default, selections are lost after copying)
.PP
.RE
\fBpaste\fR [\fB\-c\fR]
.RS
Paste text previously copied by the \fBcopy\fR or \fBcut\fR commands.
.P
.TP
\fB\-c\fR
Paste at the cursor position, even when the text was copied as
a whole\-line selection (where the usual default is to paste at
the start of the next line)
.PP
.RE
\fBundo\fR
.RS
Undo latest change.
.P
.RE
\fBredo\fR [\fIchoice\fR]
.RS
Redo changes done by the \fBundo\fR command. If there are multiple
possibilities a message is displayed:
.P
.IP
.nf
\f[C]
Redoing\ newest\ (2)\ of\ 2\ possible\ changes.
\f[]
.fi
.PP
If the change was not the one you wanted, just run \fBundo\fR and
then, for example, \fBredo 1\fR.
.P
.RE
\fBclear\fR
.RS
Clear current line.
.P
.RE
\fBjoin\fR
.RS
Join selection or next line to current.
.P
.RE
\fBnew\-line\fR
.RS
Insert empty line under current line.
.P
.RE
\fBdelete\fR
.RS
Delete character after cursor (or selection).
.P
.RE
\fBerase\fR
.RS
Delete character before cursor (or selection).
.P
.RE
\fBdelete\-eol\fR [\fB\-n\fR]
.RS
Delete to end of line.
.P
.TP
\fB\-n\fR
Delete newline if cursor is at end of line
.PP
.RE
\fBerase\-bol\fR
.RS
Erase to beginning of line.
.P
.RE
\fBdelete\-word\fR [\fB\-s\fR]
.RS
Delete word after cursor.
.P
.TP
\fB\-s\fR
Be more "aggressive"
.PP
.RE
\fBerase\-word\fR [\fB\-s\fR]
.RS
Erase word before cursor.
.P
.TP
\fB\-s\fR
Be more "aggressive"
.PP
.RE
\fBdelete\-line\fR
.RS
Delete current line.
.P
.RE
\fBcase\fR [\fB\-l\fR|\fB\-u\fR]
.RS
Change text case. The default is to change lower case to upper case and
vice versa.
.P
.TP
\fB\-l\fR
Lower case
.PP
.TP
\fB\-u\fR
Upper case
.PP
.RE
\fBinsert\fR [\fB\-km\fR] \fItext\fR
.RS
Insert \fItext\fR into the buffer.
.P
.TP
\fB\-k\fR
Insert one character at a time, as if manually typed. Normally
\fItext\fR is inserted exactly as specified, but this option allows
it to be affected by special input handling like auto\-indents,
whitespace trimming, line\-by\-line undo, etc.
.PP
.TP
\fB\-m\fR
Move after inserted text
.PP
.RE
\fBreplace\fR [\fB\-bcgi\fR] \fIpattern\fR \fIreplacement\fR
.RS
Replace all instances of text matching \fIpattern\fR with the \fIreplacement\fR
text.
.P
The \fIpattern\fR argument is a POSIX extended \fBregex\fR(7).
.P
The \fIreplacement\fR argument is treated like a template and may contain
several, special substitutions:
.P
\(bu Backslash sequences \fB\\1\fR through \fB\\9\fR are replaced by sub\-strings
that were "captured" (via parentheses) in the \fIpattern\fR.
.br
\(bu The special character \fB&\fR is replaced by the full string that was
matched by \fIpattern\fR.
.br
\(bu Literal \fB\\\fR and \fB&\fR characters can be inserted in \fIreplacement\fR
by escaping them (as \fB\\\\\fR and \fB\\&\fR).
.br
\(bu All other characters in \fIreplacement\fR represent themselves.
.br
.P
Note: extra care must be taken when using double quotes for the
\fIpattern\fR argument, since double quoted arguments have their own
(higher precedence) backslash sequences.
.P
.TP
\fB\-b\fR
Use basic instead of extended regex syntax
.PP
.TP
\fB\-c\fR
Ask for confirmation before each replacement
.PP
.TP
\fB\-g\fR
Replace all matches for each line (instead of just the first)
.PP
.TP
\fB\-i\fR
Ignore case
.PP
Examples:
.P
.IP
.nf
\f[C]
replace\ 'Hello\ World'\ '&\ (Hallo\ Welt)'
replace\ "[\ \\t]+$"\ ''
replace\ \-cg\ '([^\ ]+)\ +([^\ ]+)'\ '\\2\ \\1'
\f[]
.fi
.PP
.RE
\fBshift\fR \fIcount\fR
.RS
Shift current or selected lines by \fIcount\fR indentation levels.
Count is usually \fB\-1\fR (decrease indent) or \fB1\fR (increase indent).
.P
To specify a negative number, it's necessary to first disable
option parsing with \fB\-\-\fR, e.g. \fBshift \-\- \-1\fR.
.P
.RE
\fBwrap\-paragraph\fR [\fIwidth\fR]
.RS
Format the current selection or paragraph under the cursor. If
paragraph \fIwidth\fR is not given then the \fBtext\-width\fR option is
used.
.P
This command merges the selection into one paragraph. To format
multiple paragraphs use the external \fBfmt\fR(1) program with the
\fBfilter\fR command, e.g. \fBfilter fmt \-w 60\fR.
.P
.RE
\fBselect\fR [\fB\-bkl\fR]
.RS
Enter selection mode. All movement commands while in this mode extend
the selected area.
.P
Note: A better way to create selections is to hold the Shift key whilst
moving the cursor. The \fBselect\fR command exists mostly as a fallback,
for terminals with limited key binding support.
.P
.TP
\fB\-b\fR
Select block between opening \fB{\fR and closing \fB}\fR curly braces
.PP
.TP
\fB\-k\fR
Keep existing selections
.PP
.TP
\fB\-l\fR
Select whole lines
.PP
.RE
\fBunselect\fR
.RS
Unselect.
.P
.RE
.SS External Commands
\fBfilter\fR [\fB\-l\fR] \fIcommand\fR [\fIparameter\fR]...
.RS
Filter selected text or whole file through external \fIcommand\fR.
.P
Example:
.P
.IP
.nf
\f[C]
filter\ sort\ \-r
\f[]
.fi
.PP
Note that \fIcommand\fR is executed directly using \fBexecvp\fR(3). To use shell
features like pipes or redirection, use a shell interpreter as the
\fIcommand\fR. For example:
.P
.IP
.nf
\f[C]
filter\ sh\ \-c\ 'tr\ a\-z\ A\-Z\ |\ sed\ s/foo/bar/'
\f[]
.fi
.PP
.TP
\fB\-l\fR
Operate on current line instead of whole file, if there's no selection
.PP
.RE
\fBpipe\-from\fR [\fB\-ms\fR] \fIcommand\fR [\fIparameter\fR]...
.RS
Run external \fIcommand\fR and insert its standard output.
.P
.TP
\fB\-m\fR
Move after the inserted text
.PP
.TP
\fB\-s\fR
Strip newline from end of output
.PP
.RE
\fBpipe\-to\fR [\fB\-l\fR] \fIcommand\fR [\fIparameter\fR]...
.RS
Run external \fIcommand\fR and pipe the selected text (or whole file) to
its standard input.
.P
Can be used to e.g. write text to the system clipboard:
.P
.IP
.nf
\f[C]
pipe\-to\ xsel\ \-b
\f[]
.fi
.PP
.TP
\fB\-l\fR
Operate on current line instead of whole file, if there's no selection
.PP
.RE
\fBrun\fR [\fB\-ps\fR] \fIcommand\fR [\fIparameters\fR]...
.RS
Run external \fIcommand\fR.
.P
.TP
\fB\-p\fR
Display "Press any key to continue" prompt
.PP
.TP
\fB\-s\fR
Silent \-\- both \fBstderr\fR(3) and \fBstdout\fR(3) are redirected to \fB/dev/null\fR
.PP
.RE
\fBcompile\fR [\fB\-1ps\fR] \fIerrorfmt\fR \fIcommand\fR [\fIparameters\fR]...
.RS
Run external \fIcommand\fR and collect output messages. This can be
used to run e.g. compilers, build systems, code search utilities,
etc. and then jump to a file/line position for each message.
.P
The \fIerrorfmt\fR argument corresponds to a regex capture pattern
previously specified by the \fBerrorfmt\fR command. After \fIcommand\fR
exits successfully, parsed messages can be navigated using the
\fBmsg\fR command.
.P
.TP
\fB\-1\fR
Read error messages from stdout instead of stderr
.PP
.TP
\fB\-p\fR
Display "Press any key to continue" prompt
.PP
.TP
\fB\-s\fR
Silent. Both \fBstderr\fR(3) and \fBstdout\fR(3) are redirected to \fB/dev/null\fR
.PP
See also: \fBerrorfmt\fR and \fBmsg\fR commands.
.P
.RE
\fBeval\fR \fIcommand\fR [\fIparameter\fR]...
.RS
Run external \fIcommand\fR and execute its standard output text as dterc
commands.
.P
.RE
\fBexec\-open\fR [\fB\-s\fR] \fIcommand\fR [\fIparameter\fR]...
.RS
Run external \fIcommand\fR and open all filenames listed on its standard
output.
.P
.TP
\fB\-s\fR
Don't yield terminal control to the child process
.PP
Example uses:
.P
.IP
.nf
\f[C]
exec\-open\ \-s\ find\ .\ \-type\ f\ \-name\ *.h
exec\-open\ \-s\ git\ ls\-files\ \-\-modified
exec\-open\ fzf\ \-m\ \-\-reverse
\f[]
.fi
.PP
.RE
\fBexec\-tag\fR [\fB\-s\fR] \fIcommand\fR [\fIparameter\fR]...
.RS
Run external \fIcommand\fR and then execute the \fBtag\fR command with its
first line of standard output as the argument.
.P
.TP
\fB\-s\fR
Don't yield terminal control to the child process
.PP
Example uses:
.P
.IP
.nf
\f[C]
exec\-tag\ \-s\ echo\ main
exec\-tag\ sh\ \-c\ 'readtags\ \-l\ |\ cut\ \-f1\ |\ sort\ |\ uniq\ |\ fzf\ \-\-reverse'
\f[]
.fi
.PP
.RE
.SS Other Commands
\fBrepeat\fR \fIcount\fR \fIcommand\fR [\fIparameters\fR]...
.RS
Run \fIcommand\fR \fIcount\fR times.
.P
.RE
\fBtoggle\fR [\fB\-gv\fR] \fIoption\fR [\fIvalues\fR]...
.RS
Toggle \fIoption\fR. If list of \fIvalues\fR is not given then the option
must be either boolean or enum.
.P
.TP
\fB\-g\fR
toggle global option instead of local
.PP
.TP
\fB\-v\fR
display new value
.PP
If \fIoption\fR has both local and global values then local is toggled
unless \fB\-g\fR is used.
.P
.RE
\fBshow\fR [\fB\-c\fR] \fItype\fR [\fIkey\fR]
.RS
Display current values for various configurable types.
.P
The \fItype\fR argument can be one of:
.P
.TP
\fBalias\fR
Show command aliases
.PP
.TP
\fBbind\fR
Show key bindings
.PP
.TP
\fBcolor\fR
Show highlight colors
.PP
.TP
\fBcommand\fR
Show command history
.PP
.TP
\fBenv\fR
Show environment variables
.PP
.TP
\fBerrorfmt\fR
Show compiler error formats
.PP
.TP
\fBft\fR
Show filetype associations
.PP
.TP
\fBinclude\fR
Show built\-in configs
.PP
.TP
\fBmacro\fR
Show last recorded macro
.PP
.TP
\fBoption\fR
Show option values
.PP
.TP
\fBsearch\fR
Show search history
.PP
.TP
\fBwsplit\fR
Show window dimensions
.PP
The \fIkey\fR argument is the name of the entry to look up (e.g. the alias
name). If this argument is omitted, the full list of entries of the
specified \fItype\fR will be displayed in a new buffer.
.P
.TP
\fB\-c\fR
write value to command line (if possible)
.PP
.RE
\fBmacro\fR \fIaction\fR
.RS
Record and replay command macros.
.P
The \fIaction\fR argument can be one of:
.P
.TP
\fBrecord\fR
Begin recording
.PP
.TP
\fBstop\fR
Stop recording
.PP
.TP
\fBtoggle\fR
Toggle recording on/off
.PP
.TP
\fBcancel\fR
Stop recording, without overwriting the previous macro
.PP
.TP
\fBplay\fR
Replay the previously recorded macro
.PP
Once a macro has been recorded, it can be viewed in text form
by running \fBshow macro\fR.
.P
.RE
.SH OPTIONS
Options can be changed using the \fBset\fR command. Enumerated options can
also be \fBtoggle\fRd. To see which options are enumerated, type "toggle "
in command mode and press the tab key. You can also use the \fBoption\fR
command to set default options for specific file types.
.P
.SS Global options
\fBcase\-sensitive\-search\fR [true]
.RS
.TP
\fBfalse\fR
Search is case\-insensitive.
.PP
.TP
\fBtrue\fR
Search is case\-sensitive.
.PP
.TP
\fBauto\fR
If search string contains an uppercase letter search is
case\-sensitive, otherwise it is case\-insensitive.
.PP
.RE
\fBdisplay\-invisible\fR [false]
.RS
Display invisible characters.
.P
.RE
\fBdisplay\-special\fR [false]
.RS
Display special characters.
.P
.RE
\fBesc\-timeout\fR [100] 0...2000
.RS
When single escape is read from the terminal dte waits some
time before treating the escape as a single keypress. The
timeout value is in milliseconds.
.P
Too long timeout makes escape key feel slow and too small
timeout can cause escape sequences of for example arrow keys to
be split and treated as multiple key presses.
.P
.RE
\fBfilesize\-limit\fR [250]
.RS
Refuse to open any file with a size larger than this value (in
mebibytes). Useful to prevent accidentally opening very large
files, which can take a long time on some systems.
.P
.RE
\fBlock\-files\fR [true]
.RS
Keep a record of open files, so that a warning can be shown if the
same file is accidentally opened in multiple dte processes.
.P
See also: the \fBFILES\fR section in the \fBdte\fR(1) man page.
.P
.RE
\fBnewline\fR [unix]
.RS
Whether to use LF (\fBunix\fR) or CRLF (\fBdos\fR) line\-endings in newly
created files.
.P
Note: buffers opened from existing files will have their newline
type detected automatically.
.P
.RE
\fBselect\-cursor\-char\fR [true]
.RS
Whether to include the character under the cursor in selections.
.P
.RE
\fBscroll\-margin\fR [0]
.RS
Minimum number of lines to keep visible before and after cursor.
.P
.RE
\fBset\-window\-title\fR [false]
.RS
Set the window title to the filename of the current buffer (if the
terminal supports it).
.P
.RE
\fBshow\-line\-numbers\fR [false]
.RS
Show line numbers.
.P
.RE
\fBstatusline\-left\fR [" %f%s%m%r%s%M"]
.RS
Format string for the left aligned part of status line.
.P
.TP
\fB%f\fR
Filename.
.PP
.TP
\fB%m\fR
Prints \fB*\fR if file is has been modified since last save.
.PP
.TP
\fB%r\fR
Prints \fBRO\fR for read\-only buffers or \fBTMP\fR for temporary buffers.
.PP
.TP
\fB%y\fR
Cursor row.
.PP
.TP
\fB%Y\fR
Total rows in file.
.PP
.TP
\fB%x\fR
Cursor display column.
.PP
.TP
\fB%X\fR
Cursor column as characters. If it differs from cursor display
column then both are shown (e.g. \fB2\-9\fR).
.PP
.TP
\fB%p\fR
Position in percentage.
.PP
.TP
\fB%E\fR
File encoding.
.PP
.TP
\fB%M\fR
Miscellaneous status information.
.PP
.TP
\fB%n\fR
Line\-ending (\fBLF\fR or \fBCRLF\fR).
.PP
.TP
\fB%N\fR
Line\-ending (only if \fBCRLF\fR).
.PP
.TP
\fB%s\fR
Separator (a single space, unless the preceding format character
expanded to an empty string).
.PP
.TP
\fB%S\fR
Like \fB%s\fR, but 3 spaces instead of 1.
.PP
.TP
\fB%t\fR
File type.
.PP
.TP
\fB%u\fR
Hexadecimal Unicode value value of character under cursor.
.PP
.TP
\fB%%\fR
Literal \fB%\fR.
.PP
.RE
\fBstatusline\-right\fR [" %y,%X %u %E%s%b%s%n %t %p "]
.RS
Format string for the right aligned part of status line.
.P
.RE
\fBtab\-bar\fR [true]
.RS
Whether to show the tab\-bar at the top of each window.
.P
.RE
\fButf8\-bom\fR [false]
.RS
Whether to write a byte order mark (BOM) in newly created UTF\-8
files.
.P
Note: buffers opened from existing UTF\-8 files will have their BOM
(or lack thereof) preserved as it was, unless overridden by the
\fBsave\fR command.
.P
.RE
.SS Local options
\fBbrace\-indent\fR [false]
.RS
Scan for \fB{\fR and \fB}\fR characters when calculating indentation size.
Depends on the \fBauto\-indent\fR option.
.P
.RE
\fBfiletype\fR [none]
.RS
Type of file. Value must be previously registered using the \fBft\fR
command.
.P
.RE
\fBindent\-regex\fR [""]
.RS
If this \fBregex\fR(7) pattern matches the current line when enter is
pressed and \fBauto\-indent\fR is true then indentation is increased.
Set to \fB""\fR to disable.
.P
.RE
.SS Local and global options
The global values for these options serve as the default values for
local (per\-file) options.
.P
\fBauto\-indent\fR [true]
.RS
Automatically insert indentation when pressing enter.
Indentation is copied from previous non\-empty line. If also the
\fBindent\-regex\fR local option is set then indentation is
automatically increased if the regular expression matches
current line.
.P
.RE
\fBdetect\-indent\fR [""]
.RS
Comma\-separated list of indent widths (\fB1\fR\-\fB8\fR) to detect automatically
when a file is opened. Set to \fB""\fR to disable. Tab indentation is
detected if the value is not \fB""\fR. Adjusts the following options if
indentation style is detected: \fBemulate\-tab\fR, \fBexpand\-tab\fR,
\fBindent\-width\fR.
.P
Example:
.P
.IP
.nf
\f[C]
set\ detect\-indent\ 2,3,4,8
\f[]
.fi
.PP
.RE
\fBemulate\-tab\fR [false]
.RS
Make \fBdelete\fR, \fBerase\fR and moving \fBleft\fR and \fBright\fR inside
indentation feel as if there were tabs instead of spaces.
.P
.RE
\fBexpand\-tab\fR [false]
.RS
Convert tab to spaces on insert.
.P
.RE
\fBfile\-history\fR [true]
.RS
Save and restore cursor positions for previously opened files.
.P
See also: the \fBFILES\fR section in the \fBdte\fR(1) man page.
.P
.RE
\fBindent\-width\fR [8]
.RS
Size of indentation in spaces.
.P
.RE
\fBsyntax\fR [true]
.RS
Use syntax highlighting.
.P
.RE
\fBtab\-width\fR [8]
.RS
Width of tab. Recommended value is \fB8\fR. If you use other
indentation size than \fB8\fR you should use spaces to indent.
.P
.RE
\fBtext\-width\fR [72]
.RS
Preferred width of text. Used as the default argument for the
\fBwrap\-paragraph\fR command.
.P
.RE
\fBws\-error\fR [special]
.RS
Comma\-separated list of flags that describe which whitespace
errors should be highlighted. Set to \fB""\fR to disable.
.P
.TP
\fBauto\-indent\fR
If the \fBexpand\-tab\fR option is enabled then this is the
same as \fBtab\-after\-indent,tab\-indent\fR. Otherwise it's
the same as \fBspace\-indent\fR.
.PP
.TP
\fBspace\-align\fR
Highlight spaces used for alignment after tab
indents as errors.
.PP
.TP
\fBspace\-indent\fR
Highlight space indents as errors. Note that this still allows
using less than \fBtab\-width\fR spaces at the end of indentation
for alignment.
.PP
.TP
\fBtab\-after\-indent\fR
Highlight tabs used anywhere other than indentation as errors.
.PP
.TP
\fBtab\-indent\fR
Highlight tabs in indentation as errors. If you set this you
most likely want to set "tab\-after\-indent" too.
.PP
.TP
\fBspecial\fR
Display all characters that look like regular space as errors.
One of these characters is no\-break space (U+00A0), which is often
accidentally typed (AltGr+space in some keyboard layouts).
.PP
.TP
\fBtrailing\fR
Highlight trailing whitespace characters at the end of lines as
errors.
.PP
.
.SH SEE ALSO
\fBdte\fR(1),
\fBdte\-syntax\fR(5)
.SH AUTHORS
Craig Barnes
.br
Timo Hirvonen
|