Emacs vs Vim

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

  1. macrumors 6502

    Joined:
    Jan 6, 2010
    #1
    i have a 13" macbook air which text editor is easier to use? Emacs or Vim??
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    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

    Joined:
    Mar 12, 2010
    #3
    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 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
    #4
    Mega nerd war incoming.....


    Learn both; use emacs!
     
  5. macrumors 68040

    Joined:
    Feb 2, 2008
    #5
    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

    maril1111

    Joined:
    Mar 14, 2010
    Location:
    Denmark
  7. macrumors 6502

    Joined:
    Dec 6, 2010
    #7
    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.

    http://ex-vi.sourceforge.net/

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

    http://www.kotnet.org/~skimo/nvi/
     
  8. macrumors 68040

    Joined:
    Feb 2, 2008
    #8
    But both vim and emacs are included in OS X.
     
  9. macrumors 601

    talmy

    Joined:
    Oct 26, 2009
    Location:
    Oregon
    #9
    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

    Joined:
    Nov 19, 2008
    Location:
    MN
    #10
    Fixed it for ya.
     
  11. macrumors 603

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #11
    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

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #12
    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

    Joined:
    Mar 29, 2009
    Location:
    USA
    #13
    Neither.

    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 603

    mobilehaathi

    Joined:
    Aug 19, 2008
    Location:
    The Anthropocene
  15. thread starter macrumors 6502

    Joined:
    Jan 6, 2010
    #15
    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

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #16
    *makes popcorn to watch the nerd war about to unfold*
     
  17. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #17
    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

    iEdd

    Joined:
    Aug 8, 2005
    Location:
    Australia
    #18
    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

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #19
    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

    Joined:
    Aug 8, 2011
    #20
    Vim. For no other reason than familiarity (I use it every day at work).
     
  21. macrumors 6502

    Joined:
    Mar 12, 2010
    #21
    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

    firestarter

    Joined:
    Dec 31, 2002
    Location:
    Green and pleasant land
    #22
    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

    seepel

    Joined:
    Dec 22, 2009
    #23
    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

    talmy

    Joined:
    Oct 26, 2009
    Location:
    Oregon
    #24
    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

    Joined:
    Mar 8, 2004
    #25
    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