Oh, text.

November 14, 2008

(Much like when Lin Swimmer fears he's alienating portions of his audience, I fear I may do the same with this post. But I spent a large chunk of my day thinking about these things, so I'm posting it anyway. I promise my next post will be mindless fun pictures/video.)

I'm a programmer. It's true. Or at least I'd like for it to be true. While I do spend a lot of time writing code, I'm not formally trained, nor am I all that good. But I do think I'm enough of a programmer to care strongly about my text editor. I'm not rich enough or willing enough to buy a text editor (or else I'd probably have TextMate), so all I have to choose from are the free ones. Today, I methodically checked out some of the best free ones for OSX, and here are the results, posted here for you if you're curious... and to remind me why I liked and didn't like certain ones.

Also, if you use any of these, please tell me all about it in the comments.

MacVim
Excluding Notepad++, this is totally my favorite. I want to learn everything about Vim.
(And no, I will not partake in any Emacs vs Vim talks yet. Not until I've learned Vim well enough to kill you in 4 keystrokes, which, I hear, is possible.)

  • CON: Can feel a little too much like what it is: a command line program wrapped up for OSX (but it's still more OSX-y than the java-y programs on this list)
  • PRO: Wicked snappy
  • PRO: Wicked powerful
  • CON: Takes some getting used to
  • PRO: I like tabs
  • PRO: C-tags!
  • PRO: Lots of plugins and support and customization
  • CON: No alt-click block selection (Although it might be possible with some key combo I have yet to master)

Xcode
Pretty good, for such a huge thing. Maybe I'll try using it as a more all-purpose text editor.
  • PRO: Awesome code folding
  • PRO: Good 'find' highlighting (like Smultron). Wish it were more like Safari, though.
  • CON: No tabs, but a (very confusing to me) project tree-thing instead
  • Huge. Can be sluggish.
  • PRO: 'organizer' mode is sort of nice and interesting

Smultron
Remaining on my computer to fight another day. Should have a mutant baby with TextWrangler.
  • CON: Doesn't strike me as being as powerful as Notepad++ or MacVim
  • PRO: Looks pretty good (could use a better color scheme, though)
  • CON: Syntax highlighting is not all that great, and sometimes really sucks.
  • PRO: I like tabs
  • PRO: Good 'find' highlighting (like Smultron). Wish it were more like Safari, though.

TextWrangler
Remaining on my computer to fight another day. Should have a mutant baby with Smultron.
  • CON: no tabs, but a drawer instead
  • PRO: Better syntax highlighting than Smultron
  • PRO: Feels more powerful than Smultron
  • CON: Feels less powerful than MacVIM
Notepad++
I dream of porting this program to OS X. I might learn how to program better just for this very purpose. Oh how I wish I didn't have to run this in CrossOver!
  • FATAL CON: not osx/cocoa enough (duh! it's for Windows)
  • PRO: I like tabs
  • PRO: I love this program!!! No idea why, either.

jEdit
Deleted right before posting this. Will use MacVim and Smultron/TextWrangler instead.
  • CON: Not osx/cocoa enough
  • CON: Plugins are a good idea, but feel sort of not solid
  • PRO: C-tags!
  • CON: No tabs

Editra
Deleted right before posting this. Will use MacVim and Smultron/TextWrangler instead.
  • CON: Not osx/cocoa enough
  • CON: Feels slow (java-y?)
  • PRO: Reminds me of notepad++ (not sure why)
  • PRO: I like tabs

NetBeans or Eclipse
FATAL CON:
I'm not installing such a huge program when it's almost certainly going to feel non-native and perhaps sluggish, especially when Xcode is such a wonderful 'big' text editor

6 comments: to “ Oh, text.

  • Anonymous
    November 15, 2008 at 11:20 AM  

    To do block selections in MacVim:

    1. With the mouse: Click once to position the cursor. This will be one corner of the block. Then alt-click somewhere else, this will be the other corner of the block. Only the part of the rectangular block that is selected is highlighted, so this might not look like a rect in all cases.

    2. Hit Ctrl-v and then use hjkl to change the size of the rect. When you're in block selection mode, you can hit o to move the cursor to the other end of the block.

    When you've selected a block, hit Itext[esc] to prepend each column with "text", hit Atext[esc] to append the text, hit $Atext[esc] to append to the end of each line, ra to remove the selected block with "a"s.

    And join the vim_mac mailing list if you have suggestions, they are very responsive over there. Welcome :-)

  • Greg K.
    November 15, 2008 at 1:32 PM  

    Not that it would have changed your mind, but I was all set to post a comment about how jEdit has a tabs plugin that works pretty well. Then I realized that I don't have that plugin installed, and I can't get jEdit to install it. But I remember it working a long time ago when I used to actually edit code.

  • Dan Gr
    November 16, 2008 at 2:06 PM  

    VI's fur suckers, dude. emacs is the way to go. I prefer xemacs. not some sort of mac gui of it (which there are), but just straight up xemacs installed for linux onto a mac. that's why I got a mac, so that I could use all the standard unix stuff I'm used to.

    re emacs vs vi: let's say you wanted to do that same text block thing in the first comment: you could just highlight it with the mouse or use shift and the arrow keys. if you want to cut the block c-r k, if you want to prepend it's c-r t. I'm sure there's an append function (or at least you can write your own in lisp) but I never use it. you can also set emacs to replace highlighted text with the newly typed text like in gui editors... then you can cut and prepend in one move. kaPOW!

  • joem
    November 16, 2008 at 6:07 PM  

    anonymous:
    Thanks for the rectangle block select tips!

    piels:
    That pretty much sums up exactly what I meant about the plugins.

    dan:
    I said I'm not talking about vi vs emacs. I fear and respect them both. Maybe one day I'll learn emacs too, but for now, it's vi.

    And re:mac gui... The nice thing about MacVim is that it's just a wrapper for vim. It doesn't (as far as I can tell) replace any functionality, it just adds to it. All the normal vim keys work, in additions to cmd-s and cmd-o and those other nice Apple key combos. The vim that I'm running from terminal is the exact same vim thats inside macvim, same setting and everything, just not running in gui mode.

    Finally, re:xemacs... Have you tried out AquaEmacs? I imagine it's similar to MacVim in the "wrapper" respect.

  • Dan Gr
    November 17, 2008 at 5:56 AM  

    I've used aquaemacs and a couple of others that were set up to run in chrome or whatever it's called. They don't look that nice, actually. I mean, xemacs is no eye candy, but it's simple, why make an ugly gui from it. The main reason I don't use any of the guis is that I do all my programming in the terminal, so each time I would call one of the gui emacs it would open up a whole new instance of the program rather than just a new window. also, habit --- it's why I still use ghostview for my pdf's and ps's.

    any of these editors have good syntax highlighting and indentation for php or xml?

  • joem
    November 17, 2008 at 10:28 AM  

    Not that I'm trying to convert you, but Vim has a nice feature where you type one command and you can switch from the non-gui version to the gui version, and it brings along whatever you've got open. (I don't know if there's a way to go gui to non-gui, though.)

    Of the editors I reviewed and didn't delete, I'd say vim and notepad++ have the best syntax highlighting and indentation for php, since they're the only ones where such things are highly configurable. Vim is great when it comes to that, as you can just download an easily editable file of just that aspect of the configuration that you want.

    And I can definitely respect doing all one's programming in the terminal. I think that's the direction I'm heading.

/* Google Analytics ----------------------------------------------- */