@:aH%mH Help (type this summary) |^r mode teco stuff |char function |qK,q0 kill lines, but save them in q0. | delete characters forward | delete characters backward | multiply action of other keys by 4. |^S qS,q" search for string, terminate string with line feed |^Z qZ,q" search again for same string as last time |^B Go to beginning of buffer |^B Go to end of buffer |^V qV Display next screenful, go to next page of file if necessary. |^W qW en$$--write out file & continue editing |^X qX ex$$--write out file & exit to shell |^R qR,qt Remove char to save buffer (ie, qt) |^T qT,qt Transfer line to save buffer |^G qG,qt Get text from save buffer |^C qC Clear save buffer | Save a copy of the save register in q-reg. . | Get a copy of q-reg ›=% :@iS/ ecs [a[b[c[d[e[f[g 0,0xa0ub0ue0ug fvHEIGHT-1uc << @tqcfvRVPOS 0fvRHPOS search:  a qg"E ' qg"G(fvWIDTH-15)fvRHPOS WRAPPED AROUND 0ug' @tud.uf qd-127"E 0;' [f[a%e zj qd-19"E2*qe<]d>1ueqb"E:ia"i'-d'[f[aqfj 0ofindit' qd-14"Eqdiiz-2,zxd-2d:aad 0ofindit1' qd-3"Eqdiiz-2,zxd-2d:aad 0ofindit1' qd-13"E 2oendsearch' qdiz-1,zxd-d:aad !findit1! qfj -qac !findit! %b ess :sa"EfvBELL0j :sa"Eecsqfj0;'%g' ecs > qe"Eqa"EfvBELL 0oloop' zjga-dqa-1"G-c1A-3"Edqa-1ua' 1A-14"Edqa-1ua' c' z-qa+1,zxa-qadqf"Gqf-1uf' 0oloop' qe-1ue ]a]f !loop! qfj > !endsearch! qfj2*qe<]f> qcfvRVPOS 0fvRHPOS  @t ]g]f]e]d]c]b]a ess / |in the above [search] macro, q-reg. usage is: |a holds current search string |b holds flag saying we've searched at least once. |c holds height of screen. |d holds last char typed |e holds count of stack pushes |f holds location searched from. |g holds wrap-around flag. :@iZ/ ecs [0.u0 :S""EfvBELLq0j' @T ]0 |search for the contents of qQ. If search ess / |fails, buzz & reset pointer to where it was. :@iW/ [0 .u0 en q0j <.-q0; a q0j> @t ]0 / :@iX/0fvRHPOS 0fvRVPOS ›>›Jex/ | Delete line(s), but don't throw it away quite yet. @:iK/ecs [a[b 1<.uaubqb-1"E^^lub':1mM"NfvBELL0;'.-qafvREXPT qa,.x0qajqEfvREXEC> 1fvREXPT ]b]a ess/ | Delete char(s) forward, but don't throw it away quite yet. | (red key) @:iD/ecs [a[b 1<.uaubqb-1"E^^cub':1mM"NfvBELL0;'.-qafvREXPT qa,.x0qajqEfvREXEC> 1fvREXPT ]b]a ess/ | Delete char(s) backward, but don't throw it away quite yet. | (delete key) @:iO/ecs [a[b 1<.ua ubqb-1"E^^cub' :-1mM"N fvBELL 0;'.,qax0 qa-.fvREXPT qEfvREXEC> 1fvREXPT ]b]a ess/ | Delete a char in save mode: @:iR/ecs [a[b[c 1<ubqb-1"E^^cub' 0mM .ua :1mM"NfvBELL 1fvREXPT 0;' qa,.xc:aJcqa,.k .-(fvWINDOW)+1"G.@t'@t1fvREXPT> ]c]b]a ess/ | Get back the saved text: :@iG/ecs [0 .u0 fvREXPT 1fvREXPT q0@t@t]0 ess/ | Clear the save buffer: :@iC/ecs 0,0xJ ess/ 0,0xJ | Kill to end of line, in save mode: @:iT/ecs [a[b[c 1<ubqb-1"E^^lub' .uc :1mM"NfvBELL 1fvREXPT 0;' qc,.xa:aJaqc,.k.@t@t 1fvREXPT> ]c]b]a ess/ | Move up @:iA/ecs [b[c 1<ubqb-1"E^^lub':-1mM"NfvBELL 1fvREXPT 0;' @t1fvREXPT> ]c]b ess/ | Move down @:iN/ecs [b[c 1<ubqb-1"E^^lub' :1mM"NfvBELL 1fvREXPT 0;' @t1fvREXPT> ]c]b ess/ | Move left @:iI/ecs [b[c 1<ubqb-1"E^^cub' :-1mM"NfvBELL 1fvREXPT 0;' @t1fvREXPT> ]c]b ess/ | Move right @:iF/ecs [b[c 1<ubqb-1"E^^cub' :1mM"NfvBELL 1fvREXPT 0;' @t1fvREXPT> ]c]b ess/ :@iV\|Next window [0[1 fvHEIGHTu0 fvRVPOSu1 %1-(fv%CENTER*q0/100)u1 fvREXPT 12fvRCMACfvREXEC 1fvREXPT ]1]0\ | Utility macro to print line at bottom of screen. | 0mU means blank the bottom line | 1mU (or mU) means just say "Count = n" @:iU/ecs [a[b[c[d ua 0fvRHPOS fvHEIGHT-1fvRVPOS 1Count =  fvREXPT= >@t ]d]c]b]a ess/ | find matching ( (arg = -1) or { (arg = 1) @:iy/ecs [a[b[c[d[e ^^{uc^^}ud +1"E^^(uc^^)ud' 1ub.ue0 fvREXPT<0aua qa-qc"Eqb-1ub qb;' qa-qd"E%b' .E"1 qej 0;' r> ]e]d]c]b]a ess/ | find matching ) (arg = -1) or } (arg = 1) @:iz/ecs [a[b[c[d[e ^^{uc^^}ud +1"E^^(uc^^)ud' 1ub.ue0 fvREXPT<0aua z-."E1qej0;' qa-qd"Eqb-1ub qb;' qd-qc"E%b' c> 1fvREXPT 0fvRHPOS fvHEIGHT-1fvRVPOS Count = 1  @t ]e]d]c]b]a ess/ |Set left end of object @:iY/ecs[a[b[c[d 1<.uazj.ubgQqbj\ .ucc \udqd+1"Gqa"LfvBELL 0;'qa"Gqd-qa"LfvBELL 0;''' qd"Lqa"Lqd-qa"LfvBELL 0;''' qcjqb,.kqa\qb,zxQ> qb,zkqaj]d]c]b]a ess/ | Set right end of object @:iP/ecs[a[b[c[d 1<.uazj.ubgQqbj\udqd"Gqa+1"Gqd-qa"GfvBELL 0;''' qd"Lqa"GfvBELL 0;'qa"Lqd-qa"GfvBELL 0;''' c.,zkqa\i qb,zxQ> qb,zkqaj]d]c]b]a ess/ :iQ0 65534  | Utility macro to find ends of entities @:iM/ecs [a[c 0 1 "LfvREXPT<.;<-l.;0A-10"N0A-12"N0;''> <.;0A-9;0A-12;0A-32;-l0A-10"El 0;'>>'' "GfvREXPT0;'>>'0;' qb-^^w"E-1"L<."E1Odonew'-c0A-9;0A-10;0A-12;0A-32;>c "LfvREXPT<.;<.;-c0A-9"N0A-10"N0A-12"N0A-32"N0;''''> <."E2Odonew'-c0A-9;0A-10;0A-12;0A-32;>c>!donew!0;'' "GfvREXPT >'0;' > ; 1fvREXPT 0;> ]c]aess/ | Dispatch on ? @:iB~ecs [a[b[c[d 1ub0uc ua qa-^^n"E0fvRHPOS fvHEIGHT-1fvRVPOS Save cache in register number:  uaqa-^^"E-^^?"NfvBELL0Oend'-64ua' qa-13"E0Oend' 1 :iJ 0Oend' .udfvREXPTqd@t@t 1Oend' qa-^^p"LfvBELL 1Oend' qa-^^y"GfvBELL 1Oend'|get value for REXPT qc"E0fvREXPT %c'(fvREXPT*10)+(qa-^^p)fvREXPT mUuaqa-13"E1Oend'qa-^^"N0;'uaqa-13"E1Oend'qa-^^?"N0;'ua > 1 1 qa-^^"Eua' 1>c> qc@t@t 0;' qa-^^g"E mG 0;' |get cache qa-^^r"E qbmR 0;' |remove [chars] qa-^^t"E qbmT 0;' |take [lines] qa-^^u"Eqb-1"E^^cub' 0mM.uc:1mM"NfvBELL 1Oend' .udqcj |underscore qd-.<1<1Auaqa-^^.; qa-^^,; qa"Ci_ 0;'>c> qc@t@t 0;' qa-127"EqbmO 0;'| key fvBELL > !end!1fvREXPT 0mU ]d]c]b]a ess~ (^^fvRCMAC),^^PfvRAMAC| Blue ^^D,^^QfvRAMAC| Red ^^K,^^RfvRAMAC| Black ^^A,^^AfvRAMAC| Up ^^N,^^BfvRAMAC| Down ^^F,^^CfvRAMAC| Right ^^I,^^DfvRAMAC| Left ^^B,^^?fvRAMAC| .,enter,numbers C,fvRCMAC ^^fvRCMACuE (^^fvRCMAC),^^fvRCMAC (^^fvRCMAC),^^fvRCMAC G,fvRCMAC (^^fvRCMAC),^^fvRCMAC (^^fvRCMAC),^^ fvRCMAC (^^fvRCMAC),^^fvRCMAC ^^P,^^fvRCMAC R,fvRCMAC ^^S,^^fvRCMAC ^^T,fvRCMAC (^^fvRCMAC),^^fvRCMAC ^^V,^^fvRCMAC ^^W,23fvRCMAC ^^X,24fvRCMAC ^^Y,^^fvRCMAC ^^Z,26fvRCMAC ^^O,127fvRCMAC .,.x0 .,.x1 .,.x2 .,.x3 .,.x4 .,.x5 .,.x6 .,.x7 .,.x8 .,.x9 ›= ess esr