aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am6
-rw-r--r--doc/cheat-sheet.mm821
-rwxr-xr-xdoc/grosciteco.tes75
-rw-r--r--doc/grosciteco.tes.1.in1
-rwxr-xr-xdoc/htbl.tes2
-rw-r--r--doc/sciteco.1.in26
-rw-r--r--doc/sciteco.7.template365
7 files changed, 1125 insertions, 171 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9e32c19..fac7b1b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -61,7 +61,7 @@ CLEANFILES += $(women_DATA)
$@ $<
%.intermediate : % sciteco.tmac
- @GROFF@ -wall -Z -Tascii -t -man -M@srcdir@ -msciteco $< >$@
+ @GROFF@ -wall -Z -Kutf-8 -Tutf8 -t -man -M@srcdir@ -msciteco $< >$@
man_MANS = grosciteco.tes.1
EXTRA_DIST = grosciteco.tes.1.in
@@ -95,6 +95,10 @@ SUFFIXES += .htbl .html
.htbl.html:
@GROFF@ -wall -Thtml -man $< >$@
+# FIXME: We may want to build the cheat sheet automatically.
+# This would require a full Groff installation, though.
+EXTRA_DIST += cheat-sheet.mm
+
#
# Doxygen processing (do not install or distribute)
#
diff --git a/doc/cheat-sheet.mm b/doc/cheat-sheet.mm
new file mode 100644
index 0000000..ea0d893
--- /dev/null
+++ b/doc/cheat-sheet.mm
@@ -0,0 +1,821 @@
+\# pdfmom --roff -U -P-pa4 -rW=19c -rO=1c -rL=31c -mm -mhdtbl -mpdfpic cheat-sheet.mm >cheat-sheet.pdf
+.PGNH
+.
+.pdfinfo /Title SciTECO Cheat Sheet
+.pdfinfo /Author Robin Haberkorn
+.
+.SP 0.5c
+.
+.\" allow \fC instead of \f(CR.
+.ftr C CR
+.
+.ad c
+\#.B "SciTECO Cheat Sheet"
+\#.SP
+Overview of \fBSciTECO\fP as an editor.
+A full language description can be found in
+.pdfhref W -D https://rhaberkorn.github.io/sciteco/sciteco.7.html -A . \fBsciteco\fP(7)
+.br
+.
+.\" subscripts
+.ds < \v'+.3m\s'\En[.s]*7u/10u'-.1m'
+.ds > \v'+.1m\s0-.3m'
+.
+.\" FIXME: For switching between CR and I fonts
+.de CI
+. if \\n[.$] .fnt@switch \fC \fI \\$@
+..
+.
+.\" For drawing with foreground ($1) and background ($2) color.
+.\" Adapted from the BOX macro in Groff manual "Drawing Requests".
+.\" The $ is added to standardize the height of all boxes
+.\" (as it stretches above and below the base line).
+.\" NOTE: This does not work in arguments to .TD!
+.ds FILLSTR \
+\R!@wd \w'\\$3$'-\w'$'!\
+\h'.1m'\
+\h'-.1m'\v'(.1m - \\n[rsb]u)'\
+\M[\\$2]\
+\D'P 0 -(\\n[rst]u - \\n[rsb]u + .2m) \
+ (\\n[@wd]u + .2m) 0 \
+ 0 (\\n[rst]u - \\n[rsb]u + .2m) \
+ -(\\n[@wd]u + .2m) 0'\
+\h'.1m'\v'-(.1m - \\n[rsb]u)'\
+\M[]\
+\m[\\$1]\\$3\m[]\
+\h'.1m'
+.
+.\" Control char: monospaced font and inverted colors
+.ds CTRL \fC\\*[FILLSTR white black "\\$*"]\fP
+.ds $ \\*[CTRL $]
+.ds $$ \\*[CTRL $$]
+.
+.ds t*hl
+.ds t*vl
+.nr t*csp 0
+.ds t*bc black
+.ds t*fgc black
+.ds t*bgc white
+.ds t*hal l
+.
+.de TBLX
+. ds TBLX-TITLE \\$1
+. shift
+. TBL cols=2 \\$*
+. TR fgc=white bgc=black fst=B
+. TD colspan=2 "\\*[TBLX-TITLE]"
+. nr TRX 0 1
+..
+.de TRX
+. ie \\n+[TRX]%2 .TR bgc=grey90 \\$*
+. el .TR \\$*
+..
+.\" FIXME: Does not work when tables are automatically
+.\" deferred to the next column or page.
+.\" It's unclear what controls the spacing between tables.
+.am ETB
+. sp -0.1c
+..
+.
+.\" Legend
+.TBL cols=4 width='10% 40% 10% 40%'
+. TR fgc=white bgc=black fst=B
+. TD colspan=4 "Legend"
+. TR bgc=grey90
+. TD
+\*$
+. TD
+String delimiter (Escape key)
+\# Mention @ modifier?
+\# Or that you can also press Delete if fnkeys.tes is loaded.
+. TD
+\*($$
+. TD
+Command-line termination (2\(muEscape key)
+. TR
+. TD
+. CI X
+. TD
+Regular command.
+They are case-insensitive.
+. TD
+. I n
+. TD
+Some integer, often optional (1 or 0 by default).
+You can write \fC-\fP instead of \fC-1\fP.
+. TR bgc=grey90
+. TD
+. I text
+. TD
+Arbitrary \fItext\fP.
+. TD
+. I q
+. TD
+A named storage area called a Q-register.
+Use any case insensitive single character to name the register.
+There are also two letter names initiated by \fC#\fP and long names in \fC[\fP...\fC]\fP braces.
+. TR
+. TD
+\*[CTRL ^\f(CIX\fP]\fR
+. TD
+Ctrl+\fIX\fP, but can also be typed with a caret (\fC^\fP).
+. TD
+\*[CTRL LF]
+. TD
+Line Feed, ie. Enter/Return key
+. TR bgc=grey90
+. TD colspan=4
+For instance:
+\fC-C\fP \(== \fC-1C\fP \(== \fCR\fP \(DI
+\fCQa\fP \(== \fCQ[A]\fP \(DI
+\fCQ#ab\fP \(== \fCQ[AB]\fP \(DI
+Ctrl+I \(== \*[CTRL ^I] \(== \*[CTRL TAB] \(DI
+Ctrl+J \(== \*[CTRL ^J] \(== \*[CTRL LF]
+.br
+Undo (Rubout): Backspace, \*[CTRL ^W], \*[CTRL ^U] \(DI
+Redo (Rubin): First \*[CTRL ^G], then Backspace, \*[CTRL ^W]...
+.ETB
+.
+.\" Automatically move tables to the beginning of the next column.
+.am tbl@top-hook
+. t*hm
+..
+.\" Automatically move tables to the beginning of the next page.
+.am pg@end-of-text
+. t*EM
+..
+.
+.MC (u;(\nW-0.5c)/3) 0.25c \" 3 columns
+.
+.TBLX "Exiting" width='30% 70%'
+. TRX
+. TD
+\fCEX\fP\*($$
+. TD
+Exit, but only if no buffer is \(lqdirty\(rq (unsaved)
+. TRX
+. TD
+\fC-EX\fP\*($$
+. TD
+Exit even if buffer is \(lqdirty\(rq, ie. discarding all unsaved changes.
+. TRX
+. TD
+\fC:EX\fP\*($$
+. TD
+Exit, saving all \(lqdirty\(rq buffers.
+.ETB
+.
+.TBLX "Files" width='30% 70%'
+. TRX
+. TD
+\fCEB\fIfile\fR\*$
+. TD
+Edit buffer or open new \fIfile\fP (glob pattern).
+Files, that did not exist on disk, will not be created until you save them.
+. TRX
+. TD
+\fCEB*.c\*$
+. TD
+Open all files with extension \fCc\fP.
+. TRX
+. TD
+\fCEB\fP\*$
+. TD
+Edit the unnamed buffer.
+. TRX
+. TD
+. CI 0EB
+. TD
+Show buffer ring/list.
+You can specify a filename afterwards to open a file.
+. TRX
+. TD
+\fIn\fCEB\fR\*$
+.br
+.CI "" n U*
+. TD
+Select \fIn\fP-th buffer in ring.
+. TRX
+. TD
+\fC%*\*$
+. TD
+Select next buffer in ring.
+. TRX
+. TD
+\fC-%*\*$
+. TD
+Select pevious buffer in ring.
+. TRX
+. TD
+. CI EJU*
+. TD
+Select last buffer in ring.
+. TRX
+. TD
+\fCEW\fP\*$
+. TD
+Write (save) current buffer under its current name.
+Does not work on the unnamed buffer.
+. TRX
+. TD
+\fCEW\fIfile\fR\*$
+. TD
+Save current buffer under new name \fIfile\fP (Save As).
+. TRX
+. TD
+. CI EF
+. TD
+Finish (close) current buffer.
+. TRX
+. TD
+. CI -EF
+. TD
+Finish (close) current buffer, discarding all unsaved changes.
+. TRX
+. TD
+\fCFG\fIpath\fR\*$
+. TD
+Go to folder \fIpath\fP, ie. change working directory.
+. TRX
+. TD
+. CI 0EE
+. TD
+Set single byte ASCII mode.
+. TRX
+. TD colspan=2
+\fBTip:\fP You can use the Tab-key for autocompleting filenames and paths.
+.ETB
+.
+.NCOL
+.
+.TBLX "Text Insertion" width='30% 70%'
+. TRX
+. TD
+\fCI\fItext\*$
+. TD
+Insert \fItext\fP into buffer.
+. TRX
+. TD
+. CI I ... ^^
+. TD
+Insert single caret (\fC^\fP).
+. TRX
+. TD
+\fCI\fI...\*[CTRL ^Q$]
+. TD
+Insert \*$ (ASCII 27).
+. TRX
+. TD
+\*[CTRL TAB]\fItext\*$
+. TD
+Insert \fItext\fP with leading tab/indentation.
+See also
+.pdfhref W -D https://github.com/rhaberkorn/sciteco/wiki/Useful-Macros#indent-code-block -A . \fIn\fCM#it\fP
+.ETB
+.
+.TBLX "Text Deletion" width='30% 70%'
+. TRX
+. TD
+. CI D
+. TD
+Delete next character.
+. TRX
+. TD
+. CI "" n D
+. TD
+Delete next \fIn\fP characters.
+.ig END
+. TRX
+. TD
+. CI V
+. TD
+Delete next word.
+.END
+. TRX
+. TD
+. CI "" n V
+. TD
+Delete next \fIn\fP words.
+. TRX
+. TD
+. CI "" n Y
+. TD
+Delete previous \fIn\fP words.
+. TRX
+. TD
+\fCFK\*[CTRL LF$]
+. TD
+Delete remainder of line.
+.ig END
+. TRX
+. TD
+. CI K
+. TD
+Kill (delete) from current position to beginning of next line.
+.END
+. TRX
+. TD
+. CI 0K
+. TD
+Kill (delete) to beginning of current line.
+. TRX
+. TD
+. CI 0KK
+. TD
+Kill (delete) entire line
+. TRX
+. TD
+. CI "" n K
+. TD
+Kill (delete) next \fIn\fP lines.
+. TRX
+. TD
+. CI HK
+. TD
+Kill (delete) whole buffer.
+.ETB
+.
+.TBLX "Copy & Paste" width='30% 70%'
+. TRX
+. TD
+. CI X q
+. TD
+Copy from current position until beginning of next line into Q-Register \fIq\fP.
+. TRX
+. TD
+. CI "" n X q
+. TD
+Copy next \fIn\fP lines into Q-Register \fIq\fP.
+. TRX
+. TD
+. CI "" n :X q
+. TD
+Append next \fIn\fP lines to Q-Register \fIq\fP.
+. TRX
+. TD
+. CI "" n X q\|n K
+. TD
+Cut next \fIn\fP lines into Q-Register \fIq\fP.
+. TRX
+. TD
+. CI HX q
+. TD
+Copy whole buffer into Q-Register \fIq\fP.
+. TRX
+. TD
+. CI X\(ti
+. TD
+Copy line into clipboard. See also
+.pdfhref W -D https://github.com/rhaberkorn/sciteco/wiki/Useful-Macros#copypaste-from-clipboard -A . \fCM#xc\fP
+. TRX
+. TD
+. CI G q
+. TD
+Get (paste) Q-Register \fIq\fP at current position.
+. TRX
+. TD
+\fCI\fI...\*[CTRL ^E]\fCQ\fIq
+. TD
+Paste Q-Register \fIq\fP while inserting text.
+.ig END
+. TRX
+. TD
+\fCE%\fIq\|file\*$
+. TD
+Save Q-Register \fIq\fP into \fIfile\fP.
+.END
+. TRX
+. TD
+\fCEQ\fIq\*$
+. TD
+Edit Q-Register \fIq\fP as a text buffer.
+.ig END
+. TRX
+. TD
+\fCEQ\fIq\|file\*$
+. TD
+Read \fIfile\fP into Q-Register \fIq\fP.
+.END
+.ETB
+.
+.NCOL
+.
+.TBLX "Cursor Movement" width='30% 70%'
+. TRX
+. TD
+. CI C
+. TD
+Move one character forward.
+. TRX
+. TD
+. CI "" n C
+. TD
+Move \fIn\fP characters forward.
+. TRX
+. TD
+. CI R
+. TD
+Move one character backwards (reverse).
+. TRX
+. TD
+. CI "" n R
+. TD
+Move \fIn\fP characters backwards (reverse).
+. TRX
+. TD
+. CI W
+. TD
+Move to the beginning of next word.
+. TRX
+. TD
+. CI L
+. TD
+Move to the beginning of next line.
+. TRX
+. TD
+. CI "" n L
+. TD
+Move fordware \fIn\fP lines.
+. TRX
+. TD
+. CI 0L
+. TD
+Move to the beginning of current line.
+. TRX
+. TD
+. CI LR
+. TD
+Move to end of current line.
+. TRX
+. TD
+. CI "" n B
+. TD
+Move backwards \fIn\fP lines.
+. TRX
+. TD
+. CI J n L
+. TD
+Go to beginning of line \fIn\fP+1.
+. TRX
+. TD
+. CI J
+. TD
+Jump to beginning of buffer.
+. TRX
+. TD
+. CI ZJ
+. TD
+Jump to end of buffer.
+. TRX
+. TD colspan=2
+\fBTip:\fP Enable the \fCfnkeys.tes\fP module in \fC.teco_ini\fP
+to move around with cursor keys!
+.ETB
+.
+.TBLX "External Programs" width='42% 58%'
+. TRX
+. TD
+\fCEC\fIcommand\*$
+. TD
+Insert output of \fIcommand\fP.
+. TRX
+. TD
+\fIn\fCEC\fIcommand\*$
+. TD
+Filter next \fIn\fP lines through \fIcommand\fP.
+. TRX
+. TD
+\fCHEC\fIcommand\*$
+. TD
+Filter whole buffer through \fIcommand\fP.
+. TRX
+. TD
+\fIn\fCECsort\*$
+. TD
+Sort next \fIn\fP lines (UNIX).
+.ETB
+.
+.TBLX "Macros" width='42% 58%'
+. TRX
+. TD
+\fC@\*[CTRL ^U]\fIq\fP{\fImacro\fP}
+. TD
+Define \fImacro\fP in Q-Register \fIq\fP.
+. TRX
+. TD
+. CI M q
+. TD
+Call macro in Q-Register \fIq\fP.
+. TRX
+. TD
+\*($$\fC*\fIq
+. TD
+Discard command-line, storing it in \fIq\fP.
+.ETB
+.
+.PGNH
+.\" FIXME: We shouldn't have to reinitialize the column mode.
+.1C \" Backpage
+.SP 0.5c
+.
+.MC (u;(\nW-0.5c)/3) 0.25c \" 3 columns
+.
+.TBLX "Search & Replace" width='45% 55%'
+. TRX
+. TD
+\fCS\fItext\*$
+. TD
+Search for next ocurrence of \fItext\fP.
+. TRX
+. TD
+\fC-S\fItext\*$
+. TD
+Search for previous ocurrence of \fItext\fP.
+. TRX
+. TD
+\fIn\fCS\fItext\*$
+. TD
+Search for \fIn\fP-th ocurrence of \fItext\fP.
+. TRX
+. TD
+\fCS\*$
+. TD
+Repeat last search (pattern from Q-Register \fC_\fP).
+. TRX
+. TD
+\fCN\fItext\*$
+. TD
+Search for next ocurrence of \fItext\fP across all buffers.
+. TRX
+. TD
+\fCFR\fIfrom\*$\fIto\*$
+. TD
+Find next ocurrence of \fIfrom\fP and replace it with \fIto\fP.
+. TRX
+. TD
+\fCFR\*($$
+. TD
+Repeat the last search-replace operation (\fC_\fP and \fC-\fP).
+. TRX
+. TD
+\fC<FR\fIfrom\*$\fIto\*$\fC;>\fP
+. TD
+Find and replace all ocurrences in buffer beginning at current position.
+. TRX
+. TD
+\fCFK\fItext\*$
+. TD
+Find and kill (delete) up to first ocurrence of \fItext\fP.
+. TRX
+. TD
+\fCFD\fItext\*$
+. TD
+Find and delete first ocurrence of \fItext\fP.
+.ETB
+.
+.TBLX "Control Flow" width='45% 55%'
+. TRX
+. TD
+. CI < commands >
+. TD
+Repeat \fIcommands\fP infinitely.
+. TRX
+. TD
+. CI "" n < commands >
+. TD
+Repeat \fIcommands\fP \fIn\fP times.
+. TRX
+. TD
+. CI "" n ;
+. TD
+Break from loop if \fIn\fP is false (non-negative).
+. TRX
+. TD colspan=2
+For instance, to add \fC#\fP in front of the next 10 lines:
+\fC0L10<I#\*$L>\fP
+.ETB
+.
+.TBLX "Help" width='45% 55%'
+. TRX
+. TD
+\fC?\fItopic\*$
+. TD
+Search help for \fItopic\fP (may be command).
+.ig END \" not yet supported
+. TRX
+. TD
+\fC?\*$
+. TD
+Search help by word at current position in buffer.
+.END
+. TRX
+. TD colspan=2
+\fBTip:\fP You can use the Tab-key for autocompleting topics.
+.ETB
+.
+.NCOL
+.
+.TBLX "Search Patterns" width='40% 60%'
+. TRX
+. TD
+\*[CTRL ^X]
+. TD
+Matches any character.
+. TRX
+. TD
+\*[CTRL ^E]\fCS
+. TD
+Matches any non-empty sequence of whitespace characters.
+. TRX
+. TD
+\*[CTRL ^E]\fCA
+. TD
+Matches any alphabetic characters.
+. TRX
+. TD
+\*[CTRL ^E]\fCD
+. TD
+Matches any digit.
+. TRX
+. TD
+\*[CTRL ^N]\fIclass\fP
+. TD
+Matches any character not in \fIclass\fP.
+. TRX
+. TD
+\*[CTRL ^E]\fCM\fIpattern\fP
+. TD
+Matches many ocurrences of \fIpattern\fP.
+. TRX
+. TD
+\*[CTRL ^E]\fCG\fIq\fP
+. TD
+Matches any character in Q-Register \fIq\fP.
+. TRX
+. TD
+\*[CTRL ^E]\fC[\fIp\*<1\*>\fP,\fIp\*<2\*>\fP,\fI...\fP]
+. TD
+Matches \fIp\*<1\*>\fP or \fIp\*<2\*>\fP.
+. TRX
+. TD colspan=2
+To remove all trailing whitespace characters, you could type:
+.br
+\fCJ<FR\*[CTRL LF^E]M\*[CTRL ^E][\0,\*[CTRL TAB]]\*[CTRL $LF$];>
+.ETB
+.
+.TBLX "String Building" width='40% 60%'
+. TRX
+. TD
+\*[CTRL ^E]\fCQ\fIq
+. TD
+Expand to string contents of Q-Register \fIq\fP.
+. TRX
+. TD
+\*[CTRL ^E]\fC\\\fIq
+. TD
+Expand to integer contents of Q-Register \fIq\fP.
+. TRX
+. TD
+\*[CTRL ^E]\fCU\fIq
+. TD
+Expand to character represented by codepoint in Q-Register \fIq\fP.
+. TRX
+. TD
+\*[CTRL ^Q]\fIx
+. TD
+Quote (escape) the following character \fIx\fP.
+. TRX
+. TD
+\*[CTRL ^Q^Q]
+. TD
+Expands to \*[CTRL ^Q].
+.ETB
+.
+.\" Perhaps add the rubout/rubin code as well?
+.\" If so, it would rather belong on page 1.
+.TBLX "Command-line Editing" width='40% 60%'
+. TRX
+. TD
+. CI {
+. TD
+Edit current command-line.
+. TRX
+. TD
+. CI }
+. TD
+Replace command-line with edited version.
+. TRX
+. TD
+. CI {HK}
+. TD
+Undo the entire command-line.
+.ig END
+. TRX
+. TD
+\*[CTRL ^W]
+. TD
+Rub out word or command.
+. TRX
+. TD
+\*[CTRL ^U]
+. TD
+Rub out string argument.
+.END
+. TRX
+. TD
+\*[CTRL ^G^W]
+. TD
+Rub in word.
+Also try Shift+Delete if \fCfnkeys.tes\fP is loaded.
+.ETB
+.
+.sp |(u;\nL-7.7c)
+.PDFPIC -I -5c ../ico/sciteco-256.pdf 5c
+.
+.NCOL
+.
+.TBLX "Arithmetics" width='40% 60%'
+. TRX
+. TD
+. CI "" n U q
+. TD
+Assign number \fIn\fP to Q-Register \fIq\fP.
+. TRX
+. TD
+. CI -U q
+. TD
+Assign -1 to Q-Register \fIq\fP.
+. TRX
+. TD
+. CI Q q
+. TD
+Query (get) integer from Q-Register \fIq\fP.
+. TRX
+. TD
+. CI "" n % q
+. TD
+Add \fIn\fP to Q-Register \fIq\fP and return new value.
+. TRX
+. TD
+. CI % q
+. TD
+Increase Q-Register \fIq\fP and return new value.
+. TRX
+. TD
+. CI -% q
+. TD
+Decrease Q-Register \fIq\fP and return new value.
+. TRX
+. TD
+\*[CTRL ^^]\fIx
+. TD
+Codepoint of character \fIx\fP.
+. TRX
+. TD
+. CI "" n A
+. TD
+Get codepoint \fIn\fP characters after current position.
+. TRX
+. TD
+\fC\\
+. TD
+Parse and retrieve integer at current position in buffer.
+. TRX
+. TD
+\fIn\fC\\
+. TD
+Insert integer \fIn\fP into buffer at current position.
+. TRX
+. TD
+\fC\\+\fIn\fP\\V
+. TD
+Add \fIn\fP to number at current position in buffer.
+. TRX
+. TD
+\fIn\*[CTRL ^_]
+. TD
+Binary negate \fIn\fP \(em negate TECO boolean.
+. TRX
+. TD
+. CI "" n =
+. TD
+Show value of \fIn\fP in message line.
+. TRX
+. TD colspan=2
+Q-Registers consist of 2 cells: strings and integers.
+These are independent.
+Setting a number does not change the string part!
+.ETB
+.
+.TBLX "Syntax Highlighting (lexers.tes)" width='60% 40%'
+. TRX
+. TD
+. CI M[lexer.set. name ]
+. TD
+Set lexer (syntax highlighting) for language \fIname\fP.
+. TRX
+. TD colspan=2
+\fBTip:\fP You can use the Tab-key for autocompleting long Q-Register
+names (and therefore Lexer names).
+.ETB
+\# EOF \ No newline at end of file
diff --git a/doc/grosciteco.tes b/doc/grosciteco.tes
index cad7081..0caf3a5 100755
--- a/doc/grosciteco.tes
+++ b/doc/grosciteco.tes
@@ -11,8 +11,9 @@ LR 0X[output-woman] 2LR 0X[input] HK
:Q[getopt.t]"< EU[getopt.t]Q[output-woman].tec '
EBN[input]
+0EE !* Groff intermediate code is always ASCII *!
-! skip whitespace characters !
+!* skip whitespace characters *!
@#sw{
<0A-^^ "N 1; ' :C;>
}
@@ -49,30 +50,35 @@ EBN[input]
Q.n<.-Z"= 1; ' 0A-10"= 1; ' D>
].n }
+!* style last N glyphs/characters *!
1U[default-style]
@[style]{ [.l
U.l Q[font]-Q[default-style]"N
- .-Q.lESSTARTSTYLING Q[font],Q.lESSETSTYLING
+ .-Q.lESSTARTSTYLING Q[font],Q.lESSETSTYLING
'
].l }
[topics]
-!*
- * Special characters
- * FIXME: Use UTF8 characters once available
- *!
-[glyphs.**]*
+!* special characters *!
+[glyphs.**]∗
[glyphs.\-]-
[glyphs.aa]'
+[glyphs.aq]'
[glyphs.dq]"
-[glyphs.hy]-
-[glyphs.la]<
-[glyphs.ra]>
-[glyphs.lq]"
-[glyphs.rq]"
+[glyphs.hy]‐
+[glyphs.ha]^
+[glyphs.em]—
+[glyphs.bu]•
+[glyphs.la]⟨
+[glyphs.ra]⟩
+[glyphs.lq]“
+[glyphs.rq]”
[glyphs.rs]\
+[glyphs.ti]~
[glyphs.+]+
+[glyphs.->]→
+[glyphs.tm]™
!* process formatter commands *!
@[format]{ <
@@ -103,16 +109,16 @@ EBN[input]
* a table). Only the line+column should no longer change.
* Either store line+column or use markers.
*!
- [* EB 0:M[move] .U.d ]*
+ [* EB 0:M[move] U.d ]*
:EU[topics]\.d:
C :X[topics]
L F<
!cmd.xXsciteco_tt!
- [* EB 0:M[move] .U[ttstart] ]*
+ [* EB 0:M[move] U[ttstart] ]*
L F<
!cmd.xXsciteco_tt_end!
[* EB 0:M[move]
- .-Q[ttstart]<
+ -Q[ttstart]<
Q[ttstart]ESSTARTSTYLING Q[ttstart]ESGETSTYLEAT+16,1ESSETSTYLING
%[ttstart]>
]*
@@ -194,22 +200,27 @@ EBN[input]
:M#sw :M#gi/Q[res.h]+Q[pos.h]U.[to.h] :M#gi/Q[res.v]+Q[pos.v]U.[to.v] :M#sc
[* EB
Q.[to.h]-Q[pos.h]"=
- ! vertical line !
+ !* vertical line *!
Q.[to.v]-Q[pos.v]"< Q[pos.v]U.v Q.[to.v]U[pos.v] | Q.[to.v]U.v '
- 1:M[move] I+ %[pos.v]
+ 1:M[move] %[pos.v] .-Z"= I R '
+ -A-9472"= 0A-9472"= I┬ | I┐ '
+ | 0A-9472"= I┌ | I╷ ' '
Q.v-Q[pos.v]<
- 1:M[move] I| %[pos.v]
+ 1:M[move] %[pos.v] .-Z"= I R '
+ -A-9472"= 0A-9472"= I┼ | I┤ '
+ | 0A-9472"= I├ | I│ ' '
>
- 1:M[move] I+
+ 1:M[move] .-Z"= I R '
+ -A-9472"= 0A-9472"= I┴ | I┘ '
+ | 0A-9472"= I└ | I╵ ' '
Q.[to.v]U[pos.v]
|
- ! horizontal line !
+ !* horizontal line
+ FIXME: works only if horizonal lines are drawn first. *!
Q.[to.h]-Q[pos.h]"< Q[pos.h]U.h Q.[to.h]U[pos.h] | Q.[to.h]U.h '
- 1:M[move] I+ %[pos.h]
- Q.h-Q[pos.h]<
- 1:M[move] I- %[pos.h]
+ Q.h-Q[pos.h]+1<
+ 1:M[move] I─ %[pos.h]
>
- 1:M[move] I+
Q.[to.h]U[pos.h]
'
]* F<
@@ -221,15 +232,24 @@ EBN[input]
:Q.w%[pos.h] :M#sc F<
!cmd.C!
- :M#sw .(:M#sa).X.w
+ :M#sw 0A-^^u"=
+ C 16 :M#giU.w 
+ |
+ .(:M#sa).X.w 0Q[glyphs.Q.w]U.w
+ '
[* EB 1:M[move]
- G[glyphs.Q.w] 1:M[style] ]* :M#sc F<
+ Q.wI 1:M[style] ]* :M#sc F<
!cmd.c!
:M#sw 0AU.w C
[* EB 1:M[move]
G[glyphs.U.w] 1:M[style] ]* :M#sc F<
+ !cmd.N!
+ :M#sw :M#giU.w
+ [* EB 1:M[move]
+ Q.wI 1:M[style] ]* :M#sc F<
+
!cmd.n!
:M#sw :M#gi :M#gi :M#sc F<
@@ -268,7 +288,8 @@ Q*U*
* TODO: The size can still be improved by using SCI_SETSTYLINGEX
* if appropriate.
*!
-EB J 0U#cs 0U#cd
+EB 0EE !* operate in single-byte mode *!
+J 0U#cs 0U#cd
<
.ESGETSTYLEATUs Qs"< Qs= '
.-Z"< Qs-Q#cs"= C F< ' '
diff --git a/doc/grosciteco.tes.1.in b/doc/grosciteco.tes.1.in
index 39941db..d264afc 100644
--- a/doc/grosciteco.tes.1.in
+++ b/doc/grosciteco.tes.1.in
@@ -95,7 +95,6 @@ and provides the following \fBtroff\fP macros that
can be called by documentation authors:
.
.TP
-.TQ
\fB.SCITECO_TOPIC \fItopics...\fR
.SCITECO_TOPIC .SCITECO_TOPIC SCITECO_TOPIC
Defines one or more topics in \*(ST's help system.
diff --git a/doc/htbl.tes b/doc/htbl.tes
index 2bc5056..9cd5100 100755
--- a/doc/htbl.tes
+++ b/doc/htbl.tes
@@ -66,7 +66,7 @@ k q.[row]u.[frows] q.[col]u.[fcols] 1u.[row] 1u.[col] .u.#bd
.,.+3:ST{^J"S
.,S^JT}.-3X.[data.\.[row].\.[col]] C 1
|
- .,.+2:S\^^"S
+ .,.+2:S\^^"S
0U.[format.\.[row].\.[col].rowspan]
Q.[row]-1U.#cr
<Q.[format.\.#cr.\.[col].rowspan]">1;' -%.#cr>
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in
index 1ebb4de..82c1a47 100644
--- a/doc/sciteco.1.in
+++ b/doc/sciteco.1.in
@@ -19,6 +19,7 @@ Scintilla-based \fBT\fPext \fBE\fPditor and \fBCO\fPrrector
.OP "-e|--eval" macro
.OP "-m|--mung"
.OP "--no-profile"
+.OP "-8|--8bit"
.RI [ "UI option .\|.\|." ]
.OP "--"
.RI [ script ]
@@ -191,6 +192,14 @@ munging an empty file.
This is useful to fix up a broken profile script.
This option has no effect when a file is explicitly munged with
.BR \-\-mung .
+.IP "\fB-8\fR, \fB--8bit\fR"
+.SCITECO_TOPIC "-8" "--8-bit"
+Use raw single-byte ANSI encoding by default and disable automatic EOL conversion,
+which optimizes \*(ST for 8-bit cleanliness.
+It is equivalent to executing \(lq16,4ED\(rq, but since it is executed
+very early at startup, all Q-Registers and the unnamed buffer will
+already be in ANSI encoding.
+This option is also useful when munging the profile macro.
.IP "\fIUI options .\|.\|.\fP"
Some graphical user interfaces, notably GTK+, provide
additional command line options.
@@ -305,6 +314,10 @@ for details.
environment before initializing Curses, so these variables
can be modified in the profile macro.
.
+.LP
+On GTK+, you may turn off the infamous client-side window decorations
+by setting the environment variable \fBGTK_CSD\fP to \(lq0\(rq.
+.
.
.SH SIGNALS
.
@@ -392,21 +405,14 @@ It may also be used as a template for
Language reference:
.BR sciteco (7)
.TP
-The \fBtroff\fP post-processor for \*(ST, including
-information on how to write \(lqwomanpages\(rq:
+The \fBtroff\fP post-processor for \*(ST, including information on how to write \(lqwomanpages\(rq:
.BR grosciteco.tes (1)
.TP
-A \fBtroff\fP pre-processor commonly used to generate
-man-pages:
+A \fBtroff\fP pre-processor commonly used to generate man-pages:
.BR tedoc.tes (1)
.TP
-Homepage:
-.UR @PACKAGE_URL@
-\*(ST at Sourceforge
-.UE
-.TP
Development home, bug tracker and wiki:
-.UR @PACKAGE_URL_DEV@
+.UR @PACKAGE_URL@
\*(ST at Github
.UE
.TP
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template
index 2ad16d3..81deac0 100644
--- a/doc/sciteco.7.template
+++ b/doc/sciteco.7.template
@@ -86,17 +86,17 @@ regular commands for command-line editing.
.SH KEY TRANSLATION
.
When the user presses a key or key-combination it is first translated
-to an ASCII character.
-All immediate editing commands and regular \*(ST commands operate on
-a language based solely on
-.B ASCII
-characters.
+to an UTF-8 string.
The rules for translating keys are as follows:
.RS
.IP 1. 4
Keys with a printable representation (letters, digits and special
-characters) are translated to their printable representation.
-Shift-combinations automatically result in upper-case letters.
+characters) are translated to their printable representation
+according to the current keyboard layout and modifier keys.
+On the Gtk UI, \*(ST tries to automatically take ANSI letter
+values in situations where the parser accepts only ANSI
+characters.
+On Curses, you might need key macros to achieve the same.
.IP 2.
.SCITECO_TOPIC ctrl
Control-combinations (e.g. CTRL+A) are translated to control
@@ -104,7 +104,9 @@ codes, that is a code smaller than 32.
The control code can be calculated by stripping the seventh bit
from the upper-case letter's ASCII code.
So for instance, the upper or lower case A (65) will be translated
-to code 1, B to code 2, ecetera.
+to code 1, B (66) to code 2, ecetera.
+\*(ST will always use latin letters regardless of the current
+keyboard layout.
\*(ST echos control codes as Caret followed by the corresponding
upper case letter, so you seldomly need to know a control codes
actual numeric code.
@@ -126,138 +128,164 @@ there is often an equivalent typed with the caret character
(e.g. \(lq^I\(rq).
.IP 4.
A selection of other keys without printable representation (called
-function keys) are translated to user-definable character sequences.
-This feature is called function key macros and explained in the
-next subsection.
+function keys) are looked up as key macros, allowing user-definable character
+sequences to be inserted, including immediate editing commands.
+If there is no matching key macro, nothing is inserted.
+The key macro feature is explained in the next subsection.
+.IP 5.
+All keys with printable representations are also looked up
+as key macros, allowing them to be remapped just like function keys.
+Otherwise the corresponding UTF-8 strings are inserted into the command stream.
+.IP 6.
+The result of key macro lookups or the default printable representations
+are processed as immediate editing commands in a context-sensitive manner
+(see section
+.BR "COMMANDLINE EDITING" ).
+By default they are inserted into the command line macro and are
+immediately executed.
.RE
.
-.SS Function Key Macros
-.
-.SCITECO_TOPIC "function key"
+.LP
+While \*(ST handles keys with arbitrary Unicode representations,
+all immediate editing commands and regular \*(ST commands operate on
+a language based solely on
+.B ASCII
+codes, which is a subset of Unicode.
+\# This is because we cannot assume the presence of any particular non-ANSI
+\# symbol on a user's keyboard.
+\# Immediate editing commands do not operate directly on function keys
+\# because we didn't want to introduce an UI-independent representation
+\# of function keys - it would also complicate insertion of immediate
+\# editing commands from key macros.
+Since the \*(ST parser is Unicode-aware, this does not exclude
+using Unicode glyphs wherever a single character is expected,
+ie. \fB^^\fIx\fR and \fBU\fIq\fR works with arbitrary Unicode glyphs.
+All \*(ST macros must be in valid UTF-8.
+.
+.SS Key Macros
+.
+.SCITECO_TOPIC "key macro" ^K
By default function keys except Escape, Backspace and Return are
ignored by \*(ST.
-By setting bit 6 of the \fBED\fP flag variable, function key handling
-is enabled:
-.SCITECO_TT
-.EX
-0,64ED
-.SCITECO_TT_END
-.EE
-This is usually performed in the editor profile.
-With certain interfaces (curses) after enabling function keys,
-the Escape key might only be handled after a short delay.
+With certain interfaces (curses) the Escape key might only be handled
+after a short delay.
This is because it might be used by the terminal to transmit
Escape Sequences.
This delay is minimized by \*(ST, so using the escape key
should not be a problem even on ncurses/UNIX.
+If the default delay is too small, it can be tweaked with the
+.B ESCDELAY
+environment variable and if necessary a key macro can be
+defined as an escape surrogate as described in this section
+.RB ( fnkeys.tes
+defines the delete key as an escape surrogate for instance).
.LP
-Enabling function keys also enables Function Key Macros.
-These are Q-Register strings inserted into the command stream
-(before immediate editing command handling) when certain function
-keys (or combinations) are pressed.
-The following list of Function Key Macro registers are supported:
+To make use of function keys or to remap all other keys,
+special Q-Register strings can be defined that are inserted into the command stream
+before immediate editing command handling.
+The following list of key macro registers are supported:
+.
.TP 9
-.SCITECO_TOPIC ^FDOWN
-.B ^FDOWN
+.SCITECO_TOPIC ^KDOWN
+.B ^KDOWN
.TQ
-.SCITECO_TOPIC ^FUP
-.B ^FUP
+.SCITECO_TOPIC ^KUP
+.B ^KUP
Inserted when the down/up cursor keys are pressed.
.TP
-.SCITECO_TOPIC ^FLEFT
-.B ^FLEFT
+.SCITECO_TOPIC ^KLEFT
+.B ^KLEFT
.TQ
-.SCITECO_TOPIC ^FSLEFT
-.B ^FSLEFT
+.SCITECO_TOPIC ^KSLEFT
+.B ^KSLEFT
Inserted when the left or shift-left cursor keys are
pressed.
.TP
-.SCITECO_TOPIC ^FRIGHT
-.B ^FRIGHT
+.SCITECO_TOPIC ^KRIGHT
+.B ^KRIGHT
.TQ
-.SCITECO_TOPIC ^FSRIGHT
-.B ^FSRIGHT
+.SCITECO_TOPIC ^KSRIGHT
+.B ^KSRIGHT
Inserted when the right or shift-right cursor keys are
pressed.
.TP
-.SCITECO_TOPIC ^FHOME
-.B ^FHOME
+.SCITECO_TOPIC ^KHOME
+.B ^KHOME
.TQ
-.SCITECO_TOPIC ^FSHOME
-.B ^FSHOME
+.SCITECO_TOPIC ^KSHOME
+.B ^KSHOME
Inserted when the Home or shift-Home keys are pressed.
.TP
-.SCITECO_TOPIC ^FF
-.BI ^FF x
-Inserted when the Fx-key is pressed
+.SCITECO_TOPIC ^KF
+.BI ^KF x
+Inserted when the F\fIx\fP-key is pressed
.RI ( x
is a number between 0 and 63).
.TP
-.SCITECO_TOPIC ^FDC
-.B ^FDC
+.SCITECO_TOPIC ^KDC
+.B ^KDC
.TQ
-.SCITECO_TOPIC ^FSDC
-.B ^FSDC
+.SCITECO_TOPIC ^KSDC
+.B ^KSDC
Inserted when the Delete or shift-Delete key is pressed.
.TP
-.SCITECO_TOPIC ^FIC
-.B ^FIC
+.SCITECO_TOPIC ^KIC
+.B ^KIC
.TQ
-.SCITECO_TOPIC ^FSIC
-.B ^FSIC
+.SCITECO_TOPIC ^KSIC
+.B ^KSIC
Inserted when the Insert or shift-Insert key is pressed.
.TP
-.SCITECO_TOPIC ^FPPAGE
-.B ^FPPAGE
+.SCITECO_TOPIC ^KPPAGE
+.B ^KPPAGE
.TQ
-.SCITECO_TOPIC ^FNPAGE
-.B ^FNPAGE
+.SCITECO_TOPIC ^KNPAGE
+.B ^KNPAGE
Inserted when the Page-Up or Page-Down key is pressed.
.TP
-.SCITECO_TOPIC ^FPRINT
-.B ^FPRINT
+.SCITECO_TOPIC ^KPRINT
+.B ^KPRINT
.TQ
-.SCITECO_TOPIC ^FSPRINT
-.B ^FSPRINT
+.SCITECO_TOPIC ^KSPRINT
+.B ^KSPRINT
Inserted when the Print or shift-Print key is pressed.
.TP
-.SCITECO_TOPIC ^FA1
-.B ^FA1
+.SCITECO_TOPIC ^KA1
+.B ^KA1
.TQ
-.SCITECO_TOPIC ^FA3
-.B ^FA3
+.SCITECO_TOPIC ^KA3
+.B ^KA3
.TQ
-.SCITECO_TOPIC ^FB2
-.B ^FB2
+.SCITECO_TOPIC ^KB2
+.B ^KB2
.TQ
-.SCITECO_TOPIC ^FC1
-.B ^FC1
+.SCITECO_TOPIC ^KC1
+.B ^KC1
.TQ
-.SCITECO_TOPIC ^FC3
-.B ^FC3
+.SCITECO_TOPIC ^KC3
+.B ^KC3
Inserted when the numeric key pad's upper left key (7),
upper right key (9), central key (5), lower left key (1),
or lower right key (3) is pressed and num-lock is disabled.
The key-pad's cursor keys are handled like the regular
cursor keys.
.TP
-.SCITECO_TOPIC ^FEND
-.B ^FEND
+.SCITECO_TOPIC ^KEND
+.B ^KEND
.TQ
-.SCITECO_TOPIC ^FSEND
-.B ^FSEND
+.SCITECO_TOPIC ^KSEND
+.B ^KSEND
Inserted when the End or shift-End key is pressed.
.TP
-.SCITECO_TOPIC ^FHELP
-.B ^FHELP
+.SCITECO_TOPIC ^KHELP
+.B ^KHELP
.TQ
-.SCITECO_TOPIC ^FSHELP
-.B ^FSHELP
+.SCITECO_TOPIC ^KSHELP
+.B ^KSHELP
Inserted when the Help or shift-Help key is pressed.
.TQ
-.SCITECO_TOPIC ^FCLOSE
-.B ^FCLOSE
-ISCITECO_TOPIC when the Close key has been pressed.
+.SCITECO_TOPIC ^KCLOSE
+.B ^KCLOSE
Inserted when the Close key has been pressed.
More importantly, this key is emulated in some GUIs
(notably GTK+) when the user tries to close \*(ST's
@@ -266,34 +294,50 @@ This allows customizing \*(ST's behaviour when
program termination is requested (e.g. only quit if
there are no unsaved buffers).
The close key is also special because
-it has a default action if function key macros are
-disabled or the \(lq^FCLOSE\(rq macro is undefined:
+it has a default action if the \(lq^KCLOSE\(rq macro is undefined:
It unconditionally quits \*(ST.
The default action is \fBnot\fP performed when
-\(lq^FCLOSE\(rq has merely been masked out in the
+\(lq^KCLOSE\(rq has merely been masked out in the
current parser state (see below).
+.TP
+.BI ^K x
+Any other key with printable representation and all control codes
+are looked up with a \(lq^K\(rq prefix.
+\fIx\fP can usually only be a single Unicode glyph.
+\# Although the result of IMEs is looked up in Gtk, which I suppose
+\# can be multiple codepoints.
+If undefined, \fIx\fP is inserted unmodified.
+\# NOTE: Since all function key macros are longer than 2
+\# characters, there shouldn't be any namespace collisions.
.
.LP
-\(lq^F\(rq corresponds to CTRL+F in the above list but
+\(lq^K\(rq corresponds to CTRL+K (ASCII code 11) in the above list but
might be typed with a caret due to string building characters
in long Q-Register names.
The names are all derived from key definitions of the curses
library \(em not all of them may be supported on any particular
user interface.
.LP
-By default function key macros are effective everywhere \(em
-pressing a function key has the same effect as processing
-the characters of the corresponding function key macro as
+The result of key macro expansion differs from
+consecutive key presses in that they are considered an unity.
+If insertion of a single character fails (raises an error),
+the entire macro expansion is automatically rubbed out.
+.LP
+By default key macros are effective everywhere \(em
+pressing a key has the same effect as processing
+the characters of the corresponding key macro as
immediate editing commands (or self-inserting characters).
-However function key macros that rewrite the current command line
+However key macros that rewrite the current command line
will only work correctly from specific \*(ST parser states.
-\*(ST therefore allows you to mask function key macros in
+Another common use of key macros would be to define
+aliases of \*(ST commands for non-latin keys on Curses.
+\*(ST therefore allows you to mask key macros in
specific parser states by evaluating the Q-Register's numeric
-part, thus allowing you to control \fIwhere\fP a function key
+part, thus allowing you to control \fIwhere\fP a key
macro is effective.
The numeric part represents a bitmask of states where
-function keys are \fIdisabled\fP (so the default value 0
-enables that function key everywhere).
+keys macros are \fIdisabled\fP (so the default value 0
+enables that key macro everywhere).
\*(ST defines the following state flags:
.IP 1 4
Bit 0 represents the \(lqstart\(rq state where \*(ST accepts the
@@ -302,23 +346,27 @@ This is the state you will want command line editing macros
to be enabled in.
.IP 2
Bit 1 represents any string argument.
+.IP 4
+Bit 2 represents any case insensitive syntactic character.
+This is the state you might want to use for translating
+non-latin characters to their latin equivalent.
.LP
All other bits/flags represent any other parser state.
Consequently, setting the register to the inverse of a bitmask of
state flags enables the corresponding macro only for the specified
states.
-For instance, to enable the \(lq^FRIGHT\(rq function key macro
+For instance, to enable the \(lq^KRIGHT\(rq key macro
only in the \(lqstart\(rq state, you could set:
.SCITECO_TT
.EX
-1^_U[^FRIGHT]
+1^_U[^KRIGHT]
.SCITECO_TT_END
.EE
.LP
-A set of useful Function Key Macros are provided in the
+A set of useful key macros for function keys is provided in the
standard library
.BR fnkeys.tes .
-It demonstrates how Function Key Macros may be used to define
+It demonstrates how key macros may be used to define
alternate Escape keys (so the delay issue is not experienced),
or do insertion and command-line editing using function keys.
.
@@ -1069,11 +1117,27 @@ Every document has a current position called dot
(after the \(lq.\(rq command that returns it).
A document may contain any sequence of bytes but positions
refer to characters that might not correspond to individual
-bytes depending on the document's encoding.
+bytes depending on the document's encoding (see \fBEE\fP command).
+The \fB^E\fP command can be used to translate between byte
+and character/glyph positions.
Consequently when querying the code at a character position
or inserting characters by code, the code may be an Unicode
codepoint instead of byte-sized integer.
-Currently however, \*(ST will only handle ASCII files.
+.LP
+Currently, \*(ST supports buffers in UTF-8 and single-byte
+ANSI encodings, that can also be used for editing raw binary files.
+\# You can configure other single-byte code pages with EE,
+\# but there isn't yet any way to insert characters.
+UTF-8 is the default codepage for new buffers and Q-Registers
+unless the 2nd \fBED\fP flag bit is set.
+You can also specify \fB--8bit\fP to optimize \*(ST for
+8-bit cleanliness.
+While navigation in documents with single-byte encodings
+takes place in constant time, \*(ST uses heuristics in
+UTF-8 documents for translating between byte and character
+offsets which are slower especially when \(lqjumping\(rq
+into very large lines.
+\# But there are optimizations for R, C and A...
.LP
.SCITECO_TOPIC "EOL translation"
To simplify working with files using different end of line
@@ -1461,16 +1525,27 @@ The existence of a clipboard register can thus be checked
in macros to determine whether getting and modifying that
particular clipboard is supported natively.
.br
-.SCITECO_TOPIC xterm
+.SCITECO_TOPIC OSC-52 xterm
\*(ST does \fBnot\fP generally support clipboards on ncurses,
-but has special support when used with a sufficiently recent version
-of \fBxterm\fP(1).
-Since the operability of XTerm clipboards cannot be tested
+but has special support for OSC-52 escape sequences, as were
+introduced by sufficiently recent versions of
+.BR xterm (1)
+and have since been adopted by several other terminal emulators.
+Since the operability of OSC-52 clipboards cannot be tested
automatically, users will have to set the flag 256 of the
-\fBED\fP flags if and only if their XTerm is configured for allowing
+\fBED\fP flags if and only if their terminal emulator is properly
+configured.
+.BR xterm (1)
+for instance must be configured for allowing
the \fISetSelection\fP and \fIGetSelection\fP window operations.
-\*(ST will still check whether XTerm is actually used in
-a particular session.
+If running under
+.BR xterm (1),
+\*(ST will still check whether the XTerm version is sufficient.
+.SCITECO_TOPIC Kitty
+Other terminal emulators like Kitty may ask for permission to read the
+clipboard (\fBread-clipboard-ask\fP).
+This is not supported by \*(ST and must be disabled
+(use \fBread-clipboard\fP instead).
.SCITECO_TOPIC xclip
If native clipboard support is unavailable, users may
still fall back to using external tools like \fBxclip\fP(1)
@@ -1493,11 +1568,11 @@ the original clipboard contents, though.
The numeric parts of the clipboard registers are currently
not used by \*(ST.
.TP
-.BI ^F key
-Function key registers as documented in section
-\fBKEY TRANSLATION\fP.
-Their string-content represents a function key macro
-and their numeric part is a function key mask.
+.BI ^K key
+Key macro registers as documented in section
+.BR "KEY TRANSLATION" .
+Their string-content represents a key macro
+and their numeric part is a key macro mask.
None of those registers are automatically initialized
on startup.
.TP
@@ -1571,7 +1646,8 @@ contents of the search register you could write:
[_ Sfoo$ ]_
.SCITECO_TT_END
.EE
-.
+To copy the string and numeric contents of register \(lqA\(rq to \(lqB\(rq,
+you could write \(lq[a ]b\(rq.
.
.SH STRING-BUILDING CHARACTERS
.SCITECO_TOPIC "string building"
@@ -1588,7 +1664,9 @@ stages:
.IP 1. 4
Carets followed by characters are translated to control codes,
so \(lq^a\(rq and \(lq^A\(rq are equivalent to CTRL+A (code 1).
-A double caret \(lq^^\(rq is translated to a single caret.
+\# FIXME: Should we change the double-caret behavior?
+A double caret \(lq^^\(rq is translated to a single caret,
+but Ctrl+caret (code 30) is not translated at all.
This caret-handling is independent of the caret-handling in
command names.
.IP 2.
@@ -1616,22 +1694,29 @@ thus refers to the corresponding control code:
Escape character \fIc\fP.
The character is not handled as a string building or string termination
character, so for instance \(lq^Q^Q\(rq translates to \(lq^Q\(rq.
+Furthermore, some immediate editing commands are inhibited right after \fB^Q\fR,
+so you can type \(lq^Q^U\(rq and \(lq^Q^W\(rq, which translate to control codes
+21 and 23.
.TP
.SCITECO_TOPIC ^V^V ^Vc lower
.B ^V^V
.TQ
.BI ^V c
-Translates all following characters into lower case.
+Translates all following characters, including the expansions of \fB^EQ\fP,
+\fB^EU\fP etc., into lower case.
When \fB^V\fP is not followed by \fB^V\fP, a single character
\fIc\fP is lower-cased.
+\# Which is pretty pointless nowadays.
.TP
.SCITECO_TOPIC ^W^W ^Wc
.B ^W^W
.TQ
.BI ^W c
Analogous to \fB^V\fP, but upper-cases characters.
+Since \fB^W\fP is an immediate editing command, this can practically be typed
+only with upcarets in interactive mode.
.TP
-.SCITECO_TOPIC ^E\\ ^E\\q
+.SCITECO_TOPIC ^E\[rs] ^E\[rs]q
.BI ^E\(rs q
Expands to the formatted number stored in the
numeric part of Q-Register \fIq\fP.
@@ -1648,6 +1733,12 @@ Expands to the character whose code is stored in the numeric
part of Q-Register \fIq\fP.
For instance if register \(lqA\(rq contains the code 66,
\(lq^EUa\(rq expands to the character \(lqB\(rq.
+The interpretation of this code depends on the context.
+Within inserts and searches (\fBI\fP, \fBS\fP, etc.) bytes or Unicode codepoints
+are expected depending on the buffer's encoding.
+Operations on registers (\fBEU\fP) similarily consult the
+register's encoding.
+Everything else expects Unicode codepoints.
.TP
.SCITECO_TOPIC ^EQ ^EQq
.BI ^EQ q
@@ -1698,6 +1789,14 @@ The following pattern match constructs are supported for matching
one character in different character classes
(caret-notations refer to the corresponding control characters):
.TP
+.BI ^Q c
+.TQ
+.BI ^R c
+Escape character \fIc\fP.
+Since these are interpreted as string building characters as well,
+you may have to type two or three \fB^Q\fP in a row to escape a
+pattern match character.
+.TP
.SCITECO_TOPIC ^S ^EB
.B ^S
.TQ
@@ -2067,17 +2166,17 @@ For instance the following macro inserts \fIn\fP tab characters
.TP
.SCITECO_TOPIC """A"
.IB n \(dqA
-Applies if \fIn\fP is the code of an alphabetic character.
+Applies if \fIn\fP is the Unicode codepoint of an alphabetic character.
.TP
.SCITECO_TOPIC """C"
.IB n \(dqC
-Applies if \fIn\fP is the code of a symbol constituent.
+Applies if \fIn\fP is the Unicode codepoint of a symbol constituent.
Like in pattern matching, a symbol constituent is defined
as an alpha-numeric character, dot, dollar or underscore.
.TP
.SCITECO_TOPIC """D"
.IB n \(dqD
-Applies if \fIn\fP is the code of a digit character (0 to 9).
+Applies if \fIn\fP is the Unicode codepoint of a digit character.
The current radix is insignificant.
.TP
.SCITECO_TOPIC """I"
@@ -2150,16 +2249,16 @@ will commonly write:
.TP
.SCITECO_TOPIC """R"
.IB n \(dqR
-Applies if \fIn\fP is the code of an alpha-numeric character.
+Applies if \fIn\fP is the Unicode codepoint of an alpha-numeric character.
.TP
.SCITECO_TOPIC """V"
.IB n \(dqV
-Applies if \fIn\fP is the code of a lower-case alphabetic
+Applies if \fIn\fP is the Unicode codepoint of a lower-case alphabetic
character.
.TP
.SCITECO_TOPIC """W"
.IB n \(dqW
-Applies if \fIn\fP is the code of a upper-case alphabetic
+Applies if \fIn\fP is the Unicode codepoint of an upper-case alphabetic
character.
.LP
There are also a number of flow-control commands like
@@ -2219,6 +2318,7 @@ This manual mentions differences on several occasions.
.
.SH SEE ALSO
.
+.\" FIXME: The URLs do not format in FreeBSD's man or in woman pages.
.TP
Program invocation and options:
.BR sciteco (1)
@@ -2228,16 +2328,19 @@ Scintilla messages and other documentation:
Scintilla
.UE
.TP
-Scinterm manual, documenting the mapping of
-\(lqRGB\(rq values to terminal colors on curses user interfaces:
+Scinterm manual, documenting the mapping of \(lqRGB\(rq values to terminal colors on curses user interfaces:
.UR http://foicica.com/scinterm/manual.html
Scinterm manual
.UE
.TP
-Gtk+ 3 documentation, containg details about
-its CSS support and syntax:
-.UR https://developer.gnome.org/gtk3/stable/GtkCssProvider.html
-GtkCssProvider
+Suitable terminal fonts for icon support in Curses (see \fBED\fP flags):
+.UR https://www.nerdfonts.com/
+Nerd Fonts
+.UE
+.TP
+Gtk+ 3 documentation, containg details about its CSS support and syntax:
+.UR https://docs.gtk.org/gtk3/css-overview.html
+Overview of CSS in GTK
.UE
.
.