On 1 Feb 2016, at 18:50, Scott Barman <[email protected]> wrote:
> 
> Please bear with me. I am very olde school. I learned Unix text editing with 
> ed on Version 7! With no apologies to emacs fans, I am a vi user. After years 
> of hearing people extol the virtues of BBEdit especially for editing web 
> pages, I finally bought a copy. Now I am trying to learn without reverting 
> back to vi.
> 
> In vi (and ed), I could search for a pattern, then on every line found, run a 
> substitute command using a different pattern.
> 
> For example, if I want to find every line with a colon and change it so that 
> the line is a level 3 header, in ed or vi I could do: g/:/s/^.*$/<h3>&<\/h3>

BBEdit has exactly what you're after:

  Search > Find…

That will bring up a dialog window with "Find", "Replace", and a bunch of 
options underneath. If you tick the "Grep" option, you'll be able to do 
something like this for the above:

Find: ^.*$
Replace: <h3>\1</h3>

You'll also note that BBEdit will try to syntax colour the regex. If you don't 
see colouring, it's probably because "Grep" is not ticked. The "case sensitive" 
option is the same as the "i" modifier. "Wrap around" will change the default 
behaviour ("find stuff between cursor and end of file") to wrap-around 
behaviour ("find stuff between cursor and end of file, then start back at the 
beginning of the file"). "Selected text only" means the search/replace will 
only happen inside the currently selected block of text.

I haven't experimented with "entire word" yet.

Alex


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to