normal·mode
~ / 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.

  1. 01

    Words: iw, aw, iW and aW

    Act on the whole word under the cursor, wherever the cursor is in it.

    iwawiWaWciwdaw
  2. 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"
  3. 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<
  4. 04

    Tags: it and at

    Edit an HTML or XML element's contents, or the whole element.

    itatcitdat2it
  5. 05

    Sentences and paragraphs: is, as, ip and ap

    Bigger objects for prose, Markdown and blocks of code.

    isasipap
  6. 06

    Mix and match: any operator, any object

    gU, y, > and Visual mode all take text objects.

    gUi"yi(>iBvi"va({Visual}pnvim
outside the editor the page is in normal mode: ? keymaps · / find · : commandsfound this useful? ☕ support it ·credits · source · not affiliated with Vim or Neovim