vscode-go
vscode-go copied to clipboard
add smart paste to go comment
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.
@hyangah can I please take this up?
@shashank-priyadarshi Sure! Thanks. The code is under extension/src. Start from how other commands are registered in goMain.ts (the extension's entry point).
Contribution guide - https://github.com/golang/vscode-go/blob/master/docs/contributing.md