0

May I know how do I highlight a code region say for example

public void foo()
{
blah();
blah1();
blah2();
}

where my cursor is at 'b' of first blah(), how can I highlight the whole code region using viEmu or VIM per se?

drhanlau
  • 2,517
  • 2
  • 24
  • 42

1 Answers1

1

In Vim, that's va{ (or va}, or vaB as synonyms). The v enters visual mode, and a{ is a text object that selects a Block. If you don't want the curly braces included, use i{ (inner Block) instead. And if you want to operate (e.g. delete) on the block, you can skip visual mode and just use a command that takes a motion, e.g. da{.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324