microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.75k stars 29.47k forks source link

Issue with the cursor while doing ctrl + / for commenting code #233170

Open SwatiMohapatra opened 2 weeks ago

SwatiMohapatra commented 2 weeks ago

Please have a look at this link https://github.com/microsoft/vscode-discussions/discussions/2363

Kindly add a feature to fix such type of issues

gjsjohnmurray commented 2 weeks ago

@SwatiMohapatra please edit the issue description to fix the link.

RedCMD commented 2 weeks ago

copy pasting the link text works fine https://github.com/microsoft/vscode-discussions/discussions/2363 also https://stackoverflow.com/questions/79137268/in-vscode-language-extension-while-comment-toggling-comment-indicator-goes-to-1

possible options are:

  1. Set Tab Size indentation to 1 package.json:
    "contributes": {
    "configurationDefaults": {
        "[languageId]": {
            "editor.tabSize": 1
        }
    }
    }
  2. add a space ` to"lineComment": " !"`However it will have problems with uncommenting due to the comment toggling code skipping whitespace indentation https://github.com/microsoft/vscode/blob/main/src/vs/editor/contrib/comment/browser/lineCommentCommand.ts