Live data from Hacker News

Why, oh why, do those nutheads use vi?

viemu.com

191–200 of 228 posts

Re: Why, oh why, do those nutheads use vi?

#191
post #87

Earlier quoted context omitted.

I currently have 55 tabs open in IntelliJ (I counted). I have no trouble finding any of them. Side tabs and alphabetical sort are great.

...I have a persistent Vim session with ~600 files open. It's been in active use for over a year. It works great.

Yes, and? How is that related to "tabs don't work past about 20"?

Re: Why, oh why, do those nutheads use vi?

#192
If you use vim then I highly recommend mapping spacebar to page-down and shift-spacebar to page-up. This key is kinda useless otherwise and super-helpful afterwards. It is also the largest key on your keyboard. usability++

    nmap  
    nmap  
    vmap  
    vmap  

Re: Why, oh why, do those nutheads use vi?

#193
post #182
post #158

Earlier quoted context omitted.

Screwdriver - quick, cheap, easy to use, intuitive. Can be learned once and carried around with you. Car assembly line - lots of initial capital, specific to one kind of car, lots of time to learn. Seems like a valid comparison.

The point is: these comparisons always try to make vi seem like the always better choice INSTEAD of an IDE and this is were I completely disagree. And you make it look just like that with adjusting the comparison in favor of vi, the screwdriver. This is just wrong. Let's see, you could also say: Screwdriver: specific to only one type of screw, limited to only a couple of similar sizes and all you can do is drive scre…

If I thought an IDE was better for large Java projects than vim, then I'd use an IDE instead of vim for large Java projects. You'll find that many vim users do not use an IDE because they've found it to be more productive for them to use vim + command line instead. In those cases, there is clearly a choice being made about IDE versus vim. If you want to be pedantic about the fact that vim is just a text editor, then just imagine that whenever someone talks about using vim instead of an IDE or compares vim to an IDE, just replace "vim" in your head with "vim + command line". If you do this, you will better understand what they're saying and you won't have to get on the apples-and-oranges soapbox quite so much.

Re: Why, oh why, do those nutheads use vi?

#194
post #182
post #158

Earlier quoted context omitted.

Screwdriver - quick, cheap, easy to use, intuitive. Can be learned once and carried around with you. Car assembly line - lots of initial capital, specific to one kind of car, lots of time to learn. Seems like a valid comparison.

The point is: these comparisons always try to make vi seem like the always better choice INSTEAD of an IDE and this is were I completely disagree. And you make it look just like that with adjusting the comparison in favor of vi, the screwdriver. This is just wrong. Let's see, you could also say: Screwdriver: specific to only one type of screw, limited to only a couple of similar sizes and all you can do is drive scre…

Solution: Use an IDE plugin for vi-style bindings.

Dudes on assembly lines use screwdrivers.

Re: Why, oh why, do those nutheads use vi?

#195

Earlier quoted context omitted.

Easier for a beginner ≠ better for an expert.

The goal of a new text editor shouldn't be to make things better for people who are already experts on an existing platform. It should be to make it better for beginners on the new editor (because initially, everyone is) and better for them when they become experts. Saying "I'm an expert at vi, and other editors don't work as well for me" is a pretty meaningless statement. Of course they don't. It's like saying "I sp…

But that's not what people are saying. What people are saying is that Vi is better for Vi experts than Blub editor is for Blub editor experts.

Re: Why, oh why, do those nutheads use vi?

#196
post #81

Earlier quoted context omitted.

Don't ever start using emacs. After you do, any text editor that you are forced to use that doesn't have emacs key bindings will give you fits and make you cry. Learning emacs is your standard process of enlightenment and elation followed by a lifetime of disappointment. Think about how you'd feel if you ate the best meal of your life at age 13, and the restaurant where you ate it went out of business the next day. Y…

As someone who used emacs for five years before switching to vim, my personal experience was that the top-level comment is more true than this one.

That's because the Emacs comment missed Emacs's greatest feature: elisp. Adding functionality--even fairly complex functionality--to Emacs is much easier than extending any other editor I've used. Here are a couple of great examples from the last week for me:

I am currently taking a compiler course where we are implementing a particular language not entirely unlike--but not entirely like--Lua and Python. As part of the process, we need to churn out quite a bit of test code. Naturally, Emacs does not support this language by default because this language only exists as an implementation exercise for a couple of projects; however, creating a useful mode that does syntax highlighting and indentation--basically all you need to program comfortably--only took about 100 lines of code and less than an hour of programming!

Apart from my studies, I also work part-time at a startup. As part of this, I have to use and maintain a bunch of remote AWS machines that do all sorts of things: hosting, continuous integration, staging... I noticed that I was opening a lot of shells both locally and remotely. Writing up a command bound to a global key-stroke that prompts me for a name, opens a shell in the current directory (including remote directories!) and sets the prompt of the shell to its name literally took five minutes. And now I've saved a lot of time managing all my shells.

Being able to make my editor do exactly what I want with a trivial amount of effort is magical.

Re: Why, oh why, do those nutheads use vi?

#197
I started attempting to properly learn vim a couple of weekends back, watched a load of vimcasts (http://vimcasts.org) and got my vimrc file all set up, but rushing to get things done before a release meant I switched back to sublime within a couple hours. Perhaps not the best timing!

Can anyone recommend a good plugin for switching between files frequently - as in the Command-T shortcut in textmate/sublime. I did try the CommandT vim plugin, but didn't find it as good as the implementation in sublime.

Re: Why, oh why, do those nutheads use vi?

#198

Earlier quoted context omitted.

I imagine the mnemonics make it work reasonably well, but what about hjkl? Do you really get used to having those spread around?

Yeah. Adjusting to typing in Dvorak took me considerably more time and effort that getting used to the new shortcuts. Luckily, Dvorak isn't that bad for this. For instance, 'j' (down arrow) and 'k' (up arrow) are still next to each other, in the same order. 'h' (left arrow) and 'l' (right arrow) are not, but when you have your right hand in the starting position, their location and distance is very similar to where t…

Heh, not at all related, but do you really find it harder to type qwerty? I personally find that typing a bunch of letters that are all beside each other is actually harder than typing normal words.

Re: Why, oh why, do those nutheads use vi?

#199

Earlier quoted context omitted.

It seems quite powerful, but overall vi still overwhelms me with all the options and functionality... I'm trying to learn more about vi/m (and emacs) as I get more into Linux development, but I think a lifetime of Windows has damaged me, mentally

In fact learning vi/m is a lot like learning to play a music instrument. It is a pain to start using vim. But if you reach a certain level you start improving more and more. Concerning vim, it should takes some weeks to be as efficient than with notepad. I written this article which also might help you: http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressiv... Don't give up! It will pay faster than you think.

Honestly, when I was younger, I used to use vim when collaborating with other programmers to impress them, and then use an IDE most of the time when noone was looking. But then something strange happened, I began building up the muscle memory and eventually preferred using vim over an IDE. It seems like every year, if I take the time to learn more about vim, I become twice as effective as the year before. There seem to be an infinite amount of new things to learn, constantly making my life easier. I've been with it 4 years now, and will never go back to an IDE.

The coolest thing I learned this year is the '. command, which will go to your last change. So, you can be editing a program/script, run it, and it has an error. Most of the time you want to go back to the last modification, so just type: '. This even works, at least on my system, after closing and re-opening the file. Related to that, you can type g; and g, to go through next/previous modifications.

Post reply on HN