【问题标题】:VSCODE Indentation with PHPIntellisenseVSCODE 缩进与 PHPIntellisense
【发布时间】:2021-05-26 09:01:20
【问题描述】:

我在一个团队中工作,并不是每个人都使用相同的缩进格式,所以我希望有机会只选择一部分代码并仅缩进。选择缩进和所有文档缩进具有相同的键绑定会很好。过去我使用的是 Netbeans,没有任何设置就可以正常工作。 任何建议表示赞赏

谢谢大家:)

【问题讨论】:

  • 我冒昧地建议您的团队应该就一致的格式达成一致,但这不是软件问题

标签: php visual-studio-code format indentation


【解决方案1】:

我找到了这个。 缩进所有文档(这是默认选项):

{
  "key": "shift+alt+f",
  "command": "editor.action.formatDocument",
  "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
}

仅缩进选择:

{
  "key": "shift+alt+d",
  "command": "editor.action.formatSelection",
  "when": "editorHasDocumentSelectionFormattingProvider && editorTextFocus && !editorReadonly"
}

我设法更改了每个操作的键绑定。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-18
    • 2017-08-04
    • 2020-07-24
    • 2021-08-28
    • 1970-01-01
    • 2020-06-25
    • 2017-03-22
    • 1970-01-01
    相关资源
    最近更新 更多