Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a lightweight freeware text-editor for linux (Ubuntu) with two (or more) code panels, so I can compare pieces of code side-by-side.

For Windows Notepad++ has two panels, and I can even edit the same file in both panels, but there's no linux version AFAIK.

In Linux I'm using Geany, preety good and lightweight, but it hasn't two panels (AFAIK, again).

What do you suggest? (Maybe can be useful: I'm working with Ruby.)


I just found a plugin to Geany called "Split Window". But it's not "so perfect". Only one file at time can be at the splitted window; it hasn't its own tabs group.

share|improve this question

migrated from Sep 28 '11 at 16:24

This question came from our site for professional programmers interested in conceptual questions about software development.

I think that Geany has a two-pane mode as an addon. Split Window is the name of this specific addon, and I think it comes bundled. I don't know, though, because I haven't used Geany since I learned vim. – new123456 Sep 28 '11 at 23:52
You should read up on editor wars before posting questions like this, because your question has great potential to start them up again... :) – TC1 Sep 29 '11 at 8:15
up vote 7 down vote accepted

If you're a KDE person, Kate allows you to split the screen using the View > Split View menu.

Kate with split pane

In fact, after the split each half acts like an independent view which can be further split, so if you want you can display 3 files side-by-side, or 4 files each in a quarter of the screen, and so on. Of course any number of these views can display the same file.

share|improve this answer
Great! Another lightweight editor with n-panels! :) +1! – Sony Santos Sep 28 '11 at 22:39
I must say: just installed and when I open it for testing, the very first tip of the day is how to split window!... :) #weird! – Sony Santos Sep 28 '11 at 22:44
After testing some suggestions, this is what best suits my needs. Thank you all! – Sony Santos Sep 29 '11 at 11:44

I'm gonna be the one - vim.

enter image description here

Vertical split - :vsp

Horizontal split - :sp

Diff - $ vimdiff file1.txt file2.txt

If you have not used vim before, check out vimtutor. It'll be very difficult to understand in the beginning, but it will pay off in the long run, especially if you plan to do software development. Primary reason is because vi/vim comes with almost, if not every Unix/Linux machine, and it is incredibly lightweight.


In the case where you really dislike how vim works and want a more conventional text editor, check out Sublime Text 2 (note: ST2's also starting to support vi keybindings :p).

enter image description here

share|improve this answer
+1 for vim. A useful vim cheat-sheet: – leo Sep 28 '11 at 16:40
+1 for ST2. Nothing against vim, but I prefer "a more conventional text editor". :) Now I'm testing ST2. – Sony Santos Sep 28 '11 at 18:50
Along w/ vimtutor, this new site is great for getting your feet wet with vim: – J. LaRosee Sep 29 '11 at 3:16

For side-by-side file comparison I have yet to see anything better than Emacs' ediff. But it may not be lightweight enough for you.

share|improve this answer
Eight Megabytes And Constantly Swapping was a heavy editor. It really was, and it's not a flyweight even now; but it just doesn't sit on large fractions of a memory anymore. – dmckee Sep 29 '11 at 2:30
@dmckee - EMACS jokes - Eventually Malloc()s All Contiguous Storage, EMACS Makes All Computers Slow, probably some others I can't think of... – ConcernedOfTunbridgeWells Sep 29 '11 at 11:04
On todays processors, Emacs is tiny; compared with Eclipse it starts in no time and uses no memory. – kevin cline Feb 22 '12 at 22:56

gedit is very similar to notepad++ and allows windows to be split - command is "New Tab Group"

enter image description here

share|improve this answer
Good! It's lightweight, simple, easy to use, native in Ubuntu. +1 for that! Unfortunately, tab groups was added in v. 2.31.3, and I couldn't upgrade my gedit (2.30.0) due to many ./configure errors. – Sony Santos Sep 28 '11 at 18:56
Just out of curiousity, which plugin did you install to get this capability in gedit? Thanks. – dmohr Apr 30 '13 at 17:03
@dmohr It's not a plugin - it's included by default. Do "Documents -> New Tab Group". – Pubby Apr 30 '13 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .