In windows, I used to use a text editor called crimson editor which featured the best column-mode editing support I have yet to use.
When enabled via a simple Alt-C shortcut, selections could be made with the mouse or cursor keys and they would be visual blocks rather than wrapped-lines.
These selections could be deleted, moved, copied, pasted, and all of the operations just made sense. You could also just start typing, and you'd get a column of the characters as you're typing.
There are multiple ways of getting parts of the these features working separately discussed on this forum thread, but no one has yet to provide a solution that provides this all-encompassing and easy-to-use method.
If someone could point me to a gedit plugin where this work is actively being pursued, perhaps I could help with the coding myself. If someone is aware of a text editor that already provides this full functionality, I'd appreciate the info. Running crimson editor through wine and the close-but-not-quite multi-edit plugin for gedit are the temporary solutions I'm 'getting by with' for the time being.
UPDATE (2012-11): I'm now a very happy user of sublime text. It supports excellent column-mode editing and works on all three major OS platforms without any issue. Highly recommended!
geany
is an integrated development environment that provides good column editing support which is worth checking out (an example here)
Simply put, press down Alt+Shift instead of just Shift while making selections to invoke column mode. One important limitation is that the edits in column mode are (as yet) not undo-able.
To achieve the same with the mouse, hold down Ctrl while selecting. This actually works with most Scintilla-based editors (including SciTE and Geany).
To edit columns, I use vi / gvim. It takes a bit of learning to get used to vi, but in the end many people find this to be their preferred editor.
Specifically within vi you can use CTRL V to highlight columns in visual mode, then you can edit it as you would expect. I use this all the time for adding and removing comments, or indenting functions i.e. CTRL V (highlight a column) SHIFT I # ESC will comment out that entire column.
You do use the Eclipse editor. Alt+Shift+A should do what you need.
nedit
I use NEdit all the time.
To install it using the terminal, use the following command:
Old school (Motif) but has tabs and is lightweight and simple. Has context highlighting included for a number of coding languages, and more can be added. Pressing Ctrl while dragging with the mouse enables a block of text to be selected. Then you can copy/paste as usual. Couldn't do without this feature now.
Use a gEdit with gmate and plugins. You'll get the TextMate of Linux.
With this "slight" modification gEdit really rocks.
This is possible in emacs, and it's easy if you use the cua-mode. C-return marks the upper left of the rectangle. Then move the cursor to highlight the rectangular region.
Here's a video that shows how to do it: http://vimeo.com/1168225
And see section "CUA rectangle support" here: http://www.cua.dk/cua.html
The emacs column mode features are really cool. They go far beyond just copy/paste of rectangular text. Check out the video for a demo of how to simultaneously edit all the lines in the column! Very handy!
If you don't want to watch the video (or can't) here are the bare basics:
On Kubuntu 12.04 and emacs v24, [S-return] is CONTROL-RETURN (CTRL-ENTER) for me.
As already mentioned, Scite has this built-in (no plug-ins needed). It's very easy to use. And Scite is in the Ubuntu repos.
Also Notepadqq can do this: they briefly present the feature in their page. Hold down Alt, then hold Ctrl or Shift, and select the "columns" you want by dragging (or also clicking, if you are holding Ctrl) with the mouse. Release the buttons when you are done selecting columns, and start editing by typing, using arrow keys, copy-paste (a mouse click will cancel the multi-selection).
The points you select don't need to form a real column, it's an arbitrary number of cursors active at same time. When you copy-paste, the text is pasted cursor-by-cursor if the number of copied and pasted ones matches, otherwise every target cursor gets a full copy of the input.
Little nuisances: you can't de-select single cursors while keeping the others, and you can't use the keyboard to select them (or at least, I don't know how to).
Paste this commands in terminal
In vim use:
see:
KWrite, Kate and KDevelop also support this. It's a bit different in them in that column edit mode works not via modifier keys, but as a mode that you turn on and off. These three programs have different feature level but are based on the same editor component.
Yes, you can achieve it with the Gedit plugin multi edit. This blog post explains it.
sudo apt install gedit-plugin-multi-edit
Bonus: Use Ctrl + E, when in Multi-Edit Mode and click at various points (which you want to edit at same time). this way you can edit multiple lines based on words.