Hacker News new | ask | show | jobs
by jdrek1 2049 days ago
I don't think your take is wrong. I have yet to see any actual argument from the vim/emacs crowd. I'm genuinely curious about what makes them defend their editor choice that heavily but whenever I ask them for their reasons all I get is a "modal editing is great because modal editing is great".

I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have key binds too, I think they blow up that argument way too much) but on anything else they are suspiciously silent. Maybe I have just not met the right people to ask but that's my personal experience. Anyone I know using vim only does it because they either have been using it for 40 years or have been told to use it by someone from the first group and don't know anything else.

8 comments

It does all come down to personal preference in the end. I can only describe why I prefer Vim. I specifically do not recommend it to anybody else - it's hard enough to learn that you have to decide on your own that you want to make the effort.

In my opinion, the real drag of conventional text editing is constantly having to move between the keyboard and mouse. That's a much more physically and mentally expensive mode switch than any editor mode switch. It always tends to hurt my focus on whatever I'm working on. Vim feels like I have all of the movement types in muscle memory, and it just seems to happen automatically.

I know all editors have keyboard shortcuts. I think they're all much more awkward and inefficient than Vim though. Too many steps and too much thought for "how do I move the cursor over there without using the mouse". When it gets beyond the basics, the keyboard shortcuts either don't exist at all, or vary widely between editors. How do I split a view into 2 sections and switch between them with only the keyboard in VS Code? Beats me. Oh it may be possible, but if so, it's probably different in IDEA, Eclipse, full VS, Sublime Text, etc. Vim is always Vim.

I also find most of the IDE features for live error checking and auto-complete to be more distracting than helpful, at least for dynamic languages. It's subtly annoying and harmful to my focus for my editor to be constantly trying to tell me about the "syntax errors" in code I'm not finished writing yet, or to constantly pop up completely wrong autocomplete suggestions. I prefer to run these checks or unit tests explicitly on command, when I'm ready for it.

Here's my story: I used Notepad++ for a while, Sublime Text 2 for a couple of years, Atom for a bit, then Webstorm and VS Code before settling into primarily using VIM or VIM mode for every editor I work with.

The real instigating factor was severe RSI. Three and a half years ago, it hurt even to brush my teeth. The damage was primarily from using trackpads, mice and worst of all mobile phones, but it was much to late to just use a keyboard.

I had to take a complete break and then limit myself to a couple hours a day and only on a fully ergonomic mechanical keyboard. The difference in using VIM and staying mostly on the home rows vs constantly hitting chords with modifier keys to do everything on other editors was massive. I could work almost twice as long before feeling pain!

At the time I could get around VIM but hadn't ever customized my .vimrc or really made a concerted effort to study it. I just knew the standard navigation with hjkl, insert, append, copy, yank, delete, lines, words and find. And yet it was still reasonably productive.

Once I learned about change/delete/yank in word/tag/line/etc, it was already better than using VS Code in normal mode. Making shortcuts in my .vimrc made it even better. In a sense it's like snippets at a meta level that apply to your work flow.

Nobody pushed me to use VIM and I like it quite a bit, despite having had a lot more experience with non-modal editors. I'll use VS Code, etc, but I when I do, I use VIM mode in them unless I'm recording a screencast where I don't think that would be a good idea. So far, the only major editor I've encountered that fails to support VIM mode is Xcode.

Damn sorry, I hope it gets better for you. In that case I can definitely see how not having to leave the keyboard is of upmost importance.
Thanks. It is slowly getting better. My wrists and right index finger still hurt after using the computer but much less than before and I'm using voice input a lot less these days.

Sites that require a lot of clicking are still painful, though.

I was a short-term vim user, around 8 years. There are some benefits to it, however these benefits are starting to get less and less with other IDEs/Editors adopting some of the functionality. I now use VS Code with vim keys.

So as from my point of view of would highlight the following reasons:

- Keyboard, for even a bad typer like myself the vim keys and chords are very efficient.

- The not using a mouse is good also, your hands do not move far. - Fast

- Widely available

- Cross platform

- I can use it in a SSH session.

- When you use it for a while you do build an attachment to it. It might sound strange but I feel good using vim.

I think my vim experience has one major benefit also. I have been able to jump from one ide/editor to another and if there is support for vim keys then I can navigate and do basic to mid level editing quite efficiently.

I like VS Code now, it is consistent, plugins work consistently (one problem with Vim). I would still recommend people to learn vim.

I'll name one use case where Vim's approach helps me out a lot: macros.

Quite often I need to edit a whole bunch of lines of code/data in a similar way. simply being able to repeat a particular set of 'motions' x times, or on whatever line I'm one, has often proven quite useful.

I'm sure that many people don't really need to do this much, but for me it's probably something that crops up daily (when I'm working), at least once. Often multiple times.

The fact that I can perform complex operations and record them with no extra mental load, is definitely one reason I'm sticking with Vim (or rather, evil on Emacs).

That's a reason I can get behind. I agree though, most people probably don't need that, but in such cases it's great to have a tool like that available. Thanks!
I'd say that does illustrate why I chose to just get proficient in Vim though. There are enough of these kinds of scenarios where having it available is very useful. But if you don't know Vim, you wouldn't bother learning it for just them.

For example, I couldn't imagine using a browser without Vim keybindings anymore. I wouldn't have learned how to use any kind of shortcut/keyboard-only extension, but since I already used Vim it was a no-brainer.

It's a lot of little benefits here and there, and I think taking a bit of time to get comfortable with it would even benefit no-programmers who do a lot of text editing. Plus geek cred ;).

Me and my friends learned with Vim first (not really a choice, our exams were basically on fresh installs). One of us got into SublimText quite fast (with modal editing too, using vintage), while another went into vim scripting and python, and another with neovim.

It was our first year, i don't think we even finished our Posix shell project at that time, so our knowledge of vim's binding was very limited, as we spent less than 6 month on it. But this was really comfortable, and even the two people of our group that learnt to code prior with the Java IDE got hooked with modal editing, vim or not. Because once you've learned how to use it, it is just more comfortable. I still know how to use ctrE and ctrlA and basic shortcuts present with every IDEs, but the `find ", move one right, delete all util next "` i don't, and i'm pretty sure is not the same on Atom or Netbeans, and since i've already learned the superior `ri"` (replace inside ""), i don't understand why i should learn more complex shortcuts.

I mean, even `delete from this word until the end of the line` i'm pretty sure won't be the same within two editor (you'll have to find the word with control f, place a mark wich differ depending on the editor, CtrlE, then either place a second mark or delete from the first mark? i guess?). I like consistency and not having to place mark and think on "how will i do that".

I'm not saying modal editing is better, i think it's just like learning to use a new tool. Let's say you want to add floorboard in your house. You know how to use a circular saw (everyone does), so you use that, and that's okay and probably enough. I've learned how to safely and correctly use a radial saw however, and will rather use one if i have the choice. It's not better inherently, i'm just lazy and i find using a radil more comfortable (as long as i have earplugs available).

I think editor choice is pretty subjective, but for me it's two main things:

1) Editing speed. I'm far from a Vim power user, but anytime I have to use a different editor, I'm frustrated by how slow and cumbersome it is to edit code. It feels like trying to run in water.

2) Ubiquity. It's so nice to just use the same editor everywhere, especially remotely and/or on low-powered devices.

On point #1: This is not just an issue of familiarity either; I've used way too many editors over the years, vim wasn't my first choice, and I resisted it for a long time. Once I bit the bullet (due to point #2, above), I found that the learning curve was really steep as expected. But an interesting thing happened soon after that: long before I felt proficient in Vim, the speed of editing files in Vim surpassed the speed of making the same changes in any other editor.

For me, modal editing is great because it's comfortable. I almost never need chords save for those using control, which resides in its rightful place below the tab key.

Lots of typing, zero RSI.

Modality also enables the vi "mini-language" that makes editing actions and movement composable, which is nice.

I am an avid (Neo)vim user. I love it and have been using it for the last 4-ish years. I know it's not a lot, but I _am_ in my early 20's. :D

I started coding only during my undergrad (computer engineer), so first editor/IDE was Eclipse, and then moved to Atom -> Sublime -> CLion. By the time I reached my 3rd year, I was writing C/C++, and took this course on Operating Systems. The course taught on the OS/161 teaching OS [1], which (at the time) used BSD Make and other magic, and I had no idea how to configure my CLion IDE to handle it. The course professor was a Vim evangelist, and actually dedicated a weekend to teach Vim for anyone who wanted to learn. Since, then I have been hooked. (Point being: I haven't existed for 40 years, let alone used Vim for that long, nor have I just been told. I think there is some comment in this post that compares learning Emacs/Vim to learning foreign languages, which I definitely relate to.)

Why I like Vim:

1. I can separate my text typing with text manipulation (if that makes any sense). 2. Cliche, but I love that I don't have to use my mouse. I don't necessarily care about the speed of it (I have RSI from using my keyboard too much, so I am actively slow) but having to switch to a mouse and then search for the button I want to click, etc. is a significant mental strain/distraction for me. 3. Command mode is not the same as keybindings in IDEs: I have used several IDEs (outside the ones I mentioned above) and I always found keybindings to not be intuitive and also involves having to press a bunch of unrelated keys. I think the reason why Sublime/Atom/VSCode have a Command Pallette is exactly for this reason, and IMHO, Vim does it better. 4. And, finally, the most important reason: I don't have to leave the terminal. I have a setup that uses Neovim and Tmux, through various high-quality plugins written by some really awesome people. It is seamless. I have latex compiling in the background, I can edit command line arguments to Clang without having to hop through multiple dialog boxes, and so on.

[1]: http://os161.eecs.harvard.edu/

Edit: Forgot to put link to OS/161

Edit: Found out that the original website for the course I took is still up at https://ops-class.org/courses/buffalo/CSE421_Spring2017/