2

When I try to indent multiple lines I highlight the lines (SHIFT+V) then indent (SHIFT+>). That works if I only want to indent one time.

But if I try to indent multiple times my highlighted area gets lost after the first indent, I must repeat the WHOLE process. Which is frustrating and annoying.

Here's a video showing the problem:

https://i.stack.imgur.com/sfbUl.jpg

(Note how I have to re-select the lines every time indentation changes)

In terminal vim, the lines stay highlighted and I can indent them multiple times no problem.

How can I configure VSCode & the vim extension to allow me to indent multiple times without requiring I re-select the area every time?

Schneems
  • 14,918
  • 9
  • 57
  • 84
  • As pointed out on twitter, apparently this reselect behavior is default even in vim. I'm working around it via https://github.com/schneems/dotfiles/blob/main/vim/.vimrc#L150. So maybe the next question would be "how to do that in vscode". – Schneems Oct 26 '21 at 14:12

1 Answers1

2

I also get the selection lost, but using . to repeat the action indents the correct lines, hope this helps!

Edit: Video showing how it works using .: https://i.stack.imgur.com/CXxdc.jpg

mrcasals
  • 1,151
  • 10
  • 20
  • Thanks! That's not exactly the fix I was looking for, but actually saves keystrokes. Great idea, I'll try that out! – Schneems Oct 26 '21 at 14:06