Live data from Hacker News

Why, oh why, do those nutheads use vi?

viemu.com

111–120 of 228 posts

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

#111
post #73

Earlier quoted context omitted.

> All of this, except the 20 minutes part. I'd hate > to have to spend that much time with one of these > "enlightened" editors. Did you have this same resistance to learning when you learned the languages you are presumably programming in? "I'd hate to have to spend 20 minutes with Ruby, just let me describe my program in 'real' language please."

> Did you have this same resistance to learned when you learning the languages you are presumably programming in? Speaking for myself, no. My reasons for disliking "enlightened" editors are similar to my reasons for disliking alternative keyboard layouts. If I can only be fluent in a highly specialized environment, in a sense, my skills become less portable. I like being able to walk up to someone's computer and just…

  > If I can only be fluent in a highly specialized
  > environment, in a sense, my skills become less
  > portable. I like being able to walk up to someone's
  > computer and just use it or help them with their issue
This is a non-issue. There are no versions of Windows, Linux or OSX that allow all text boxes to use Vi keybindings. The idea that if you started using Vi or Emacs bindings in an 'enlightened' editor, that you would lose the ability to edit textboxes on other computers is a straw man.

You could similarly say that you don't want to use VisualStudio because it would affect your ability to help out Eclipse users or vice versa.

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

#112
post #104

What I want to know: how good is the best autocompletion available? Does it stack up to Visual Studio's Intellisense? (For statically typed languages, that is; Intellisense doesn't work very well for eg Javascript).

I used to hook up auto completion to my tab key in vim, worked fine in c/c++ at the time. It would pop up a window of the options, but I stopped using that feature at some point.

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

#113
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.

As someone who used emacs for 8 years, then swiched to vim and used that for 4 years, and then switched back to emacs 2 years ago -- my personal experience is that being forced to use anything which isn't vim or emacs will give me fits and make me cry, but switching from one to the other is mostly fine.

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

#114

> Do whatever you want. Don't learn it if you feel it's too much effort just for nothing. Learn emacs instead. Or stay in your IDE using a lousy editor. Whatever. Why do all articles about how wonderful vi is end with condescension? Anyway: vi -> fast editing. IDE -> fast maintenance. I know which one I'd choose. The text editing features of an IDE is not why people choose to use IDEs (note: of course this helps best…

Oh! I read over the line that says that the author is actually developing a Visual Studio plugin to close exactly this gap. That's cool. Also puts what I took for condescension in a different light. Anyone used it? I might consider learning vi bindings decently if I can keep getting all the IDE goodness.

I use cscope as my backend for vim, there are other ways to get your IDE going. Adding a vim emulator would not be as good as just using vim, imho. http://sourceforge.net/projects/vimplugin/ is the vim plugin for Eclipse if you can't live without Eclipse. I can't live without vim, myself ;)

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

#115

One of the great things about vim is that even if you use it as your regular editor (I use MacVim), you tend to learn something new every time you read a new article. Today I learned about the '.' command. Also, old discussion on same article: http://news.ycombinator.com/item?id=151637

Yeah, I've never used the autoindent command before, either. Oops.

Been manually indenting stuff with :,,s/^/\t/ for years now, oof.

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

#116
post #99
post #97

Earlier quoted context omitted.

Well, I use Xcode because the performance loss in writing Objective-C without autocompletion is larger than the performance gain from using vim. However, navigation is just so painful , and "awful" is really being kind about Xcode's find/replace.

Is there no suitable vim autocomplete script for Objective-C?

How well does the clang autocomplete work?

http://www.vim.org/scripts/script.php?script_id=3302

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

#118
post #104

What I want to know: how good is the best autocompletion available? Does it stack up to Visual Studio's Intellisense? (For statically typed languages, that is; Intellisense doesn't work very well for eg Javascript).

To be completely honest if you were impressed you shouldn't have been. Learn your IDE!

Apart from the douchey tone of the article, the thing he misses is that most editors can do this stuff, you've just got to make a bit of an effort to find out how.

Emacs/Vim force you to learn this stuff as they suck without it. That's one of the big difference between Vim/Emacs and others, people don't realise they can do so much more with IDEs.

For example in VS2010 with the MS productivity tools extension:

Example 1: Use ctrl-shift-r/ctrl-shift-p (temp macro), actually less typing than his example due to auto-bracketing. Also learn how to use snippets.

Example 2: I'm dubious on the value as believe this would require cognitive effort that I'm using for the code. I suspect hunt-and-peck (and only 4 or 5 keystrokes using ctrl-arrow at that) is probably better than switching mind modes to figure out the best cmd. For example won't handling entry.key().equals(qk.key) instead require different keystrokes, hence thought?

Example 3: Use End, Shift-Home or Home, Shift-End instead

Example 4: Use home, end, ctrl-pageUp, ctrl-pageDn to mostly deal with this

Example 5: VS does this automatically on paste, so no typing at all required. If it really struggles you can use shift-},tab to indent an entire block, assuming starting on the { as the article does.

Example 6: VS highlights end tags automatically without you even having to press anything, there's probably a command to select the enclosing block but I've never looked as it happens so quickly I don't think it's worth the time, here I just End, shift-upArrow a few times or go to the mouse. Deleting a whole block of code generally requires some thought about what it was doing, you're not in edit mode at the point of deletion. If you're looking for multiples then ctrl-F (find) will highlight all instances of the word your cursor is on, this is easier with productivity tools installed as it doesn't open a dialog. And VS also has the excellent rename all instances of this variable only in the right scope.

He keeps banging on about fingers staying on the home row, but I don't really notice moving to the arrow keys, perhaps it's cognitively similar to switching to/from insert mode.

I had to actually do all of them a few times to be able to write them down as just like Vim/Emacs, that's all muscle memory to me now.

NB for example 5/6 I highly recommend changing the default colour of highlighted start/close tags in C#, the gray MS uses is far too light given how important it is. This is pretty much the only colour I have ever bothered changing from default.

The other massive productivity thing in all editors if you didn't know it is ctrl-arrow, moves along words instead of single instances. Holding shift works as expected and you can hold shift-ctrl with one little finger. But I'm sure everyone knows that one.

In regard to the productivity tools, I would turn off the auto-correct mixed tabs as it moans all the time when you look at downloaded code and also 'Quick Access' too as that's annoying.

All that power without months of learning a new way of using a text editor.

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

#119
post #95

> Do whatever you want. Don't learn it if you feel it's too much effort just for nothing. Learn emacs instead. Or stay in your IDE using a lousy editor. Whatever. Why do all articles about how wonderful vi is end with condescension? Anyway: vi -> fast editing. IDE -> fast maintenance. I know which one I'd choose. The text editing features of an IDE is not why people choose to use IDEs (note: of course this helps best…

"Why do all articles about how wonderful vi is end with condescension?" Because one way to get someone over the initial learning hump is to "encourage" them by challenging their manhood. Same principle behind a boot camp sergeant telling every single incoming group that they are the worst bunch of nambypamby girliemen he's ever seen and he's been in this army for 25 years and that he will consider it a personal failu…

Comparing vi to an IDE is like comparing a screwdriver to a fully automated car assembly line... it is completely beside the point and they each have their purpose and downsides.

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

#120

I want to meet a dvorak keyboard user who is passionate about vi.

I'm one of the really blasphemous vi nuts who uses both Dvorak and the arrow keys for movement. I keep a very minimal vimrc, and I don't use or remap the standard hjkl keys. But that means I can also seamlessy switch between multiple IDE's with vi-compatible modes, and have zero problems using vi/vim on machines that don't yet have my vimrc set up. I feel that it gives me a superior editor with a superior keyboard layout, and the flexibility to use some of the best tools for the job.

For the record, I use a "Tenkeyless" [1] quality keyboard, and depending on what languages I'm working on, I use:

- vi/vim for editing one-off files or small, isolated projects

- Sublime Text 2 with vintage mode for Python or PHP projects

- Eclipse with Vrapper for Java/Android projects

- Visual Studio with the OP's ViEmu plugin for C#/Xna projects

I'm pretty freakin' happy with my setup.

1: http://elitekeyboards.com/products.php?sub=leopold,tenkeyles...

Post reply on HN