"Column Mode" in gedit?
Asked Answered
P

8

30

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?

Poteat answered 12/12, 2009 at 16:21 Comment(1)
askubuntu.com/questions/1126156/…Panslavism
W
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

Weightless answered 12/12, 2009 at 16:44 Comment(1)
Yeah, looks like I'm not the only one who became addicted to this feature. Multi-edit looks like an interesting option. Thanks!Poteat
W
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.

Wester answered 3/12, 2012 at 15:13 Comment(3)
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?Archicarp
Geany (in many ways the equivalent to Notepad++ on Windows) is able to do it (I just tested it - version 1.35) - use Shift + Alt + arrow keys to select.Fledge
Thanks for recommending Kate. Works great with columns. Indeed lots of dependencies, about 155, but total size is about 50 MB, who cares. +1Squeal
O
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.

Overspill answered 13/4, 2013 at 11:7 Comment(3)
multiple-cursors is probably a better fit that cua-mode for column editing.Sabinasabine
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.Dillingham
Even more convenient than using the mouse is to use the keyboard shortcut: Shift + Alt + arrow keys to select.Fledge
F
2

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

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

Franklin answered 9/4, 2014 at 5:28 Comment(3)
Note that it's a trial version for 30 days.Goldeneye
And it's not a purchase, it's a subscription !! from £79.99 annually, here in2019Belmonte
@Belmonte says reinstate Monica: Yes, and they are very unclear about it (e.g. they don't tell if the software will actually stop working).Fledge
D
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.

Delinda answered 30/8, 2011 at 13:55 Comment(2)
This seems to be the preferred option as the ColumnMode plugin is deprecated.Mudslinger
askubuntu.com/questions/1126156/…Panslavism
E
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.

Escapade answered 2/7, 2014 at 15:15 Comment(0)
S
0

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

Samuele answered 6/4, 2019 at 4:9 Comment(0)
B
-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.

Basilisk answered 27/10, 2015 at 22:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.