diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 4 | ||||
-rw-r--r-- | lib/color.tes | 66 | ||||
-rw-r--r-- | lib/fnkeys.tes | 68 | ||||
-rw-r--r-- | lib/opener.tes | 37 |
4 files changed, 155 insertions, 20 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 8bf80be..70f39b7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,6 @@ -dist_scitecolib_DATA = color.tes lexer.tes session.tes fnkeys.tes -dist_scitecolib_DATA += string.tes getopt.tes +dist_scitecolib_DATA = color.tes lexer.tes session.tes opener.tes \ + fnkeys.tes string.tes getopt.tes # Helper script for creating lexer definitions EXTRA_DIST = scite2co.lua diff --git a/lib/color.tes b/lib/color.tes index eaa0baa..f732848 100644 --- a/lib/color.tes +++ b/lib/color.tes @@ -4,25 +4,55 @@ (Q.r # Q.g*256 # Q.b*256*256) } -!* These 8 colors should be available on every system *! -000,000,000:M[color.rgb]U[color.black] -128,000,000:M[color.rgb]U[color.red] -000,128,000:M[color.rgb]U[color.green] -128,128,000:M[color.rgb]U[color.yellow] -000,000,128:M[color.rgb]U[color.blue] -128,000,128:M[color.rgb]U[color.magenta] -000,128,128:M[color.rgb]U[color.cyan] -192,192,192:M[color.rgb]U[color.white] +0EJ-1"= + !* + * The Curses RGB values are hardcoded by Scinterm + * and do not necessarily correspond to the renditions by + * terminal emulators. + *! + !* These 8 colors should be available on every system *! + 000,000,000:M[color.rgb]U[color.black] + 128,000,000:M[color.rgb]U[color.red] + 000,128,000:M[color.rgb]U[color.green] + 128,128,000:M[color.rgb]U[color.yellow] + 000,000,128:M[color.rgb]U[color.blue] + 128,000,128:M[color.rgb]U[color.magenta] + 000,128,128:M[color.rgb]U[color.cyan] + 192,192,192:M[color.rgb]U[color.white] -!* Light color variants, might not be available on every terminal *! -064,064,064:M[color.rgb]U[color.lblack] -255,000,000:M[color.rgb]U[color.lred] -000,255,000:M[color.rgb]U[color.lgreen] -255,255,000:M[color.rgb]U[color.lyellow] -000,000,255:M[color.rgb]U[color.lblue] -255,000,255:M[color.rgb]U[color.lmagenta] -000,255,255:M[color.rgb]U[color.lcyan] -255,255,255:M[color.rgb]U[color.lwhite] + !* Light color variants, might not be available on every terminal *! + 064,064,064:M[color.rgb]U[color.lblack] + 255,000,000:M[color.rgb]U[color.lred] + 000,255,000:M[color.rgb]U[color.lgreen] + 255,255,000:M[color.rgb]U[color.lyellow] + 000,000,255:M[color.rgb]U[color.lblue] + 255,000,255:M[color.rgb]U[color.lmagenta] + 000,255,255:M[color.rgb]U[color.lcyan] + 255,255,255:M[color.rgb]U[color.lwhite] +| + !* + * The GTK RGB values are the ones used by common terminal + * emulators. This should ensure that color schemes based + * on the 16 default colors look similar on Curses and GTK. + *! + 000,000,000:M[color.rgb]U[color.black] + 205,000,000:M[color.rgb]U[color.red] + 000,205,000:M[color.rgb]U[color.green] + 205,205,000:M[color.rgb]U[color.yellow] + 000,000,238:M[color.rgb]U[color.blue] + 205,000,205:M[color.rgb]U[color.magenta] + 000,205,205:M[color.rgb]U[color.cyan] + 229,229,229:M[color.rgb]U[color.white] + + 127,127,127:M[color.rgb]U[color.lblack] + 255,000,000:M[color.rgb]U[color.lred] + 000,255,000:M[color.rgb]U[color.lgreen] + 255,255,000:M[color.rgb]U[color.lyellow] + 092,092,255:M[color.rgb]U[color.lblue] + 255,000,255:M[color.rgb]U[color.lmagenta] + 000,255,255:M[color.rgb]U[color.lcyan] + 255,255,255:M[color.rgb]U[color.lwhite] +' !* <[[flags,]bg,]fg,style>M[color.set] *! @[color.set]{ diff --git a/lib/fnkeys.tes b/lib/fnkeys.tes index ab78025..857c249 100644 --- a/lib/fnkeys.tes +++ b/lib/fnkeys.tes @@ -124,3 +124,71 @@ 1U[F9] @[F10]{(ESZOOMIN{-12D}} 1U[F10] + +!* + * Mouse integration. + * Might be disabled unless bit 7 (64) is enabled in ED. + * + * Left click: Edit command line to jump to position. + * Ctrl+left click: Jump to beginning of line. + * Right click: Insert position or position range (when dragging). + * Double right click: insert range for word under cursor + * Ctrl+right click: Insertion beginning of line + * Scroll wheel: scrolls (faster with shift) + * Ctrl+scroll wheel: zoom (GTK-only) + *! +@[MOUSE]{ + -2EJESCHARPOSITIONFROMPOINTU.p + -4EJ&2"N Q.pESLINEFROMPOSITIONESPOSITIONFROMLINEU.p ' + 1,Q.pESWORDSTARTPOSITION:U.#ws + 1,Q.pESWORDENDPOSITION:U.#we + Q.p:U.p + + -EJOpressed,released,scrollup,scrolldown + !pressed! + !* left click *! + -3EJ-1"= Q.p-.M#c !* not reached *! ' + { -9D + !* right click *! + -3EJ-3"= Q.p"U I(\.p ' ' + !* middle click *! + -3EJ-2"= :Q~"U I(g~) ' ' + } + !released! + { -9D + -3EJ-3"= Q.p"U + !* right click *! + <-A-("=1;'R> \U.o + Q.o-Q.p"= + .-1"> -2A-)"= + R <-A-("=1;'R> + \-Q.p"= + !* double right-click *! + .,ZD I\.#ws,\.#we + ' + ' ' + ZJ I) + | + Q.o-Q.p"> Q.o,Q.p U.oU.p ' + !* right drag *! + .,ZD I\.o,\.p) + ' + ' ' + } + !scrollup! + -4EJ&2"= + -4EJ&1"=-1|-2',0ESLINESCROLL + | + ESZOOMIN + ' + {-9D} + !scrolldown! + -4EJ&2"= + -4EJ&1"=1|2',0ESLINESCROLL + | + ESZOOMOUT + ' + {-9D} +} +@[MOUSE]{(M[MOUSE]} +1U[MOUSE] diff --git a/lib/opener.tes b/lib/opener.tes new file mode 100644 index 0000000..6a57317 --- /dev/null +++ b/lib/opener.tes @@ -0,0 +1,37 @@ +!*$ + * M[opener] -- Open a number of files from the current buffer + * + * This is usually the unnamed buffer as initialized from the command line. + * It supports both the +line[,column] and filename:line[:column] syntaxes. + * Since this may make it hard to open files with certain file names, all + * filenames after "--" are interpreted verbatim. + *! +@[opener]{ + <.-Z; + !* --/-S stops processing of special arguments *! + 0A--"= 1A--"= 2A-10"= + L <:L;R 0X.f [* EBN.f ]* L> 1; + ''' + + 1U.l 1U.c + !* +line[,column] *! + 0A-+"= + C 0A"D \U.l W 0A-,"= C \U.c ' 0A-10"=L' ' + ' + + !* filename:line[:column][:] *! + LR -A-:"=R' <-A"DR|1;'> -A-:"= + \U.a R <-A"DR|1;'> -A-:"= + \U.l Q.aU.c R + | + Q.aU.l 1U.c + ' + | + LR + ' + + 0X.f [* + EBN.f Q.c-1,Q.l-1ESFINDCOLUMN:J + ]* + L> +} |