3

vscode 里面多行注释样式能调整吗?

 2 years ago
source link: https://www.v2ex.com/t/838063
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

vscode 里面多行注释样式能调整吗?

V2EX  ›  Visual Studio Code

vscode 里面多行注释样式能调整吗?

  yahon · 23 小时 46 分钟前 · 755 次点击
默认的样式是:
/*
我是注释
*/

如果想要下面这种要怎么设置?
/**
* 我是注释
*/
8 条回复    2022-03-05 02:00:47 +08:00

Hconk

Hconk      23 小时 38 分钟前 via iPhone

装个 doxygen

Hconk

Hconk      23 小时 37 分钟前 via iPhone   ❤️ 1

@Hconk 没打完就发出来了,装个 doxygen 插件可以。其实你装了 C++支持直接打 /**回车就是第二种。

DrakeXiang

DrakeXiang      23 小时 31 分钟前   ❤️ 1

至少我从来都是 /** 回车就自动生成第二种了

yahon

yahon      23 小时 28 分钟前

感谢 @Hconk 已经安装 doxygen

karott7

karott7      23 小时 22 分钟前

vscode 自带 jsdoc ,直接 输入 /** 就会补全成你说的第二种

noe132

noe132      19 小时 26 分钟前

{
"key": "ctrl+shift+/",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},

noe132

noe132      19 小时 23 分钟前   ❤️ 1

发错了。。。上面的是普通 block comment 。
{
"key": "ctrl+alt+shift+/",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "/** $1 */"
}
},

dcsuibian

dcsuibian      19 小时 6 分钟前   ❤️ 1

文档注释,按#5 说的直接打就好了。这个东西功能上也有区别,不建议只为要个样式这么写。

关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2484 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 21ms · UTC 13:07 · PVG 21:07 · LAX 05:07 · JFK 08:07
Developed with CodeLauncher
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK