sandric
sandric

Reputation: 2470

is there any vim plugin to select block of code in any language?

I mean, if my cursor is pointing somewhere inside of javascript else block, is there a plugin for one shortcut to be able to select all lines inside this else block, regardless to on which line exactly I'm currently in this else block pointing my cursor, so that, if I will want to select any other else block in, lets say ruby, using the same shortcut, I would be able to select the whole lines of this else block code in ruby?

thx.

Upvotes: 1

Views: 799

Answers (1)

lcd047
lcd047

Reputation: 5851

Try viB to select the "inner block", and vaB to select the block together with the enclosing braces. See :help text-objects for more (highly useful) information.

Upvotes: 3

Related Questions