Monday, October 1, 2007


I just found a new favorite text editor: Notepad++.

I've been doing quite a bit of JavaScript coding lately, and the desire for a good code editor quickly becomes apparent.

The two main features I was looking for were capable syntax highlighting and code folding. (While other languages such as Java and C++ are commonly supported, many other editors seem to lack good support for JavaScript.)

Notepad++ does both of these nicely, does them by default, and does them well. Additionally, it is free and open source, with a GNU GPL license.

Other useful features included are:

  • Search and replace using Regular Expressions.
  • "Find in Files". Handy for searching for a string or pattern across multiple files and directories.
  • Block-select mode / rectangular block selection. Select and manipulate columns of characters, without selecting the entire row(s).
  • Bracket matching, auto indentation, and compiler integration.

Notepad++ even has somewhat stated support for Linux, through the use of Wine: details here and/or here.

Read more from Wikipedia: Notepad++ and Comparison of text editors.

My 2nd choice would be SciTE. While it has native support for both Win32 and X11 for Linux, the default options aren't the most favorable, and most preferences have to be set through a config file only, since the GUI options are a bit limited. (Read more on Wikipedia: SciTE.)

Both Notepad++ and SciTE seem far better than two other editors I had been using: TextPad (Wikipedia) and EditPlus (Wikipedia). Neither are free nor open source. Neither support code folding. EditPlus supports basic syntax highlighting by default, as does TextPad, but only after adding a syntax definition file.


Roy said...

I obtained Notepad++ to remove a BOM from my PHP files on my website, but it does not give me the option to SAVE WITHOUT BOM. Can you tell me why please?

Mark A. Ziesemer said...

Roy - don't look under the "Save" menu. Before saving, look at the "Encoding" menu. Click the "Convert to UTF-8" option (the one without a "BOM" suffix), then save as you normally would.

Roy said...

Thanks for your help Mark. I did exactly as you said but when I looked at the encoding menu it already was marked as "Encode in UTF-8". So I clicked on "Convert to UTF-8 (without the BOM) and saved it. I then uploaded to my website and checked it on the WC£ Unicorn checker. The BOM was still there. I am thinking it may be because the form contains this "accept-charset=\"UTF-8\" enctype=\"multipart/form-data\" to enable unicode to be sent to me. It returned this comment, "The UTF-8 Byte Order Mark (BOM) was found below the top of the page." Then I removed "accept-charset=\"UTF-8\" enctype=\"multipart/form-data\" from the form and reloaded it in Notepad++. This time when I went to the encoding menu nothing was marked, so I clicked on "Convert to UTF-8 (without the BOM) and saved it. I uploaded it to my website and checked it again. Exactly the same result - the BOM was still there. Any ideas?