~ / text-objects
5
Text Objects
Operate on words, sentences, paragraphs, quotes, brackets and tags as single units, no matter where the cursor is inside them.
- 01
Words: iw, aw, iW and aW
Act on the whole word under the cursor, wherever the cursor is in it.
iwawiWaWciwdaw - 02
Quotes: i", a", i' and i`
Change or delete a string's contents from anywhere on the line.
i"a"i'a'i`a`ci" - 03
Brackets: i(, i{, i[ and i<
Act on whatever sits between a pair of brackets, even across lines.
i(a(i{a{i[a[i<a< - 05
Sentences and paragraphs: is, as, ip and ap
Bigger objects for prose, Markdown and blocks of code.
isasipap - 06
Mix and match: any operator, any object
gU, y, > and Visual mode all take text objects.
gUi"yi(>iBvi"va({Visual}pnvim