Operators

Vim Text Editor Quick Reference

2 min read

Published Jul 6 2025


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.


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