29

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mzzzzzz
  • 4,770
  • 7
  • 30
  • 47
  • 2
    https://askubuntu.com/questions/1126156/how-to-select-a-column-or-block-of-text-in-gedit-3-28-1 – Adam Mar 28 '19 at 18:00

8 Answers8

12

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
webdreamer
  • 2,359
  • 3
  • 23
  • 30
  • 2
    Yeah, looks like I'm not the only one who became addicted to this feature. Multi-edit looks like an interesting option. Thanks! – Mzzzzzz Dec 13 '09 at 18:38
11

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
zeggman
  • 111
  • 1
  • 4
  • So what about rows of arbitrary length as selection and and then copy paste (which ST and Atom support)? Or does it only support a block of equal length rows? – Zelphir Kaltstahl Oct 02 '16 at 11:19
  • [Geany](https://en.wikipedia.org/wiki/Geany) (in many ways the equivalent to [Notepad++](https://en.wikipedia.org/wiki/Notepad%2B%2B) on Windows) is able to do it (I just tested it - version 1.35) - use Shift + Alt + arrow keys to select. – Peter Mortensen Mar 22 '20 at 00:04
  • Thanks for recommending Kate. Works great with columns. Indeed lots of dependencies, about 155, but total size is about 50 MB, who cares. +1 – Roland Jun 10 '22 at 21:23
5

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chenming Zhang
  • 2,446
  • 2
  • 26
  • 34
  • multiple-cursors is probably a better fit that cua-mode for column editing. – Jordon Biondo Apr 13 '13 at 16:52
  • 2
    Eclipse handles this well too. I remember doing this with "brief" on a 33MHz Pentium, we thought it was way cool. I also had to move from UE due to the IE6 DLL dependency on installs. – mckenzm Feb 15 '19 at 04:06
  • Even more convenient than using the mouse is to use the keyboard shortcut: Shift + Alt + arrow keys to select. – Peter Mortensen Mar 22 '20 at 00:05
2

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

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

Chanaka udaya
  • 5,134
  • 4
  • 27
  • 34
1

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.

jmotes
  • 2,669
  • 2
  • 22
  • 19
  • 1
    This seems to be the preferred option as the ColumnMode plugin is deprecated. – nunop Jun 11 '18 at 22:45
  • https://askubuntu.com/questions/1126156/how-to-select-a-column-or-block-of-text-in-gedit-3-28-1 – Adam Mar 28 '19 at 18:00
0

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Steve
  • 3,127
  • 14
  • 56
  • 96
0

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

-1

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.

zero298
  • 25,467
  • 10
  • 75
  • 100