Monday, October 13, 2008

Best text editors

Developers still spend a lot of time with plain text. No matter how many wizards and other sorcerers we develop, most coding is still in plain text. Most of the information you keep should also reside in plain text because you never know if the tool you are using will be around in five years. It’s a good bet that you’ll be able to read plain ASCII (and probably Unicode) for the next century or so.
(As The Pragmatic Programmer [Addison-Wesley] admonishes: "Keep knowledge in plain text.")

Because so much of what we do revolves around text, it makes sense to find your perfect text editor.

This isn’t about IDEs; company policy and the language you use generally dictate that. IDEs are great at producing source code. But they are lacking in some of the best tools for plain old text.

And IDE is usually "heavy" (i.e. resource-consuming) for the student computer, whereas the developer often just want a quick edit. Why would we need to wait 8 seconds for IDE booting, just for a 5 second copy & paste & modify? Therefore it's essential to get a general source code editor (or lightweight IDE), beside the primary IDE .



Hence, which text editor to pick ?


Usually, the criteria for a good text editor are :

+ Syntax highlighting (i.e colorful)

+ Line number, column number, num of chars, ...

+ Braces matching and block folding

+ Smart indent , bracing, shortcut keys

+ Multi programming languages support

+ Customizable syntax/font/theme/hotkey...

+ Auto completion (keywords, APIs, ... )

+ Lightweight, small footprint

+ Macro recording

+ Supports multi types of line-breaking, character encoding, collation

+ Regular Expression search/replace

+ Multiple documents (tab/panel/... ) in a window

+ Multiple views in a document window

+ Some advanced features (convert charset, file explorer, function list, link compiler, plugins, ... )


Now, let's have a look at the candidates:


1/ Notepad++ (screenShot) : currently it is the most favourite one. It has enough good features, and does the job well. Despite being written in C++ and WinAPI (based on Scintilla lib), it can run smoothly on *nix via Wine. Notepad++'s biggest drawback is the slowness when processing large file ( > 100 MB) , you can begin to see this downfall if you have to open an XML or SQL file which is more than 80 MB.
( thôi viết tiếng Việt cho khỏe :D )


2/ jEdit (screenShot) :


3/ SciTE (screenShot) : cũng là phần mềm mã nguồn mở và dùng thư viện Scintilla như Notepad++ , do chính tác giả của Scintilla phát triển (ban đầu nhằm minh họa thư viện trên). SciTE có phiên bản chạy tốt trên cả Win lẫn Linux, có dung lượng nhỏ nhưng đầy đủ tính năng của 1 editor mạnh, và đã được AutoIT developer xem là editor chính cho AutoIT .


4/ Emerald (screenShot) : trước đây là Crimson Editor, từng được coi là text editor miễn phí tốt nhất trên Windows (như Notepad++ bây giờ) , sau đó ngưng phát triển 1 thời gian nên bị các tool kia vượt qua, và bây giờ come back với tên mới là Emerald :D


5/ PSPad (screenShot) :
cũng là phần mềm miễn phí nhưng không open source, hỗ trợ rất nhiều ngôn ngữ lập trình (nhất là các loại về Web) . Nói chung nếu bạn chỉ code trên Windows thì cái này cũng là ứng cử viên nặng ký.


6/ kate (screenShot) : cá nhân tớ đánh giá kate khá cao , nếu chỉ xét các text editor dạng GUI trên Linux thì xem như nó đỉnh nhất, hơn gedit hay kedit, kwrite nhiều. Các chức năng IDE cũng có thể cạnh tranh với XEmacs, Geany, BlueFish, ... nói chung nếu bạn xài KDE thì nên dùng kate làm text editor chính.


7/ Emacs derivation (XEmacs, Aquamacs, nano, pico, ...) :
(to be updated)


8/ vi derivation (VIM, elvis, nvi, vile, ... ) :
VI/vim is a very good powerful and lightweight editor. It can run on console, i.e. command-line, of ALL the modern Operating Systems. VI/vim is incredibly hard to learn; it has a virtual cliff-face learning curve. But, once you’ve mastered it, you are the most effective manipulator of text possible. Watching experienced VIM coders typing prolly make you impressed, people say that the cursor just follows their eyes !
Despite small footprint, VIM can open big ( > 100 MB ) files, replace many ( > 1000 ) words much faster than such as Notepad++ , jEdit, ... Not only able to invoke shell commands, VI/vim also supports hundreds of language syntax highlightings, macro recording, and scripting, mapping hotkeys as many as you want, and lot of more cool features !


9/ Another freeware (Notepad2, Smultron, ConTEXT, ... ) : Trong số này thì cũng có vài cái xài được, nhưng có vẻ chưa mature đủ để vượt qua danh tiếng những cái trên. Time will tell, though.


10/ proprietary ones (TextMate, e, SlickEdit, UltraEdit, ... ) :
thường phải trả phí từ 20-60$ . Nổi bật nhất có lẽ là TextMate , rất được hâm mộ trên máy Mac, không chỉ ở giao diện elegant, nhiều theme đẹp mắt mà còn đủ các tính năng đáng kể như đã nêu ở trên .
Có một bản port sang Windows là "e" , hay còn gọi là "E" , hoặc "eText editor" hoặc "eEditor" , cũng đang được đánh giá cao, vượt hơn những đối thủ cạnh tranh trước đó như UltraEdit, EditPlus, SlickEdit, TextPad, EmEditor ...



have fun,

3 comments:

Anonymous said...

vim is very good if you usually working with command-line :D

Anonymous said...

jEdit is very good if you works on multi-platform (Mac book, Desktop Windows, Linux)

shahdkhan said...

latest version of notepad++ from notepad++ plugin manager