From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Hohensee Message-Id: <200108141702.NAA05037@smarty.smart.net> To: 9fans@cse.psu.edu In-Reply-To: <3B73F61E.F60C9811@null.net> from "Douglas A. Gwyn" at Aug 14, 2001 09:44:23 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [9fans] h is for help in tp Date: Tue, 14 Aug 2001 13:02:33 -0400 Topicbox-Message-UUID: dc195466-eac9-11e9-9e20-41e7f4b1d025 I just have the command language of sam in cLIeNUX, since I don't use X. I also call sam tp for "text processor". In view of someone whining about the user interface, allow me to re-post my cheatsheet. In cLIeNUX tp (sam) this comes up when you hit h. If there's further interest I'll post the code to do that, which is trivial. h ____________________________________________________________________________ cLIeNUX sam/tp text processing language cheatsheet cheatsheet markup... refNAME `default' "virtual" /delimited/ 0_or_more... syntax operators (in commands, not patterns or strings) delimiter any punctuation, paired or with EOL next character is literal \ text location operators (address elements) linefeed (unix newline) \n "empty line" at End Of File $ current text segment . MARKed text segment ' scanning DIRection - or `+' Line Number Character Number # match scan PATtern /regular expression, \n allowed/ OFFset LN or CN or PAT or `1' HALF address full ADDRess , just , is whole buffer text inputs INTERactive accept typed text up to . alone on line Whole Match Backreference & SUBmatch backreference \ nth match ()-delimited in PAT LITeral string /literal text and|or WMB... and|or SUB.../ INPUT LIT or INTER commands and thier PHRASE syntaxes, some multi-buffer phrases omitted a _append_ INPUT after address b make buffer the current buffer c _clobber_ address with INPUT d _delete_ addressed range of text e _edit_ file, make file current buffer f rename current buffer g PHRASE do PHRASE _if_ PAT matches in ADDR h You're soaking in it. i _insert_ INPUT before address k mark address for reference as ' m move, not copy n list buffers p _print_ to stdout. usual default command. q _quit_. Always works the second time. r _read_ file into buffer after ADDR s use xc instead t copy u undo. Unlimited, but one-way. v PHRASE do PHRASE if PAT _doesn't_ match in ADDR w _write_ out ADDR. default is whole buffer. x PHRASE for each match of PAT in ADDR do PHRASE y PHRASE do PHRASE on text between each PAT in ADDR ............................................................................ Rick Hohensee www.clienux.com