JJRhythm
JJRhythm

Reputation: 643

Vim hotkey's corresponding command name

I'm having trouble finding the command that would match % in normal mode. Or any command for that matter, i.e. yy to :yank.

Basically what I'm trying to do is make a oneliner like so, :s/this/that/g | yank | undo | /* Move down one line */ | /* % */ | paste

Upvotes: 1

Views: 120

Answers (2)

Matt Boehm
Matt Boehm

Reputation: 1912

You can do normal mode operations in command mode with normal/norm.

For example, to yank the current line, you'd want :norm yy.

Upvotes: 4

Jo So
Jo So

Reputation: 26541

You can move to the next % character in normal mode with f%, and just before it with t%

Upvotes: 0

Related Questions