Text Objects

Vim Text Editor Quick Reference

2 min read

Published Jul 6 2025


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.


Products from our shop

Vim Cheat Sheet - Print at Home Designs

Vim Cheat Sheet - Print at Home Designs

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Mouse Mat

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Travel Mug

Vim Cheat Sheet Mug

Vim Cheat Sheet Mug

Docker Cheat Sheet - Print at Home Designs

Docker Cheat Sheet - Print at Home Designs

Docker Cheat Sheet Mouse Mat

Docker Cheat Sheet Mouse Mat

Docker Cheat Sheet Travel Mug

Docker Cheat Sheet Travel Mug

Docker Cheat Sheet Mug

Docker Cheat Sheet Mug

SimpleSteps.guide branded Travel Mug

SimpleSteps.guide branded Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript - Travel Mug

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Dark

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Embroidered T-Shirt - Light

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - White

Developer Excuse Javascript Mug - Black

Developer Excuse Javascript Mug - Black

SimpleSteps.guide branded stainless steel water bottle

SimpleSteps.guide branded stainless steel water bottle

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Light

Developer Excuse Javascript Hoodie - Dark

Developer Excuse Javascript Hoodie - Dark

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact