Aug 12

Vim on Mac OSX

by in Open Source, Techie :: Techno ::

vim-editor_logo.png

I’m editing a few pages on a few sites today and realised that I didn’t have a proper text editor installed on my Mac desktop.

There is a text editor app, but it doesn’t have syntax highlighting, nor does it do a lot of the other funkier stuff that Vim does “out of the box”.

The silly thing is that a Google search for vim on osx (you can adjust the keywords to suit your taste) keeps taking me to this site, which doesn’t have a very recent version of vim. I’m sure their version is fine, but the installer is sadly lacking ie. you need to decompress files and move them around the place, whereas this sourceforge project is almost “sane”.

Related Posts:

Tags: , , , ,

14 Responses to “Vim on Mac OSX”

  1. From Olivier Ansaldi:

    Install MacPorts (http://www.macports.org/) and then:
    port install vim-app
    or:
    port install vim
    Happiness… at last :)

    Posted on August 12, 2008 at 11:30 am #
  2. From Michele Neylon:

    Olivier
    Will MacPorts have any impact on the other software installed? eg. Firefox
    Michele

    Posted on August 12, 2008 at 11:38 am #
  3. From Olivier Ansaldi:

    No. It lives in its own /opt/local directory away from everything else. MacPorts is a port system similar to the BSD one. It has a couple of small issues but I wouldn’t use a Mac without it!

    Posted on August 12, 2008 at 11:57 am #
  4. From Olivier Ansaldi:

    (just in case you missed my tweet!)
    make sure to RTFM before installing MacPorts otherwise you’ll get it wrong and you’ll lose a lot of time. Key thing is you must install Xcode and X11 (app and sdk) from the OS/X dvd that came with your Mac before you install MacPorts.
    Also, make sure to update Xcode to its latest (running Software Update will do the trick) otherwise some ports might have problems building.

    Posted on August 12, 2008 at 12:09 pm #
  5. From Brian Kenny:

    Michele, the best editor I have seen to do this is TextMate. Absolutely brilliant.
    You can even create a project, drag all your website into the project and begin editing.
    Brian

    Posted on August 12, 2008 at 12:16 pm #
  6. From Colm MacCarthaigh:

    Which release of OS X do you have? I can’t remember ever getting an osx mac that didn’t have vim pre-installed;

    colmmacc@thoth (~) $ uname -a
    Darwin thoth.stdlib.net 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
    colmmacc@thoth (~) $ which vim
    /usr/bin/vim
    
    Posted on August 12, 2008 at 12:20 pm #
  7. From Michele Neylon:

    @Brian – I’ll have a look into that – thanks :)
    @Colm – sorry. I should have specified. I was looking for something equivalent to gVIM ie. with a decent GUI

    Posted on August 12, 2008 at 12:40 pm #
  8. From Aidan Finn:

    Whats the point of using vi if you want to use a gui;)
    Vi, emacs, vim are all installed on OS X. You can run them from the command line. There is also an X-server included as an extra on the OS X cd (part of the developer tools). If the xserver is running you can get a gui version of emacs, vim etc. AFAIK the macports versions are similar to the included version: i.e. command-line unless you have an x-server running.
    If you’re open to emacs you could try aquamacs. http://aquamacs.org/. Or if you’re willing to pay, Textmate is the business.

    Posted on August 12, 2008 at 6:32 pm #
  9. From Michele Neylon:

    @Aidan
    I’m awkward :) What can I say?
    I’ve downloaded a copy of TextMate and will give it a go tomorrow.
    Michele

    Posted on August 12, 2008 at 6:58 pm #
  10. From Paul McCarthy:

    I’d recommend Smultron. It’s easy to install, comes with syntax highlighting for almost every language you can think of, allows multiple tabs, and is Free. Full source code is available if you need it.
    Smultron:
    http://smultron.sourceforge.net/

    Posted on August 12, 2008 at 7:14 pm #
  11. From Michele Neylon:

    @Paul
    That looks nice. I might give it a go
    Michele

    Posted on August 12, 2008 at 7:31 pm #
  12. From Patrick:

    TextWrangler: GUI – syntax highlighting and everything you expect form an advanced text editor. Even has a command-line interface so you can launch it from a terminal session
    http://www.barebones.com/products/textwrangler/index.shtml

    Posted on August 12, 2008 at 7:49 pm #
  13. From Michele Neylon:

    Patrick
    Interesting ! I’m almost tempted to fire up my Mac laptop to give that a try :)
    Michele

    Posted on August 12, 2008 at 7:51 pm #
  14. From howie:

    Here’s the real MacVim: http://code.google.com/p/macvim/
    Very good and 100% up to date.

    Posted on September 4, 2008 at 10:12 pm #