In: , , , , ,
On: 2007 / 06 / 21
Shorter URL for this post:

I have been using UltraEdit as my primary text editor over the last few years. I thought it had all the features I could expect from a text editor : tabbed interface, syntax highlighting for a number of languages, code block collapsing, regular expressions for searching and replacing, opening and closing brace matching, you name it.

Then, recently, I got more and more annoyed by the weaknesses of the code highlighting feature. For instance, UltraEdit gets it wrong if you use heredoc syntax (using something like <<<HERE and HERE; as delimiters for a string) and can't parse and highlight properly your code.

One night, someone in #wordpress mentioned they were using PSPad. I realized that, after all, I had been using the same text editor over the years simply because I had never looked if something better existed. So I loaded my gun and went for a little hunt, hoping to find the perfect text editor. UltraEdit, Notepad++, PSPad, EditPlus, EditPad Pro, Crimson Editor, GridinSoft Notepad, HTML-Kit, I tortured them all with my binary and merciless 10 seconds review tool: the Tricky Code Snippet From Hell.

The test

I made up a short and catchy text file filled with traps I knew most editors would fall in, which consisted of the following :

  1. <?php
  3. $pattern = '(<body[^>]*?>';
  5. /*  abcdef
  6.     multi-line
  7. */
  9. $hello = <<<HELLO
  10.     <<<<--! jk -->
  11.     >>>
  12.     /*
  13.     abcdef
  14. HELLO;
  16. function echoit($pattern) {
  17.     echo "123 456 $pattern";
  18.     echo '123 456 $pattern';
  19.     foreach (array(1,2,3) as $val) {
  20.         echo $val;
  21.     }
  22. }
  24. echo "/*";
  25. echo '//';echoit($pattern);
  27. ?>

From this incongruous yet efficient snippet, I was expecting to check, at a glance and in less than 10 seconds, the following 9 tests:

  1. Line 3: will the editor think the regular expression pattern is actually the closing ?> PHP tag
  2. Line 5 to 7: can you collapse multiline comments
  3. Line 9: heredoc, part one, does the editor understands we're just defining a string
  4. Line 12: heredoc, part tow, does the editor gets that we're not starting a multi line comment
  5. Line 16: can you collapse regular code block
  6. Line 17 & 18: will the editor display differently these two lines(variable in the first one, just text in the second one)
  7. Line 19: how will the editor display nicely (or not) the nested code folding marks
  8. Line 24: will the editor think we're starting a multi line comment
  9. Line 25: will the editor think we're commenting out the line

You've already noted that the in-blog code highlighter I'm using failed on line 12 and test #4 :) How did the desktop software did?

Results and verdicts.

Crimson Editor

I didn't know this software, but it was in Google's top results for "text editor" and looked decent, so I gave it a try.

Crimson Editor

Miserably fails at line 12 (while still being able to highlight matching braces within what it thinks is a comment), and you can't fold code blocks.

Verdict: Sucked.

EditPad Pro

Again a software with a good ranking within Google's search results. It produced:

EditPad Pro

Incoherent results: fails at line 3, while still giving folding marks for the whole file (does it end on line 3 or not??), you can collapse a function block but not the nested foreach block. That's too bad, because the highlighting abilities were not mislead by the heredoc and its deadly line 12, and it does make a difference between line 17 and 18. Almost passed.

Verdict: Sucked.


I was recommended this software by some friends.


Oh, my. I hope we're still friends. Died at line 12.

Verdict: Sucked.

GridinSoft Notepad

Another software I didn't know and that was waiting for abuse within Google's top results.

GridinSoft Notepad

Pathetically fails at line 3. By the way, I don't understand why it highlighted HELLO that way.

Verdict: Sucked.


It was recommended by a friend, so I gave it a try despite its name making me thinking it was more HTML oriented than anything else.

The highlighting abilities are decent, it doesn't get fooled by line 3 and the confusing heredoc. Making no difference between line 17 and 18 is too bad, and not being able to collapse block is a no-go with me.

Verdict: Sucked.


I read about it on #wordpress as a coding tool of choice, so I had a good a priori here.


Failed at line 3.

Verdict: Sucked.


The software I thought was the Rolls Royce of editors for years.


As I knew it, UE understands nothing about heredocs, which is really too bad considering that without this line 12, it would pass every other tests.

Verdict: Sucked.

Hey… No winner ?

Ho, you noticed, all the softwares mentioned got the "Sucked" grade (some well more deserved than others, I'll fairly admit it). No winner, then ? Of course there's a winner, would I bother writing such a useless review otherwise ? :)


I started using Notepad++ two years ago on my computer at work because for some reason I couldn't properly install UltraEdit (I guess my user limited privileges on Windows 2000 were to be blamed), and had sticked with a very old version of it, till I even had the idea of upgrading to the latest version for this test. Boy, that was a good idea.


Syntax highlighting is just… perfect. The heredoc does not fool the software, line 17 and 18 are perfectly shown. The only thing I'd miss is the ability to fold comment blocks (line 5 to 7) but it's pretty minor to be honest.
Edit: Klaue, a reader in comments, points out that you can actually fold comments. It just doesn't work with PHP, apparently. Sounds like a bug then!

Notepad++ passing the 10 second test, I looked at the rest of features and abilities a simple glance and screenshot cannot reveal. To my pleasure, everything I need is here: search and replace with regexp, bookmarks within your text files, 3rd party plugins, loading and saving "sessions" to work on a predefined group of files. The software came with a very very handy plugin that shows real time a list of functions defined in your text file, which makes it really easy to navigate through your code with a single click on the function name.

In short, I love this software. Did I mention this is freeware ? Give it a try, you'll love it or I'll refund !

Shorter URL

Want to share or tweet this post? Please use this short URL:


This entry "Text Editors for Coders : Deathmatch Review" was posted on 21/06/2007 at 12:41 am and is tagged with , , , , ,
Watch this discussion : Comments RSS 2.0.

53 Blablas

  1. Twig says:

    No idea why, but I read that entire post… Thanks for the info though. I just downloaded Notepad++ and I love it. I was using PHP Designer 2007 Professional and it definitely was not doing the trick.

  2. Alix Axel says:

    I've tried all (and a couple more) the text editors shown here and personally for me the most impressive one is EditPlus, it can do many things like search within folders and so on. Notepad++ comes at second and also a very good one you haven't talked about is ConTEXT.

  3. Ozh says:

    Alix » indeed, search&replace in folders is a really neat feature of EditPlus. I sent an email to Notepad++'s dev and this was one of my suggestions :)

  4. Nice review.

    I sent your copy of Translator on 17th. I am very surprised that you still didn't receive it. I am sending it again from my GMail account; last time I used account.

    Please confirm receipt. You can also download it from the download site ( )using your PayPal transaction id that you received in email after payment.

  5. BB2k says:

    just a test under kate, the kde text editor under linux :


  6. Ozh says:

    BB » perfect!

  7. Tom Drummond says:

    I used to use Notepad++ and I really did like it. But if you want something a lot more powerful then try Komodo Edit.

    It's not the fastest to load up but apart from that it's hard to fault. Possibly my favourite feature is when you are working on multiple PHP files and you want to use a function from one of them, not only does it auto-complete the function name but it'll also give you a list of attributes required and the comment above the function. This means you never have to go hunting for how to use a function, it's all displayed for you automatically.

    I've also got a couple of macros that give it a nearly TextMate style snippets.

    Oh, and here's an image of Komodo rendering your test.

  8. Ozh says:

    Tom » thanks for this info, indeed I didn't know this software and your screenshot says it passes my 5 second test so I'll have to have a deeper look. I'm just a bit amazed at the size of the download, 26 MB for an editor seems a bit overkill to me, unless it has really serious features beyond editing of course. I'll have a try, thanks for this link.

  9. brandyS says:

    I am a mac user and I prefer BBEdit (from barebones software) as a text editor.

    I don't have any idea what that script you formed does, but I've been using BBedit for about five years for most of my html coding. I can program web pages in html and xml, use css, and make some pretty killer tables. BBEdit has been a reliable tool for me.

    It does have color coded syntax, patterned search and replace, and lots of other things you might find useful. They also have a freeware version called "Text Wrangler" but as far as I can tell, the free version doesn't offer the color coded syntax, which makes it useless to me.

  10. Ozh says:

    brandyS » my code does nothing (or just prints stuff). Its point is not to be executed at all, it's just to be read within a text editor. As for BBEdit, I'm a Windows user.

  11. Jens Remus says:

    You missed a very popular open source text editor: Scintilla Text Editor (SciTE). You can find a screenshot highlighting your example code here.

  12. Jens Remus says:

    Oh, and what I missed about SciTE:
    – SciTE is portable (put it on your USB-Stick with the config-file).
    – It has many standard features not shown on the screenshot (parenthesis highlighting, search and replace using regular expressions, find in files, …).
    – There are a lot of configuration options to make SciTE fit your needs. Only drawback: you have to configure them using configuration files – there is no GUI to do this. You can configure SciTE for every "language" differently (HTML, PHP, C, JavaScript, …).
    – SciTE is fully scriptable using Lua as scripting language. You can extend SciTE using Lua to suit your needs. Some examples: Running tidy on your HTML, stripping spaces at the end of the lines, fixing identation, compiling your code, running your code, …
    – SciTE runs on Windows and Linux (could be ported to Mac OS probably).

  13. Ozh says:

    Jens » I think I've tried it but I didn't like it, can't remember why. Probably either not tabbed interface, or something requiring additional libraries to display (something like GTK or stuff like that ?)

  14. HED says:

    I support SciTE choice. It has tabbed interface and doesn't need any specific libs to run (on Win98/XP that is)

    My coworker uses Notepad++ and I find SciTE much better (duplicate lines, transpose lines, commenting/uncommenting – both HTML and C comments btw, and customizability (Wordcount script for writers ^^))

  15. Iwan says:

    What abaut TextPad++, have you review it yet?

  16. Jack Book says:

    wow.. thanks Ozh. your post and the comments are really2 useful. now i use notepad++. and (@Jens Remus) it's portable too isn't? it doesn't need to be installed. i can run it from everywhere. i really love the tidy feature.

    thank Ozh.

  17. Jack Book says:

    Ohh.. I revise my statement.
    notepadd++ sucks on me :(
    somehow, while i copy from notepad++ and paste on my blogger html editor, the code was changed! looks notepad++ convert some character or something! now i'm back to textpad :(

  18. _ck_ says:

    This is so funny, I've been reviewing php editors myself and discovered Notepad++ the other day and came to the conclusion it was the best for me too. It also has much more control over the visual colors and font sizes than others like pspad.

    I just wish I could put a little margin on the left side of the text somehow, I don't like it right up against the "folding" line. Oh well.

  19. […] this out, OZH (a well known WP plugin author) came to the same conclusions about choosing Notepad++ (but for technical […]

  20. […] my favorite text editor, has been updated (changelog, binaries) Share This Related […]

  21. Sean O says:

    I used Notepad++ for months, thinking it was the bee's knees. But then I found PSPad a few weeks ago, and it's earned the title as go-to editor. Tabbed Interface, multi-code-highlighting, projects, text diffs, many user-created extensions, etc. etc.

    But what sealed it for me was built-in site management over FTP. Work with remote files as if they're local. Couple that with ability to run from your USB drive, and you've got a powerful, anywhere, any-code editor.

    My only task now is to find (or write) the handy "duplicate line" function from Notepad++…

  22. Ozh says:

    Sean O » I find PSPad's highlighting abilities quite average. Nice software other than that. But so behind N++ :)

  23. tom says:

    How is his a comparison of text editors when you don't evaluate them on their ability to actually edit text?

  24. Ozh says:

    tom » Wow. This is probably one of the silliest comment across my whole blog.

  25. Klaue says:

    Actually, you can fold comments in Notepad++. It just doesn't work for PHP (try to select C++ in languages and you can)
    Maybe you should write this in case someone uses the article to choose a texteditor for a non-php language

  26. Ozh says:

    Klaue » ho, nice, I didn't know this. Thanks!

  27. Rob says:

    I've been using NP++ for about a year now. It's truly great, isn't it?

    A couple features I use a lot are:

    find/replace in all opened documents
    regex find/replace

  28. DavidTan says:

    Nice read. I love PSPad and Notepad++, they are probably the only 2 text-editor (not IDE!) that you will ever need.

  29. Wgaffa says:

    I tested the code in E-Texteditor and it seemed to pass all your requirements. It could even fold multiline comments but it gets fooled at line 12 and 24 as it doesnt know where it ends and therefore collapses to the end of the file.

  30. Leeoniya says:

    Ozh, i came to the same conclusions that you did. but i have to have live tag matching.

    try dev-PHP or anything else that uses the SynWeb component:

    they all pass your php syntax test, are as good if not better than all scintilla-based editors like notepad++, notepad2, programmer's notepad2, sciTE etc. plus you get live HTML tag matching.

    depending on the implementation tho, you may or may not get tag and attribute code hints (for css and html), tag auto completion, and color picker and file path browse dialogs which are the only other things i would like to see to greatly improve usability. php designer is not free, but has a ton more stuff that makes it the best php editor i think w/live syntax checking, xdebug, ftp, SVN etc.


  31. David says:

    The version of EditPad Pro that I'm using (6.3.2) does not presume that line 3 is a closing tag, and the editor will autofold comments and For loops if you set one of its configuration options to generate folds based on text indentation (not perfect, I realize, but better than nothing).

  32. Carbonize says:

    Whilst Notepad++ has great syntax support this is due to the component used and the the person who makes the program. But as someone else has commented it takes more than good syntax highlighting to make a good text editor. I have used both PSPad and Notepad++ and always return to PSPad. My main reasons for this is that PSPad has a better list of PHP functions and can complete them as either just the function and parenthesis or as the complete function and attribute descriptions as taken from And I just tested your test code on PSPad and switched it to PHP highlighting and not HTML multihighlighter and it passes line 3 fine but fails on the heredoc. Also I find PSPad easier to use and it's configuration makes more sense.

    Just to add that Notepad++ does now have FTP support.

  33. Mat says:

    I just wonder, which of the editors supports regex syntax that oneself can make?

  34. adrian says:

    Notepad++ code snippet's hotkey (quicktext plugin) is Ctrl Enter — which is a great downside for me. i think people has cried out for the Tab hotkey for ages now :)

  35. Firebat says:

    Great list, personally I have been using phpDesigner in windows and I find it quite nice especially since it highlights syntax errors such as a missing ";".

    Might as well test it with your tricky code when I get home. Using linux however, I really love Gedit (Gnome's default editor) just tested your code there and it has no syntax highlight flaws, its only missing the collapse option. What I really like about it though is the ability to use it with gnome's ftp connections and open/save as if remote files were local.


  36. razorwire says:

    A different HEREDOC identifier SHOULD change the code styling within the HEREDOC part appropriately and NOT just assume every HEREDOC is a GENERIC quoted string. In the example below I want it to parse the heredoc part as JAVASCRIPT with matching JAVASCRIPT code styling!

    $language = <<<JAVASCRIPT
    This is invalid javascript.
    The <<<JAVASCRIPT code styling here SHOULD be screwy (NOT necessarily a solid color)

    $language = <<<JAVASCRIPT
    /* This <<<JAVASCRIPT SHOULD have JAVASCRIPT code styling.
    It SHOULD NOT all be the same color! */
    var stlyled;
    styled = true;

    Is there a text editor that can do this?

  37. razorwire says:

    Textmate can do HEREDOC code styling as long as you update the PHP bundle to the latest one. See:

    To update the PHP bundle after installing textmate change "Python" to "PHP" in the terminal commands on the following page:

  38. dr3d says:

    Notepad++ fails HEREDOC if encoding is MAC .. just an FYI cause it had me pulling the last of my hair out….

  39. JCM says:

    I can't believe nobody mentioned VIM (!

    VIM 7.2 with the default PHP file type renders your snippet perfectly.

  40. I have been programming for 6+ years using textpad, it it a light but very powerful text-editor it is shareware though, but you can use it forever..

    What i Love about it is:

    1. Very Fast To Load
    2. Has Simple To use but Powerful Macro Programming
    3. Tabbed Interface
    4. Can do Search using text/hex, or regex, and can search through files and folders….Very fast too.
    5. You can download any syntax color highlighting for free, from
    6. Tons of macros and tools there as well all free.
    7. You can adjust the colors of each file type to fit your own needs or needs of your graphics/monitor.
    8. Can easily change case of code/text in blocks to any case, upper, lower, capitalize, sentences

    Just a powerful old-skool text-editor…

  41. Tim says:

    Notepad++ fails unfortunately if the end tag of a heredoc – in this case, HELLO; is tabbed away from the margin in anyway.

  42. Ozh says:

    Tim » It's normal. Heredoc are supposed to be on their own line, not indented or tabbed (at least in many languages, PHP & Perl for example)

  43. Tim says:

    Oh right OK. I didn't know, slightly frustrating though when I want to place them within IF and SWITCH statements… or is this not the done thing? Sorry more of a scripting question!

  44. Ozh says:

    Tim » indeed it can break your neat block indentation :) But there's nothing wrong with this, except for the aesthetics of your code of course

  45. TwoHawks says:

    After all this time your posting here still gets high SE listing, OZH ;^)

    To chime in… I have been using EditPad Pro for soem years now, but occasionally (like today) look around for alternatives. I am compelled by your text highlighting / handling comparison. I tried your test in the latest EPP and it succeeded at everything except added collapsing for the nested Foreach statement.

    Today I briefly looked into Notepad++ and TextPad. Some quick comments…

    1) Language selection in EPP is as easy as selecting from a drop-down menu. Finding other or custom languages (or customizing installed ones) is a snap
    – NPP appears to have similar/o-par capability
    – TextPad's handling seems a bit clunky and not well thought out (difficult to use)

    2) I rely heavily on the Project Grouping capability of EPP. I can open several projects ('Workspaces' in TP, 'Sessions' in NPP) each having its own dedicated tab (I set it up so they are along the bottom of the open documents' window-panes). Select a Project tab and all the document tabs at top shift to the current project.
    – TP cannot open multiple workspaces at the same time.
    – NPP 'can' open another window instance and then you can load a unique session in it, so the ability is there, but it feels a bit clunky,
    – you have to have multiple windows open
    – there's no menu or anything at all to help you determine which session you have open, may be working in, or to navigate them… so its not really a supported feature, only this "workaround" kinda gets you there.
    Would not be practical if you rely on managing concurrent workspaces/projects/sessions, but then I am a bit spoiled by EPP's advanced handling of this.

    3) In EPP I like being able to write custom command sequences for files, or code within files (like select a line, or group of lines, and run them). EPP supports complex configuration of such, and a handy menu for running them. It also sports a results pane. I do not think you can set break points in EPP, but reporting is excellent (ec: dll call and handle reports are very detailed making troubleshooting a snap).
    – TextPad and NPP both have similar features, albeit seemingly not near as diverse or easily manageable -but I didn't spend time with it [yet], so I could be shortchanging them. I have no feedback on their reporting depth or capabilities. TP has a report pane, I do not readily see it (or find it) in NPP.

    4) EPP does not wrap document tabs… I sorely wish it had this.
    – TP doesn't either
    – NPP does

    I really want to find a features comparison chart that looks at these great editors being discussed here. If anyone knows of something decent in this regard please do post ;^)

    Thanks for this article, Ozh!

  46. rhapdog says:

    The thing about the heredoc failing with UltraEdit that does not bother me is this… I hate the heredoc syntax, because it messes up the indentation level of your code. You can accomplish the same thing as heredoc in PHP by simply using a "multi-line" string.

    For example:
    echo "This is the first line of a string
    this is the 2nd line
    3rd line
    and so on.";

    Multi-line strings are my preferred method of doing things, especially since it is just plain "easier to read and understand." When you work between multiple programming languages, it is also the most portable.

    Given this, and the fact that Notepad++ can't handle alternation (|) in regex find/replace, and Notepad++ can't handle large file support or even multi-line regex find/replace, then UltraEdit wins hands down. Those are features I use regularly, and Notepad++, while a fine text editor, just doesn't do what I need.

  47. Heyaw Haw says:

    UltraEdit might not be perfect (none of the others are either apparently) but it has Column Mode edit where you can edit multiple lines at once, make vertical selections and edit those, insert e.g. multipl lines of a href=" and then make a new selection over the lines to make closing brackets, which is just too insane to fathom until you see it. Then you are hooked.
    I'm curious why that hasn't even been mentioned. I think it's a unique feature of UltraEdit?

  48. EHLOVader says:

    I thought I would share a relatively new editor that can stand up to this challenge.

    SublimeText has risen to the top of my list, and it is worth noting that it highlights this appropriately.

  49. Ozh says:

    EHLOVader » It fails, line 17 and 18 are the same, they should not

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?