Live data from Hacker News

VIM Pays Excellent Dividends: Learn it early, if you can

medium.com

21–30 of 65 posts

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#21

Earlier quoted context omitted.

Full quote, for context: Being conservative, let’s say it makes you 5% more productive. It's subjective. I'd like to see a before and after study, but empirically measuring code productivity is -- a hard problem.

It might no be too hard in this case, since you're really testing editing speed not code productivity. You could take a random selection of (small) git commits and time how long it takes people to recreate them. That maybe gives Vim an unfair advantage actually since the IDE features help more while actually composing code, rather than just editing text. Still I think it could be measured.

I think the focus on speed is counterproductive. Increased productivity isn't the only — or even the most important — measure of value.

I enjoy using Vim (Emacs Evil mode these days) because I can edit more fluidly without having to shift focus and context switch. My hands stay on the keyboard, my eyes stay on the screen, and I don't have to think about "how" to achieve my goals — I just think about what I want to achieve and muscle memory takes care of the rest.

I might edit more quickly, but that's a side effect of using a tool that allows me to focus deeply and maintain that focus for longer: both of which are vital to flow and satisfaction with my work.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#22
post #5

This is a huge thing I've been thinking about lately. Very recently I was a pretty staunch advocate for IDEs and thought the whole VIM situation was crazy. It is unintuitive. It doesn't come bundled with lots of useful tools. It takes some configuration if you want nice things (e.g. file tree on the side). Over winter break I decided to really commit to becoming productive in VIM. I stopped using VSCode and I stayed…

I use VsVim in Visual Studio, highly recommended.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#23
I find using Vim more natural when I'm spending time in the command line. I'm an entrenched Windows user but I love the power of the linux command tools.

Now thanks to the GNU Tools packaged with Git, you get Vim and OpenSSH as lovely extras. It's really nice to be able to switch back and forth between editing on Linux via SSH in Vim and then back in Windows.

If you're searching around and moving files via the DOS prompt, getting your daily Docker/Vagrant fix it becomes much more natural just to open Vim edit the file and close it.

Plus you can add the solarized colours to the DOS prompt and you get lovely syntax highlighting too.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#24
post #14

I've been interested in using vim and am not completely useless at using it, but I haven't quite been able to commit to it. The main reason is that I'm not sure it's any faster than using IntelliJs products well. Last time I mentioned to a coworker who is a vim user, that I was thinking if switching to it, he said he was thinking of switching to Idea after seeing me use it.

Buried in my footnote is the real gist is: learn your editor, deeply. IntelliJ is a great tool, too.

VIM'er here. I use IntelliJ-Pycharm when i'm really strappin in for a good DEV session. Plus you get the ideaVim plugin and i've got the same VIM magic I know and love. Plus all the fancy IDE stuff. Some will say you can upgrade VIM to IDE level (project tree, auto complete, other fancies) which is totally true. I dont got time for dat.

Other bonus for vi is that you are now capable of editing files on any unix server in the world.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#25

I've used vim and emacs. I can't claim to be an expert on either, but I am somewhat comfortable with vim and it can be convenient for any unix straight out of the box. But I found it to be fairly overrated even with all these claims of boost in productivity. Just use Sublime Text in this day and age and use the spare time you would've had to learn vim and do something more useful.

Usually when so many people are saying something, and one's reaction is "I don't get it, I guess I'm missing something", they are, in fact, missing something. You can't really know what vim does for you until you commit to it and actually use it. Then over time the usefulness gets greater as you learn more things.

If you expect everything to be completely apparent to you the first time you look at something, that says more about your approach than the value of the tool.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#26
post #23

I find using Vim more natural when I'm spending time in the command line. I'm an entrenched Windows user but I love the power of the linux command tools. Now thanks to the GNU Tools packaged with Git, you get Vim and OpenSSH as lovely extras. It's really nice to be able to switch back and forth between editing on Linux via SSH in Vim and then back in Windows. If you're searching around and moving files via the DOS pr…

You know Cygwin has been around for ages and has done this forever. You didn't need to wait for some big bundle of git to arrive on Windows for this.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#27
post #15

I've used vim and emacs. I can't claim to be an expert on either, but I am somewhat comfortable with vim and it can be convenient for any unix straight out of the box. But I found it to be fairly overrated even with all these claims of boost in productivity. Just use Sublime Text in this day and age and use the spare time you would've had to learn vim and do something more useful.

I've always been wondering if there is some secret that I've been missing and that these VIM or Emacs gurus keep to themselves which makes them "more productive". All these abstract claims in blog posts and on forum pages about productivity are completely worthless. Go watch a stream where you can actually see someone program. Maybe you'll pick something up that they do better/faster/more elegant than you. Other than…

I don't know about being more productive but I use commands like 3cwfoo to replace the next three words with foo. Or 2cf,foo to replace everything including the second comma on the current line. Or some : command. I no longer even consciously think about such things as how vi works is something I know in my fingers. Originally I learned such things only after repeating some command multiple times, thinking there has to be a better way, and then learning the more powerful commands. The core set of vi commands is quite regular and once you learn something it can be applied in other situations.

If I am working with another expert vi user it is very easy to give him precise instructions - I can just say things like replace the second foo with bar on every line starting with a space and he'd know to type the correct : incantation.

The key is to pay attention to your inner voice saying "there has to be a better way" and doing something about it! Bottom line: learn to know how to use your everyday tools well.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#28
post #26
post #23

I find using Vim more natural when I'm spending time in the command line. I'm an entrenched Windows user but I love the power of the linux command tools. Now thanks to the GNU Tools packaged with Git, you get Vim and OpenSSH as lovely extras. It's really nice to be able to switch back and forth between editing on Linux via SSH in Vim and then back in Windows. If you're searching around and moving files via the DOS pr…

You know Cygwin has been around for ages and has done this forever. You didn't need to wait for some big bundle of git to arrive on Windows for this.

I don't think you need to wait for anything; I think he's describing MinGW that comes with a Windows install of Git. It's been around for a long time.

Cygwin vs MinGW is a whole other argument, of course.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#29

I've used vim and emacs. I can't claim to be an expert on either, but I am somewhat comfortable with vim and it can be convenient for any unix straight out of the box. But I found it to be fairly overrated even with all these claims of boost in productivity. Just use Sublime Text in this day and age and use the spare time you would've had to learn vim and do something more useful.

I've been thinking about this lately, and whether my preference for modal editors is a historical accident, an adaptation to the limited resources available when I was an undergrad, or whether there's more to it. I think there's more to it. What separates vim and emacs from editors with a more forgiving learning curve is that they embrace a separate language for editing that's distinct from text entry.

That's not to say that other editors lack a meta-language. Even Notepad has Control-this and Meta-that. But vim and emacs (and my new favorite, kakoune) are all about using the meta language to manipulate text as much as possible, and only doing text entry when text entry is truly called for. Subjectively, I feel more productive using one of these, and completely hamstrung by IDEs, even when they supposedly support vim keybindings.

Re: VIM Pays Excellent Dividends: Learn it early, if you can

#30
I can't claim to have ever "tried" to get into vim - in the sense of ditching my daily driver (Sublime/VS Code) and going 100% vim. I've done the vimtutor, I even know how to do basic text editing (cut, copy, paste, find-and-replace, visual mode highlight) in vim, plus some of those "magic" things where you can repeat an action multiple times (:2wi or whatever). And I'll happily fire up vim if it's something really quick, like making a list in a plain text file or something.

So what's kept me from going 100% vim?

1. Plugin/add-on support - I have no clue what's going on here. There's no clear guidance on what to use (vundle? pathogen?). I haven't really grokked how plugins really work - where do they come from? how do I search for them? where are they really installed? how are they organized in the install directory? do I need to care? etc (I'm aware this is all documented somewhere, and maybe I just need to make more of an effort). Whereas in something like Sublime Text there's an easily installable package manager that takes care of all these things for you. And if you really care to learn, you can drop into one of the packages and find easy-to-understand Python and JSON. Versus vimscript, weird config files and whatever else vim uses to configure things.

2. Multi-file support - Sublime has a Cmd + T fuzzy filename finder right out of the box. With vim (for a beginner) your choices are either: a) open multiple terminal windows with a single file in each, Cmd + Tab endlessly or b) open multiple files in the same editor and drop out of insert mode every time you want to switch files (way more keystrokes than Cmd + T or Ctrl + Tab; maybe there's a toggle file shortcut in Vim also). I'm aware that there exist plugins for fuzzy-file searching in vim also, but because of 1 I don't know how to find or install them.

3. Buffers and marks - I'm vaguely aware they exist. I'm not sure what they do and why they're important. Again, this one is probably on me rather than the tool itself.

Post reply on HN