'How to comment out code in VS Code without indent?

Currently, after commenting out the code (e.g. in BASH script) in VS Code I get:

function foo {

    #function bar {
    #    echo 'Le Bar.';
    #}
}

but I'd like to have this:

function foo {

#    function bar {
#        echo 'Le Bar.';
#    }
}

I can't find proper settings for disabling comment indentation, what am I missing?

Edit: I created Feature Request for it, please upvote, if you're also interested in having it here: https://github.com/microsoft/vscode/issues/147168 — just 20 upvotes will move the request to backlog. :-)

Edit: "Just" 15 votes more and we gonna have it! (Well, almost) :-) Please be so kind to upvote! :-)



Solution 1:[1]

There are no features built into Visual Studio Code for not indenting comments.

However, if you really want to have them, you could follow these two links to other Stack Overflow answers (but it might just be overkill):

You can also make a GitHub Issue on Microsoft's official Visual Studio Code repository with the tag feature-request.


In summary, there isn't a feature like that in Visual Studio Code. However, there are a few solutions, but they just might be overkill for such a simple task.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1