Operators

Vim Text Editor Quick Reference

2 min read

Published Jul 6 2025, updated Aug 17 2026


11
0
0
0

LinuxText Editor

Vim has a number of operators that can be combined with motions to do different actions.

To use them you press:

  1. Operator - selects what action is to happen.
  2. Motion - tell how far or what to act on.

You can also enter operator operator to apply the operator to the whole line without using a motion. eg. d d will delete a whole line or y y will yank a whole line.


List of operators available

KeyDescription
d

Delete

y

Yank (copy)

c

Change and put in to insert mode

>

Indent right

<

Indent left

g~

Toggle case

gu

Make lowercase

gU

Make upper case

!

Filter through external command

=

Auto-indent, auto format code

p

Paste


Character & word motions

KeyDescription
h

Left character

l

Right character

w

Start of next word

W

Start of next word in white space

b

Start of previous word

B

Start of previous word in white space

e

End of current word

E

End of current word in white space


Line & paragraph motions

KeyDescription
0

Start of the line

^

First non-whitespace on the line

$

End of the line

gg

Top of the file

G

Bottom of the file

{

Previous paragraph

}

Next paragrap


Search & match motions

KeyDescription
/pattern

Search forward

?pattern

Search backwards

n

Next search match

N

Previous search match

%

Jump to matching [ { ( ) } ] bracket


Find & to motions

KeyDescription
fcharacter

Find next occurrence of character

Fcharacter

Find previous occurrence of character

tcharacter

Move to the next occurrence of the character

Tcharacter

Move to the previous occurrence of the character


Line-wise motions

KeyDescription
j

Move down one line

k

Move up one line

}

Paragraph forwards

{

Paragraph backwards

}}

Blank line block forwards

{{

Blank line block backwards


Adding counts before operators

You can add a number before double operator actions to set a number of times it should occur.

  1. count - number of occurrences
  2. operator operator - operation to be carried out

eg. 4 d d will delete 4 lines, or 8 y y will copy 8 lines.


Adding counts before motions

You can add a number before the motion part to repeat the operation on that motion a number of times.

  1. operator - the operation to be carried out
  2. count - the number of occurrences.
  3. motion - how far or what to act on.

eg. d 6 w will delete 6 words, or d 4 j will delete 4 lines downwards.

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