Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe I just don't code enough. I see little advantage to vim or emacs over, say, gedit or kate. What am I missing (besides a need for esoteric hotkeys)?


This question can be answered by just a bit of research using your friend Google. I like sum-it-up by saying that it's all about making your editor work for you as opposed to simply being a blank slate on which you can type.

Simply thinking that the hotkeys are esoteric is missing the entire point of the command structure which is effectively a language for text manipulation. Google for "vim nouns verbs" for some great descriptions.


"work for you" might not be the right message, as that is what IDEs are known for.

I'd say that vim makes you faster. It's like talking with your close friend vs talking with a stranger. You understand each other better and can speak very quickly. High bandwidth communication maybe?


I agree; it's tough to write out the semantic difference between an IDE "doing work for you" and Vim "working for you," where the former is tools doing tasks you don't want to do and the latter is the editor providing a language for you to give it instructions in far more evolved way than the primitive text-editing concepts of many other editors.

Maybe its "working with you"


Both Emacs (reportedly, I use vim) and vim have a system that allows you to be more effective in every thing you do when manipulating text. I cannot give examples for Emacs, but for vi(m) the interface is based around a few basic concepts:

Two modes: command mode and insert mode

You type in insert mode. You do everything else in command mode. You'll end up doing most work in command mode (well, sort of).

Command mode is centred around verbs, modifiers and nouns (objects).

A typical verb is "d" for delete. Example noun are "w" for word, and "double" for line. So in command mode, "dw" deletes a word, "dd" (you see what I mean by double now) deletes a line.

Yank "y" copies a noun, paste "p" pastes it after the current position.

How do you copy a word? That's right: "yw". A line? That's right, "yy".

For how vim works, see eg:

http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-n...

For how you can become more effective with vim, or any similarly powerful editor, I recommend watching:

"7 Habits for Effective Text Editing 2.0" http://video.google.com/videoplay?docid=2538831956647446078

It's not about the esoteric hotkeys - it's about having a consistent framework and tool set.

When I first started with Linux in the mid 90s I didn't get vim at all. As most people I had a hard time closing the thing when I accidentally opened a file with it -- I seem to recall switching to another virtual terminal and fiddling around with "ps", "grep" and "kill" (I didn't know about pgrep/pkill at the time).

Now I cringe everything I have to use a web browser that doesn't support vimperator/pentadactyl -- and I'm not even much of a vim power user.

edit removed erroneous and confusing reference to "l", some spelling errors.


By calling them esoteric, you've demonstrated what you are missing. The keyboard shortcuts are made in such a way that they should feel natural with regard to the task they accomplish. Once you master enough of them, you won't believe how fast you can type and edit code.


I'd argue that it has nothing to do with how fast I can type or edit code. It has to do with how fast I can express ideas.

Just like I've learned to express ideas in various programming languages, I've learned to express ideas in Vim. Those ideas are within the domain of text manipulations. Even if I spent the same overall amount of time manipulating text (I don't) the process of getting from point A to point B is smoother and costs me less mental energy. That energy savings translates into better code.

One thing to note here is that, just as with any other notation, there is a learning curve. You must learn the essential complexities of the problem domain, as well as the accidental complexities of the notation. That learning requires deep understanding of fundamentals, memorization of idiosyncrasies, and practice, practice, practice. This is true in mathematics, spoken languages, written languages, programming languages, sheet music, and all the rest!


I don't think the two ideas you are talking about are mutually exclusive. I type and edit code faster in vim, and I'm able to accomplish tasks and put down my thoughts faster as well. One lets me accomplish the other, and vice versa.


You're right. Hence why I wrote:

> Even if I spent the same overall amount of time manipulating text (I don't)

I'm just saying that faster code editing is a side effect of -- or the aggregate view of -- smoother thinking and faster thought expression.


Esoteric: Intended for or likely to be understood by only a small number of people with a specialized knowledge or interest.

I think the body of knowledge regarding vi(m) hotkeys would fall under this definition when considering the entire world. I mean no ill will by the description.


It's just faster to edit anything.

Read this for an overview of what makes vim vim:

http://stackoverflow.com/a/1220118

I wrote about some of my favorite commands here:

http://news.ycombinator.com/item?id=4142875




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: