26
votes

I'm transitioning from UltraEdit on Windows to gedit on Linux. So far, the experience is great (there's a lot here for a free tool), but there's one indispensable feature of UltraEdit I can't seem to find a way to replicate -- Column Mode.

Column Mode is a feature available in UltraEdit by pressing Alt+C. With it enabled you can highlight text in a single column over many lines, allowing you to edit many lines at once (e.g., to comment out a section of text, prepend some string to aligned variable names, or for many other reasons). It's saved me countless hours of find-and-replace or repetitive manual editing of consecutive lines, and I feel very awkward in gedit without it.

Is there anything like this (via a plugin probably) in gedit?

8

8 Answers

11
votes

I'm not sure if this helps. The GNOME page on the subject is down. Quite a lot of people seem to be looking for that exact feature. One guy is doing this plug-in; try it perhaps it helps: http://jon-walsh.com/journal/multi-edit/

Other thoughts on the subject are here: http://brainstorm.ubuntu.com/idea/17656/. This is supposed to be an unfinished plug-in for what you're looking for, but as I said, the page appears to be down. http://live.gnome.org/Gedit/Plugins/ColumnMode

9
votes

Multi-edit only provides a subset of the functions available in UltraEdit column mode. While I can make a column-delimited selection by enabling Multi-edit mode and hitting "Enter" after a regular selection, I can't copy this selection to the clipboard and paste it elsewhere as I can with UltraEdit.

The developer of Multi-edit has developed a sequel called "Imitation", discussed at http://codetree.com.au/projects/imitation/. The sequel also appears to lack the ability to cut and paste a column selection.

There is another editor available for Linux called "Kate", which provides the ability to cut and paste a rectangular block of code. The "block editing" mode in Kate is enabled with Ctrl + Shift + B. Once the block edit mode is enabled, you can click-drag to select a block of text, and cut, copy, or paste the block just as you would in UltraEdit.

When I installed Kate on my Fedora system, it pulled in a lot of KDE dependencies, which may be a problem for some people. For me, it's one less reason to have to boot up Windows, since I was using UltraEdit's column mode to do editing which was simply not convenient in gedit.

5
votes

I also had the experience of transiting from UltraEdit in Windows to some editors in Linux. So far the best solution is:

  1. Using Geany to edit large text files. It is much faster than gedit to open a file and the column mode is quite convenient: just hold Ctrl + Shift when using the mouse to select the contents. Or you can first put the cursor at the start point, and then hold Ctrl + Shift before using the mouse to select the end point. Which is suitable for large columns.

  2. For edit scripts it is better to use Emacs. There is also a mode called CUA-mode which could select a column. And they can add an incremental number on each line of the selected columns. The best tutorial is to search CUA mode Emacs on YouTube.

2
votes

Now you can download the UltraEdit for linux distributions from the following link.

http://www.ultraedit.com/downloads/uex.html

1
votes

http://blogs.gnome.org/jessevdk/2009/11/15/new-gedit-plugin-multi-edit/

To get it, just install the gedit-plugins package and enable the plugin from Edit -> Preferences -> Plugins.

0
votes

Geany has this feature with ctl+shift drag mouse from the cursor

0
votes

Development on it has stopped, but NEdit is still available.

It has fantastic column editing, better than UltraEdit. It is a fast editor and you don't have to install KDE components.

-1
votes

Holding down Ctrl and making a selection will paste as a column. It's not as good as Alt+C but is quick enough for a workaround.