Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Wednesday, August 15, 2007

Why the jEdit Text Editor Rocks

Here I describe the reasons why jEdit is almost certainly the best text editor in the world. jEdit's creator, Slava Pestov, is a genius – you can tell from the power and extensibility of his creation.

jEdit lets you use both monospaced fonts and proportional fonts. Here it is with one of my favorite fonts, Franklin Gothic:

SnagIt Capture

Everything that this text editor does can be assigned to a shortcut key of your choosing. And even a second shortcut key, if you desire.


You can turn on rectangular-selection with Alt+\ (or Ctrl+dragging with your mouse). This lets you type in several lines at once.


You can also turn on multi-selection with Ctrl+\. This lets you create multiple selections and type on them at the same time.

Check out jEdit's powerful Search And Replace window below. Yes, that search field contains a regular expression with multiple newlines. And yes, that replacement field contains real Java code. Being able to replace text with the result of an arbitrary Java expression is tremendously powerful.


jEdit offers syntax highlighting for more than 130 languages. Here's some Haskell code, for example:


I love jEdit's integrated FTP/SFTP support. The file tree below is for a remote SFTP server. It's better than the SFTP support in UltraEdit, which lets you see the contents of only one tree node at a time (painful!).


I quite like the Highlight Occurrences function, which I've assigned to Alt+5. It lights up every occurrence of the word at the cursor. Below I'm highlighting the word "dojo". And see those little triangles on the left? Those are code-folding buttons – press them to fold up the code, to make it easier to see the structure.


One of the nicest features about jEdit is its PlugIn Manager. Here you can choose from 150 plugins to add various capabilities to jEdit. And best of all, you don't need to restart the editor – the plugins are ready for immediate use.


The plugins I've installed are: Code2HTML, Console, Editor Scheme, FTP, Highlight, MacroManager, PHPParser, SwitchBuffer, TextTools, and WhiteSpace. Here are the options added by the TextTools plugin, for example:


I often find myself using Sort Lines, Delete Duplicated, and Shuffle Lines.

If you don't like the color scheme, the Editor Scheme plugin gives you 22 others to choose from; or you can create your own. Here's the "Emacs" color scheme:


You can configure the number of Recent Files listed. I've set mine to 120:


Pressing Ctrl+Space will autocomplete the current word, using keywords from the current language as well as other words found in the current file.


The Console plugin adds a handy terminal window. Here I've docked it at the bottom of the editor:


The Buffer Options window lets you choose the line terminator, character encoding, and other options:


Often it's useful to be able to split the window horizontally or vertically, so you can see another file (or a different part of the same file). Ctrl+2 splits the view horizontally; Ctrl+3 splits the view vertically; Ctrl+0 removes the splits. You can also duplicate the view in a new window by clicking View > New View


And I haven't even mentioned incremental search, macro recording, HyperSearch, incremental switch-to-buffer, and many other features. Plus it's free and it works on Windows, Unix, and Macs.

jEdit. Those who like it, like it a lot.


  • I agree: jEdit is a happy little miracle. Only for some (smaller) tasks I prefer crimson editor.

    By Anonymous Michael Repplinger, at 8/16/2007 4:32 AM  

  • Hi Michael - I've been hearing about Crimson here and there - I'll need to check it out.

    By Blogger Jonathan, at 8/16/2007 10:45 AM  

  • And it's free!

    By Blogger Jeff, at 8/16/2007 10:53 AM  

  • Jeff - totally. Amazing, isn't it!

    By Blogger Jonathan, at 8/16/2007 2:50 PM  

  • And for those who love the power of vi, jEdit has a plug in that allows you to use the vi commands. The plugging is called Vimposter.

    By Anonymous Carlos, at 8/17/2007 3:16 PM  

  • Carlos - great to know!

    By Blogger Jonathan, at 8/17/2007 10:09 PM  

  • HI

    Can I use jedit to find text, then extend that selection to the next find? (like in Textpad?)

    By Anonymous Anonymous, at 1/24/2008 4:57 PM  

  • Hi Anon - Hrm - I'm not sure how you would do that. You could probably write a macro to do it, then assign it to a shortcut key.

    By Blogger Jonathan, at 1/24/2008 9:06 PM  

  • How do you get that Search & Replace window? I was unable to find it in jedit. Thanks for a reply!

    By Anonymous Fernando, at 4/18/2008 8:57 AM  

  • Hi Fernando - I get it by clicking Search > Find on the menubar. Maybe you have a different jEdit version - I'm using jEdit 4.3pre10 - in which case yours might look slightly different.

    By Blogger Jonathan, at 4/18/2008 5:54 PM  

  • Found! Thank you very much! I'm using 4.2stable, not the pre-version, but it is indeed under search not replace [...] ^^

    By Anonymous Fernando, at 4/19/2008 4:21 AM  

  • I couldn't agree more. After having to switch back to C++ after doing Java for nearly 6 years I found myself having to dig up a development environment once again.

    Vim and emacs are very nice, but the seamlessness of the macros and plugins really got me hooked with jEdit.

    With all the available plugins and easy-to-write macros I was able to piece together something with jEdit that I really enjoy working with.

    I had used jEdit in the past but I never took advantage of the macros. I got back the time I invested into learning the macro mechanism very quickly. Great for mundane text processing type work.

    Love it!

    By Blogger Gregory, at 4/22/2008 1:21 PM  

  • Cool stuff, Gregory. It's great that you can leverage your Java knowledge to write the macros.

    By Blogger Jonathan, at 4/22/2008 7:57 PM  

  • of course Super Abbrevs plugin!

    like Text Mate tab triggers, can make your own templates :)

    By Anonymous Burak, at 10/14/2008 4:31 AM  

  • Ah - SuperAbbrevs. Lots of people like that one.

    I use AutoHotKey myself - does keyword expansions in all windows, not just jEdit.

    By Blogger Jonathan, at 10/14/2008 6:42 PM  

  • Totally agree, I have been using jEdit for years now. I actually dropped my own purchase of Slick Edit when I got into jEdit. I have a query about one of the features you mention. You mention a Highlight Occurrences function which I have spent the last hour or so looking for in jEdit and cannot find ? I am using and have been using the 4.3 pre releases for a long time now. I tried assorted web searches to see if its an extension or something. Can you provide more info ? I have actually written a pair of macros that do something like that a while back.

    By Anonymous rluiten, at 11/12/2008 7:08 AM  

  • Hi rluiten - there's actually a plugin called Highlight. It's great.

    By Blogger Jonathan, at 11/12/2008 7:48 PM  

  • Thanks for that. Somehow I missed that. Nice :). My macros let me jump around between the marked words as well but then mine isnt sticky it uses multi-select fudgery. Mine also has a bigger performance hit.

    By Anonymous rluiten, at 11/12/2008 9:17 PM  

  • If you are interested in using some of Textmate's schemes in JEdit I've written converter from Textmate's colour scheme format to JEdit's format. Please check my post at . You can grab there the converter and/or already converted 16 schemes.

    By Anonymous sickill, at 1/25/2009 6:14 AM  

  • Thanks sickill!

    By Blogger Jonathan, at 1/26/2009 10:47 PM  

  • The TextFilter plugin makes it easy to add scripts through which to filter the current buffer.

    By Blogger Jonathan, at 8/15/2009 11:19 AM  

  • Thanks For Your Tutorial, I'm Still new about this Software Editor, :D

    By Anonymous DonyChandra, at 10/19/2010 6:11 PM  

  • While you say the inventor of this editor is a genius, and I'm not inclined to disagree, it is worth mentioning that he has abandoned the project, and developed the Factor language, having become disenfranchised with Java altogether. He created the editor at a very young age, but it is now kept going by the open source community. It is currently my favorite editor, having an underlining spell-checker, highlights HTML, and has a lot of plugins, most of which work well. It has TextMate like macros, but ZenCoding is slow to be implemented for it. I saw the site for the BlueFish editor, the other day. It may provide some competition.

    By Anonymous CodeLurker, at 4/18/2012 1:41 AM  

Post a Comment

<< Home