diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 4 | ||||
-rw-r--r-- | lib/colors/solarized.tes | 4 | ||||
-rw-r--r-- | lib/fnkeys.tes | 151 | ||||
-rw-r--r-- | lib/lexer.tes | bin | 716 -> 714 bytes | |||
-rw-r--r-- | lib/lexers/cpp.tes | 2 | ||||
-rw-r--r-- | lib/lexers/git.tes | 18 | ||||
-rw-r--r-- | lib/lexers/html.tes | 51 | ||||
-rw-r--r-- | lib/lexers/troff.tes | 85 |
8 files changed, 246 insertions, 69 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index a458692..ac45c76 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -99,6 +99,8 @@ dist_lexer_DATA += lexers/verilog.tes \ lexers/python.tes \ lexers/yaml.tes \ lexers/markdown.tes \ - lexers/asciidoc.tes + lexers/asciidoc.tes \ + lexers/troff.tes \ + lexers/git.tes endif diff --git a/lib/colors/solarized.tes b/lib/colors/solarized.tes index 7479c31..25a256a 100644 --- a/lib/colors/solarized.tes +++ b/lib/colors/solarized.tes @@ -138,5 +138,5 @@ Q[solarized.light]"T :M[solarized.light] | :M[solarized.dark] ' * register `solarized.toggle` as the function key macro for F5. * This terminates the command line as it cannot be rubbed out. *! -@[F5]{(M[solarized.toggle])} -1U[F5] +@[F5]{(M[solarized.toggle])} +1U[F5] diff --git a/lib/fnkeys.tes b/lib/fnkeys.tes index d0c0e66..fd6b332 100644 --- a/lib/fnkeys.tes +++ b/lib/fnkeys.tes @@ -1,99 +1,126 @@ -! Here we define some reasonable default function key macros. - Their corresponding command-line editing macros begin with ! - -! edit command line to move <n> chars, updating existing move ops ! +!* + * Here we define some reasonable default function key macros. + * Their corresponding command-line editing macros begin with . + *! + +!* + * Edit command line to move <n> chars, updating existing move ops. + * The command line at the time of call looks like: (123C)(M[FOO + *! @#c{{U.c <-A-("=-D1;' -D> - ."> - -A-)"= -S(\U.v .,Z-2D 0A-C"=2DQ.v|2D-Q.v'%.c | I(Q.c ' - | I(Q.c ' - "> Q.c\IC) | -Q.c\IR) ' + .-4"< Oins ' -2A-C"N -2A-R"N Oins ' ' -A-)"N Oins ' + <R -A-("=1;'> + \U.v .-1,Z-2D 0A-R"=-'Q.v%.c 2D + !ins! + I( Q.c"> Q.c\IC | -Q.c\IR ' I) }} -! Make DELETE an ESCAPE surrogate. - Macro is enabled everywhere. ! -@[DC]{} - -! Make SHIFT+DELETE a rubout/re-insert key. - This reverses the ^G modifier for BACKSPACE. - The macro is enabled everywhere. ! -@[SDC]{} - -! Command line editing macros. - They are enabled only in the start state (i.e. they - have no effect in string arguments, etc.). ! +!* + * Make DELETE an ESCAPE surrogate. + * Macro is enabled everywhere. + *! +@[DC]{} + +!* + * Make SHIFT+DELETE a rubout/re-insert key. + * This reverses the ^G modifier for BACKSPACE. + * The macro is enabled everywhere. + *! +@[SDC]{} + +!* + * Command line editing macros. + * They are enabled only in the start state (i.e. they + * have no effect in string arguments, etc.). + *! @[HOME]{ - .ESLINEFROMPOSITIONESPOSITIONFROMLINEU.p + ESLINEFROMPOSITIONESPOSITIONFROMLINE:U.p Q.pU.l <Q.l-."U 1; ' Q.l-.AU.c Q.c- "N Q.c-9"N Q.lU.p 1; '' %.l> + Q.pESGETCOLUMN,4EJ Q.p-.M#c } -@[HOME]{(M[HOME]} -1U[HOME] +@[HOME]{(M[HOME]} +1U[HOME] @[END]{ - .ESLINEFROMPOSITIONESGETLINEENDPOSITION-.M#c + ESLINEFROMPOSITIONESGETLINEENDPOSITIONU.p + Q.pESGETCOLUMN,4EJ + Q.p:-.M#c } -@[END]{(M[END]} -1U[END] +@[END]{(M[END]} +1U[END] @[NPAGE]{ - .ESLINEFROMPOSITION+(ESLINESONSCREEN) + 0,4EJ + ESLINEFROMPOSITION+(ESLINESONSCREEN) ESPOSITIONFROMLINEU.p - Q.p"< Z | Q.p '-.M#c + Q.p"< Z | Q.p: '-.M#c } -@[NPAGE]{(M[NPAGE]} -1U[NPAGE] +@[NPAGE]{(M[NPAGE]} +1U[NPAGE] @[PPAGE]{ - .ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l - Q.l"< 0 | Q.lESPOSITIONFROMLINE '-.M#c + 0,4EJ + ESLINEFROMPOSITION-(ESLINESONSCREEN)U.l + Q.l"< 0 | Q.lESPOSITIONFROMLINE: '-.M#c } -@[PPAGE]{(M[PPAGE]} -1U[PPAGE] +@[PPAGE]{(M[PPAGE]} +1U[PPAGE] @[LEFT]{ - ."=0|-1'M#c + ."=0|.-1'U.p + Q.pESGETCOLUMN,4EJ + Q.p-.M#c } -@[LEFT]{(M[LEFT]} -1U[LEFT] +@[LEFT]{(M[LEFT]} +1U[LEFT] @[SLEFT]{ - 0,0,.ESWORDSTARTPOSITIONESWORDSTARTPOSITION-.M#c + 0,0,ESWORDSTARTPOSITIONESWORDSTARTPOSITIONU.p + Q.pESGETCOLUMN,4EJ + Q.p:-.M#c } -@[SLEFT]{(M[SLEFT]} -1U[SLEFT] +@[SLEFT]{(M[SLEFT]} +1U[SLEFT] @[RIGHT]{ - .-Z"=0|1'M#c + .-Z"=.|.+1'U.p + Q.pESGETCOLUMN,4EJ + Q.p-.M#c } -@[RIGHT]{(M[RIGHT]} -1U[RIGHT] +@[RIGHT]{(M[RIGHT]} +1U[RIGHT] @[SRIGHT]{ - 0,0,.ESWORDENDPOSITIONESWORDENDPOSITION-.M#c + 0,0,ESWORDENDPOSITIONESWORDENDPOSITIONU.p + Q.pESGETCOLUMN,4EJ + Q.p:-.M#c } -@[SRIGHT]{(M[SRIGHT]} -1U[SRIGHT] +@[SRIGHT]{(M[SRIGHT]} +1U[SRIGHT] @[UP]{ - .ESGETCOLUMN - (.ESLINEFROMPOSITION-1) - ESFINDCOLUMN-.M#c + 4EJ(ESLINEFROMPOSITION-1)ESFINDCOLUMN:-.M#c } -@[UP]{(M[UP]} -1U[UP] +@[UP]{(M[UP]} +1U[UP] @[DOWN]{ - .ESGETCOLUMN - (.ESLINEFROMPOSITION+1) - ESFINDCOLUMN-.M#c + 4EJ(ESLINEFROMPOSITION+1)ESFINDCOLUMN:-.M#c } -@[DOWN]{(M[DOWN]} -1U[DOWN] - -@[CLOSE]{(EX)} -1U[CLOSE] - -! enable function key (macro) support ! -0,64ED +@[DOWN]{(M[DOWN]} +1U[DOWN] + +@[CLOSE]{(EX)} +1U[CLOSE] + +!* + * Zoom with F9/F10 if function keys are enabled. + * This is automatically rubbed out. + *! +@[F9]{(ESZOOMOUT{-13D}} +1U[F9] +@[F10]{(ESZOOMIN{-12D}} +1U[F10] diff --git a/lib/lexer.tes b/lib/lexer.tes Binary files differindex 82d8bd9..7381e62 100644 --- a/lib/lexer.tes +++ b/lib/lexer.tes diff --git a/lib/lexers/cpp.tes b/lib/lexers/cpp.tes index d1acce4..5c3ce4a 100644 --- a/lib/lexers/cpp.tes +++ b/lib/lexers/cpp.tes @@ -12,7 +12,7 @@ :EN*.hppQ*"S -1 ' :EN*.hxxQ*"S -1 ' :EN*.ippQ*"S -1 ' - :EN*.mmQ*"S -1 ' + !*:EN*.mmQ*"S -1 '*! :EN*.smaQ*"S -1 ' :EN*.inoQ* } diff --git a/lib/lexers/git.tes b/lib/lexers/git.tes new file mode 100644 index 0000000..3162f78 --- /dev/null +++ b/lib/lexers/git.tes @@ -0,0 +1,18 @@ +!* Git commit and rebase messages *! + +@[lexer.test.git]{ + :EN*/COMMIT_EDITMSGQ*"S -1 ' + :EN*/TAG_EDITMSGQ*"S -1 ' + :EN*/MERGE_MSGQ*"S -1 ' + :EN*/git-rebase-todoQ* +} + +@[lexer.set.git]{ + :M[color.comment],1M[color.set] + + .U.p + J< .-Z"= 1; ' + 0A-#"= ESSTARTSTYLING 1,(Q.lESLINELENGTH)ESSETSTYLING ' + :L; %.l> + Q.pJ +} diff --git a/lib/lexers/html.tes b/lib/lexers/html.tes index b09012d..61a8448 100644 --- a/lib/lexers/html.tes +++ b/lib/lexers/html.tes @@ -1,4 +1,4 @@ -! AUTO-GENERATED FROM SCITE PROPERTY SET ! +!* HTML and embedded scripting languages *! @[lexer.test.html]{ :EN*.htmlQ*"S -1 ' @@ -78,21 +78,66 @@ __dir__ __file__ __function__ __line__ __method__ __namespace__ __sleep __wakeup 5ESSETKEYWORDS ELEMENT DOCTYPE ATTLIST ENTITY NOTATION + !* HTML *! + :M[color.keyword],1M[color.set] :M[color.number],5M[color.set] :M[color.string],6M[color.set] - :M[color.string],7M[color.set] + :M[color.string2],7M[color.set] + :M[color.comment],9M[color.set] + :M[color.variable],10M[color.set] + :M[color.preproc],17M[color.set] + !* Embedded Javascript *! :M[color.comment],42M[color.set] :M[color.comment],43M[color.set] :M[color.comment],44M[color.set] :M[color.number],45M[color.set] :M[color.keyword],47M[color.set] :M[color.string],48M[color.set] - :M[color.string],49M[color.set] + :M[color.string2],49M[color.set] :M[color.operator],50M[color.set] + !* ASP Javascript *! + :M[color.comment],57M[color.set] + :M[color.comment],58M[color.set] + :M[color.comment],59M[color.set] + :M[color.number],60M[color.set] + :M[color.keyword],62M[color.set] + :M[color.string],63M[color.set] + :M[color.string2],64M[color.set] + :M[color.operator],65M[color.set] + !* Embedded VBScript *! :M[color.comment],72M[color.set] + :M[color.number],73M[color.set] + :M[color.keyword],74M[color.set] + :M[color.string],75M[color.set] + !* ASP VBScript *! :M[color.comment],82M[color.set] + :M[color.number],83M[color.set] + :M[color.keyword],84M[color.set] + :M[color.string],85M[color.set] + !* Embedded Python *! :M[color.comment],92M[color.set] + :M[color.number],93M[color.set] + :M[color.string],94M[color.set] + :M[color.string2],95M[color.set] + :M[color.string],97M[color.set] + :M[color.string2],98M[color.set] + :M[color.operator],101M[color.set] + !* ASP Python *! :M[color.comment],107M[color.set] + :M[color.number],108M[color.set] + :M[color.string],109M[color.set] + :M[color.string2],110M[color.set] + :M[color.string],112M[color.set] + :M[color.string2],113M[color.set] + :M[color.operator],116M[color.set] + !* PHP *! + :M[color.string],119M[color.set] + :M[color.string2],120M[color.set] + :M[color.keyword],121M[color.set] + :M[color.number],122M[color.set] + :M[color.variable],123M[color.set] :M[color.comment],124M[color.set] :M[color.comment],125M[color.set] + :M[color.variable],126M[color.set] + :M[color.operator],127M[color.set] } diff --git a/lib/lexers/troff.tes b/lib/lexers/troff.tes new file mode 100644 index 0000000..a10d3e9 --- /dev/null +++ b/lib/lexers/troff.tes @@ -0,0 +1,85 @@ +!* troff/nroff *! + +@[lexer.test.troff]{ + :EN*.groffQ*"S -1 ' + :EN*.roffQ*"S -1 ' + :EN*.meQ*"S -1 ' + :EN*.mmQ*"S -1 ' + :EN*.msQ*"S -1 ' + :EN*.momQ*"S -1 ' + :EN*.manQ*"S -1 ' + :EN*.mdocQ*"S -1 ' + :EN*.tmacQ*"S -1 ' + :EN*.[12345678]Q* +} + +!* Heirloom Troff specific requests *! +[lexer.troff.heirloom] + bleedat breakchar brnl brpnl + cropat dch dwh + errprint + fallback fdeferlig feature fkern flig fp fps fspacewidth + hidechar hylang hylen hypp + index + kernafter kernbefore kernpair + lc_ctype lds letadj lhang lnr lnrf lpfx + mediasize minss + nhychar nrf + padj papersize psbb pshape + recursionlimit rhang + sentchar spacewidth + track transchar trimat + unwatch unwatchn + watch watchlength watchn + xflag +!* Neatroff-specific requests *! +[lexer.troff.neatroff] + << >> cl co co+ co< co> eos ff ffsc fmap + hycost hydash hystop in2 kn ochar pmll ssh ti2 + +@[lexer.set.troff]{ + ESSETILEXERtroff + !* Predefined requests (derived from Groff) *! + 0ESSETKEYWORDS + ab ad af aln als am am1 ami ami1 as as1 asciify + backtrace bd blm box boxa bp br brp break + c2 cc ce cf cflags ch char chop class close color composite continue cp cs cu + da de de1 defcolor dei dei1 device devicem di do ds ds1 dt + ec ecr ecs el em eo ev evc ex + fam fc fchar fcolor fi fl fp fschar fspecial ft ftr fzoom + gcolor + hc hcode hla hlm hpf hpfa hpfcode hw hy hym hys + ie if ig . in it itc + kern + lc length linetabs linetabs lf lg ll lsm ls lt + mc mk mso + na ne nf nh nm nn nop nr nroff ns nx + open opena os output + pc pev pi pl pm pn pnr po ps psbb pso ptr pvs pvs + rchar rd return rfschar rj rm rn rnn rr rs rt + schar shc shift sizes so sp special spreadwarn ss sty substring sv sy + ta tc ti tkf tl tm tm1 tmc tr trf trin trnt troff + uf ul unformat + vpt vs + warn warnscale wh while write writec writem + Q[lexer.troff.heirloom] Q[lexer.troff.neatroff] + !* Flow control requests/commands with conditionals *! + 1ESSETKEYWORDSif ie while + !* Flow control requests/commands without conditionals *! + 2ESSETKEYWORDSel nop + !* Requests and commands, initiating ignore blocks *! + 3ESSETKEYWORDSig + !* Requests and commands with end-macros. + Mom macros alias MAC to de. *! + 4ESSETKEYWORDSam am1 de de1 MAC + + :M[color.keyword],1M[color.set] + :M[color.preproc],2M[color.set] + :M[color.number],3M[color.set] + :M[color.operator],4M[color.set] + :M[color.string],5M[color.set] + :M[color.comment],6M[color.set] + !*:M[color.comment],7M[color.set]*! + 7U.i 20<:M[color.variable],%.iM[color.set]> + :M[color.preproc2],17M[color.set] +} |