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.
Ultraedit. Very Good! http://www.ultraedit.com/products/ultraedit/ultraedit_tour.html
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.
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.
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.
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.
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.
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).
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.
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.
I'm very happy with Visual Studio - both native editing abilities, easy extension model and customizable syntax.
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