You are not logged in.

#1 2007-12-03 17:33:59

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Simple Vim and Emacs questions

Between Vim and Emacs, does one have a steeper learning curve than the other? Is the syntax less cryptic on one or the other? Why do you have a preference of one over then other?

Last edited by skottish (2007-12-03 17:34:45)

Offline

#2 2007-12-03 17:37:10

Bison
Member
From: Jacksonville, FL
Registered: 2006-04-12
Posts: 158
Website

Re: Simple Vim and Emacs questions

I think emacs has a much steeper learning curve, but it is much more extensible. (Especially since the configuration is done in emacs-lisp, which is a full featured programming language)

Offline

#3 2007-12-03 18:04:51

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Simple Vim and Emacs questions

Well, emacs is easier to start off with, simply due to the fact that a handful of the common shortcuts you use in other apps (like, say, bash). In addition, there's not the additional concept of a "mode". That said, emacs may have lesser learning _curve_ that does not mean it's easier (to get dorky: the curves may be different, but the integrals are the same).

To answer your second question: vim is generally accepted as more cryptic and arcane than emacs. Want to rot13 an entire file? The command is 'ggg?G'.

If [] is the cursor:

Hello this is a foo.  This is bar. Senten[c]e 3 is cooler. No way, sentence four rules!

hitting "dis" produces:

Hello this is a foo.  This is bar.[ ]No way, sentence four rules!

It's only cryptic until you 'get' it.

Offline

#4 2007-12-03 18:17:57

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Simple Vim and Emacs questions

Cool. Since I'm a noob at advanced text editors, I think Emacs may be a good place to start.

Offline

#5 2007-12-03 18:46:47

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: Simple Vim and Emacs questions

Couple of observations from another noob who has tried using both recently:

Regarding the initial learning curve, for me they were extremely similar. They both require a small investment of time to learn the basic commands for navigation, copy/delete, etc., but I didn't find either system to be any more or less intuitive or hard to pick up and remember than the other. As for customization, here I think vim is easier for beginners, if only because the syntax of .vimrc so simple. I don't doubt that emacs offers more (or at least easier) customization for advanced users, but for those who don't know (e-)lisp it can be a bit daunting.

I started using emacs because of its excellent support for writing LaTeX (via AUCTeX and RefTeX), and as far as I can tell it's really unparalleled in this area. Vim has the LaTeX-Suite plugin, but its functionality (at least the defaults), though similar, is slightly less intuitive and useful, I found. That said, there are plenty of excellent vim plugins and extensions; one particularly useful one is the Snippets plugin, which provides functionality similar to that in TextMate (on OS X) and makes it easy to write your own snippets. Handy for LaTeX or whatever you're doing.

As it turns out, the thing that has switched me away from emacs and towards vim is the complexity of the keystroke commands in emacs: not because they were hard to remember, but because they were killing my wrists. I find it's much easier in vim, where, e.g., the navigation commands for jumping from word to word, etc., involve just a single keystroke, instead of a C- or M- combination. And I actually find the modes concept very useful, though obviously opinions vary.

Anyway, good luck and have fun using them. They're both just excellent tools.

Offline

#6 2007-12-03 19:41:48

elai
Member
Registered: 2007-11-08
Posts: 4

Re: Simple Vim and Emacs questions

I prefer vim since it's far easier to integrate into other applications since it doesn't interfere as much as emacs would with the app's keyboard shortcuts.  Emacs uses the alt/ctrl option type commands while with vim it's just straight letters and an esc key to switch modes.  Far less interference that way.  You can even integrate vi into emacs with the elvis extension if you wanted to.  Also when your using other unix systems, vim tends to be the one editor that sticks around.

Offline

#7 2007-12-04 00:09:38

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: Simple Vim and Emacs questions

I learned emacs first and probably as such it is my preference. But as in the previous post knowing how to get by in vi is a good idea as it is on nearly every *nix system where emacs may not be, for example the Arch installer. There is a nice tool built in to learn vi just run vitutor or vimtutor.

Offline

#8 2007-12-04 00:23:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Simple Vim and Emacs questions

Thanks a lot everyone for all of the really insightful input.  tesjo's point is an excellent one; Vi seems to be everywhere. I'll start there, and who knows what the future brings?

Offline

#9 2007-12-04 05:14:10

Xilon
Member
Registered: 2007-01-01
Posts: 243

Re: Simple Vim and Emacs questions

Well I haven't really used emacs yet, so I'm very biased towards vim. I don't particularly like emacs bindings (a reason why I don't like screen and other apps), it's just annoying to press so many combinations just to get one thing. Vim has similar keybindings as well, but I think it has the "command line" alternative for everything (C-w v == :vsplit). Vim is a nice little editor though, a lot smaller than emacs and it's sort of focused on one thing. There aren't any jokes about vim being a whole OS wink. The editor has some really cool functionality for editing plain text, as phrakture showed us, I'm sure emacs has similar functionality though.
I didn't really find vim hard to learn, but it did take time. The commands are easy to get used to (if you like consoles) since they resemble those that you type on the console. The bindings are easy to type and I love "motions" (gq}), enabling you to act on a selection of text quickly. Vim's bindings also try to keep you on the home row of the keyboard, though I'm not much of a touch typist (and prefer dvorak), but it's a nice goal that they have.
And of course like all good software, vim is highly extensible, it's got thousands of extensions, you can run shell commands from within it, as well as piping the input/output to other commands so you have very versatile functionality without ever leaving vim. You can also drop to the shell which I find really good for testing programs (F6 to compile or :make, :sh, test the program, exit and return to vim - also immediately able to jump to any compile errors you have!).

Last edited by Xilon (2007-12-04 05:16:44)

Offline

#10 2007-12-04 11:04:54

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Simple Vim and Emacs questions

Xilon wrote:

There aren't any jokes about vim being a whole OS wink.

There aren't such jokes about emacs either. These are to be taken seriously! big_smile

I use emacs for every bigger task and for the smaller ones (editing a config file, opening a README or so) I use ex-vi or zile. vim is too bloated for these tasks in my opinion. But neverheless a great tool.

As I use emacs for many things I encountered the fact that I do not miss some apps (filemanager, pdf-viewer, IDE) on my system. But the real reason for using emacs is, as mentioned before, the great integration into the tex-ish world (auctex with preview-latex, reftex).

Also the pkgbuild-mode is very nice!

Offline

Board footer

Powered by FluxBB