Live data from Hacker News

Why, oh why, do those nutheads use vi?

viemu.com

171–180 of 228 posts

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

#171
post #159

Earlier quoted context omitted.

How does VS2010 compare to vi when making a change to a config file on a remote machine? 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. It's slower. I still move to the arrow keys in vi for some reason, and it noticeable slows me down when I do so. The physical movement of your arm there…

I'd honestly love to see some videos. I want to see how it is faster, what it could give me. If it is I'm all for jumping ship, I've honestly never seen a Vim/Emacs master at work. I have tried to find video examples before because I want to see if it is worth learning. I am only pointing out that all the author's examples are achievable in most IDEs, you just have to learn. There's nothing special or magical there.…

I don't have videos to hand, but the vi master I know is a sysadmin rather than a coder - lots of glue code and config changes. I can't say I've watched a full-time programmer code in vi.

When I first starting playing with linux, I watched him get into a remote machine, replicate a few blocks in a conf file and customise them in vi, then restart the service, all in the time it would have taken me to simply complete my Windows remote desktop request.

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

#172
post #152

Earlier quoted context omitted.

So a 4000 word article that includes character-by-character examples for newbies doesn't count as 'the minimal level of respect'?

That's fine, but ending on a disrespectful tone is generally a bad idea.

I don't see the above quote as particularly disrespectful in context. It's a bit like a friend who has just spent half an hour talking you into going for that new wonderful job, and says 'or you could stay in your crummy current job'.

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

#173
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).

For all your programming needs I would highly recommend JetBrains products. I am currently evaluating PyCharm and their JavaScript and Python editors are awesome. I was mostly using vim and tmux for Django development until now. Using vim plugin in PyCharm feels really 21st century. It kinda feels like VisualStudio + ReSharper (also a JetBrains product) for .NET

We await the day when they produce the last word in parenthesis-based IDEs.

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

#174
Reading the article and the comments here, I came to the conclusion that I seemingly don't really use vi. As in: I don't live in it.

On a typical day, I work with my files using grep, awk, bash, python, sed, make, cat, xargs, etc. And, of course, vi.

But I don't really use it like some (most?) people here seem to do. I don't list and navigate through files in vi (I use tree, ls and find for that). When I use vi, it's mostly for short bursts of manual editing. Occasionally, vim's syntax highlighting comes in handy - but that's about it.

Don't get me wrong: that is exactly why I _love_ vi. It starts fast[0]. It fits in pretty well with the rest of the unix environment (it can read stdin, for example; and with vim you can open multiple files given on the command line - and you can construct that file list with any of the standard unix tools, of course).

So, for me, the question "IDE or vi" ends much earlier. I don't even come to the point where I could discuss editing features. Can't read from stdin? Doesn't start in less than 1 second? Doesn't fit into my work-flow.

Of course, vi(m) is a great editor, for all the reasons mentioned here and in the article. But the unix user-land has some great tools, too. And it includes vi. So it is by definition an even better editor than vi. :-)

So that's what I use.

[0] Believe it or not, emacs starts still too slow for me. These one or two seconds tend to disrupt me a lot (I've tried it, with GNU emacs). And, as I said before, I invoke my editor pretty often, maybe 50 times a day.

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

#175

Earlier quoted context omitted.

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…

Example 1: use q to make a macro and then invoke it with @ and it would be even less typing. There are many, many ways to edit in vim. Example 2: If you press dW it deletes the whole word. which would be the entire entry.key().equals(qk.key) string. dw would delete up to the period. d2f) would delete up to and including the second right paren from where you are. I personally use delete whole word a lot. Example 3: th…

You kinda missed the point of my comment, it's just demonstrating that there's nothing amazing about any of his examples.

I'm not denying some things are faster in vim, but other things are slower.

What I take umbrage with is when someone posts a load of examples like this where they can all be done in your favourite IDE but the author's just too lazy to find out if they could be and so declares the magic of Vi or Emacs compared to [insert everything else here].

Often it's like saying 'look my car's got windscreen wipers, all your cars suck'. Um, mine has windscreen wipers too dude.

See my response to vacri, if you've any examples, please do share. I honestly will switch if I could see a sizeable productivity gain.

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

#176

Earlier quoted context omitted.

Easier for a beginner ≠ better for an expert.

I'm actually quite satisfied in being a perpetual "vi beginner". With regard to Linux however, I started using it (professionally too) before most people (including IT professionals) heard of it at all. I enjoy puzzling my coworkers by declaring that I am "vi-ignorant and proud of it". :) Anyway, I guess I just dislike vi because it's different from everything else. I like things that are uniform. That's what really…

Never saw the point in wasting time to learn an arcane editor from the '70s.

Well apparently you wasted your time learning an arcane command line interface from the 70s.

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

#177
post #53

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…

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…

you can always map y to yank line except for end.

Mapping the leader to , and it's even nicer. then all you need to do is ,y and you get the line in fragment mode.

nnoremap y 0y$

or if you want just first non whitespace char you could do an uppercase y for the leader command. swap the upper and lower to make it how you want. seems like this would be a more useful command to have:

nnoremap Y ^y$

edit: saw that you found a workaround by pasting in insert mode. ctrl-r" any other ways to paste in insert mode?

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

#178

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?

Hi TomasSedovic! > Anything in particular you want to ask? Just wondering how much dvorak gets in the way of vi/vim. Lots of wonderful answers showed up in this thread! Looks like dvorak is a small obstacle (because of hjkl) but not a show-stopper.

That's been my experience at least. But remember that this is very subjective and different people will have different habits.

It's quite possible that there are shortcuts that get crippled by the Dvorak layout -- I'm just not aware of them.

Also, muscle memory is a strong thing. Expect at least the first few days to be slow and painful. And as such, it's quite possible that all my positive experience now is due to cognitive dissonance.

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

#179

I've never really felt comfortable in vi. I first started using it in 1989 at home, used it throughout college, and then used it on-and-off during my career, but it's never really felt powerful compared to a GUI editor. I want a scrollbar. I want a list of files in my project that I can just click on to open. I want tabs I can click. I want multiple windows that I can alt-tab to. And since I spend most of my time thi…

Have you tried using gvim? It has the best of both worlds.

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

#180
post #135

Earlier quoted context omitted.

Also typing in dvorak layout doesn't destroy your ability to type qwerty.

People that I know of that have personal experience do say it impairs it though.

I've certainly gone out of training on qwerty (or rather qwertz), but I was never actively impaired. Though in the last few months I went down the even more extreme route of getting a special keyboard not only an alternative layout. The Kinesis Advantage.

By the way, learning vi is probably the most standard compatible thing to do. Vi is a standard Unix tool, has been around for decades and will be around for decades more. (Not that I use vi much myself.)

Post reply on HN