How To Make Column-Mode Selection in Visual Studio

All text-editors on Windows, including Visual Studio; generally operates in line-mode (and implicitly stream-mode too).

Stream mode selects text in a “stream”, beginning with the first character selected and ending with the last character, just as if you were reading the text. Line mode selects full lines of text. Both of them are characteristically equal in terms of their modus operandi, i.e. they work in lines; it’s just a matter of how much texts are covered by the selection (either all or some).

There’re some circumstances where you want to select in columns instead of lines. Selecting text in column mode is similar to drawing a rectangle around the text you wish to select. See the differences in the following figure:

Selection Modes

Many people do not know about the column-mode selection in Visual Studio, but it’s just as simple as holding the ALT key while rubberbanding your text (selecting text by dragging the mouse). Pretty handy, huh?

About these ads

Posted on January 26, 2006, in Code Junky. Bookmark the permalink. 11 Comments.

  1. Duhhhh…

    But I didnĀ“t know that! It was too simple… THANK YOU! THANK YOU A LOT!!!

    Symp.

    P.S.: The worst: I tried to search on Visual Studio help, and I did’n see anything!

  2. I have been looking this since the days of WordStar !!!

  3. I have been looking for this since the days of WordStar !!!

  4. Great! One more thing VS2012 is doing better!

  5. have been using this feature in ultraedit for many years, never thought VS can do this. thank you very much

  6. Also, keyboard select works the same way. From the current cursor position in a document, press and hold Alt + Shift and then press the arrow keys to move the cursor and create the selection. This will select in a columnar fashion to wherever you move the cursor relative to its starting position.

  7. And this is not new to VS 2012. It has been there for quite some time; since at least VS 2008. It’s also supported in VS 2013.

  8. What about column edit after column selection (like in slick edit)??

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: