vote up 1 vote down star

Hello

In another thread about Vim, someone suggested ci" in order to change an entire string when the cursor is on the string.

I found this very interesting and wanted to read about it in Vim's help system. Yet, a :help ci brought me to copyindent (which is obviously not what I was after) and a :help ci" told me that there's no help for it.

So, how would I go about searching for help on this specific feature? Also, how do you generally search for features you know they're there but forgot the name of it.

Thanks / Rene

flag

64% accept rate

2 Answers

vote up 0 vote down check

Investigate :h helpgrep.

link|flag
Err... How did that help here? – Manni Nov 9 at 10:03
vote up 2 vote down

The trouble is that you have to understand a lot of how vim works before you can use the help system effectively.

In your case, the answer is that there is no ci" command. However, there is a c command and indeed, :help c will send you to the correct topic. This will tell you about c{motion}. Think of the i" part as parameters or modifiers to the c command. Other modifiers of the c command are, for example, w which will change a word or $ which will change the rest of the line.

To answer your question: You can look stuff like that up by trying the first character of the command you were given. If that brings up a help topic, the topic should also explain what modifiers you can use with the command. In this case, it will tell you about {motion}. Place the cursor on that and hit Ctrl-] to see what a motion is.

link|flag
1  
beat me to it. note the difference between the single-letter-commands and the ones that are preceeded with :. – ~quack Nov 8 at 9:43
;-) Good point. The colon makes a huge difference. – Manni Nov 8 at 9:45

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.