MacOS block select / replace text?

TeeJayHoward

Limpness Supreme
Joined
Feb 8, 2005
Messages
12,271
So in MacOS, you can block-select text by holding down option (alt) and selecting the lines you want. Cool. Works well. But I'm a little spoiled by Notepad++ which allows you to replace the text you just selected just by typing. Is there a way to enter the same text on multiple lines in MacOS?
 
Not sure I understand- if you have selected text and type it will replace.

Enter the same text on multiple lines... not sure about that. Sure sounds an awful lot like CMD-C, CMD-V
 
So, as an example:

AAA1AAA
BBB1BBB
CCC1CCC

Select just the "1" column by holding down Alt+drawing a box around the 1s.

In Notepad++, you can type "2" after selecting the "1"s and it will end up looking like this:

AAA2AAA
BBB2BBB
CCC2CCC

However, in TextEdit (and I imagine other MacOS programs), it looks like this:
AAA2AAA
BBB1BBB
CCC1CCC
 
Oh a vertical select - that I don’t know - it’s not OS level but doesn’t mean a program couldn’t have implemented something like it.

If you were to hold Alt and arrow down and select all the 1’s, after you type you would normally have:

AAA2222
2222222
2222CCC

Check out TextWrangler / BBEdit- not sure if they do that specific item but they are pretty robust text editors on OS X
 
Oh a vertical select - that I don’t know - it’s not OS level but doesn’t mean a program couldn’t have implemented something like it.

If you were to hold Alt and arrow down and select all the 1’s, after you type you would normally have:

AAA2222
2222222
2222CCC

Check out TextWrangler / BBEdit- not sure if they do that specific item but they are pretty robust text editors on OS X

Late reply but this does indeed work in TextWrangler. Bare Bones Software no longer supports TextWrangler nor, as far as I can tell, allow you to download it from their site. However, BBEdit in lite mode (what BBEdit becomes after 30 days if you don't pay) is supposed to be functionally equivalent.
 
What you want is Column Edit mode.

It's supported by most major text editors. You'll just have to switch modes using a hotkey combo.

For Ultraedit, it's Alt-C.
 
Back
Top