Re: stupid question on vi

2025-02-25 Thread RVP
On Mon, 24 Feb 2025, Greg A. Woods wrote: Versions other than the one in NetBSD really aren't relevant here. :-) Fair enough. "imply"? I would say it's pretty explicit. The word "text" (when not appearing before the word "editor") in the manual page usually refers to "document text", tho

Re: stupid question on vi

2025-02-24 Thread Greg A. Woods
At Mon, 24 Feb 2025 22:11:02 + (UTC), RVP wrote: Subject: Re: stupid question on vi > > On Sun, 23 Feb 2025, Greg A. Woods wrote: > > > At Sun, 23 Feb 2025 06:44:02 + (UTC), RVP wrote: > > Subject: Re: stupid question on vi > >> > >> nv

Re: stupid question on vi

2025-02-24 Thread adr
On Mon, 24 Feb 2025, beaker wrote: The OP should be able to use named buffers for this task. Steps: 1) create lines with the commands you want to run: /\x93# vi cmd: find/search forward in file for "\x93" :%s/\x93//g # ex cmd: globally replace all instances of "\x93" w/ "" 2) move to

Re: stupid question on vi

2025-02-24 Thread RVP
On Sun, 23 Feb 2025, Greg A. Woods wrote: At Sun, 23 Feb 2025 06:44:02 + (UTC), RVP wrote: Subject: Re: stupid question on vi nvi(1) has a poorly-documented Ctrl-X key Looks very well documented to me: [0-9A-Fa-f]+ Insert a character with the specified hexadecimal

Re: stupid question on vi

2025-02-24 Thread beaker
adr wrote: > On Sun, 23 Feb 2025, beaker wrote: > > I'm not seeing the Ctrl-X thing on NetBSD 9.3, though maybe that's > > the poorly documented aspect.. > > It's there since (at least) 1997: > https://docs-archive.freebsd.org/44doc/usd/13.viref/paper.pdf So why is it not in the :viusage listing

Re: stupid question on vi

2025-02-23 Thread Greg A. Woods
At Sun, 23 Feb 2025 06:44:02 + (UTC), RVP wrote: Subject: Re: stupid question on vi > > nvi(1) has a poorly-documented Ctrl-X key Looks very well documented to me: [0-9A-Fa-f]+ Insert a character with the specified hexadecimal value into the text. P

Re: stupid question on vi

2025-02-23 Thread adr
On Sun, 23 Feb 2025, adr wrote: RPV gave the answer the OP was looking for, let's not I'm sorry RVP, I messed up your name!

Re: stupid question on vi

2025-02-23 Thread adr
On Sun, 23 Feb 2025, beaker wrote: I'm not seeing the Ctrl-X thing on NetBSD 9.3, though maybe that's the poorly documented aspect.. It's there since (at least) 1997: https://docs-archive.freebsd.org/44doc/usd/13.viref/paper.pdf The OP should be able to use named buffers for this task. Steps

Re: stupid question on vi

2025-02-23 Thread beaker
RVP wrote: > On Sat, 22 Feb 2025, Dave Tyson wrote: > > > I have a file which has some hex characters 0x80 and higher. > > > > I am trying to search for them so I can replace them. I can see them > > and they appear, for example, like \x93 on the screen and occupy a > > single character. > > > >

Re: stupid question on vi

2025-02-23 Thread adr
On Sun, 23 Feb 2025, Dave Tyson wrote: I have tried various incantations like /^V\%x93 That's a vim "thing". I have used sed to do do replacements fine I think that's a perl "thing". The escape sequence \xNN is not implemented in regex, but locally in sed: /usr/src/usr.bin/sed/compile.c =

Re: stupid question on vi

2025-02-23 Thread Dave Tyson
On Sun, 2025-02-23 at 06:44 +, RVP wrote: > On Sat, 22 Feb 2025, Dave Tyson wrote: > > > I have a file which has some hex characters 0x80 and higher. > > > > I am trying to search for them so I can replace them. I can see > > them > > and they appear, for example, like \x93 on the screen and

Re: stupid question on vi

2025-02-22 Thread RVP
On Sat, 22 Feb 2025, Dave Tyson wrote: I have a file which has some hex characters 0x80 and higher. I am trying to search for them so I can replace them. I can see them and they appear, for example, like \x93 on the screen and occupy a single character. nvi(1) has a poorly-documented Ctrl-X

Re: stupid question on vi

2025-02-22 Thread Van Ly
Dave Tyson writes: > > I have used sed to do do replacements fine, but I just want to locate > some errant characters so I can see the context. > Two thing you can try on Grok 3: — tell Grok to write a Perl script to your requirements — upload your file to Grok and request what you are after

Re: stupid question on vi

2025-02-22 Thread Robert Elz
Date:Sat, 22 Feb 2025 23:08:42 + From:Dave Tyson Message-ID: <0a81f160c933bb8f824b03cbeb87305dfa8262da.ca...@anduin.org.uk> | I am trying to search for them so I can replace them. You need to type a literal 0x93 character and search for that. It shouldn't need