Live data from Hacker News

To Master Vim, Use It Like Language

danielmiessler.com

1–10 of 124 posts

Re: To Master Vim, Use It Like Language

#4
Vim is a regular expression system hooked to a 1970s user interface. If you need to apply regular expressions to text files, vim is useful. I used vi to write code for years, but that was decades ago. There's been some progress since the 1970s.

Re: To Master Vim, Use It Like Language

#6
post #4

Vim is a regular expression system hooked to a 1970s user interface. If you need to apply regular expressions to text files, vim is useful. I used vi to write code for years, but that was decades ago. There's been some progress since the 1970s.

That's just not what vim is... I don't even really know where to begin, you're just flat out wrong. I'd say you're confusing vim with something else, but I don't even know what else fits that description.

Re: To Master Vim, Use It Like Language

#7
post #3

> inoremap jk Using two keystrokes instead of ESC to leave insert mode is definitely a personal preference and not necessarily more efficient or comfortable.

Way more useful (for me anyway) is mapping Capslock to ESC. It works with any vi anywhere as long as you are using your main machine to connect. Also with inoremap don't you have to wait for the letter j to show up until you type your next character? That would drive me crazy.

Edit now that I have actually looked at the article: Yes, you can map it to Control but for me it's an awkward place to put a modifier. What if you want to do Ctrl-A? Ctrl-C? At least the way I type, I'm better off using the one in the corner.

Re: To Master Vim, Use It Like Language

#8
post #4

Vim is a regular expression system hooked to a 1970s user interface. If you need to apply regular expressions to text files, vim is useful. I used vi to write code for years, but that was decades ago. There's been some progress since the 1970s.

That's just not what vim is... I don't even really know where to begin, you're just flat out wrong. I'd say you're confusing vim with something else, but I don't even know what else fits that description.

1,$s/a/b/

Re: To Master Vim, Use It Like Language

#9
I consider myself at least an intermediate user of Vim, and I'm glad that you mentioned the "f" motion (along with its cousins "t" and ";"). I don't think these keys get enough exposure among beginner Vim users (they aren't mentioned in vimtutor), but they allow you to quickly and efficiently move across files and do things like "ct(" (change text up to first left parentheses), which is super useful for changing function names.

Shameless plug: I wrote a plugin (https://github.com/unblevable/quick-scope) that facilitates the use of "f" and family that even beginners can take advantage of.

Re: To Master Vim, Use It Like Language

#10
post #3

> inoremap jk Using two keystrokes instead of ESC to leave insert mode is definitely a personal preference and not necessarily more efficient or comfortable.

Way more useful (for me anyway) is mapping Capslock to ESC. It works with any vi anywhere as long as you are using your main machine to connect. Also with inoremap don't you have to wait for the letter j to show up until you type your next character? That would drive me crazy. Edit now that I have actually looked at the article: Yes, you can map it to Control but for me it's an awkward place to put a modifier. What i…

Was just about to post this. Though I map Caps-Lock to Esc through xmodmap so it works everywhere instead of just in Vim.
Post reply on HN