Live data from Hacker News

Why, oh why, do those nutheads use vi?

viemu.com

51–60 of 228 posts

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

#51

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

I'm extremely passionate about vim, and I cannot type with a plain QWERTY keyboard. It's really not a big deal. I remap h,j,k,l to d,h,t,n (and n to l so I can search) and I'm off to go.

The one problem I have is that my vimrc/.vim stuff is all customized far enough that I can never use any of the vim-like emulated modes in other text editors. I think evil-mode may be possible if I wanted to learn how to configure emacs at all, but it's generally not worth the hassle. I'm not sure about the particular Visual Studio plugin that the link is to, but one of the two doesn't allow remaps, for instance. It's generally not a problem to use j/k for short periods of time at least. My big problem Dvorak wise is Nethack which is sort of a pain. I bought a Qido USB layout switcher to make games like that possible.

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

#52
> 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 if you use a well-supported statically typed language - a Ruby IDE can't be as awesome as a Java IDE).

Also, there could perfectly well be good IDEs with good Vim key binding support. This would be a wonderful mix of two worlds, and finally end this stupid discussion. I believe at least Qt Creator has a half-decent FakeVim mode baked in.

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

#53
post #21

I use vim for about a year or more, and I like it, however I'm still having trouble with copying and pasting tiny fragments of text. Maybe someone can help me out with this? 1) If I yank a line with yy, pressing P or p will insert the text into a new line. 2) If I go to visual mode and select a region, yank it with y, then press p/P, it gets it inserted into the current line. That is, vim preserves new lines. What I…

Whether it pastes a newline or not depends on whether you yanked one. I guess this is what you mean by "vim preserves new lines". Don't all editors work this way? If you want to yank a line character-wise, you would do something like ^y$. I have Y mapped to y$ for this sort of thing. You cannot yank a substring of a line line-wise. That doesn't really make sense. I typically open a new line with o and then paste in i…

Don't all editors work this way?

Seems like my description was incorrect. I meant that there are two ways to deal with text: line-wise and fragment-wise.

In most other text editors, if you copy a line, and then paste it, it gets pasted into the cursor position regardless whether you copied a line or a fragment (fragment-wise). In Vim, lines yanked with 'yy' disregard the cursor column and get pasted into a line above or below, while fragments yanked with 'y' (e.g. '0y$'), take into account the column.

I like how in Vim you can do line-wise editing, but I just miss an easy way to paste text to the position starting with the current column regardless of the way I yanked it.

PS Thanks everyone for replies!

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

#55

Whenever I am using a program other than vim I feel clumsy. Plugins for Eclipse, Chrome and so on will only bring you so far. The other way around, namely turning vim into a multipurpose IDE does not satisfy my needs. One needs to admit that some features (refactoring support in Eclipse for example) cannot be matched by the available vim plugins. I know there are other solutions, like eclim, but I am looking for some…

Here is one in C# https://github.com/jaredpar/VsVim/

That's not what the GP meant. He meant getting Vi key bindings in any imaginable text field.

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

#56

Earlier quoted context omitted.

Whether it pastes a newline or not depends on whether you yanked one. I guess this is what you mean by "vim preserves new lines". Don't all editors work this way? If you want to yank a line character-wise, you would do something like ^y$. I have Y mapped to y$ for this sort of thing. You cannot yank a substring of a line line-wise. That doesn't really make sense. I typically open a new line with o and then paste in i…

Vim's preserving of new lines is more awesome than that of lesser editors. If you have This is a test ^ with your curser at the carrot, and you type 'yyp' you will get This is a test This is a test Rather than This This is a test is a test

Yes, but can you make it paste the second way if you yanked with 'yy'? That's my problem.

Edit: aha, pasting in insert mode works like this!

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

#57
post #24

Earlier quoted context omitted.

What's the biggest OS distribution that does not have vi mapped to vim by default these days?

The last time I used AIX (I believe it was 5.3), it had old-school vi on it. I would bet this is true of newer revisions of AIX, as well as other commercial UNIX(tm) systems. I would also not be surprised to learn that some/most of the BSD systems still use it.

I don't think any of the free BSDs distribute the classic vi by default anymore, but they've standardized on nvi rather than vim as their "enhanced vi" of choice.

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

#58

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

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

#59
> The first time you stumble into vi or vim, you are shocked and disgusted that you have to use 'i' to start typing text. Can't remember which of hjkl moves in which direction. And you need to press 'a' if you want to insert after the last character of the line. Since you're already probably used to other editors, and if the arrow keys work in insert mode (they do if the system is configured properly, which is over 90% of the cases), you will stay in insert mode and not go back to normal mode except if absolutely necessary. You'll probably spend 20 minutes with it, and never go back.

All of this, except the 20 minutes part. I'd hate to have to spend that much time with one of these "enlightened" editors. Just let me use my arrow keys, please and thank you.

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

#60

Earlier quoted context omitted.

Pleasure to meet you. Not sure how much passion you require. I'm not exactly head-over-heels with vim, but I have been using it for about 7 years and dvorak for about 3. Anything in particular you want to ask?

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

If you're a little pragmatic about it like me, you can still use the arrow keys to move around, at least in vim this works out of the box.

I've been using VIM for over a decade now, and learned to make good use of many of its features, but I've never had the urge to stop using the arrow keys. Except when working remotely to some ancient Sun or HP box that only has vi, or some crappy terminal settings that mess up the arrow keys.

The idea behind hjkl is that it's supposed to be faster because you don't have to move your hands away from the letter keys, but in practice, I don't actually move around in single-character increments that much when editing anyway.

All I want now is XCode with VIM bindings :-(

Post reply on HN