The one thing I miss when using Xcode, having spent most of my career in Visual Studio and having, for the most part, come to prefer Xcode over the last few years, is the ability to edit multiple rows of text simultaneously.
In VS, this is accomplished by alt-dragging a columnar selection, then typing. Whatever you type appears on all rows at once. So you can convert this:
glVertex2f( 1, -1 );
glVertex2f( 1, 0 );
glVertex2f( 1, 1 );
...to this...
glVertex2f( -1, -1 );
glVertex2f( -1, 0 );
glVertex2f( -1, 1 );
...with a single keystroke. Or perhaps you meant to type "glVertex2i". All those f's can turn to i's in a moment. This feature is amazingly handy in a wide variety of situations.
Xcode also allows columnar selection with alt+drag. However, after making such a selection, typing only modifies the first row of text, as if only the first row had been selected.
Is there an option, a plugin—anything—that enables multi-row editing in Xcode?
I'm currently in version 4.3.1, BTW.
What you do put your cursor where you want to add a character on a line, then use SHIFT+ALT and either the arrow keys or your mouse (you have to click to the same column position the line that you are selecting to) to select all the lines that you want to edit the same way.
This is where the Edit all in scope command comes to rescue. The way edit all in scope works is you select the word that you would like to replace and press ^⌘E. This will highlight all the occurrences of your selected word in the current file.
Not a perfect solution but maybe this can help you...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With