"Multiline comments" in VSCode v1.67 [resolved: pull request comments]

Viewed 154

In the release notes in VSCode April 2022 (version 1.67):

Multiline comments

Behind the scenes, VS Code has supported multiline comments since the comments UX was finalized, but multiline comments were never surfaced in the UI. You can now see and leave multiline comments.

I notice that there is a new feature called Multiline comments.

However the description is not very explicit.

What is it used for and how to enable it?

enter image description here

1 Answers

There might be more general uses in the future for these "Comments" but primarily they are for commenting on pull requests.

So you have to have the Github Pull Requests and Issues extension installed. Which allows you to view pull requests within vscode itself.

When viewing a PR, you can create comments in the code like you can on github itself. That is what the gif you linked to shows. Adding a comment to a pull request. There is no setting to enable the add a comment button, it is already there if the code is "commentable" - which I assume means it is part of the PR.

Update: It looks like v1.69 will have a command to toggle these "comments" indicators on/off: Comments: Toggle Editor Commenting.

If you have the extension installed, there is a view in View/Open View.../Pull Requests you can open to see any pull requests.

Also, a Comments section will be added to the Panel showing any comments created in the workspace.

A brief demo:

Pull Request Comments

Related