Hacker News new | past | comments | ask | show | jobs | submit login
Announcing my free book on Vim (swaroopch.com)
101 points by prakash on Nov 26, 2008 | hide | past | web | favorite | 27 comments



I use emacs, and won't be switching to Vim anytime soon, but I'd like to say thanks for writing what seems like a really good book and releasing it for free.

The world needs more of this.


How convenient, considering I am returning to Vim after a very long absence!

Step 1: Start reading online.

Step 2: Buy it because releasing books for free is friendly.


Seems great.

Are there any similarly gentle intros to emacs?


    M-x help-with-tutorial


Which is Emacs keyboard shorthand for, "press Alt-x, let go of Alt, then type help-with-tutorial and press Enter".

If that doesn't work (depending on what Emacs thinks your Alt key is), you can also type Control-H, let go of Control, and then type t.


..............

........................

I thought David was kidding. Jesus.


Not at all. That's the Emacs crash course: How do you move by charcters/words/lines/sentences/paragraphs/function definitions/..., how do you open/save files, what does 'C-x M-c butterfly' mean, how do you browse the main help system, etc. It probably takes about half an hour to go through.

Emacs is largely self-documenting, but since it was written decades (and several OSs) ago, it's IMHO worth reading through the basics. For one thing, it tends to use different terminology than most people are familiar with.


I'd say press F1 F1 and follow instructions on the screen.


:help Just to mention the same for Vim. :-)


F1 even works.


  % vimtutor
An alternative.


Vim seems to add a lot of things you would rather expect from emacs (great extensibility) and emacs of course has always been able to emulate vi keybindings.

What are the major differences in functionality between the two?


Even with all it's features, Vim's direction has always been as a pure text editor. Plugins focus on making editing better, new features help with multiple windows, making modes easier, etc.

Emacs is really a platform who's main use is a text editor. The programming tools are stronger, and it has a few more interactive options when making extensions. This allows developers to create news readers, email clients, web browsers all inside emacs. Much of that could potentially be possible in Vim, but it would require shelling out, and would have a nasty interface in general.


> The programming tools are stronger

Not really. Not outside of lisp. Vim makes for a fully capable ide.

> allows developers to create news readers, email clients, web browsers

And they're all silly wasted effort.


Longer comment about same: http://news.ycombinator.com/item?id=230990

Emacs is a Lisp virtual machine, and tends to act more like an integrated environment, while vi(m) is a text editor with less intrinsic extensibility.

Also, Emacs's default keybindings (both in the main system and virtually every mode people write for it, out of tradition) tend to use quite a bit of modifier keys (e.g. you are frequently typing with control held down), which can be hard on your hands. Vi clearly wins in this regard.


The key thing being Vim's "modes". Vim users spend most of their time in normal mode navigating and doing some editing. Insert mode is for actually typing characters into the document.


Right. Emacs modes are more context-oriented ("I'm editing XML, so give me navigation commands that natively understand that syntax") while vi modes are operation-oriented (either inserting/appending or navigating/editing). In the vi sense, Emacs is always in both modes, so you need to press modifier keys to categorize actions (and if you're unlucky, you may find yourself gradually growing crab claws for pinkies).

There's an editor synthesis waiting to happen, but decades of old elisp means there's a lot of inertia for new editors to overcome.


The difference I was trying to point out is that Emacs is always in "insert mode" in the vi sense. In vi normal mode, many commands don't require modifier keys.

Vim has syntax-aware navigation, too. And what Emacs calls "modes", Vim calls syntax/filetype plugins.


Pretty much the first thing I do these days is swap Caps Lock and Control on my keyboard layout. Emacs is the reason I started doing this, now I wonder how I ever lived without it.


On long days at work, sometimes my pinky will start to ache from holding down control while typing. It's definitely better than leaving Ctrl at the bottom left, but I'm considering remapping the left Alt to Ctrl so I can type it with my thumb. (No other RSI symptoms, and I'd like to keep it that way.)

I don't have a Kinesis keyboard, but I read that their modifier keys (along with space, Enter, and backspace) are all at the thumbs, and that seems like a really good idea.


What I really like about emacs is extensibility in Lisp. I used vim until I wanted to be able to hack my editor. I have absolutely no desire to learn vimscript, a language useful solely for hacking vim. Lisp, on the other hand, is actually a real language.


You can script Vim in python.


Any links or resources for this? I would much rather do that than using vimscript!



Just started reading it.

So far great reading.

Thank you very much


Swaroop's byte of python book is well liked by beginners.


Clearly better than Emacs! (j/k)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: