1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Emacs vs Vim

Discussion in 'Mac Programming' started by SuperMiguel, Jan 11, 2012.

  1. macrumors 6502

    i have a 13" macbook air which text editor is easier to use? Emacs or Vim??
  2. Moderator


    Staff Member

    This is basically a religious war that has been in progress ever since Emacs was first released. Expect carnage.

    Obviously the answer is Emacs.
  3. macrumors 6502

    Each is a tool that has it's uses. There are things that emacs does better, and things that vim does better. Knowing both is a good thing. I develop software for a living, and use both on a daily basis.

    Vim is pretty easy to get started with. Learning about 10 commands will let you do 95% of what you want to do. Emacs has a steeper learning curve, but IMHO gives more control for more complicated tasks.

    If you're planning on doing any sysadmin type work, learn vim. It's great over a slow connection, and is pretty much guaranteed to be installed on any unix system you encounter.

    Then go learn emacs.
  4. macrumors demi-god


    Mega nerd war incoming.....

    Learn both; use emacs!
  5. macrumors 68040

    None of them are easy to use, with quite steep learning curve, comparatively IMO. The best thing you can do is try them for yourself. :D
  6. macrumors 68000


    vim is easier to learn but i prefer emacs
  7. macrumors 6502

    Neither, they both suck.

    The fine people at Caldera/SCO have open sourced the original source code that you can download and compile. Source available here.


    As an alternative, the BSD people have a fine vi clone call nvi which is available here.

  8. macrumors 68040

    But both vim and emacs are included in OS X.
  9. macrumors 601


    Don't forget nano and ed, both come in OS X, ed being the oldest UNIX editor. I also maintain a free TECO (TECO being about 45 years old) and there are plenty of other editors free and otherwise. My favorite is the EMACs-like, multi-platform Lugaru Epsilon.
  10. macrumors 6502

    Fixed it for ya.
  11. macrumors 603

    Which ever one your fingers have already learned.

    Both have steep learning curves, making both of them extremely difficult to use... at first. But that learning curve gets completely forgotten after one spends enough time with a particular edit key usage. How much time depends on each individual.

    Having used vi for over a quarter century, I don't even notice my fingers typing vi edit commands, no matter how convoluted or poor UX/UI design that sequence is to learn. Exactly the same for long time emacs users.
  12. macrumors 65816


    I started with emacs because I didn't like the whole modal thing of vim. But now I use vim, because I (subjectively) find it more efficient to use.

    However, can I point out that neither are good Mac OS X citizens. If your looking for a free Mac OS X editor, have you checked out Text Wrangler. It's free on the Mac App Store or downloadable from http://www.barebones.com/products/textwrangler/.
  13. macrumors 68000


    TextMate, BBedit (or TextWrangler, the free 'lite' version), Komodo Edit, or SublimeEdit are all probably better choices.

    You should know the basics of vi/vim but it takes a long time to be a wizard with it.
  14. macrumors demi-god


    This should answer all your questions.
  15. macrumors 6502

    does the keyboard make a difference??? like how the macs keyboards are layed out?

    also i been programming in VMs (not sure if one is better than the other in shortcuts)

    and i don't know any of them.. been using nano for a while.. but want to start using Xemacs or vim
  16. chrono1081, Jan 11, 2012
    Last edited: Jan 11, 2012

    macrumors 604


    *makes popcorn to watch the nerd war about to unfold*
  17. macrumors 65816


    Won't be a difference in either vim or emacs. They both assume a basic keyboard. For example, neither require the use of function keys, arrow keys or the editing block; although both can make use of them if they're available. So vim and emacs both work well with compact keyboards.
  18. macrumors 68000


    Vim (or Vi if you prefer) is a great text editor. The majority of commands are single-key, so you don't destroy yourself reaching for things.

    Emacs was designed to break your hands and wear out the escape key. :eek:
    M-x tetris
  19. macrumors 603


    I personally prefer Vim because when you start to learn some of the keyboard commands it quickly becomes one of the fastest text editors to use. With a little bit of effort memorising Vim cheat sheets you can quickly become extremely fast. In fact I really miss using Vim when I am forced to use Xcode as the keyboard shortcuts just seem so much slower to use.
  20. macrumors member

    Vim. For no other reason than familiarity (I use it every day at work).
  21. macrumors 6502

    The keyboard does make a difference. Emacs uses the ctrl key for many operations. On many keyboards it is easy to hold down the ctrl key with the palm of your hand while still typing. Not true of the current mac keyboards. This isn't a reason not to learn emacs, but it is a reason to get yourself a good keyboard for home use.
  22. macrumors 603


    Of the two, the correct answer has to be vi.

    I think it's an essential to learn enough vi to be productive. Vi will always be there - and it'll work through pretty much any dumb terminal.

    If I have to hack text or code on a Mac though, my tool of choice is TextMate.
  23. macrumors 6502


    I'm a vi user but I would actually recommend learning Emacs simply because the Mac text fields respond to a lot of the same short cuts. If this weren't true then I would totally say vi all the way.
  24. macrumors 601


    Which is why I assign the useless caps lock key to be a CTRL key. I also normally use a 23 year old Northgate Omnikey keyboard which has CTRL to the left of the A and also has an easily reachable ESC key for VI users.
  25. macrumors 6502

    I use nano whenever I don't use a modern text editor. Nano doesn't have much of a learning curve and the amount of UI it does have is pretty good.

Share This Page