Vscode: [機能リクエスト]ユーザースニペットに複数行の説明のサポートを追加

作成日 2019年01月04日  ·  3コメント  ·  ソース: microsoft/vscode

ユーザースニペットを作成するときのルールは、次のようにする必要があります。

"example": {
    "prefix": "example",
    "body": [
        "line 1",
        "line 2"
    ],
    "description": "A single line description"
}

多くの説明を表示したい場合は、次のような多くのエスケープ文字を含む巨大な文字列を作成する必要があります。

"toctree": {
    "prefix": ".. toctree::",
    "body": [
        ".. toctree::",
        "$0"
    ],
    "description": "A toctree item, have these options:\n\t:maxdepth: para\n\t:caption: para
\n\t:numbered:\n\t:titlesonly:\n\t:glob:\n\t:reversed:\n\t:hidden:\n\t:includehidden:",
    "scope": "text.restructuredtext"
},

descriptionオプションがbodyようなリスト値を受け取ることはおそらく良い考えです:

"toctree": {
    "prefix": ".. toctree::",
    "body": [
        ".. toctree::",
        "$0"
    ],
    "description": [
        "A toctree item, have these options:",
        ":maxdepth: para",
        ":caption: para",
        ":numbered:",
        ":titlesonly:",
        ":glob:",
        ":reversed:",
        ":hidden:",
        ":includehidden:"
    ],
    "scope": "text.restructuredtext"
},
feature-request good first issue help wanted snippets

全てのコメント3件

バージョン情報:

  • コードバージョン:1.30.1(ユーザー設定)
  • コミット:dea8705087adb1b5e5ae1d9123278e178656186a
  • 日付:2018-12-18T18:12:07.165Z
  • 電子:2.0.12
  • Chrome:61.0.3163.100
  • Node.js:8.9.3
  • V8:6.1.534.41
  • OS:Windows_NT x64 10.0.17763

@jriekenこの問題の解決について

このページは役に立ちましたか?
0 / 5 - 0 評価