
Learn to speak vim - verbs, nouns, and modifiers - skwp
http://yanpritzker.com/2011/12/16/learn-to-speak-vim-verbs-nouns-and-modifiers/
======
lhnz
I am ashamed to say that this made me giggle like a girl.

I guess I'm the kind of guy that understands and learns in this way better
than seeing visual cheatsheets or long-winded reference pages. Up until now
I've just been remembering particular sets of vim commands but this will
really make me a lot more productive I'm sure. :)

~~~
hrktb
I am not fully vim fluent, but I found this presenting angle confusing at
best.

Perhaps it helps to remember more easily if one already knows and uses all the
basic commands. Personaly I don't use vim all the time and have trouble
keeping a good mental model of the different commands behaviour depending on
the state of the document.

Telling me "hey, y is not some command acting against a state, it is a verb,
just use it with nouns like you use verbs!" is just counterproductive.

completely off-topic, but I had a hard time to visualize how it is to "giggle
like a girl". Even googling and youtubing left me puzzling at the exact way to
giggle you wanted to express. It is kind of fun and curious.

PS: responded to this post for the OT bit. not that it was a direct reply.

------
lukegru
If this gets people into vim and helps them understand some of its craziness,
that's awesome. However, like previous commenters have pointed out, most of
these examples are actually wrong (not by a mile, but it pays to be precise in
vim). Also, even though I love browsing through dotfiles and plugins on code
repository sites, I tend to think that beginners to vim should learn slowly,
gradually, and build up their knowledge over time, like anything else. Diving
into plugins and custom mappings right away is going to be a lot more painful
and less productive. And that's the antithesis of vim.

~~~
skwp
sorry, made some mistakes late at night. but "most" examples wrong? I think I
only screwed up on the $ examples. if you see anything else wrong can you
please point it out, so that I can fix em and not mislead people, thanks!

------
morsch
This is similar to the post _Your problem with Vim is that you don't grok vi_
at [http://stackoverflow.com/questions/1218390/what-is-your-
most...](http://stackoverflow.com/questions/1218390/what-is-your-most-
productive-shortcut-with-vim/1220118#1220118) (also on HN somewhere).

------
Dysiode
I'd been familiar with the concept of verbs and nouns in vim but this really
simplifies it all. I wish there was a more comprehensive list of everything in
a readable format. Man pages just don't do it for me :(

~~~
kmiyer
Have you see
[https://github.com/LevelbossMike/vim_shortcut_wallpaper/raw/...](https://github.com/LevelbossMike/vim_shortcut_wallpaper/raw/master/vim-
shortcuts_1280x800.png)? It's pretty much instinctive for me now, but if I was
starting out, this would have been invaluable.

~~~
non123
I have that wallpaper with a green background on my wall. I think the author
posted it here a few months ago.

------
wahnfrieden
This has some mistakes. yt$ is not equivalent to yy - yt$ yanks from the
cursor to the end, yy is equivalent to 0yt$

~~~
shadowfiend
Actually it's even bigger than that. yt$ does not include the newline, yy
does. So p after a yt$ will not change lines, it will insert the content
directly on this one after your cursor, while p after a yy will reproduce the
entire line as a new line below the current one.

~~~
sciurus
Are you sure that yt$ will do anything if there is not a dollar-sign character
on the line? Neither that or ct$ seem to do what the post advertises.

~~~
lukegru
y$ will yank till the end of line (characterwise). Y is actually the same as
yy, unless you n(no)remap Y to be the same as y$, which most people do. This
makes make more sense, because C is the same as c$ (change till end of line).
':h change.txt' explains all of this and more a lot better than I could.

~~~
skwp
thanks guys, I wrote the post at 3am and that was a bad time to be writing
about vim as it turns out :) I've removed the bad examples for now and will go
back to the post and add more as I think of them. The general idea was to
explain that vim is not voodoo, but is very mnemonic and conversational.

------
djacobs
These kinds of blog posts always forget the 's/S' (substitute) operator. I
find it super-useful.

~~~
skwp
it feels like the substitute operator doesn't follow the sentence conventions.
you can't saw (substitute around word) or anything like that. it feels like a
standalone bit of functionality. I was trying to express reusable bits in my
post, things you can build on and expand. am I wrong?

------
oacgnol
Useful - I found that mapping keys to actual verbs in my head as I'm using vim
really helps the memorization process.

This doesn't exactly work for everything though... I'm still having trouble
remembering movement keys (still using the arrow keys instead of hjkl...).

~~~
city41
For what it's worth vim has been my main editor now for 2+ years and I still
don't use hjkl. I know I should, but I can't seem to get over the hump that I
can easily find arrow keys by feel, but not hjkl.

As for remembering them, left and right are on the outside, and 'j' kind of
looks like a down arrow (that's how I distinguish j from k)

~~~
thristian
I've been using Vim for something like a decade, and I only recently started
toying with hjkl. At first, I ignored it because I was already pretty good
with the arrow keys and hjkl are annoyingly not _quite_ the home keys; then I
ignored it because I switched to Dvorak and hjkl are scattered across the
keyboard.

Strangely, it was Google+ that got me interested in hjkl, or at least J and K
for moving up and down. In the Dvorak layout, J and K are where C and V are in
QWERTY, so they're still pretty convenient to reach for.

------
wahnfrieden
Is there any way to use a / search as the target object with these sorts of
commands? I'd like for instance to be able to type ct/foo<cr> and have it
delete to the next instance of foo and put me in insert mode. Or something
along those lines.

~~~
burgerbrain
Simply c/foo should work, if I understand you correctly.

~~~
wahnfrieden
Oh thanks, for some reason I thought I tried that before and it didn't work.
Awesome.

