Wiki

by yszheda

View project onGitHub

Tip 12: Combine and Conquer

Return to the top: <<Practical Vim>>

Operator + Motion = Action

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h operator
Trigger Effect
c Change
d Delete
y Yank into register
g~ Swap case
gu Make lowercase
gU Make uppercase
> Shift right
< Shift left
= Autoindent
! Filter {motion} lines through an external program

Custom Operations Work with Existing Motions

Example :commentary.vim

\\{motion}

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h map-operation

Custom Motions Work with Existing Operations

Example: textobj-entire plugin

References:

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h omap-operation