Live data from Hacker News

Vim Creep

rudism.com

141–150 of 237 posts

Re: Vim Creep

#141
LOL so in my early days it was "vi" but I too use "vim" now a days.

Either way the funny thing is when someone asks me "how do you do THAT in vi?" I often find myself typing in the air to replay the muscle memory that executes those instructions.

For better or for worse I've become muscle programmed to execute vi commands in flashes of thought that really never reach my normal cognitive functions. I love to watch people stunned as they see me do something I've taken for granted for years or figured everyone else knew how to do.

All that said, all tools are not for all situations and all people. I do at times find myself jumping into eclipse (Java I'm looking at you!!!) because of the many additional features available in a good IDE.

I know you can run the vim extensions in eclipse but I've never bothered. I figure if I'm going to mouse my way through an IDE I'm not sure what having vi commands will do to make my life easier. :-)

Re: Vim Creep

#142
post #121

Earlier quoted context omitted.

For rhetorical effect, `:wq` is right. But in the real world, `:x` is the better choice.

I've been using vim for years and didn't know about :x. go figure.

Be aware that :wq will update the last-modified timestamp and :x will only do so if it's actually saving.

Re: Vim Creep

#143
post #34

This feels like an article about a religion or cult, not a software program. I just don't get it. Ever since newer editors got block editing or multiple insertion cursors, and RegEx find & replace across multiple files, and searching filenames to open... I feel like I've already got everything I need! What am I missing out on? I don't feel like my text editor holds back my productivity. Using something like Sublime,…

You really have to sit down and see a vim user work to start to understand. In vim you don't just move around with arrows, then delete and then replace the text you want. What happens is you can use noun-verb associations to do things. For example on a line like this: var foo = "bar"; I could be at the beginning of the line and type the following keys to change the inside of the quotation marks: ci"baz In sublime I w…

It probably helps to explain that ci"baz means: change (c) what's inside (i) the apostrophes (") to baz (baz), end ()

Re: Vim Creep

#144
post #112

Earlier quoted context omitted.

On IDEs: I have the 'pleasure' of being one of those chaps who spends parts of his day job reworking massive Java projects. There is no way in hell I'm touching that without an editor that deeply understands Java.

There are multiple variables in your equation. You may be altering the wrong one.

What are you talking about? His job?

Re: Vim Creep

#145
post #123

Earlier quoted context omitted.

For me, it's about the interface. In descending order: intuitive, consistent, modular, comfortable, portable. Intuitive: most commands resemble natural language, without awkward or arbitrary mappings. For instance: - w: (forward) word; - cw: change (forward) word; - c2w: change 2 (forward) words; - 2cw: twice change word; - ciw: change inner word; There is no intervening translation. For instance, to change a word in…

I'm sorry, but although I'd agree vim is awesome, there's no way I would call its commands "intuitive." Take 'y', for 'yank.' Would anyone really argue that the word "yank" is a natural way of expressing "copy?" "Yeah mom, just yank and paste that into an e-mail... " And there's nothing inherently intuitive about '/' for searching, unless you're already familiar with unix commands like sed. Or ":" for go to line. Or…

I agree that there are some trade-off, but other editors have their trade-offs as well. IMO, Vim's trade-offs are acceptable. Actually, / for search is traditional beyond Unix: Opera and Firefox understand it. And ? (which is Shift + /) searches in the opposite direction (a smart trade-off). x, while not literal, is descriptive: think about drawing an x over a character to "delete" it. hjkl, while not mnemonic, are so often used that that it is advantageous having them there and muscle memory develops fast. Goto line is also G, more mnemonic.

I think the steep learning curve comes from the need to learn a richer and more precise way of editing, while you may be used to get by with a sloppy one. I had a similar experience when I switched to the Dvorak keyboard: I learned for the first time how to touch-type, while the Qwerty grew on me from hunt-and-peck.

Since you are considering about going back, here are some useful custom mappings of mine: - swap p and P; - map Space as PageDown; - map Shift + Space as PageUp; The last two mirror the way most document-displaying applications work. Generally, don't think twice about remapping some commands either to correct historical quirks of Vim or make it behave consistently with other applications you may be using, hence lowering your memory load.

Have fun

Re: Vim Creep

#146
post #114

Earlier quoted context omitted.

In Sublime Text 2 using multi cursers: 1. `command + A` to select all 2. `command + shift + L` to split the multi-line selection into multiple single line selections (one curser at the end of each line) 3. `delete delete delete` to get rid of ".rb" on each line 4. `command + shift + ←` to select the identifier 5. `command + C` to copy each identifying word on each line (!!!!) 6. `←` to get to the beginning of the lin…

Multiple carots, the minimap and ST2 picking your indentation strategy automatically by looking at the file (I work with badly formatted legacy code a bit, there is no project-level strategy that applies) are the three reasons I bought it.

Some of my coworkers use sublime, and have been very excited about it. I used vim for several years and use emacs now, so probably a hard sell. Still, I get curious when people are Really Excited about other editors (because there may be ideas worth stealing and adding to emacs ;) ).

What's the "minimap", the scrollbar that is a shrunken version of the document? The "multiple carets" feature seems handy. Are there any other standout features, compared to vim or emacs (not, say, TextMate)?

Re: Vim Creep

#147
post #123

Earlier quoted context omitted.

For me, it's about the interface. In descending order: intuitive, consistent, modular, comfortable, portable. Intuitive: most commands resemble natural language, without awkward or arbitrary mappings. For instance: - w: (forward) word; - cw: change (forward) word; - c2w: change 2 (forward) words; - 2cw: twice change word; - ciw: change inner word; There is no intervening translation. For instance, to change a word in…

I'm sorry, but although I'd agree vim is awesome, there's no way I would call its commands "intuitive." Take 'y', for 'yank.' Would anyone really argue that the word "yank" is a natural way of expressing "copy?" "Yeah mom, just yank and paste that into an e-mail... " And there's nothing inherently intuitive about '/' for searching, unless you're already familiar with unix commands like sed. Or ":" for go to line. Or…

Er, "hjkl" for input?

Re: Vim Creep

#148
post #125
post #59

Earlier quoted context omitted.

Exactly, and does it really matter? I mean, how many people in usesthis.com actually use Vim? And they are all brilliant people.

Brilliant people don't need to be brilliant in everything. You can use lesser tools and still accomplish a lot.

Or maybe they're not lesser tools.

Re: Vim Creep

#149

This feels like an article about a religion or cult, not a software program. I just don't get it. Ever since newer editors got block editing or multiple insertion cursors, and RegEx find & replace across multiple files, and searching filenames to open... I feel like I've already got everything I need! What am I missing out on? I don't feel like my text editor holds back my productivity. Using something like Sublime,…

It's about a text editor that you learn more about and customize until it fits you like a glove.

Then you reap productivity benefits for the next couple decades.

Re: Vim Creep

#150
post #121
post #104

Earlier quoted context omitted.

And he end it with :wq This part make me smile... Wonder what others tough when see that?

For rhetorical effect, `:wq` is right. But in the real world, `:x` is the better choice.

No love for `ZZ` here? :( (And its friend `ZQ`, which is the same as `:q!`.)
Post reply on HN