在VSCode,当我发布主要组合ctrl+时, VSCode将评论选定的线线,确保登革功能。 因此,如果法典系从第16号立场开始,那么评论的双重界限(即:/
)将处于第16位的位置,将法典移至右边。
我要指出这一点,因为当我新闻ctrl+/时,该评论将永远从一栏的位置开始。 0. 是否可能这样做?
感谢。
在VSCode,当我发布主要组合ctrl+时, VSCode将评论选定的线线,确保登革功能。 因此,如果法典系从第16号立场开始,那么评论的双重界限(即:/
)将处于第16位的位置,将法典移至右边。
我要指出这一点,因为当我新闻ctrl+/时,该评论将永远从一栏的位置开始。 0. 是否可能这样做?
感谢。
https://stackoverflow.com/a/723113/836330”
这是一个小小小小小小小小.,但检验了这一点。 你们需要一个宏观的延伸,例如、多边-command。
在你的关键约束力中。 json:
{ // disable ctrl+/ for js/php files only
"key": "ctrl+/",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php)/"
},
{ // call the macro multiCommand.insertCommentColumn0 when
// commenting a single line
"key": "ctrl+/",
"command": "extension.multiCommand.execute",
"args": { "command": "multiCommand.insertCommentColumn0" },
"when": "!editorHasSelection && editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php)/"
},
{ // call the macro multiCommand.AddCommentColumn0MultipleLines when
// commenting more than one line
"key": "ctrl+/",
"command": "extension.multiCommand.execute",
"args": { "command": "multiCommand.AddCommentColumn0MultipleLines" },
"when": "editorHasSelection && editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php)/"
},
{ // call the command editor.action.removeCommentLine when
// commenting a single or multiple line(s)
"key": "ctrl+shift+/",
"command": "editor.action.removeCommentLine",
"when": "!editorHasSelection && editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php)/"
},
在您的环境下,大事是:
"multiCommand.commands": [
{
"command": "multiCommand.insertCommentColumn0",
"sequence": [
"cursorLineStart",
{
"command": "type",
"args": {
"text": "// "
}
},
]
},
{
"command": "multiCommand.AddCommentColumn0MultipleLines",
"sequence": [
"editor.action.insertCursorAtEndOfEachLineSelected",
"cursorLineStart",
{
"command": "type",
"args": {
"text": "// "
}
},
"removeSecondaryCursors"
]
},
www.un.org/chinese/ga/president 你们可以改变,如果你们想要关键的约束者申请更多的档案。
你们可以把这些钥匙改变到你们想要的东西。 注:斜线(目前不能)是使用Ctrl+/的简单基点,但关键的约束性没有办法发现已经存在评论。 你们需要获得这种功能。
这种方法的一个缺点是,如果你选择多条线路并对其进行评论,那么你将失去中学选择权(如白天可以看到的)。
对于那些在这里umble倒的人来说,接受的解决办法是热心的,我希望加以扩大。 这一修改保留了以下标题:.c
和.cpp
文档,以及可在.py
和上浏览评论。 其他评论类型和档案延期很容易增加。
请注意,我倾向于<代码>/至/
(无挂号背书)。 感到可以随意更改。
keybindings.json
{
// call the macro multiCommand.insertCppCommentColumn0 when
// commenting a single or multiple line(s)
"key": "ctrl+/",
"command": "multiCommand.insertCppCommentColumn0",
"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php$|c$|cpp$|json)/"
},
{ // call the macro multiCommand.insertPyCommentColumn0 when
// commenting a single or multiple line(s)
"key": "ctrl+/",
"command": "multiCommand.insertPyCommentColumn0",
"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\.(py$|sh)/"
},
{ // call the command editor.action.removeCommentLine when
// commenting a single or multiple line(s)
"key": "ctrl+shift+/",
"command": "editor.action.removeCommentLine",
"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\.(js$|php$|c$|cpp$|json$|py$|sh)/"
},
地点:json
"multiCommand.commands": [
{
"command": "multiCommand.insertCppCommentColumn0",
"description": "Toggle Comments (c/c++/json/js/php)",
"sequence": [
"editor.action.setSelectionAnchor",
"editor.action.insertCursorAtEndOfEachLineSelected",
"cursorLineStart",
{
"command": "type",
"args": {
"text": "//"
}
},
"removeSecondaryCursors",
"editor.action.selectFromAnchorToCursor"
]
},
{
"command": "multiCommand.insertPyCommentColumn0",
"description": "Toggle Comments (py/sh)",
"sequence": [
"editor.action.setSelectionAnchor",
"editor.action.insertCursorAtEndOfEachLineSelected",
"cursorLineStart",
{
"command": "type",
"args": {
"text": "#"
}
},
"removeSecondaryCursors",
"editor.action.selectFromAnchorToCursor"
]
}
I can t seem to find this one! So say someone like "Joe" (the Author) submits his code into the svn repository with the message "Fixed this bug and that bug yada yada" (his Comments). I d like to ...
Using the latest VS 10 we created html markup, then commented it with html comments. The file on disk is not mangled, but when it renders, it renders the html comment tags, then removes some of the ...
If i have an interface, which i add comments to to identify that a specific exception will be thrown, is it ok for implementing classes to throw different exceptions? A (bad) example is: public ...
This may sound like a foolish question or an observation, but i have seen that most of the times when one tries to look at the opensource code, there are no comments or just one or two lines at the ...
Everyone knows the advantages of a more readable code. So in order to make my code more readable what i do normally is include the commented class declaration in the implementation file of that class....
Over the years, I ve discovered that green-programmers tend to read the comments rather than the code to debug issues. Does having one person document the other person s code (and vice-versa) with ...
Is it possible to override the auto-indentation of comments in VB.NET (Using visual studio 2008)? Please see the comment above the second Case Statement in the code below for context. The IDE auto-...
It is valid JavaScript to write something like this: function example(x) { "Here is a short doc what I do."; // code of the function } The string actually does nothing. Is there any reason, ...