Quickly replace all instances of a word.

318 views
Skip to first unread message

Justin Driscoll

unread,
Feb 3, 2015, 6:17:09 PM2/3/15
to bbe...@googlegroups.com
Wherever the cursor is placed in BBEdit it underlines the current word and all other instances of that word. Is there a way to quickly replace all those instances without copying it, opening find/replace, pasting, finding and so forth? Now I'd love to see BBEdit get multiple insertion points and implement column editing and an analog of Sublime/Atom's "Select Next" feature. Still, a quick replace would be very helpful and I often over look existing features in BBEdit.

Bruce Van Allen

unread,
Feb 3, 2015, 6:44:10 PM2/3/15
to bbe...@googlegroups.com
On 2/3/15 at 3:17 PM, justin....@gmail.com (Justin
Driscoll) wrote:

>Wherever the cursor is placed in BBEdit it underlines the
>current word and all other instances of that word. Is there a
>way to quickly replace all those instances without copying it,
>opening find/replace, pasting, finding and so forth?

Sure. Select the word, and choose the menu command Search -> Use
Selection for Find (Cmd-E in my setup). Then type the
replacement text over the selected word, select it, and choose
Search -> Use Selection for Replace (Option-Cmd-E for me). Then
use the command Search -> Replace All (Option-Cmd-=).

Check your menu key assignments for these - I don't remember if
mine are standard.

You could also easily write a script that would let you simply
place the cursor in the word you want, then evoke the script
(with an assigned key combo), which would select the word, make
it the Search pattern, prompt you for the replacement, and then
perform Replace All.

HTH
--

- Bruce

_bruce__van_allen__santa_cruz__ca_

Vlad Ghitulescu

unread,
Feb 4, 2015, 12:59:05 AM2/4/15
to bbe...@googlegroups.com
Hello!


Am 04.02.2015 um 00:44 schrieb Bruce Van Allen <b...@cruzio.com>:

Check your menu key assignments for these - I don't remember if mine are standard.

(A little OT, but:) I’ve seen this a lot in this group and it’s already true for me too, even when I’m a fairly new BBEdit-user. Is there a way to recall / save / list all the personal keyboard shortcuts from BBEdit? 
Something like:

SELECT (all shortcuts)
FROM (the big BBEdit-shortcut-container)
INTO (a BBEdit-text-document, what else? ;-)
WHERE (shortcut is not default)


Regards,
Vlad


Reply all
Reply to author
Forward
0 new messages