Text Objects

Vim Text Editor Quick Reference

2 min read

Published Jul 6 2025, updated Aug 17 2026


11
0
0
0

LinuxText Editor

Here are some ways to select, delete or copy different text objects.


Using the text operator

  1. v - to enter visual mode.
  2. i / a - to select inner or around.
  3. text operator - to define what is to be selected.

eg. v i w will select the inner word.


List of text operator options

So you would use the below by doing v i keybelow or v a keybelow, depending if you want inner or outer selection:

KeyDescription
p

Paragraph

w

Word

W

Word surrounded by white space

s

Sentence

t

HTML or XML tags

"

Text between " quotes

'

Text between ' quotes

[or]

Text inside square brackets

{or}

Text inside curly brackets

(or)

Text in side normal brackets (parentesies)


Deleting using the text operators

Rather than just selecting, you can also delete using the text operators above.

  1. d - the delete operator.
  2. i / a - to select inner or around.
  3. text operator - to define what is to be deleted.

eg. d i w will delete the inner word, or d i " will delete everything inside the "" marks etc.


Changing text using the text operators

You can also use the text operators to select text, clear it and enter insert mode to make changes to the selection.

  1. c - the change operator.
  2. i / a - to select inner or around.
  3. text operator - to define what is to be changed.

eg. c i w will clear the selected inner word and leave you in insert mode to type new text. etc.


Copying (yanking) using the text operators

You can also use the text operators to copy text.

  1. y - the yank (copy) operator.
  2. i / a - to select inner or around.
  3. text operator - to define what will be copied.

eg. y i w will copy (yank) the selected inner word. etc.

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Vim Text Editor Quick Reference | Text Objects | SimpleSteps.guide