111 comments

[ 0.24 ms ] story [ 90.0 ms ] thread
Refreshing to see this after all the Vim gospel programmers out there claiming it's benefits. I do have to say though, I've seen some videos of real Vim pros at work and it's -majestic- how swiftly they move through lines and duplicating lines, editing params, refactoring, etc - a thing of beauty akin to watching videos on /r/artisanvideos[0].

I'll stick to Sublime Text and Nano when I need some ssh terminal editing. :)

[0] - http://www.reddit.com/r/artisanvideos

Our industry works this way and I don't understand why programmers who are always "using the right tool" call anything new that they disagree with "gospel" or "evangelizing."

SublimeText isn't that old. Somehow you found out about it, learned its keyboard shortcuts, found out what plugins to install to do your work, and made it your editor.

That's how I learned Vim. I'll admit that I have a bias, and that learning to use something else would be harder.

But here's the thing - the Vim knowledge I have can translate to Visual Studio with a plugin, to XCode with a plugin, and to Eclipse with a plugin. Netbeans, RubyMine, and Webstorm have a Vim plugin as well.

So does SublimeText.

SublimeText's knowledge transfers to the next paid version of SublimeText.

The issue, really, is that vim is stuck in terminal land. It can't have easily navigable GUI menus, it can't really have overlays, it can't have a minimap, it can't have differently sized text, it can't have all sorts of things as a result of its dependence on the terminal. It doesn't even have autocomplete for its commands, at least out of the box, which would make it significantly more usable without disappearing into help files every time I want to do something I don't do often.

Add on to that its awful configuration language and the fact that it's not really usable out of the box unlike Sublime Text, it's easy to see why some people consider it unmodern and, for them, inferior.

The issue, really, is that most Vimmers, including its core devs, don't care about all the gimmicky features you list.
They're not gimmicky. I depend on them every day, either for learning or for regular use, just like vimmers depend on the weird ability to build up ridiculously complex commands. You may as well call user interfaces aside from the shell prompt a gimmick altogether.
You depend on them everyday but most people don't and nobody cares about that because nobody is trying to force you to use Vim or even change your perspective about it. Some retarded bloggers, on the other hand, like to use their lack of patience/knowledge/willingness to learn as a proof that Vim sucks. Well… they don't really serve their goal, do they?

> vim is stuck in terminal land

For people who use a terminal it's not a problem at all.

> It can't have easily navigable GUI menus

I suppose MacVim and GVim don't count. Vimmers usually don't use menus, though.

> it can't really have overlays

And we don't want that gimmick.

> it can't have a minimap

And we don't want that one either.

> it can't have differently sized text

Same.

> It doesn't even have autocomplete for its commands, at least out of the box, which would make it significantly more usable without disappearing into help files every time I want to do something I don't do often.

It has tab-completion, though.

> Add on to that its awful configuration language

    set showmode
is awful? Oh yes, JSON… the answer to every damn problem on earth.

> and the fact that it's not really usable out of the box unlike Sublime Text, it's easy to see why some people consider it unmodern and, for them, inferior.

To be honest, if Sublime Text had been available for Mac OS X and Linux when I was looking for a cross-platform TextMate alternative I would have switched to it in a heartbeat. But I chose vim out of a very large pool of editors/IDEs and, frankly, using anything else is now a PITA.

I'm actually quite comfortable with Vim's perceived learning curve: it keeps the most superficial users out of our ecosystem.

>I'm actually quite comfortable with Vim's perceived learning curve: it keeps the most superficial users out of our ecosystem.

Literally the dumbest thing I've read on HackerNews. https://twitter.com/shit_hn_says material.

Why would you even care who uses what or belongs to your 'ecosystem'? What?!

I you are interested in a fork, have a look at neovim[0]. Many of the issues you describe are being addressed.

[0] http://www.neovim.org

The Sublime Text knowledge I have is pretty esoteric, I admit. You have to learn weird key combos like Cmd-C to copy text into a register (or a "clipboard", to use ST's unusual terminology), and Cmd-V to "paste" it. I have no idea which other software uses those shortcut combos.
You can do exactly that with GVim if you are so inclined.
Or I could use SublimeText 2 and not have to learn weird keyboard combos that only work in Vim.
I'm referring to the many, many ST things I mentioned in my posts. Copy and paste is trivial and I'm sure you're aware of what I was referring to.
You would think it would translate, but my experience with most VIM plugins is that they're rubbish. They have the surface level stuff (basic keys), but they don't even come close to replicating a lot of the more advanced things (paragraph editing and so on)
You're mostly right re: knowledge transfer, although it's really as simple as you imply.

First, Vim emulation widgets vary a great deal in quality, supporting different, disjoint subsets of Vim functionality. Just as an example, ideaVim doesn't support Ctrl-W for navigating between panes. The deeper your knowledge of Vim, the more diminishing returns you get.

Second, Sublime Text's Vintage mode supports enough of my Vim workflow that it's actually made me faster with Vim and other Vim emulation widgets. To the extent that any Vim emulation mode overlaps with Vim, I have improved across the board. Of course this is true mostly for the less deep features IME.

I feel very bad for anyone that uses Nano for any kind of terminal editing. Not to mention there's a whole class of very serious developers that live in the terminal. Nano is the notepad.exe of *nix.
It's good enough for me. I normally use it edit conf files.
> I've seen some videos of real Vim pros at work

Yeah, I know one of these people too. I know one for Emacs, Eclipse, Excel and of course SublimeText.

Honestly, I don't see why some folks obsess over text editors/IDEs. Familiarity and mastery matter way more than features. Sure, a truly barebone editor like Notepad.exe or nano might be insufficient, but any editor with a decently-sized following has enough features to make its users comparably productive - as long as you learn how to use them (This is almost a self-fulfilling claim: if an editor has a sizable following, that means it got something right for its users).

I mean, how else do we explain that Rob Pike uses Acme, Joshua Bloch uses Emacs to write Java, and Paul Graham uses vi to write code and prose?

Wait a minute.

I am sure I have read that part somewhere:

> Honestly, I don't see why some folks obsess over text editors/IDEs. Familiarity and mastery matter way more than features. Sure, a truly barebone

Are you quoting someone ? I think I read something like this some years ago and it turned into a short-lived meme about text editors.

Or am I experiencing some kind of déjà-vu ?

> For the first 1-2 years of your Vim usage you will be much less efficient than your current editor because of the odd yet lovable key bindings.

Seriously? It's about as hard as getting used to the keyboard shortcuts of Starcraft 2.

I use grid layout for SC2; easy to learn and no reaching for awkward keys. I haven't seen any arguments for using the standard keyboard shortcuts.
"For the first 1-2 years of your Vim usage you will be much less efficient than your current editor"

years????

This is obviously a typo.

If you used a real editor, it'd be quite easy to change "years" to "days."

I don't know, when it comes to navigating and manipulating a single document I can see vim's advantages, but having spend a few days recently trying to learn vim I didn't find any replacements for things like jumping to a file by name or recursive regex searching, things that I've come to rely on in Sublime. Feel free to point out if I missed them, but it seems based on my initial experience with vim that there's not really a concept of a "project" or a "codebase", just the collection of buffers you happen to have open at the moment.
Much of what you're looking for is provided by plugins (eg. command-T).

There's no question that vim requires a lot of messing around with initially to get it configured the way you want it. But that rapidly fades away and it's not such a big investment of time for something as important as an editor.

I think there are two kinds of programmers, those that love tweakability and configurability and spend lots of time customizing and perfecting their setup, and those that just want to use stock software with as few modifications as possible. I'm in the latter camp.

I'd like my skills in using a piece of software to be transferrable - I'd like to know that if I'm using vim or whatever on my personal machine or on another machine with no customization, that the experience is the same between both. For the most part, Sublime provides that.

However, I'm willing to give vim another shot, do you have links to the plugins that you mentioned?

I actually don't typically like endlessly tweaking my software either. I was prepared to do this with vim only because a text editor is such a key tool for a developer that it justifies the outlay of time. In addition, I wanted an editor that was available on any platform, and in a shell. It's true that vim under someone else's login will behave differently, but that's not a common case for me.

Command-T can be found here:

https://github.com/wincent/Command-T

Not really, there's vimgrep plus regular grep on the command line.
I don't understand the need to write an article which criticizes a matter of preference. EDIT: I am also astonished at the authors attack on those who operate the vim wiki. He suggests that those who operate the site have personality disorders and are robots and emotionless coders. Come on.
> Vim: The Editor You Need To Read (At Least) Two Books On To Use Well

No. You need to start using it for 2 weeks and then you can no longer look back on any other editor. You don't need to read two books. Stopped reading the article right there.

I hear ya. I'm currently giving vim a after using Sublime since learning how to code. I'm at the point where I pretty much prefer vim for backend stuff, but I sometimes like Sublime when I'm working on the frontend, especially Angular. I have so many different files in different folders, and I'm just used to being able to get there quickly with Sublime.
You should try Vim Command-T plugin, kicks ass in terms of reaching files quickly.
there is still emacs out there and getting some fresh air recently.
but it's non-free software.

you should also consider trying emacs.

So, in a few thousand words, the author manages to give multiple reasons not to use Vim and not a single one to use Sublime Text, except this:

> But Sublime has things Vim can never have. It’s the new hotness and has a more active community than Vim does.

"Things Vim can never have"? Details please. "It's the new hotness"? Yeah, because I choose my software based on its hip factor rather than its suitability to do what I need.

>It's the new hotness

These people are the reason we are going to spend the next twenty years cleaning up after these two-week fad languages/frameworks.

Sublime Text is 6 years old. While not comparable to the age of vim or emacs, it's not exactly a "2 week fad" piece of software.
(comment deleted)
"i love relearning a new editor every two years"
With Vim, you can spend two years learning an editor!
>"Things Vim can never have"? Details please.

He gave several, did you read the article?

A proper extension mechanism for one.

A GUI that's not just monospaced fonts (or just some stylized buttons triggering functions, as Gvim, MacVim etc).

Ans lots of other things. As a matter of fact, a team even started refactoring Vim itself a few months ago, because they feel the current code doesn't cut it and they want to have a codebase that can be properly extended and get rid of all the legacy cruft.

>Vim: The Editor You Need To Read (At Least) Two Books On To Use Well

Is this some kind of joke? If this person is serious I think they're doing more harm to the image of Sublime than good.

I sort of, but very reluctantly, agree. I would add that modern VIm package systems like SPF13 make it much easier and more accessible, I'd suggest the author check that out instead of continuing to maintain that 700 like vimrc file. That having been said, I still end up fixing a lot of bugs that crop up even with my SPF13 setup (the bright side is I can now contribute those fixes back to a project so others don't need to suffer).

However in the end VIm and VIm style modal editing has been, at least in my opinion, a big improvement in my productivity and flow when coding. It's so big that I can't actually bring myself to switch back to something like RubyMine which is arguably a true IDE for what I work on most (Ruby on Rails).

I'm still a bit confused at peoples love of Sublime specifically. Sublime isn't an IDE, so to be quite honest I'm surprised people choose it over the tools from Jetbrains such as Webstorm, Rubymine and IntelliJ. Its benefit over an IDE, or over VIm, is perhaps just that it is fairly simple. It's downside is that it really isn't very powerful and its VIm mode is awkward and clunky.

The sad thing to me is that there are really just a couple of VIm features that make me stick around.

1. Split management that is easy to work with.

I use this all the time. I often need to be able to look at multiple files that are part of the same context I'm working in (view, controller, service, etc.). Tab switching is not effective for this in the least. Every other tool that can do split panes does this poorly. With VIm I can just Ctrl-P<Fuzzy Search>Ctrl-X/V and it's opened horizontally or vertically relative to the current pane.

2. VIm style text navigation and manipulation.

As true as it is that it's not that hard to just click where you want, I completely disagree with the authors assertion that it's just as effective as keyboard based text navigation and manipulation. Perhaps it's just a matter of flow, but being able to select text in multiple ways, manipulate it and repeat that is amazing. For an example of just how powerful this is in certain cases look at the VImcast on the "gn".

http://vimcasts.org/episodes/operating-on-search-matches-usi...

I use that one all the time since learning about it a few weeks ago.

The bottom line for me, is that until editors learn the lessons VIm has already taught us, it's going to be extremely hard for anyone who has learned to use VIm even half decently to stop using it. Perhaps that's the biggest reason to not recommend VIm to new people. They'll never forgive you for it. It's a trap.

> 1. Split management that is easy to work with.

Command-K, Command-Up to do open a new vertical split pane in Sublime with the current file.

Command-K, Command-Down to close the pane and move the file back, or just Option-Command-1 to switch everything back to a single column no matter how many were open.

I've used split management in Sublime. I can say with some certainty it is awkward to work with compared with VIm's. Perhaps that's partly because I'm used it it.

One pet peeve I have is that Sublime came with a VIm mode package but yet didn't implement the split behaviours for it. Also you can't "open in split" which is supported in multiple ways in VIm.

I agree that the author seems to be missing some of the beauty of keyboard commands and navigation. Sure Sublime does some things vim can't, but you can do things in vim you certainly can't with mouse-only input. For instance, I use visual block mode dozens of times a day, which allows identical edits to be made to multiple lines simultaneously.

I do complex search and replace very frequently, and almost always on a particular group of lines. In vim that's as simple as typing `:{start},{end}s/{needle}/{replacement}/g<ENTER>`, but in a GUI I have to select the lines with the mouse, likely reselect since I didn't get exactly the right selection the first time, then find the control key to hit <Ctrl-F> before I can even start thinking about my search terms.

I think it comes down to giving you the power to make the edits you will be doing frequently. I find it interesting the author spoke so much about autocomplete and autotab. It's probably just a matter of preference but I've always found that those features get in the way of effective coding. Every time I'm forced to use Visual Studio for something I feel like it's an unloved little kid that keeps piping up: "hey, hey I know what you want to do" but it's always sorely mistaken.

Let me replace on lines 6 through 437 of some text dump the leading curly brace with a function call to turn it into a code file and you'll win my heart, because those are the sorts of transformations that I want my editor helping with.

Actually, Sublimes multi-edit feature is actually pretty good and it's something I'd love to see VIm able to do. What I want to edit isn't always organized into neat vertically aligned blocks.

On the subject of VIm's search and replace, the VIm style regex does drive me nuts, I constantly have to remind myself what needs escaping.

I don't use Sublime Text because it's not free software and it doesn't run in a terminal. I like vim, but I'm not "stuck in my ways" and would gladly switch to a better editor that meets those two requirements.
Then just use Kate or Geany. I love Kate. It even has a vim mode!
http://limetext.org/ might be interesting to you at some point (and despite the suspicious landing page showing event from November to February and then silence, there's activity in the repository)
This is what my Vim looks like.

http://www.webhook.com/webhook-uploads/1396995440381_1396021...

I'm a designer, not a programmer. I can't code perl, vimscript, and can barely read python or javascript. I can use git repos, which really is all I need to know how to setup Vim properly. That and I guess the ability to read some instructions. I've done nothing more than edit a .vimrc file.

It took me a month to switch to Vim from Sublime. There are certainly parts of this article that are true... it is hard to setup initially, but it's not two years, and it's not ugly. For me, the monospace fonts means that EVERYTHING in my vim window is aligned correctly.

Believe it or not I use Vim partially because it allowed me to set up the prettiest editor possible. Sublime just LOOKS bloated to me at this point.

I'd say by month 3 I was doing things faster in Vim. It had NOTHING to do with movement around my screen (though I certainly love that as well). It had everything to do with tailoring my editor to do what I wanted it to do when I performed certain actions / key commands.

In the end I think Vim is a fingerprint. Mine is different than yours. That's pretty awesome and certain of us really want that.

What I will say is that the vimscripts website is garbage. That is absolutely true.

Whoa, I had no clue you could do all that. Did you follow any guides? I'd love to see my folder structure and be able to switch colors.
If you're someone that is coming from Sublime and are used to its features, I'd start with this consolidated plugin repo. It's unmaintained now, but was an excellent primer for me on how to set up the guts of my vim setup.

https://github.com/fatih/subvim

I ended up modifying it pretty drastically over the course of a month. And essentially I think that's why the author stopped maintaining it. Everyone will set up vim their own way. That's kind of the point.

>switch colors

If you have gnome terminal you can use different built in themes and fiddle with the color pallet.

[warning: high-contrast light theme] http://i.imgur.com/tITUU55.png

I have to ask, being that I am a designer too, do you find it awkward to move from Vim keybindings into design programs? I have an interest in learning Vim, due to all of the vehement and myriad posts about productivity increase, but I can't divorce myself from the design programs I use (~80-90% of my day, Adobe/Sketch) and their keybinding philosophies in order to feel very comfortable switching directly to Vim and back.

MacVim solves this for me to some extent, but since I don't have the time to dedicate toward learning the veritable library of Vim commands I find myself returning to Sublime over and over again.

Text programs and design programs are already so different it's never a problem.

I'd equate it more to using your mouse for everything in photoshop or spending the time to learn that V selects the arrow key, and G selects the paint bucket.

Once you learn vim commands it's more a problem of using regular text fields (like the one I'm commenting in now). Right now I really want to use Vim key commands, and have to tell myself to Shift-left to get to the beginning of this line.

Is the screenshot supposed to be impressive? It has all the constraints the post mentioned.

>Sublime just LOOKS bloated to me at this point.

There are tons of themes you can use, including some far more minimal than your Vim screenshot. Don't know exactly what "looks" bloated.

I guess bloat is subjective. Your setup looks nice and I'm glad you found something that works for you. But on the flip side, it "looks" bloated to me, too— any reasonably useful Vim setup will have at least a dozen or so plugins and/or an intricate .vimrc.

Sublime Text did almost all I wanted out of the box. Maybe it has more functionality than I need, but it won hands down in terms of installing (and maintaining) software in order for it to be usable for me.

FWIW, since I abandoned Vim as my main editor, I just grab spf13-vim[0] when I want to use it. It's still really handy to be able to type vi foo to edit a file at the command line.

[0]: http://vim.spf13.com/

Or just use vim in Sublime Text through vintage mode or the vintageous plugin. I use mouse navigation plenty when browsing code, but a mouse is never going to be as effective at routine tasks like changing text inside a matching bracket, switching case, etc., none of which require dealing with vim plugins. Sure, all those things can be done through an IDE like ST without vi bindings, but only by memorizing even stranger meta key combinations that don't combine into a powerful grammar like vi.
I do this and it's really the best of both worlds.
Yeah I came in to say using vintage mode + VintageEx is fantastic and what I spend 80% of my time developing in.
Sometimes I love my job.

Sometimes I read posts like this and think I should get a job at a research station in Antarctica so I don't have to watch the collapse of civilization when one of these people convinces banks to switch to Go and hype.js.

"Everyone talks about the steep learning curve but no one talks about what happens once you finally get hjkl in your brain for movement. The answer is months of frustration, followed by finally having a usable editor, followed by knowing some cool tricks that you use in 1% of your daily workflow."

I've seen a lot of people saying this. I've met people who actually experienced this. And I can't listen to it anymore - so I've decided to write a book about how I learned Vim quickly, and how everyone can do this as well[0]. People just don't learn Vim the right way.

There's no need for months of frustration!

When I was starting with Vim, my friends were telling me something like "Just give it a few weeks, and you'll never want to switch back.". However, in every previous attempt to become good at Vim, I would give up after couple of days. Not because I'm someone who give up easily, but because I had lots of work to do.

And with every attempt of switching to Vim, I would spend most of my time on fighting with my new editor and not on the actual work.

The thing is, I didn't have to put so much effort when I first tried Sublime, or when I tried to switch to Textmate. They were downright pleasant.

What my friends were telling me (btw, advanced Vim users), was something like:

- "Turn off the arrow keys, it's not the Vim way..." - "Force yourself to use keyboard all the time, don't use mouse at all!" - "You have to learn x commands, and y things, so you could do z stuff..."

Then I realized - that was wrong! So, in my last (and the succesful one) attempt to switch to Vim (and finally learn how to be productive with it), I decided to don't listen to my "Vim masters" friends. I just decided that in the first couple of days, I'll try to use Vim as any other editor. Just like simple Notepad. No commands, no mappings, no plugins, etc. Just editing text. And that's how it all started.

With using some learning techniques, I've managed to get good at Vim really fast.

For example, if you can't get used to, or you're not productive with h j k l keys for movement, just don't use them. I don't use them. I use arrow keys all the time. Vim "masters" will probably judge me because of this - cause it's not the "Vim way". So what? I don't care. Arrow keys work for me the best, and I'm happy with it.

[0] - I'm in the process of writing a book - Mastering Vim Quickly (from WTF to OMG in no time) link: http://www.jovicailic.org/mastering-vim-quickly/

For example, if you can't get used to, or you're not productive with h j k l keys for movement, just don't use them. I don't use them. I use arrow keys all the time. Vim "masters" will probably judge me because of this - cause it's not the "Vim way". So what? I don't care. Arrow keys work for me the best, and I'm happy with it.

I started using elvis and vim somewhere in the nineties and used the cursor keys until ~five years ago. I like hjkl more now, since I don't have to leave the home row and the cursor keys are awkward on Macs, but there is indeed nothing wrong with using the cursor keys if it's more convenient.

My approach to learning vim has been the following: start using it as any text editor until you are comfortable. Then take O'Reilly's vim pocket reference. Look for a command/movement that you think would increase your productivity. Try to integrate that command (and only that command) in your workflow. If you believe after a week that it indeed improves your workflow and enters your muscle memory, keep it, otherwise drop it.

Repeat this for some month, and you'll quickly learn the commands that increase your productivity the most.

If you don't mind me asking—where are you from?
We're from the same country my friend ;)
Nice to see that! Your upcoming book seems promising. I'll make sure I keep an eye on it :)
Yeah, I've been using Vim as my main editor for around 15 years, and I still use the arrow keys.
This was my approach as well. When I started using Vim I used it almost like a normal editor, and spent most of my time in insert mode. Gradually I started spending more time in normal mode, and eventually I incorporated more advanced features like text objects and surround.vim into my daily editing.

Mastering Vim takes time, but the slope to learning it is pretty shallow. Learning Vim doesn't feel like a chore to me, because I just pick up new commands every so often.

I just don't get it. The only difference between SublimeText and a GUI version of Vim is that the keyboard shorcuts in SublimeText don't follow the same command/movement patterns as Vim.

And unlike the author, I feel qualified to speak on this as I've been using Vim for 10 years and SublimeText since version 1.

ST is fancy. It's also pricey. I can save you $80 and give you a script that will set up Vim and all the cool plugins you'll need. In fact I've done just that for some of my students.

It's the blog post I was born to read. Thank you for writing this.

The amount of stupid tedious pain you're supposed to go through with vi in order just to get a basic working editor is ridiculous. Like some kind of nerdy rite of passage. No thanks.

I would recommend Atom over Sublime Text if for no other reason than it being open source. But Atom also has the might of github behind it and a very fast growing community.

I love vim's editing commands: moving through a document, deleting, copying, etc. I think it's by far the best way to edit text. I hate everything else about vim. I find project wide search, finding and opening files quickly, shells and repls inside of vim, etc to all be subpar compared to vim's competition. I'm currently giving emacs with evil mode a try. Although not perfect, it does address most of my vim concerns after using vim for about 4 years.

No. I'll keep using vim, because I'm efficient in it and I enjoy using it.
To be fair, the article explicitly states the following:

> TL;DR I cannot in good faith recommend Vim to a new developer, even though I use it.

Since you're already familiar with vim, you clearly aren't in the target audience.

Yikes. I've been trying to use vim without plugins for 15 years. I'm glad somebody told me it's unusable, otherwise I may not have noticed.
Same here, 15 years. If it wasn't for this article I would have not noticed as well.
I really want to like sublime but the rules around its extensibility are too rigid: you can't change the UI.

As a Vim user I feel like we are all just waiting for either Atom to become fast or for NeoVim mature.

I think many of these comments are failing to mention one of my primary reasons for using vim... the power of being able to use the same editor in a GUI and a shell. It takes me at least a day to setup my workstation for development but if my laptop crashes I can always SSH into my workstation VPS and get work done. It's also nice to be able to edit server configuration files with the same editor that I write code in.

Vim isn't for everyone but if you're a power user that wants to master one text editor and use it for the rest of your life then Vim is that text editor.

Read 2 books to use Vim? Seriously, w.t.f? Just give it 2 weeks using Vim.