VIM Q again

Gene Heskett gene.heskett at verizon.net
Mon Jun 2 01:26:04 UTC 2008


On Sunday 01 June 2008, Cameron Simpson wrote:
>On 01Jun2008 20:19, Gene Heskett <gene.heskett at verizon.net> wrote:
>| However adding the missing comments is severely hampered by vim's apparent
>| inability to do a global search and replace with the example shown in
>| the ":help change" portion of the online help.
>
>The help is probably wrong then.
>
>| So what am I doing wrong when in the command mode, I type
>| /s/L1BAE/isspace/&g, or :s/L1BAE/isspace/&g
>
>What do you think each of the "&" and the "g" do in your line?
>
>Next. What does:
>  :s/L1BAE/isspace/g

which has not done anything here even to a single instance of L1A8E

>do? That's for a single line. Every line:
>  :%s/L1BAE/isspace/g

The use of the % sign doesn't seem to be mentioned in the :help I have been able 
to get to.
>
>It would help if you explained what you were trying to achieve instead of
>what you were trying to type.

When I figure out what a piece of code is doing, I would like to be able to 
globally replace the L1A8E label it now carries as an entry point,  as found 
and labeled by our disassembler, with something more in line with what the 
routine actually does, like "s/L1A8E/printerr/g" which with another editor I 
use on that machine will globally replace every instance of L1A8E with 
printerr.

So code would look like this:
	lbsr 	printerr
...
printerr	lda #path
		  etc etc

This is all assembly language for a 6x09 cpu, not that it makes any diff here.

Thanks Cameron.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Other women cloy
The appetites they feed, but she makes hungry
Where most she satisfies.
		-- Antony and Cleopatra




More information about the fedora-list mailing list