Andrew Hendrie
Andrew Hendrie

Reputation: 6415

What's the most efficient way to copy and paste brackets and their contents in vim?

I'm aware of how to copy the text within a set of brackets with the following command:

yi[

So when I use this command while my cursor is on the following line:

[:test, :array]

I can use p to paste :test, :array

What I want to do though is paste [:test, :array].

What's the most efficient way to do this?

Upvotes: 2

Views: 176

Answers (1)

matt3141
matt3141

Reputation: 4423

The command which you wanted

ya[

Upvotes: 6

Related Questions