Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indenting multilines/block with vscode and vim plugin

Un-indenting lines in VS Code is already on the site, but it doesn't work for me. I'm not 100% sure the answer can be adapted to my situation (the question asks about Vim "mode"). If it is, the context for the accepted answer isn't obvious to me.

I assume we're supposed to splice the JSON fragment

{
  "key": "shift+tab",
  "command": "outdent",
  "when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus"
}

into our settings but it's not clear how or where. The app has a settings.json, a keybindings.json and the plugin has package.json.

Ctrl+[ and Ctrl+] aren't functional for me. Presumably they would be without the Vim plugin, but the plugin overrides the Ctrl commands.

like image 765
Koz Avatar asked Oct 23 '25 19:10

Koz


1 Answers

Just as in normal vim, typing >> and << in normal mode or > and < in visual mode will indent and un-indent lines, respectively.

Source: https://vim.fandom.com/wiki/Shifting_blocks_visually

Also: https://stackoverflow.com/a/235841/7007605

like image 102
Billy Avatar answered Oct 26 '25 13:10

Billy