Text Editors for Programmers on the Mac

Preface

In the last 10 years many new text editors became available for Mac OS X. Since I have tried most of them I wanted to give an overview and a brief description about each one of them. This is for developers that are looking for decent editors on the mac to get their job done.

Lets get straight to it then.

The Editors

Emacs / Vim

Emacs and Vim are really the dinosaurs of text editors for programmers. Both have a immensely rich feature set and can be extended to a degree where you can forget about the OS they are running on. Although there is and always was a strong debate about which one of the two is superior, it is mostly a matter of personal taste in the end. Both have a steep learning curve and both are probably not something you want to give your web development intern on the first day at the office. However they are really powerful and they have one big advantage in common which is that they are available on a lot of operating systems and are installed by default on most of them. Whenever you log into a linux, bsd, osx or other unix machine you can be sure that vi or emacs or both are already there. On some shared web hosts you can’t even install your own packages so you are stuck with one of them. The cool thing is that you have to learn only one editor and all its specialities and you can work with it on almost any platform and on any remote machine. Since they are both really old they are known to work. They can handle big text files without crashing and for every problem you encounter there is already an extension to solve it. This is why many experienced programmers which started with more modern editors come back to them.

Some of the features that very few other editors offer are: horizontal and vertical split views, whole project tab completion ( most other editors only complete words from the same file ), fundamental customization of almost every behavior of the editor.

Besides the features related to programming they are also powerful text editors.

Both editors have OS X versions with a nice GUI wrapper to make them better integrated citizens, AquaEmacs and MacVim.

I really recommend reading the blog post by Yehuda Katz about switching to MacVim.

Both of them are open source and free of charge.

BBEdit / TextWrangler

Speaking of dinosaurs of course BBEdit and the light weight version called TextWrangler come to mind. They are not as old as Emacs and Vim but BBEdit is around for 20 years! It claims to be the editor »that doesn’t suck« and it is a strong contender. However it is really focussed on text rather than programming. It has a lot of features dealing with plain text manipulation, search and replace etc. but lacks some of the features I need in my daily programming job. It has syntax highlighting, auto completion, syntax checking for a few languages and much more but in the end it always feels a little dusty compared to other editors. For example it supports SVN, CVS and Perforce but not Git in its most recent version.

I’d recommend BBEdit more to markup authors than to programmers but its worth checking out the website and the trial version.

SubEthaEdit

I’m not sure how log SubEthaEdit exists but its at least 6 or 7 years I’d say. The wikipedia page does not say anything about it so if one of the readers has a more accurate number let me know.

SubEthaEdit shines in collaborative editing and most of the time that also applies more to plain text than to programming but still, its a cool feature which allows you to edit text documents via internet or local bonjour connection. Other than that it is also a decent editor for programming with support for a lot of different programming languages. It is simple and does not take a whole lot of time to learn. In the end though it is also limited compared to the other more powerful editors. Non the less I think it belongs on this list.

Smultron

When it comes to simple and basic text editors for programming activities you have to take a look at Smultron. It used to be free but now its around 5$ in the Mac App Store. Still quite cheap and it features an icon you can’t miss in your dock! But seriously – its probably one of the most straight forward and simple text editors for the mac. Possibly a good entry point when you are just starting with programming and only need syntax highlighting and other basic editing features.

Textmate

Textmate was and probably still is the default text editor for many ruby developers. When the web framework Ruby on Rails first came out, the screencasts that came with it demonstrated the editing powers of Textmate so that everybody else started to use it as well. Compared to the other editors that were available at the time it was superior in almost every discipline. It was a lot better integrated into the mac environment compared to emacs or vim, offering standard shortcuts, preferences and native text controls. It supported a lot of languages and so called bundles which are a mixture of snippets, macros and other useful language specific functions like syntax validation or build system integration. It offered more comfort and flexibility than SubEthaEdit or BBEdit. It felt more productive and faster and it was easy to learn.

Why am I using the past tense here? Most of this still applies but Textmate did not receive a major update in years. Textmate2 became what Duke Nukem Forever was already famous for: Vaporware. Just recently some Textmate developer claimed that there would be an alpha release by the end of the year but I won’t believe it until a download link shows up on their website.

The problem with Textmate is mostly its lack of performance with big files, the instability of some really useful extensions and the lack of some features I have learned to love in other text editors like split views for example.

I quit using Textmate because I used some extensions which made it crash to often and because it crashed and locked up when working with big files. Other than that it is still a great editor and its principles were copied to a lot of other editors on other platforms.

Even today I use it for html, xml and other markup languages because its just the fasted editor to work with in that discipline.

I highly recommend trying it. There is a 30-day trial version.

Kod

When the people realized that TextMate2 was vaporware and no new version to fix the issues described above was in sight, alternative editors slowly began to appear. One of them is Kod, although it is really in an early state it is a decent and simple to use editor for programming. Its not offering a lot of features, not like Textmate or the other more powerful editors, but still quite usable. If you don’t want to spend a few dollars for Smultron, this might be just the right editor for you. I mentioned Smultron before because it is more mature while Kod is at version 0.0.3. For additional hipness it is worth knowing that its build upon Googles V8 JS engine.

Readers pointed out that the development is stagnating and nothing really happens anymore but as a basic editor it still works I think.

Sublime Text 2

Like Kod, Sublime Text appeared as well received alternative to Textmate but compared to Kod it has the same kind of feature set as Textmate and more. It even supports Textmates color themes and language definitions which makes a migration to it quite easy.

It even has split views and its lighting fast. It has vertical / column selection (like Vim/Emacs/Textmate), multiple line / word select and different ways to expand the current scope of selection. Really, when I tried it the first time I was amazed how snappy it is. Like Textmate it features snippets, macros and build system integration. On the other side its highly configurable though you have to use simple config files instead of the standard OS X preference panes. I’d say its a perfect mixture of Vims configurability and Textmates editing comfort and speed. I highly recommend giving it a try if you are looking for a powerful, feature rich text editor for programming.

Also worth noting: Sublime Text 2 is a cross platform editor which runs on Windows, Linux and Mac OS X. That fact scares many mac users away without even trying it but I can assure you once more that it runs stable and snappy on OS X and feels as much as a cocoa app as I’d expect it to.

Its price tag is a bit higher than others, currently 59$, but I did not have to hesitate long to support the development of this editor after using it for a couple of days in trial mode.

Vico

If you like the concepts of Vim but MacVim is not wrapping enough of Vims “awkwardness” for you then Vico might be the right editor for you. Basically it uses the vim key bindings and therefore you hardly ever need a mouse to use it and it shows all the shortcuts in a native OS X menu bar. Other than split view support it is a very basic text editor for programming and features a custom scripting language to customize it.

Chocolat

This is yet another Textmate contender but it is currently in private beta phase and its too early to really judge it as many many features are missing in it. I have to say it has the most intuitive split view implementation of all the editors mentioned here but elementary things like vertical / column selection or parenthesis / scope highlighting are still missing.

If you want to give it a try nonetheless go to http://chocolatapp.com/ and sign up for the beta or go to their irc channel on the freenode network and ask for an invite. Took me 5 minutes to get one.

Coda/Espresso

These tools, although from different vendors, focus on the same group of people: web developers. They try to bring the entire development tool set together by bundling the functionality together that is otherwise only found in separate tools like file transfers, version control etc.

I tried them both but although they bundle together lots of features they are very limited at the same time to a certain flavor of web development.

Still on the list as I think they will appeal to some people.

CodeEspresso

skEdit

skEdit is the only editor I haven’t used personally yet so I can’t say much about it other that a colleague of mine is using it as his primary editor for quite some time now so I wanted to mention it for completeness sake. Like Coda and Espresso it is focused on web development but its not as limited to it.

Final words

My first editor was emacs although I only used it in a very basic way. After that I have used Textmate for a couple of years and switched briefly to MacVim for about half a year. Currently I’m using Sublime Text 2 on a daily basis for my programming work.

Personally, I don’t like IDE’s. There are programming languages or environments where an IDE is necessary and really superiour to text editors for programmers but I just don’t like these languages or environments either. So please don’t start a “but $IDE does all of that and more” discussion here. This is about text editors only and yes, I know … some text editors are almost like an IDE.

If I forgot to mention your favorite editor please let me know!

For a more elaborate list checkout wikipedias comparison of text editors

61 Responses to Text Editors for Programmers on the Mac

  1. Good roundup.

    I think Sublime Text 2 is the most promising to be the “new TextMate”. It has great features galore and is tastefully put together.

    Though I do think it has a slight branding problem as a Mac app. It desperately needs a pretty icon, and should drop the “2” from the name, since the original was Windows-only.

    • “Real men” know how to spell “real men” or can at least write a macro for emacs to correct that for them.

      unless you intended it to be in cave man (like l33t but more primitive) then never mind

  2. It’s really stupid to say something like vi/emacs are dinosaurs of text editors. It’s more like they are the most powerful, most feature complete, most extensive, most actively developed, really well integrated into UNIX, and completely free as in beer, and as in freedom. These editors solve the text editing problem thoroughly and completely.

    They are so good with such a long history of development, that no other editor has a chance of catching up, and other editors are simply pointless, unless of course you are faced with a novice, less experienced user, who doesn’t really know what they are doing and are not willing to invest into their career and become really good at what they do. These people would rather edit text with a mouse, then to learn to touch type at least 80 wpm and one of the advanced editors. These people live their lives thinking that clicking on pictures is better for you than learning to read and write. Ignorance is bliss. If you are that kind of person then you are better off with one of the dumbed down editors, and you are welcome to even pay for the privilege to get a subpar product.

  3. @exim is right emacs is a whole platform to itself. I am rolling the ‘on trend’ Janus setup in vim and it has been pretty good. I was talking with a silicon valley legend the other day about editors; “vim let’s you keep your hands where God intended” I tend to agree. If you can make it a month in vim and force yourself to remember the navigation key combinations, you’ll really dig it.

  4. I think you should add a section for programming ide’s. I started using phpstorm last month coming from textmate and never looked back. it is a matter of taste but i like it having all my needed tools in one place (remote ftp projects and autoupload on save for example)

  5. @Mario, you’re in a discussion about Mac text editors.

    The whole appeal of the Mac (at least for developers), is that it’s a Unix with a non-archaic user interface and prevalent design sense.

    Not everyone has to care about that. Linux and the rest are ready and waiting.

  6. Tried all of these and switched back to Komodo IDE (commercial version of, also excellent, Komodo Edit) for development and vim for remote work over ssh. I highly recommend the both..

  7. Thanks for your great roundup!
    After fiddling around with MacVim for a while, reading your article made me give Sublime Text 2 another try. As I’m not a full-time programmer, switching between text editors is not that much of a pain for me 🙂
    Feature wise ST2 is really impressive so far. I highly suggest using Sublime Package Control for easy package management.
    http://wbond.net/sublime_packages/package_control

    I also applied the Soda Theme for a more native OS X look:
    (The Soda Theme can also be installed via Package Control)

    If you feel the need to replace the questionable default icon, have a look at these forum posts 😉

  8. Pingback: OS X Text Editors

  9. @Mario
    why don’t people accept what you are saying? you are absolutely right! Emacs and Vim are the real thing and even if somebody wants to use dumbed down editors use Gedit for God’s Sake!!

    And you are in Gnu/Linux want less dumbed down editor/IDE use geany(smallest IDE i know) for GNOME , Kate for KDE.

    you really don’t have to pay for subpar programs and if you really have money to be spent, please donate the FOSS developers of Gedit,Emacs,Vim,Geany or your favorite FOSS editor.

  10. Aloha!

    Great roundup. I was just going through editors myself, trying them out using some simple Python projects. One editor I tried and thought was pretty good was UltraEdit:

    http://www.ultraedit.com/

    Yes, it is the old Windows editor, which has been ported. But it does work nice in Mac.

    • It’s just a specially configured version of Eclipse. It’s a full IDE and not appropriate to a discussion on text editors.

  11. Aloha!

    Re TheDon: Don’t you think that “Emacs vs Vi” statement is a getting just a tiiiny bit old – like riding on your dino old?

    Seriously, The size of Emacs might have once been comparatively monstrous (like, a dinosaur). But compared to Eclipse, MS Visualwhatever etc? Emacs is pretty slim and focused on what it does. And Yes, Vi and its decentants are slimmer around the waist.

    Is ize (install, binary and runtime) really the key metric for judging the productivity support you get from your professional development editor, development environment? Unless the editor causes the machine to swap and get slow, shouldn’t you concern yourself more on how well the editor supports efficient code entry, debug, reading, refactoring etc?

    FWIW. My Emacs instance, with 10+ open buffers is using a bit less than 50 MByte on my MacBookPro with 4 GByte of RAM. I think I can handle the “Emacs bloat”.

    • JoachimS, I was just joking when I said that. I had to add my two cents. I heard Emacs is great. I just have not used it.
      I did not have the difficulty getting into Vim because I stuck with it. I just think Vim is great!

  12. read The art of unix programming, a section was written by Rob Pike about editors and u know what “the small and simplicity” guys of unix like Emacs much more than vi/Vim and they explain why it’s extension is ad-hoc and against the grain of simplicity , Emacs has complex design(good reason for it) with enournmous amount of features

  13. Pingback: Ein knackiger Rundumschlag über Texteditoren auf dem Mac - hirnrekorder

  14. The best thing you can do for your web development intern is to introduce them to vim (or if you must, emacs) on their first day. In 10 years, almost everything else you teach them now will be useless.

    Another key advantage of vi: It is the most portable editor of all. It’s on all flavors of desktops, all flavors of server, can easily be put on your phone, and if you check, it is probably on your toaster.

  15. BBEdit was a progammer’s editor long before it became popular for HTML markup. And as web development becomes more complex, those features become more useful.

  16. I like jEdit ( http://jedit.org ), it’s a nice Java-based text editor with many plugins. Recently I’ve configured it do Textmate-like autocompletion and installed a plugin for searching and opening files in my project. Really great and the fastets Java app I’ve ever seen. However, when I need to edit a 10 MB file, I use Vim.

  17. Pingback: Text Editoren unter Mac OS X | Ideas are bulletproof

  18. Pingback: Mac 程序员的文本编辑器 | 马翔

  19. As answer to the Question how long Subethaedit exists, one of the developers (@map) wrote in German:

    @waldorfpatriot hab ich ihn jetzt schon gefühlt achtmal beantwortet. 2003. steht auch in wikipedia und auf SubEthaEdit.net

    In English he said, that he has the feeling he answered the question 8 times, the answer is 2003. you can look that up at wikipedia and on subethaedit.net.

  20. Sorry to be a little provocative here:

    as an amateur only programmer I am always surprised how conservative and reluctant programmers are to adopt to new tools (eventually developed in this *this* century 😉

    Could that be one reason why progress is so little in the last decade when it comes to real innovative improvements for operating systems and new ideas for man-machine interfaces?

    How can you even think that you understand the needs of your customer if you still believe that dinosaurs like vim or emacs are your top notch choice for modern SW design?

    • you said it yourself, “it is because of amautuer programmers like you who write *write-only* code in php,javascript or such cr#$”. read Mario’s comment on text-editing problem, you don’t belong to our league, you are a fanboy not a geek *programmers are geeks*.

      read Marco’s comment.

      there is no editor as feature-rich as emacs and there is no editor as portable as vi and further (dare i say) there is no editor as simple as Gedit(GNOME) or Kate(KDE) and even further no IDE as lightweight as Geany.

      so get over yourself, i launched this strong reply, because of your poor fund of knowledge of programming and software development in general.what more innovation in operating systems, you want? more crappy candy-quoting, i’m not against “better” or flashier UI,but you badly confuse UI design with entire OS.

      Emacs and Vim of today aren’t exactly your Grandfather’s editors, sure they share the heritage but they are constantly developed and released in scheduled dates(2 times a year i guess for Emacs).to some extent they have been rewritten to accomodate or adapt to modern programming needs.

      same goes to programming languages as well, Lisp had most of the awesome programming features for which languages like Java,Python etc are praised like hell by 1970’s(ok atleast Gerry Sussman and Guy steele jr invented scheme 1975) but unfortunate thing for Lisp computers at the time were *very slow*, my friends teenage sister has a phone which has more than 1000 times computing power than fastest machines at that time and also theory of programming languages and compilers was not well developed, so it stands as it is now , remember the first man-machine interfaces were writtern in Common Lisp(or MacLisp).All new craze about functional programming and F# , you know what languages like Ocaml have thrived for more than 15 years and awesome most language Haskell been since 1990,

      so don’t kid yourself *we make the change*,we are not reluctant to change, the stupid user is.most of geeks aren’t interested in eye candy but doesn’t give you right to accuse of being anti-progressive, it is the pointy-haired boss tells us to use Java cr$% and we trick them saying i would use a library called “Clojure”(actually a programming language,lisp-dialect on top of JVM and yeah invented(exactly reinvented i guess) in 2007) for concurrency , it runs on JVM , boss says ok.

      I shouldn’t probably have clicked on this from lxer, knowing its after all Mac-users,who are self-admittedly amateurs ,seriously want to be pro use Linux or BSD.

      by this time you reach, here you might also notice that some geeks are humble,most give any damn about your comments ,some don’t even blog posts let alone on “Mac”,only few (who have time to kill) are eager to launch a counter-attack

      advice to you don’t be skin-deep, if you are amateur, try to learn the art for the fun of it and see for yourself why people fiercly guard, time tested tools(emacs&vi) and ideas(Unix).

      ok with this all-provoking and annoyingly long reply probably you shouldn’t reply 🙂

      if you do, i’m ready to flame you more, na just kidding 🙂

  21. Used Aptana since 2007. Got worse with every release. Version 3 was promising. But still to buggy (e.g.: copy & paste don’t work if the CPUload is > 20% … that’s just ridiculus – no line-wrap, it’s 2011 goddamit, autocomplete is still incomplete – can’t read the whole project and no ouline in half my files). At least: their git integration is quite nice.

  22. I do Python development on W and want to continue on Mac. On W I use Python(x,y) and now I need an efficient editor on Mac.

    I like Smultron for years, but I miss the capability to ctrl click to the definition of a method or class. Any of the above mentioned editor that could be able to do it ?

  23. Richard Stallman would probably slice you with his katana if you told him emacs was open source … it’s free software dammit!

  24. Pingback: Overview of Text Editors for Programming on the Mac | Josh Kerr

  25. I think if you keep your hands in the terminal, macvim or emacs is the way to go.

    And if you do more front-end things sublime and textmate will suffice.

    My 2 cents

Leave a Reply

Your email address will not be published. Required fields are marked *