Skip to content

add smart paste to go comment #3554

Open
@hyangah

Description

@hyangah

From anonymous response to the IDE user survey:

I often temporarily copy specs as comment to have it at sight.
These comments often are being disturbed by the go fmt.
This is most annoying if docs have eg. packet layout laid out in two or more lines.

Ideally, such marked comment, eg a /** */ block, could be made sticky
to the top of editor pane, like functions headers already do.

Indenting the pasted text will prevent the go formatter from messing up the copied block.
Indenting every line manually can be tedious. It will be nice if the extension offers a smart paste command. (credit: @aclements)

The command reads the content in the clipboard
https://code.visualstudio.com/api/references/vscode-api#Clipboard

and write indented text to the editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestHelpWantedIssues that are not prioritized by the maintainers. Help is requested from community contributors.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions