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

I understand Vim. Really, I do. I even know how to use it for the most part.

But I guess I just don't get it. It's too obtuse. I don't feel connected to my editing while using it, I feel... connected to Vim. Which, I think, might explain why others feel so connected to Vim too. They get attached to it because it's an investment, and as we know from various psych studies, we get attached to things we invest in.

This isn't a bad thing, just wanted to throw my 2¢ out there. Vim's a cool language for text editing, but it's not the only one.



I completely understand where you are coming from.

For me and others, we actually feel connected to our text instead of Vim. Let me give you an example, let's say I have following sentence.

"Why, oh WHY, do those #?@! nutheads use vi?"

my cursor is on the letter 'h' of 'nutheads'.

Let's say I decide to change the whole word to 'crazy people'.

Here's how you would do it in conventional editor (using EditPlus as an example).

Ctrl + <- (to jump to n)

Ctrl + Shift + -> (to select the whole world)

Shift + <- (to remove the space which was selected. )

Type in "crazy people"

Here's how you would do it in Vim.

ciw - (change inner word), it gets rid of the whole 'nutheads' word and puts me in INSERT mode.

type in "crazy people"

As you can see, EditPlus forces to you to navigate the text using conventional method. It doesn't have a concept of a 'word'.

Compare this to Vim. I told Vim what I exactly wanted to do ('change inner word') and it let me achieve that without any fuss.

As I wrote in my other comment, Vim lets me 'talk' and 'interact' with my text at a semantic level. Vim is like a translator which completely disappears when I am working with my text.

The example sentence was borrowed from another excellent article on Vim:

http://www.viemu.com/a-why-vi-vim.html


Excellent comparison, thanks.

It's important to note that many modern text editors do have concepts of "words" and "lines" and such that can be used in similar ways. Granted, not near the extent of Vim, but they're still useful.

In sublime for example, I can Ctrl+Shift arrow to select words before and after. This even works with multiple selection (multiple caret positions). It's pretty cool.

Again, I understand that Vim is more of a language to describe editing text and is very efficient, I'm just saying you can get close with modern editors, and personally I find their visual language to work better for me.


Mainstream editors get close to Vim only if you use Vim as it were a mainstream editor. Yes, on a mainstream editor you can use Ctrl+Shift+Arrow to select words - which already requires you to move your hands way more than Vim would - but - among other things - how do you cut/change/copy text:

- up to a specific character?

- up to a specific string?

- up to the beginning/end of a document?

- up to the beginning/end of a sentence?

- up to the beginning/end of a paragraph?

Good luck ;-) Maybe these examples are lame because I haven't edited text in a while and I couldn't think of anything better, but I hope you can see what we are talking about.

Read PG's essay about Blub languages and Lisp, then replace Blub with mainstream editors and Lisp with Vim and you'll understand why Vim is better. My colleagues used to ask me why I kept using a weird editor, and when I answered they replied the same way you have done, yet they always marveled at me editing texts at insane speeds. Go figure.

With Vim, you also have a reduced mental load, as its command set relies on intuitive and flexible composition.

Actually I don't even use Vim. I use a Vim mode for GNU Emacs, which gives me these added advantages: - learning a Lisp (ask Eric Raymond why this is advantageous); - having a powerful batch text processing tool (no need for Perl, Awk, and the likes); - a box of tools for several tasks which are more powerful than mainstream ones.

Have fun.


I love how every Vim user speaks to non-Vim users as though they're novices that are just "not there yet." It's cute.


Non-Vim users are novices that are just "not there yet", when it comes to text-editing. The Vim way is the most simple and effective way to edit text by means of a keyboard. Like Lisp and the Dvorak keyboard, it's alien, but it's actually simpler. Maybe, now that touch-screens are becoming commonplace, an equally or more effective new way will be developed.


My guess is GP knows how to use Vim, and yet he's happy to use something else... but many Vim users can't imagine that scenario.

I personally know and like Vim and Emacs, but I'm using ST2 because those editors lose some of their greatness on vanilla Windows. And Emacs keybindings do hurt my wrists.

Also, I could never get really fast at editing multiple files inside a single Vim session. Nothing near Emacs with ido.el or vanilla ST2. I already tried Lusty* packages and Nerd* packages... It's also kinda hard to prevent :q from quitting the whole editor, which always bugged me.

When I open it from the terminal for a quick fix on a single file, Vim works very naturally and I think, once more, "hey that edit was easy and fast - why not switch to it as my main editor?"...


You've proved my point. In your words Vi-style editing is "natural", "easy" and "fast". Vi-style is better than Emacs-style because the latter "do hurt my wrists", thus discarding the only worthy contender.

The only reason you are using another editing model is because you've found the tools offering Vi-style editing to be lacking in important areas.

Sublime may be better than Vim as an overall editor in your particular case even when the editing model of Sublime is less efficient than the one of Vim. We agree on this: we don't live in a perfect world. Indeed, even Vi-style editing is not perfect, as it was designed for a different keyboard than those which are commonplace nowadays.


RIght, right. Unfortunately I can't convince my brain to accept that Sublime+Vintage works like Vim. I need to be in Vim to trigger the Vim mode of thinking in my brain...

I'm curious though: I thought it was Emacs that had a special keyboard in the old days. What do you think could be easier in Vim with a different keyboard? (I can only think of ESC position).


Not much, actually, besides : which was unshifted. But we shouldn't overlook people who try to use Vi(m) on keyboards other than the US one. For instance, on the Italian layout, / and ? are both shifted, and on different keys, thus causing their relationship to be less intuitive, and further from the home row.


Well, there is Vim and there is the Vi-editing style. My understanding was we were talking about the latter. In such case, I admit I couldn't think of a proficient Vi-clone user switching to any other editing model.


>Non-Vim users are novices that are just "not there yet", when it comes to text-editing.

Religious war nonsense. Vim still uses modal editing, which we've known to be a mistake for how many decades now? Sure, vi is better than Notepad. Congratulations.


Mmmmm... Modality a mistake? Seemingly, it depends on whom you ask. People have been using it for millennia in their languages (many words change meaning according to their context, context being the "mode"). Musicians have been using it proficiently for centuries for their music sheets(notes on the music staff change according to tonality, tonality being the "mode"). Nowadays (most? many?) people use modality every day on their mobile phones (e.g. T9 has a modal keyboard). Could it be that studies about modality were flawed? I think so. For instance, if you teach modality in the wrong way, I agree you will "realize" that modality is ineffective. I had an hard time using T9 before being told how to use it effectively, and I have helped a couple of people who hated it as well. And I had an hard time using Vim before being told how to use it effectively.


There is at least one study that talks about this. I'm talking about modal editing. Obviously I'm not against context.

>Could it be that studies about modality were flawed? I think so.

This isn't how we progress. Do you have a study that demonstrates the opposite? Then claiming the study was flawed is meaningless.

>And I had an hard time using Vim before being told how to use it effectively.

Stay classy. I knew how to use it just fine, but mode management slows everything down.


> There is at least one study that talks about this.

I couldn't find any. Could anyone provide some pointers, please?

> I'm talking about modal editing. Obviously I'm not against context.

When scientific proof lacks, appropriate analogies can be our only tool in analyzing a issue and reaching a conclusion. My point is that people don't seem to have issues with modality in other contexts, provided that they know how to cope with it, thus why should I doubt their ability to cope with modality while editing?

> This isn't how we progress. Do you have a study that demonstrates the opposite? Then claiming the study was flawed is meaningless.

Sadly, progress is slower than we wish. If a study contradicting empirical evidence is flawed, it doesn't prove anything, for empirical evidence wins and we are back to square one.

> I knew how to use it just fine, but mode management slows everything down.

This proves that some people have issues with modal editing. Why? Maybe: - they didn't approach it effectively (in the case of Vim, they lingered in Insert mode); - their tools were inappropriate (in the case of Vim, the Esc key was too far). - or modal editing requires some mental capability which not everyone possess (some people can type on Dvorak and Qwerty, indifferently); - or modal thinking is a learned skill; - or... If we can solve this problem, instead of saying that modal editing is better, we could say that modal editing is better when some conditions are met.

EDIT: I've also thought about reasons for Vi-style editing not being as superior as it was in the past: - keyboard layouts do not resemble the keyboard layout used while designing Vi; - keyboards with integrated touch-pads and/or track-pads are available to make switching to a pointing device quicker.


When your cursor is in the center of the word, you can't use ctrl-shift arrow to select that word [it will only select part of the word]. Therefore first you need to move cursor to a side, then start your ctrl-shift work that you described.

GP highlighted this special thing. I guess you missed his main point.


In terms of finger travel, if I've already moved my right hand to the arrow keys, and my left hand to ctrl and shift, then it's simply hold-ctrl, left, start holding shift, right. While not quite as simple as ciw, my main complaint is moving my right hand all the way over to the arrows and back; complaining about the comparative complexity of the sequence seems ridiculous.


What annoys me about the arrow keys is that I can't reach them without looking, and they also change position on different keyboards (standard keyboards vs laptop keyboards, for example). Having to look to the keyboard distracts me.


Agreed - needing arrow keys in the middle of doing anything else is bad. My point was that, in this particular case, the fact that the arrow keys are needed is basically all of the bad, and that the parent's complaint of increased complexity/typing is certainly not strong and perhaps not valid.


As z92 mentioned in reply, you missed my point about the fact that EditPlus or Sublime will force you to move to the beginning of the word before you can select it. Try the above exercise in Sublime and then in Vim so that you can see the difference clearly. May be that will kick in that bulb in your head and you will see Vim in a whole different light. Trust me, it took me a long time before Vim 'clicked' for me.


As the other reply mentioned, it's Ctrl+D, and there are many other ways to accomplish the same things that Vim can do in general. Maybe one is slightly better or more efficient, but they're really not that different.

Not to get into a holy war, but that's is one of the things I don't really like about Vim—the community is pretty religious and Vim "can do no wrong" in a sense. The process of conversion is just an epiphany and if you haven't realized that, then you must just not have used it enough, because it's factually better. Not really true. I'll leave it at that.


I am sorry if you get the impression that we are trying to suggest that Vim can do no wrong.

Your original comment was exactly how I felt when I was learning Vim. I also thought that Vim is obtuse and it gets in my way. And now after using Vim for over 3 years, I now know why Vim is the way it is and I was sharing my epiphany.

By all means, use the editor which makes you most productive (you are already ahead of 70% folks who don't even care to find better editor). But at the same time, if you think that Vim is crazy, at least listen to the other side of an argument with an open mind.

PS: I also replied to comment by 'recursive' on the Ctrl + D shortcut.


I think you just embodied the entire sentiment the GP was criticising: the whole concept that Vim is not an editor; it's a state of mind.

I compel you and anyone else who is quite dogmatic about their choice of editor to try explaining it in such an objective, non-patronising way, so that the layman can think, "oh, it sounds like it's worth learning then."

I'm not a Vim user per-se, but I'd find more value in something like this, possibly with a more specific follow up:

Vim works a bit differently than other editors. It cares more about manipulating existing text than creating new text, and so it tries its best to let you make changes without just deleting and re-typing from scratch, or using your mouse to point and click and drag and highlight.

It has a steep learning curve so it's initially hard to adapt not just to this change in perspective, but also to the commands and shortcuts that allow you to be more efficient and productive.

Such is the investment of time and effort required to do be good in it, you might consider grokking Vim a commitment as big as grokking your programming language of choice. However, you will in return acquire a life-long knowledge of working in Vim, and using it will become second-nature and infinitely preferable to manipulating text by hand.

As a developer, knowledge of Vim is valuable because of two things:

1. Portable configuration: what you learn, and how you personalise your editor, is transferrable to other machines, as it's just text. No modern editor has adequately replicated such basic functionality.

2. Ubiquity: you can't load Sublime Text, Textmate, Eclipse, {$gui_editor} on the VPS you routinely SSH into. You will, however, have access to Vim, or its predecessor Vi. You can thus have a somewhat familiar environment when working on remote servers, without any faff.


This is a sublime comment. Thank you for writing it.


> Sublime will force you to move to the beginning of the word before you can select it.

Only if you don't know how to use it. Ctrl + D does it in fewer keystrokes than you can in vim.


Sure, there could be a short cut to make this particular example easy. But can you combine this knowledge and use it everywhere?

Let's say your sentence was like this:

"Why, oh WHY, do those #?@! 'nutheads' use vi?"

[Notice that word 'nutheads' is enclosed in single quotes.]

If I am on the letter h, I can press [ciw] to only replace nutheads word with my target word, it will keep the single quotes as it is.

OR

If I wanted to replace the whole word including the quote, I would press [ciW] (notice the capital W)

Now, can you use that knowledge of Ctrl + D in this situation in Sublime?


I'm by no means a sublime expert, but I'd approach those scenarios like this. For replacing the inner content, Ctrl + D still works. To also replace the quotes, I'd use Ctrl + D, Del, Del, Backspace.

Yes, in the second case, Sublime is one additional keystroke. I know you could come up with examples that would show bigger advantages for vim.

FWIW I do believe that vim has advantages to some editors in certain scenarios, but I think those advantages are overestimated by the vim-inati. If you've spent years learning one editor, of course it will seem more capable than editors you have used less.


What if it's 'so called nutheads' that you want to change?

AFAIK, Sublime Text 2 doesn't provide a shortcut for that. You can do Ctrl+D to select "called" but then what? Extending selection to scope or brackets won't help and you are back to a series of Ctrl+Left -> Ctrl+Left -> Ctrl+Shift+Right -> Ctrl+Shift+Right -> Ctrl+Shift+Right. In Vim, that's ci', or ca' if you want to also remove the quotes. Hell, you don't even have to move the cursor to the quoted text to do that.

This scenario happens dozens of times in a given day around here and, as for many other little things, Vim and his "awkward" language and it's "antiquated" modality rule.

The irony, here, is that you actually can change the content of a pair of quotes in ST2.

If you activate its Vim mode.




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: