Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Language-agnostic properly-tabbing code editors for Linux?

Tags:

linux

editor

I need a Linux text editor to replace Textpad 4.7.3 (a Windows nagware app), but all the alternatives I've tried are either bloated or incomplete. Here are the features I find most important, in descending order:

  • Regex search, mark, and replace (across all open files, even), regex search in directory trees
  • Tabbed editor with proper keyboard shortcuts ([ctrl]+[tab] should work on the exact same model as [alt]+[tab])
  • Auto-indent, indent preservation, and indent manipulation (tab, shift-tab)
  • Smart navigation keys: [home] toggles between start of line and start of non-whitespace, [F2] seeks to next bookmark, hitting the up and down arrow keys take you to the column where you last navigated, not where you last typed (I think Textpad's the only place I've seen this)
  • Syntax highlighting (bonus: mixed-language highlighting, which TextPad lacked)
  • Block select mode
  • Run user-defined commands from program (such as compilers), have interactive command results (Textpad would let you define regexes to match filenames and line numbers so you could double-click on an error and be taken to that line in that file.)
  • Workspaces (collections of files to be open at the same time)

Here's what I've found distasteful in the editors I've tried:

  • Vim and emacs do not take full advantage of my screen, mouse, and keyboard. Also, there's have quite a learning curve -- you have to learn an entirely new way of interacting with the keyboard. (Of course, if they had everything I wanted, I would learn them.)
  • Gedit is almost perfect, but it (like most of them) has crappy tabbing, which is intolerable
  • Eclipse is a monstrosity, and I won't touch it unless I'm doing Java
  • Regex capability is frighteningly rare
  • Almost nothing has last-seen tab traversal
  • I've not seen anything with last-navigation-column cursor traversal. (Once I started using it I found I couldn't do without.)

I don't have the time or the specific knowledge required to build my "ideal editor", so I'm hoping someone out there with the same taste in editors might have stumbled across a gem.

ETA: Please don't recommend an editor you haven't personally used. I've heard of SciTE, Eclipse, gedit, medit, nedit, GVim, Gemacs, Kate, Geany, Gnotepad, ozeditor, etc. I'm sure that most of them have some of the features I mentioned. If you're not sure if it has an essential feature (e.g. ctrl-tab works just like alt-tab), then you're not really helping, are you?

like image 659
treat your mods well Avatar asked Oct 21 '08 03:10

treat your mods well


3 Answers

Here is a Vote for jEdit, which I have been using for about 5 years:

* Regex search mark, and replace (across all open files, even), regex

search in directory trees

yup, and back references including $0 for the whole match

* Tabbed editor with proper keyboard shortcuts ([ctrl]+[tab]

should work on the same model as [alt]+[tab])

multiple ways of displaying buffers, and completely customizable keyboard navigation. One of my most used function is "go back to last buffer" which I have mapped to F12

* Auto-indent, indent preservation, and indent manipulation

(tab, shift-tab)

Yup. You can also set these to be tabs or spaces and convert between the two

* Smart navigation keys: [home] toggles between start of line and

start of non-whitespace, [F2] seeks to next bookmark, hitting the up and down arrow keys take you to the column where you last navigated, not where you last typed (I think Textpad's the only place I've seen this)

Generally expected nav. Map these to your key of choice. If you place the cursor at a particular column and page up or up arrow, the cursor stays put in that column

  • Syntax highlighting (bonus: mixed-language highlighting, which TextPad lacked)

Many different languages with xml files to customize token matching. Some mixing for example php + javascript

* Block select mode

Nope, not as far as I know...wait! Yup! Under Edit -> More Selection -> Rectangular Selection. Thanks dwhall for pointing that out

* Run user-defined commands from program (such as compilers), have

interactive command results (Textpad would let you define regexes to match filenames and line numbers so you could double-click on an error and be taken to that line in that file.)

Many plugins for this from a full command line console (works in linux and windows) to BeanShell macros that can make system calls. Many plugins for common taks such as ant, cc, make, svn etc

* Workspaces (collections of files to be open at the same time)

yup plugins for this too, and jEdit also keeps track of open files, unsaved changes and cursor position between sessions

Here's what I've found distasteful in the editors I've tried:

* Vim and emacs do not take full advantage of my screen, mouse, and

keyboard. Also, there's quite a learning curve. (Of course, if they had everything I wanted, I would learn them.)

jEdit is a java program but still makes good use of cross-platform clip boards and drag and drop

* Regex capability is frighteningly rare

jEdit has the best regex handling I've seen yet, Regex searches can return multiple results grep style and result positions aren't confused when you add or removes text lines after the search

* Almost nothing has last-seen tab traversal

Like I said one of my favorite features is "go to last buffer"

* I've not seen anything with last-navigation-column cursor

traversal

Like I said, your cursor stays put in the column when paging up and down

Other features I like:

  • indent based folding: No syntax awareness necessary, simply fold on indent
  • side-by-side Diff: nice graphical difference view
  • multple views and split panes
  • macro recording with beanshell
  • abbreviations: I have short 2-3 letter keywords that expand to code snippets when I hit space
like image 99
Mark Porter Avatar answered Nov 17 '22 21:11

Mark Porter


Vim and emacs do not take full advantage of my screen, mouse, and keyboard.

Have you looked at gvim? I'm a console guy myself, but I'm pretty sure it's GUIlicious.

like image 26
Andy Lester Avatar answered Nov 17 '22 21:11

Andy Lester


I recommend Geany (version 0.15 now). It has all (or almost all) the features that you need. Look in the manual to find the keys (I used it for a year before discovering that it had block selection).

like image 4
Kknd Avatar answered Nov 17 '22 20:11

Kknd