3 ms·
what does `ci"` do in vim? I'm decent with vim, but it didn't make sense to me - then I tried it and it didn't do anything.
by pigcat 4y ago
what does `ci"` do in vim? I'm decent with vim, but it didn't make sense to me - then I tried it and it didn't do anything.
- thegeomaster 4y agoDeletes text inside the nearest quotes and puts you in insert mode. You probably tried it without being inside a quoted string, that's why it did nothing.
- torarvid 4y agoChange inside doublequotes. You can also do `ci{` or similar to Change inside curly-braces or `di[` to Delete inside square brackets
- exDM69 4y agoCursor needs to be between double quotes (e.g. inside string literal) for ci" to work. See `:help text-objects`.
- Agentlien 4y agoci is "change inner ..." If we use | to mark our cursor, and you have your cursor inside quote: '"he|re"' ci" would replace everything inside giving you '"|"' and putting you in insert mode. cab would aso remove the quotation marks and give you '|' With ce or cw you'd get '"he"' and cE or cW would give you '"he'