views:

612

answers:

13

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?

+1  A: 

Have you tried scite?

http://www.scintilla.org/SciTE.html

Your distro might already have a package for it.

I believe there was a plugin that could add projects, but I can't remember it off the top of my head. I'm not sure about being able to double-click on errors to jump to the line.

Dave
SciTE doesn't have proper tabbing. Could you stand it if your operating system tabbed the way these editors do?
phyzome
What is the problem with scite's tabbing?
ypnos
SciTE has "go left/go right" document tabbing. There does not appear to be a key combination that will allow you to navigate first to the most recent tab, etc.
phyzome
+4  A: 

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).

Kknd
I like the per-file tab vs spaces selection.Workspace handling isnot that good, but still it is a great improvement over gedit
shodanex
A: 

Have you tried Kate? I'm not sure it complies with all your requirements, but it may. Also, for a more development oriented tool, you could try KDevelop, whose default editor is Kate (but you can change for any other editor implementing the KTextEditor interface)

Vinko Vrsalovic
Kate's idea of tabbing is to have a separate plugin, and then that plugin only accepts [alt]+[left] and [alt]+[right]. :-/
phyzome
+1  A: 

Have you tried running Textpad in Linux with Wine?

postfuturist
It runs decently well overall, but there are some major bugs. It doesn't handle dot-files very well, the color picker for syntax highlighting is screwed up, the file extension lists in the per-language prefs are almost un-editable... It's not pretty.
phyzome
I don't use it much anymore, but before I learned gvim, I used wine / notepad++ . It does have the tabbing right. RegEx / highlighting / bookmarks and most of everything. One of the worst graphics on a web site too. :)
Eric Tuttleman
+1  A: 

jEdit might be what you're looking for. Out of the box it has quite a bit of what you're looking for, and all the rest can likely be found in the large collection of plugins available.

postfuturist
+6  A: 

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.

Andy Lester
By default, it doesn't show any gui for tabs. You have to turn on the option with the 'set tabline=2' command. Also, ctrl-tab / ctrl-shift-tab won't work in the MS Windows model unless you write some impressive functions. Next tab / prev tab could be mapped pretty easily though. Great editor.
Eric Tuttleman
(G)Vim will always show tabs if you use `-p` or :tabe ... Also, gt/gT/:tab# are a lot easier to hit than Ctrl-(Shift)Tab, IMO.
ephemient
+2  A: 

I would also suggest jEdit. It has many features and many plugins.

Wikipedia has a good comparison of text editors that may be of use as well: http://en.wikipedia.org/wiki/Comparison_of_text_editors

Byron Holldorf
+8  A: 

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
Mark Porter
phyzome
I vote jEdit too, easily one of the best
dsm
Another vote for jEdit. I've been using it for several years.
rjray
jEdit has a rectangular selection mode (if that's what the OP meant by block select). Two best jEdit features: easy user-definable keyboard shortcut mappings and easily scriptable in Python (or Java). Worst jEdit feature: memory hoggish, so the jvm garbage collector runs too often causing noticeable delays (on my PPC, Mac OS X)
dwhall
+3  A: 

I think you're making a serious mistake in being so extremely picky on how things should work. You will probably not find something which is exactly like TextPad in every single respect. You're missing out on some great functionality in some of the suggested text-editors.

One thing I've learned during my years using Emacs is the answer to the question "can you do X in Emacs" is always YES! (Of course, there are a few cornercases where this isn't true, but it is basically a good approximation of reality.) So, I realized that someone probably already has implemented a module for making Emacs more Windowsy (CUA-shortcuts, Ctrl-Tab, etc.) After googling on "windows keys in emacs", I found EmacsW32. It seems to have many of the features you're asking for:

  • Regexp support: Yes
  • Ctrl-Tab buffer switching: Yes
  • Auto-indent: Yes
  • Syntax highlighting: Yes
  • "Smart navigation keys": Not directly, but this should be possible with a simple rebinding of the proper commands.
  • Block select: Yes
  • User-defined commands: Yes
  • Jumping directly to compiler error locations: Yes, but if you're using a compiler with a non-standard error format, you may need to tweak the regexps used to extract error messages
  • Workspaces: Yes (I think this included as a standard package nowadays)

And remember, Emacs has a big and active community with a lot of resources online, and a lot of people who are willing to help you customizing Emacs. If you're missing a feature in Emacs, chances are someone else has already implemented it!

JesperE
It looks like that's only for Windows. I didn't see a way to put it into Linux. :-/
phyzome
Details, details. ;-) The important point is that there are Emacs-modules which makes Emacs work like a normal Windows programs.
JesperE
We've all got enough projects without our editor being one too. It's not a mistake to be picky. Crappy editors are incredibly expensive if you spend 12 hours a day using one. Maybe the cost of certain critical features is worth making the editor into a project, but I'd rather pay for an editor that I didn't have to build myself.
Mnebuerquo
But it is a mistake to be so picky as to discard good editors just because you can't be bothered to relearn anything, which I think was my point.
JesperE
A: 

notepad++ is full featured, I use it for all languages, all the time!

It's on windows but apparently it can be run on linux using WINE http://notepad-plus.sourceforge.net/uk/nppLinux.php

hasen j
If you want to run Notepad++ on Linux, you may as well use Geany - http://www.geany.org/ - they are extremely similar (and both are based on Scintilla).
thomasrutter
I also find MadEdit quiet similar.
hasen j
A: 

Komodo Edit by ActiveState has a linux version, and it does most of the things you describe. I've been using it 24/7 for well over a year now, and while I don't like it, I haven't found anything better on Linux. It's the reduced feature free version of their commercial product, and if it worked better I'd be tempted to buy their more-featured Komodo IDE.

It's not real stable, at least on my system. It crashes a lot or freezes, so save often if you try it.

I recently upgraded to version 5 from 4.2, and it was not an improvement. They broke a lot of things so I'm going to go back to 4.2. The main thing they broke which really makes me sad is the tabs for editing multiple files. In 4.2 they had the x to close in the right edge of the tab row, where its position never changed. In 5 it moved to the end of the active tab. Now you can't close multiple files without aiming the mouse for each one.

I used Eclipse before Komodo, and Komodo 4.2 is less bad than Eclipse was a year ago.

Really, this response isn't an endorsement of Komodo Edit. I'm really not happy with it, and I'm hoping you find a good editor with this question so I can switch too.

Mnebuerquo
A: 

I just installed Geany based on Kknd's post and it is SWEET.

I recently jumped from Mac to Linux (Ubuntu), and have been missing BBEdit. After months of bouncing back and forth between gvim and gedit and finding jedit kinda clunky, I believe Geany is the answer for me. Totally intuitive out of the box, lots of goodies when you start digging.

Not sure if it gets an A on the phyzome test, but certainly an A-minus:

Fully configurable syntax/color themes -- I just installed a dark theme created by Barry Van, but you can create your own if you want. Have to admit I'd never thought about mixed-language highlighting as a real possibility, so not sure about that one.

Multifile search, regex.

Directional and historical tab navigation.

Great auto-indent options (different brace modes, tabs vs spaces, you can even edit with tabs and have it autoconvert to spaces on save!)

I honestly don't think about "smart navigation keys" too much (beyond the basics), so can't really speak for that, but it does seem to have a lot of config options for keyboard shortcuts..?

Haven't looked into block-select mode yet, but Kknd says it's in there.

Run/Compile controls, Virtual Terminal Emulator for running commands.

Workspaces... doh! Maybe not. It does have a documents sidebar.. maybe there's a workspaces plugin somewhere?? "Add a couple things" is still way better than "build from scratch" ;)

rob
+1  A: 

I certainly recommend PowerPad if for no other reason than that I wrote it.

Here are some of the wonderful features you will find in the Linux version:

  • Multi-tab interface
  • Powerful scripting language based on Python
  • Unlimited undo
  • Auto-indent
  • Support for opening and editing files over FTP
  • Ability to open UTF-8 and UTF-16 encoded files
George Edison
It certainly looks promising... I may contact you off-site with some feedback.
phyzome