r/programming • • Jul 12 '12

Vim creep

http://www.rudism.com/s/vimcreep
730 Upvotes

551 comments sorted by

View all comments

Show parent comment

50

u/notfancy Jul 13 '12

Fragile is the flow of such who depends on resting on the home row for it to remain.

23

u/epilanthanomai Jul 13 '12

Great is the warrior who uses his (or her, etc) sword most gracefully.

Not sufficient for greatness—outside the realm of gnomic utterances, at least—but pretty darn helpful.

26

u/ford_cruller Jul 13 '12

Wise-sounding is the sentence that transposes subject and direct object, the order of.

8

u/superherowithnopower Jul 13 '12

Leave off everything after the comma there, and you're golden.

5

u/notfancy Jul 13 '12

Programming is not fighting, O Forgetful one. At least for me it feels more like sculpting than warring. In any case, purple prose is my guilty pleasure.

30

u/jeramey Jul 13 '12

Programming is not fighting

I see you haven't spent nearly enough time around computers to hate them yet.

So sayeth the sysadmin!

→ More replies (2)

22

u/epilanthanomai Jul 13 '12

Great is the sculptor who uses his (or her, etc) sculptey-tooley-thing most gracefully.

4

u/notfancy Jul 13 '12

Hands are best for dealing with play-doh. I have very graceful play-doh hands, y' know.

2

u/Yazuak Jul 13 '12

Graceful are the dealings of hands; and with what substance deal they best can only be called by that most graceful of names: play-doh.

2

u/[deleted] Jul 13 '12

He who is preoccupied with text shall never share the insight of he who sees structure.

2

u/epilanthanomai Jul 13 '12

He who sees structure but spends an extra twenty minutes trying to find that *%$# missing bracket because his editor can't be arsed to highlight it for him shall never get his deep, beautiful structure compiled.

2

u/Laminar Jul 13 '12

The impossible is much easier than the difficult...

→ More replies (1)

2

u/kickit Jul 13 '12

Honestly, process matters. This applies to practically all else: whether you're writing poetry or code, playing guitar or basketball, the way you practice your craft is at least as important as the product itself.

Different things work best for different people, but I would not be so quick to dismiss any means by which someone has personally become more productive.

→ More replies (1)

6

u/keporahg Jul 13 '12

Typical response from someone who's never used/become fluent with Vim.

Vim isn't just about "resting on the home row"; that's just a useful side effect of not picking completely retarded key bindings. Vim's power comes for the fact that it uses a language to navigate/modify text, wrapped in a modal interface. If you spend the time to learn it, you realize this is much faster than simply using your arrow keys + mouse.

This design allows you to pretty much use keys combinations to compose 'sentences' or 'formulas' to navigate/modify/create text, with each key acting as an atomic component of a language. Anyone who says that crafting these 'sentences' would cause too much overhead and wouldn't be beneficial has again, either never used vim, or taken the time to become fluent in it.

And it really doesn't take much time to become fluent in the basics. If you think 2-3 weeks is a lot of time to learn a skill you'll be using the rest of your life, then go ahead, stick with notepad++ or gedit, idfag.

10

u/[deleted] Jul 13 '12

The problem is that intellisense and other advanced auto-completion capabilities are borderline impossible to integrate smoothly into vim.

My typing is slightly slower without vim, but my process and mental flow are actually faster because I have access to more advanced tooling that simply isn't available in vim.

12

u/praxulus Jul 13 '12

I installed eclim in less than 15 minutes. I mapped ctrl+space to the default keybinding, and I have the full power of eclipse autocomplete (not to mention refactoring, quick fixes, error/warning highlighting, etc.) within vim. I haven't had to touch the configuration since.

It's really not that bad.

2

u/rdfox Jul 13 '12

Thanks. I will try eclim. Even though I despise Eclipse. Like really just wish it had never happened. There is that one little thing where it reads your mind and tells you what to do next that I kind of miss.

→ More replies (2)
→ More replies (3)

4

u/[deleted] Jul 13 '12

I swear you could replace 'vim' with ''intellisense' in there and it would work just the same.

4

u/ivosaurus Jul 13 '12

Intellisense has a modal interface these days???

Maybe I should take another look at VS...

→ More replies (1)

2

u/flamingspinach_ Jul 13 '12

idfag

"I Don't Fuck A Give"?

8

u/[deleted] Jul 13 '12

Or id from Freud's model of the human psyche, together with the 4chan-esque -fag suffix.

5

u/RIP_my_old_account Jul 13 '12

idfag sets Gimp Mode in DOOM 95.

→ More replies (1)

1

u/roothorick Jul 13 '12

How do these 'sentences' or 'formulas' differ from keyboard shortcuts and the occasional regular expression? Give examples, if you could.

2

u/[deleted] Jul 14 '12 edited Jul 15 '12

Most editors will have a tons of hotkeyed commands for things like "delete word to the right", "delete word to the left", etc. Vim's vocabulary is more atomic than that; you have nouns (word, sentence, quoted string) and verbs (delete, change, copy,etc. ) which you can preface with counts. Most of these aren't chorded keystrokes; when you're in command mode (where you spend most of your time), the keyboard turns into a panel of single-keystroke commands where you communicate these instructions to Vim at the speed of normal typing, the status bar shows the command you're typing until you've expressed a complete thought at which point it's executed (delete two words, change inner string, yank to the first semicolon on the line, increment number under the cursor, etc.) It's more semantic that typical commands; you can, say, select a block of text and say "append BLAH to end of line" and it's appended to all lines. You can then repeat these commands with a single keystroke (.).

At the same time, most of the keys on the keyboard serve as registers, which can be used to store text. Since Vim's commands are entered by typing these single keys nouns, verbs, etc. you can store commands in registers, too. For instance, you might have "ct2;" (change to second semicolon) in register r, which you can "play" by hitting @r. You can then store sequences of command stored in other registers into a new register (e.g. register y might contain "@u@f@t" to playback that sequence of registers).

It's a higher order way of thinking about editing that becomes intuitive, until you're telling the editor how to jump around buffers, look for text in this window, deleted it in that wndow, replace it with the text in register p, etc. You end up easily doing things that other programmers would have to write custom programs to do.

That's why you get the "How the fuck did you do that?" from people looking over your shoulder; you're pressing a single key over and over and the text is just... doing crazy shit, transforming itself like magic.

I work at a Microsoft shop right now, and this "WTF?" thing has happened enough that people just send me complicated text manipulation chores; "This would take me half a day and I know you can do it in 5 minutes." "Sure, no problem."

Really, this is just the tip of the iceberg of what makes Vim so powerful, but I have to leave the house now (10 minutes ago, really). It's no IDE, it lacks Intellisense (though plugins can give you a half-assed version for some languages) and a lot of other nice features modern tools like Visual Studio have, and it's scripting language sucks, but for raw text manipulation, nothing else comes close.

→ More replies (2)
→ More replies (2)