This reminds me again that I'm in the constant search for an editor that I can call my own. On Windows I use Notepad++. There is no question, it's the editor for me on Win32 and I install it on every single windows computer I use. The one exception is that I use Visual Studio for my C# programming needs, but I don't think anybody will fault me for that.
On Linux, however, it's a different story entirely. I don't have a go-to editor of choice on Linux, and I've never found myself to be 100% happy with any of the offerings. Surprisingly, I'm not even happy with Notepad++ on Wine, although that seems like it should be the obvious choice. I was using MEdit for a while, GEdit a little before that, and now I'm using Kate. MEdit was far to light in the features department, and Kate is turning out to be far too buggy. This may be because I am using Kate in my Gnome environment, or because I'm using the wrong version of a critical library, or whatever. The fact is, I've found it to have a shittonne of bugs in Kate: some are annoying but harmless, some make the software downright unusable. Plus, Kate doesn't really offer all the features I want in an editor, so that's an extra layer of annoyance. I tried Eclipse too, but that was far too much for me and I was having a lot of difficulty just making basic edits to simple ASCII files. I don't need a huge integrated IDE (don't want it either), just a simple text editor with some features for programmers.
So what do I want? Here's a list of some must have features and properties that I need in an editor:
- Absolute, 100% configurable syntax highlighting. I should be able to specify color scheme in any way that I choose, and I should be able to easily define schemes for new languages. Being able to define things on a per-language level would be the best. This is the #1 requirement and the primary reason why I left MEdit. This is also the reason why I haven't switched to Padre. I know that a lot of highlighting libraries use default schemes and system-wide settings so this is a little tricky.
- The editor must be light weight, should start quickly, and just support simple plain-text editing. It should be easy to find the options and actions that I need. The "learning curve" for a light-weight text editor should take all of 30 seconds, if that. This is why I don't use Eclipse.
- Line numbering. Most editors do this.
- Multiple documents (tabbed is fine, but not the only way). I should be able to switch between documents with a simple key combination. FireFox lets me switch tabs with CTRL+PgUp or CTRL+PgDn, so that would be ideal in an editor too. Not having a good key combination (at least not one that I have found) to do this in Kate is a big reason why I am moving away from that editor.
- Whitespace handing. Must be able to replace tabs with spaces, must be able to specify the number of spaces to use for a tab, and must be able to indicate or automatically remove trailing whitespace.
- Must work well with C. Most of what I write is C, and I need an editor that can tailor itself to that. Being able to handle Perl and M would be cool too. Proper XML/HTML handling is always a plus but far less important.
- Proper Tab button action. Selecting text and pressing Tab should indent the selection. Shift+Tab should unindent the selection. Most editors that I've seen do this.
- A good search tool. Literals good, regexes better, regex find/replace best.
- Automatic indenting is good. Automatic code formatting (especially with per-language rules) is better. Being able to specify custom rules for formatting and indenting is best.
- Brace matching. If I could custom set the highlighted color, that would be even better.
- Being able to autoformat code (especially whitespace) on paste would be awesome.
- Being able to open documents side-by-side: Being able to clone a document into multiple views would be awesome. Being able to link scrollbars so files scroll together would be better. Notice that Notepad++ does this very very well.
- Autocomplete for certain language constructs would be very nice. "Go to Definition" would be good too
- Displaying a guide at a fixed column width (especially a configurable width)
- A multi-item keyboard that I can store multiple snippets in at once.
- An embedded console window.
- The ability to build or run code from inside the editor
- Macros
- Zoom
- Code or comment folding
- Spell Check or Grammar Check
- "Sessions" or "Profiles"
- All sorts of complex key bindings. I like some but not too many. I definitely don't like having to rely on them when my hand is already on the mouse. This is why I don't (and won't) use Vim or Emacs.
- "Tip of the Day". Hate.
- Too many buttons, huge menus, and no ability to hide the crap that I don't want or need.
- Writing extensions or commands
I would be very happy to hear suggestions about editors that people use that support some of these needs. I wouldn't even be surprised to hear that no editor on Linux really satisfied all of this, so I don't expect anything to be 100% perfect.
Have you tried jEdit? I've been using it for Perl, PHP, HTML and a bunch of stuff. I think it's awesome. I went from Windows Notepad (years ago) to EditPad Classic, to SciTE (scintilla text editor) finally to jEdit. Tried Eclipse and didn't make it much past installation.
ReplyDeleteI especially like jEdit's text handling, relating to items #5 and #7 in your essentials list. Tabs behave exactly as you describe, and also I can do tall cursor and rectangular selection.
You can see screen shots at my web site dynamodan dot com Click on the tools link. Or you can just go to jedit dot org also. What got me started on jEdit was its ability to run on mac, even though I don't run mac.