[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Putting 2-char. func.call in CM-line argument



Just thought I'd pass on a bit of information to anyone who's as klutzy as I am.

Harry Binswanger kindly showed me that you can use {11} (the "masculine" symbol)
together with the string /fn to search or replace, e.g.
			se/fn *{11}bc*
(where {..} = ASCII call-out number, and ** are the begin-end separators for a
search)
if keyed on the command line and executed with F9, will put the cursor on each
successive instance of the BC function call. Similarly,
			cia/fn *{11}bc*{11}bx*
will, when executed, change all occurrences of function call BC to function call
BX.

Fine. But today I wanted (please don't ask why: the answer is, I'm not just a
klutz, I'm a klutz who works at high speed) to find successive occurrences of a
function call _plus_ a further string: specifically, I wanted the cursor to end
after the "a" of BC cia. But
			se/fn *{11}bccia*
wouldn't work. The reason (I finally figured out) is that the highlighted "BC"
which depicts the function call in a program file on screen always has an
immutable, untouchable space after the "C", so (as indicated above) I was keying
in that space. When I put
			se/fn *{11}bccia*
on the command line, with no space between the two "c"s, the search worked fine.
The same applies to search-and-replace commands, etc.

Again, this won't be news to a lot of people. And I wasn't completely satisfied
with this new tool until I'd put the {11} character into the keyboard file. But
I now have "empty" search, search-back, cia, and cva loaded onto four keys,*
plus the {11} character itself on another key, and I'm as happy as a clam at
high tide.

					Eric Van Tassel


* Again for anyone who needs it, my method is to incorporate strings like the
following in the kbd file:
	26=BC,SI,c,v,a,/,f,n, ,*,{11},*,{11},*,CL,CL,CL
The effect of "SI" plus the three "CL"s is to put the cursor back before the 2nd
* and make sure the Insert key is toggled to insert mode; when this string
appears on the command line, the cursor is in position to input a func.call
(plus any other string) to-be-changed, and I then arrow-right past the 2nd * to
input a func.call (plus string) to-be-changed-to. (In reality, I use not ***
but {239} x3: I want to be able to input any plausible string without
conflicting with the separators, and while I do use * (and /, \, |, and
suchlike) in my files, I never use ASCII 239 (which is something in symbolic
logic) -- its other virtue being that it's large enough to be highly visible
onscreen.