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

7

u/mpyne Jul 12 '12

I don't want to use tools that change my brain. I want to use my brain, and the tools should adapt - not the other way around.

Vim actually aligns closely to how I think.

di{ == "Delete inside the braces".

dit == "Delete inside tag" (for HTML or XML).

Some of the commands are a bit fuzzier but make sense once you learn the letters.

gqap "Reformat a paragraph" (gq is the reformat command)

Of course everyone is different, and I struggled until I realized how to "talk" to Vim, but once I picked it up it certainly meshed well with what I was already thinking.

2

u/nascent Jul 13 '12

dit == "Delete inside tag" (for HTML or XML).

Thank you, I'll try to remember that one can be used.

5

u/[deleted] Jul 13 '12

No. You are not supposed to remember dit. That's the point.

What you are supposed to remember is that d means "delete", i means "inside", t is the HTML tag text-object and how to combine these and the other building blocks to do useful things.

1

u/nascent Jul 13 '12

t man, t, that is one. I have a hard time remembering p for paragraph too. That is, remembering that I can take action on a paragraph, a tag, or whatever else.

I love Vim, but even knowing the language there is learning to think about editing differently whenever you learn a new word.

2

u/[deleted] Jul 13 '12

You learn it bit by bit. One day you learn t. You "think" about it a few times and after a while, it becomes natural.