diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-15 20:17:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-15 20:17:08 -0700 |
commit | 81709906eeb5e853d03f5e966e631720c8632566 (patch) | |
tree | b03898133b1b967b625dbdf0391871aaea3e546b /txr.1 | |
parent | ba05e309f805fa6338584aa8e77350dade9269ca (diff) | |
download | txr-81709906eeb5e853d03f5e966e631720c8632566.tar.gz txr-81709906eeb5e853d03f5e966e631720c8632566.tar.bz2 txr-81709906eeb5e853d03f5e966e631720c8632566.zip |
linenoise: parenthesis-matching backward jump.
* linenoise/linenoise.c (LINENOISE_PAREN_DELAY): New
preprocessor symbol.
(scan_match_rev, scan_rev, usec_delay, paren_jump):
New static functions.
(edit): Handle closing parenthesis, bracket and brace
by inserting and calling paren_jump.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -33677,6 +33677,28 @@ that is, when the .code -i option isn't present. +.SS* Parenthesis Matching + +A feature of the listener is visual parenthesis matching in the form of a +brief backward jump of the cursor. This provides a hint to the programmer, +helping to prevent avoid parenthesis balancing errors. + +When any of the three closing characters +.codn ) , +.codn ] +or +.code } +is inserted, the listener scans backward for the matching opening +character. If the matching character is found, the cursor jumps to that +character and then returns to the original position a brief moment later. If a +new character is typed during the brief time delay, the delay is immediately +canceled, so as not to hinder rapid typing. + +Note that the backward matching is unsophisticated; it doesn't observe the +lexical conventions and syntax of the \*(TL programming language. For +instance, a closing parenthesis outside a string literal may match +match an opening one inside a string literal. + .SH* DEBUGGER \*(TX has a simple, crude, built-in debugger. The debugger is invoked by adding the |