Vscode: Have Shift+Tab remove whitespace within a line

Created on 24 Oct 2017  路  7Comments  路  Source: microsoft/vscode

Extracted from https://github.com/Microsoft/vscode/issues/32280#issuecomment-333843440

From @martinsuchan


Shift+Tab does not outdent. Tested in *.ps1 files. No idea if this has worked in previous versions, just noticed it now.

Edit it works when I'm on the start of the line, but not in between strings. In VS2017 it works even between strings. Not sure it this is native VS behavior or ReSharper, but I use it a lot.
tab gif

  • VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:38:23.027Z)
  • OS Version: Windows_NT x64 10.0.15063
  • Extensions:
    Kotlin|mat|1.3.0
    csharp|ms-|1.12.1
    PowerShell|ms-|1.4.3
    java|red|0.11.0
editor-core feature-request

Most helpful comment

My coworker doesn't remember how he figured this out, but if this happens to you, hit ctrl+m (or whatever the equivalent is on your machine). Now tab goes back to normally functionality.

All 7 comments

Please note that shift+tab always works, it just always operates on the beginning of a line:

kapture 2017-10-24 at 12 24 38

So, did you find out a solution?

This has suddenly stopped working for me. Randomly today shift+tab started navigating around the UI rather than outdenting. /shrug

My coworker doesn't remember how he figured this out, but if this happens to you, hit ctrl+m (or whatever the equivalent is on your machine). Now tab goes back to normally functionality.

Above worked for me, toogle tab key moves focus (ctrl + m) toggles this unwanted behavior. Thanks @komali2

Is there a solution for this? Coming from Visual Studio, where I used in-line outdent all the time, this is a big friction point when working with VS Code. I'd also be fine with installing an extension.

The default value for the command "outdent" is "ctrl + ["
This default value might have been shift + tab in previous versions. I noticed the same issue described in this but, and I was able to get back the desired behavior after updating the key binding to shift + tab

CIA-Giphy-1266

Was this page helpful?
0 / 5 - 0 ratings