Re: Possible with Grep?

2024-02-28 Thread GP
Thinking outside the box... You said you already have three search and replace operations that do what you want but are looking for a one operation solution. Canonize is one way to achieve a one operation solution. Put your existing search and replaces in a transformation file. One search and

Re: Any way to print differences of two text files?

2024-02-28 Thread Allen Watson
I'll give this a try! Thank you. On Tuesday, February 27, 2024 at 12:56:24 AM UTC-8 jj wrote: > Hi Allen, > > I don't know if this is possible with BBEdit alone. > But you could do it in a terminal with the help of command line utilities > diff and aha

Re: Possible with Grep?

2024-02-28 Thread Neil Faiman
I’m afraid that I don’t have anything useful to contribute, but many, many years ago (1980s), I was using a programmable text editor (anybody remember TPU / LSEdit for VMS?), and implemented exactly this feature. I used it all the time; and I’ve regretted ever since that I’ve never seen it in

Re: Possible with Grep?

2024-02-28 Thread Mike Pasini
I did this once upon a time but had to use separate replacements for each case pattern. Here's an example you can run in BBEdit: #!/usr/bin/env perl @data = ( "word","Word","WORD"); $mask = "%-10s >> %s\n"; for $datum (@data) { printf $mask, $datum, fix($datum); print "\n"; } sub

Re: Possible with Grep?

2024-02-28 Thread 'Ulrich Kapp' via BBEdit Talk
I don't know if I understood your intention correctly, but maybe this ist what you are looking for: *First switch of case sensitive searching!* Search pattern: (w)(ord) Replacement pattern: \u\1\L\2 With this, every *word *|*Word *|*WORD* turns into *Word.* Use the "Pattern Playground"

Re: Possible with Grep?

2024-02-28 Thread Jim Straus
Sorry, maybe I wasn’t clear. Yes, “word” is a place holder. Think aWord, A_WORD, a_word as possible items to be changed. I want to change them to aSomething, A_SOMETHING, a_something. Searching for “word” in a case insensitive manner is easy, and even capture it. The question is, can I

Re: Possible with Grep?

2024-02-28 Thread GP
>From the BBEdit Find window's grep cheat sheet, (?i) on the find grep expression will do case insensitive matches. Then the question is what do you want the replacement's character casing to look like? If you want the character casing to conform to the found match's, I don't think you can

Re: Possible with Grep?

2024-02-28 Thread Rick Gordon
*(?i)* in the string will render it case-insensitive, as will unchecking *Case sensitive* at the bottom of the BBEdit Find/Replace dialog. On Wednesday, February 28, 2024 at 1:14:26 PM UTC-8 Brian Forte wrote: > On Wed, 28 Feb 2024 11:38:07 -0600, Jim Straus wrote: > > I'm looking to change a

Re: Most BBEdit-like Terminal Editor ??

2024-02-28 Thread James Reynolds
I forgot one, TextAdept also has a terminal version. https://orbitalquark.github.io/textadept/. IMO micro is much better though. James Reynolds https://magnusviri.com > On Feb 28, 2024, at 14:33, Rick Gordon wrote: > > Thanks all! I think micro looks like the best one I've found. I

Re: Most BBEdit-like Terminal Editor ??

2024-02-28 Thread Rick Gordon
Thanks all! I think micro looks like the best one I've found. I appreciate your insights. Rick Gordon -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com" rather than posting here. Follow @bbedit

Re: Possible with Grep?

2024-02-28 Thread Brian Forte
On Wed, 28 Feb 2024 11:38:07 -0600, Jim Straus wrote: > I'm looking to change a word in my code to another one, but it is > sometimes "Word", "word" or "WORD". I can do this with three search and > replaces. I also know about the \u\U modifications to the group (so \u\1 > to uppercase the first

Possible with Grep?

2024-02-28 Thread Jim Straus
Hello all regex experts - I'm looking to change a word in my code to another one, but it is sometimes "Word", "word" or "WORD". I can do this with three search and replaces. I also know about the \u\U modifications to the group (so \u\1 to uppercase the first letter), but that doesn't really

Re: Most BBEdit-like Terminal Editor ??

2024-02-28 Thread Antoine Beaubien
For sure it’s micro. Regards, Antoine Le mar. 27 févr. 2024, à 03 h 49, Rick Gordon a écrit : > What Terminal editor is the most similar in interface to BBEdit (i.e., the > easiest TUI editor for a person who is most comfortable with BBEdit), which > I might install on a remote machine