views:

1163

answers:

15

What is the best text editor with the ability to create custom syntax? I used notepad++, but the custom syntax was a bit limited and the plugins (namely textFX) had a few bugs to satisfy me. I heard about Vim and Emacs (which one is better?), but I want a FAST editor with many features.

+3  A: 

Ultraedit. Very Good! http://www.ultraedit.com/products/ultraedit/ultraedit_tour.html

backslash17
I've used it since version 5 or 6, finally broke down and bought a perpetual license. It's on version 15 now.
Mark Allen
+1  A: 

http://www.textpad.com

Joshua Belden
A: 

For simple syntax highlighting for C-like languages, try Textpad. You can define the operators, braces, comment delimiters and keywords for your languages in a few minutes.

The editors Komodo Edit, Emacs, VIM and Epsilon give you the power to define almost any kind of syntax highlighting. If you know the syntax highlighting model of these editors very well (takes hours or more to learn), usually you have to spend at least an hour, but usually a day to create your custom syntax highlighting, VIM being the easiest to program the syntax highlighting.

I use the editor Joe on Linux, which also lets the user define custom syntax highlighting, but its state machine-based model is not so powerful as the editors mentioned in the previous paragraph.

pts
+2  A: 

On Windows, the E Text Editor supports TextMate bundles, which seem to be fairly easy to create given how many there are and how powerful they tend to be. (Basically, TM bundles can do the heavy lifting in any language you please.)

However, it's paid software, and uses Cygwin underneath, which makes it a bit laggy and flaky when executing the bundle commands.

Sii
+10  A: 

Vim and Emacs are fast and have lots of features, including syntax highlighting.

Personally I use Vim, but both of them are powerful editors. If you use Visual Studio the ViEmu plug-in is a very nice option as it allows almost complete Vim editing within Visual Studio.

Brian Rasmussen
And both of them have massive collections of syntax-highlighting already.
bignose
A: 

For Windows, I've been very happy with Programmer's Notepad for a while. It's stable, it's customizable, it's light enough, and it's open-source.

Adrien
A: 

A few years ago I would have answered Textpad as well, but development seems to have slowed since then and features such as auto-highlighting bracket completion, pretty much standard these days, are still missing (see the Textpad forums for discussion). The syntax highlighting options are user-contributed but there's been no gardening done on the Textpad website for years, so it'll be up to you to find, for example, which of the 11 PHP highlighters works the best.

A recent find for me is Editra, a Scintilla-based app that is fast, multi-platform and customizable. It's still in early versions but has given me no troubles so far on Windows. For syntax customizations look in the syntax folder inside the library.zip file once it's installed.

Komodo is powerful but I've found it to be slower than slow, particularly when launching. It also left "Edit with Komodo" entries scattered all through my registry after being uninstalled, so it won't be invited back.

julianz
+1  A: 

You might want to give PSPad a try. Free and feature-rich. Does not even need to be installed, which is a plus if you live in a restricted environment (i.e. no local admin rights).

msiemeri
+1  A: 

notepad2 is really simple and easy to use tool.

CodeToGlory
+1 I agree this is a nice, simple text editor which does exactly what it says on the tin and is free.
Ian Roke
A: 

Quick responses! I'll certainly be looking into some of these. BTW, what is the difference between EMACS and Vim? They seem the same to me, except that EMACS has games :-)

I misworded my question. I'm looking for the ability to add new styles, not modify existing ones.

Aethex
Emacs and Vi are both terminal-based editors that now come with some GUI support. Their command structure is very different. Vi started in the '70s and actually predates the kind of modeless editing that almost all apps use -- for example, it will interpret letter keys as commands, until you press "i" to insert; then everything gets inserted (and you can't use any commaands) until you hit Esc. Drives me crazy, and I can't understand why anyone still uses it.Emacs is a bit more conventional, but it's legendary for having a near-infinite number of commands. You could spend years learning it.
Jens Alfke
Don't add answers. Extend the question, or add comments on individual posts. A question is *not* an answer. http://stackoverflow.com/questions/469150/im-new-to-stackoverflow-what-should-i-consider-before-asking-questions
Kent Fredric
emacs and vim aren't simply "terminal based editors". They both have full fledged graphical interfaces. However, both can also be run in a terminal, which can be quite a lifesaver at times.
Bryan Oakley
"VIM and Emacs seem the same to me" -- How cute ;)
Lakshman Prasad
+2  A: 

I like SciTE. It's very customizable (with lua), and works great on windows and linux. It's easy to modify existing language rules, or add new languages. Generally I only do syntax-highlighting and tab behavior, but the sky's the limit if you use lua.

KeyserSoze
++(anything made with Scintilla)
Anonymous
+1  A: 

I'm very happy with Visual Studio - both native editing abilities, easy extension model and customizable syntax.

Ofek Shilon
+1  A: 

If you're on a Mac, Smultron offers dead-simple custom syntax highlighting. It's pretty much point and click. You're limited to about 7 or 8 different tag/keyword combinations, but it took me about 5 minutes to put together a custom highlighting scheme once I knew where to look.

I'd also second what other people said about existing syntax files for vim. There are pretty good odds that someone has created a syntax file (or something close to it) for what you're doing. My advice: Try to find a similar syntax file, then hack it up and put it in your ~/.vim/syntax directory. Before you go to the trouble, though, go through the vim tutorial (you should be able to just type "vimtutor" at your command prompt) and see if the quirky keyboard commands would work for you.

As for Jens Alfke's comments about vi, I use vim ("VI-iMproved") on a regular basis and find that the moving around without the arrow keys or mouse is dramatically faster when working with multiple large text files. I felt the same way as Jens about the cryptic letter commands until I ran through vimtutor - since then, vim has been my favorite editor. The only side effect is that I'll end up with odd characters in non-vim text fields sometimes. :wq

A: 

The Zeus editor syntax highlighter is highly configurable.

jussij
+1  A: 

Try HippoEDIT. It's my editor of choice after I dumped Notepad++.

rein