|Monday, 04 September 2006 07:09|
I'm writing this page because I've spoken to many fellow co-workers that haven't yet heard of the column mode (or sometimes called rectangular selection...maybe even vertical selection) feature available in many nice text editors. If you don't know what rectangular selection is...and you are a programmer, then get ready for a wonderful tool to put in your toolbox. This information has saved me hours of text editing time.
Column-mode in a text editor allows you to select text on a column by column basis not line by line.
At first thought this may not seem like such a cool feature... but it is really great.
When programming, you often have to add the same information to many lines of code. With column mode, you can quickly make the change on all the lines at the same time.
Access keys and methods are a bit different in every editor.
First thing to learn in any text editor is the selection capabilities. I would like this page to serve as a teaching tool for how to do column selection in all of my favorite editors (Ultraedit, JEdit, Vim, emacs, VS2008, etc).
First on my list is Ultraedit, which is the IDE I first learned about column mode selection goodness.
UltraeditColumn-mode editing allows you to select, copy and paste a rectangular block of text. In Ultraedit, you can select a single column (with width=0 characters), start typing and whatever you type is inserted in every line selected.
Visual Studio 2010 Box Selection
Wow! The visual studio team implemented a zero width selection, multi-line edit and insert, with virtual space box selection/editing (editing in the file where there aren't bytes in the file already). This makes VS2010 a very significant upgrade to me. Woot! Woot!
Visual Studio (VS2003,VS2008)To enable rectangular selection in visual studio just hold down the ALT key while selecting text.
I think this is a would-be-great feature of visual studio. However, I don't like that you can't select a zero width column. Forcing you to destroy some part of your input. With zero width column selection, you just start typing in front of your selected text.
Just as a side note, here is what you get in VS2008 when you try and make a zero width selection by SHIFT-ALT Left Arrowing the selection above. Sad, I'm not sure that selection is even useful. Maybe someday there will be a plugin/setting to fix it...
Then, to make matters worse, when you begin to type, it unselects your selection and places the input on the first line. How is that useful? I'm not really fond of capabilities of visual studio's implementation. :(
Here are some other interesting textual selection shortcut keys for visual studio.
Edit.CharLeftExtendColumn - SHIFT + ALT + LEFT/RIGHT ARROW - Moves the cursor to the left/right one character, extending the column selection.
Edit.GoToBraceExtend - CTRL + SHIFT + ] - Moves the cursor to the next brace, extending the selection.
Edit.SelectCurrentWord - CTRL + W - Selects the word containing the insertion point or the word to the right of the cursor.
Edit.WordNextExtend - CTRL + SHIFT + RIGHT ARROW - Extends the selection one word to the right.
JEditJEdit is a nice cross platform programmer's editor. It is open source java.
Selecting Text in jEdit
VIMVIM has the ability to select text in rectangular blocks in VISUAL BLOCK mode. Hit CTRL-V and you can extend the selection column by column. This doesn't allow you to have 0 width selections or to move and extend the selection into columns that do not exist on disk however (huge drawback!).
Selecting columns with visual block mode - vimcasts.org on column commands and using visual block mode.
EclipseEclipse has native column mode "block mode" support since 2009. Alt-Shift-A (Thanks Bill Foster)
Eclipse Tip: Block Selection Mode « Vasanth Dharmaraj’s Blog
Columns Plug-in for Eclipse 3.3.1 - this is a pretty nice plugin with many options (shown above). My only gripe with this plugin, is that it doesn't show the selection as-is...it still highlights characters outside of the selection. Though, it is better than nothing and it does what it should.
Column Mode for Eclipse Text Editors - i've tried to install, but it wouldn't work for me...
EmacsW32 Home Page
emacs-fu - useful tricks for emacs blog.
EmacsWiki: Site Map
The Craft of Text Editing - a thesis on text editing.
Emacs as a tiling window manager
Self-contained emacs mariusaeriksen/make-emacs · GitHub - simple, self-contained, relocatable emacs
nEditNEdit - the multi-purpose X Window System editor
Lucas Vieites writes Hi, I am too a big fan of this feature that is absent from all the "big" programming editors out there. I miss it very much since I had to quit using "Nedit" a few years ago because of it's lack of unicode support. In Nedit you can do Ctrl+drag to select columns and copy/cut & paste them wherever you like.
GeanyLucas Vieites also noted geany which I had not seen before...it also includes column mode.
Geany : Home Page -a text editor using the GTK2 toolkit with basic features of an integrated development environment.
Geany is based on Scintilla and SciTE and is gtk based.
Homepage of Crimson Editor - Free Text Editor, Html Editor, Programmers Editor for Windows
Introduction - Textadept - talks of rectangular selection in Adept Editing - Textadept
|Last Updated on Saturday, 08 June 2013 09:23|