Mac Emacs vs Vim

robbieduncan

Moderator emeritus
Jul 24, 2002
25,147
444
Harrogate
This is basically a religious war that has been in progress ever since Emacs was first released. Expect carnage.

Obviously the answer is Emacs.
 

willieva

macrumors 6502
Mar 12, 2010
274
0
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.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
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
 

talmy

macrumors 601
Oct 26, 2009
4,715
276
Oregon
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.
 

firewood

macrumors 604
Jul 29, 2003
7,824
1,082
Silicon Valley
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.
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
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/.
 

robvas

macrumors 68040
Mar 29, 2009
3,077
531
USA
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.
 

SuperMiguel

macrumors 6502
Original poster
Jan 6, 2010
416
6
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
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
does the keyboard make a difference??? like how the macs keyboards are layed out?
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.
 

iEdd

macrumors 68000
Aug 8, 2005
1,956
4
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
 

Cromulent

macrumors 603
Oct 2, 2006
6,039
36
The Land of Hope and Glory
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.
 

willieva

macrumors 6502
Mar 12, 2010
274
0
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.
 

firestarter

macrumors 603
Dec 31, 2002
5,500
117
Green and pleasant land
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.
 

seepel

macrumors 6502
Dec 22, 2009
471
0
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.
 

talmy

macrumors 601
Oct 26, 2009
4,715
276
Oregon
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.
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.
 

Mac_Max

macrumors 6502
Mar 8, 2004
404
1
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.