Home > database >  How to comment out code in VS Code without indent?
How to comment out code in VS Code without indent?

Time:04-10

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?

CodePudding user response:

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.

  • Related