0

So what I want is a single key map in Xvim that will highlight all of the text inside brackets and then indent using Xcode's indent functionality.

What i've tried

nnoremap ,i V aB <C-i>

What I would expect is for this to go into visual mode, highlight within the braces, and then indent. It does the first two, but does not indent. What am I missing?

Peter Foti
  • 5,526
  • 6
  • 34
  • 47

1 Answers1

0

<C-i> / <Tab> only works in insert mode; it doesn't indent in visual mode. For that, you can use the > command:

nnoremap ,i VaB>

You don't actually need to go through visual mode; the >{motion} command can take the aB text object:

nnoremap ,i >aB
Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324