0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ChatWork記法のVSCodeスニペットを設定する

Posted at

チャットワーク(ChatWork)にまとまった文章を投稿する時などはVisual Studio Codeで下書きして貼り付けています。
ChatWorkは独自のメッセージ記法が使えますので、そのスニペットをVSCodeに登録してみました。

環境

  • Visual Studio Code 1.24.0

グローバルスニペットの追加

Ctrl+Shift+Pでコマンドパレットを起動し、>Preferences: Configure User Snippetsと入力し、「新しいグローバルスニペットファイル」からchatwork.code-snippetsのような名前をつけて、下記を作成します。

chatwork.code-snippets
{
	"chatwork:code": {
		"prefix": "```",
		"body": ["[code]","$0","[/code]"],
		"description": "ChatWork:コード"
	},
	"chatwork:information": {
		"prefix": "info",
		"body": "[info][title]${1:タイトル}[/title]${2:本文}[/info]",
		"description": "ChatWork:インフォメーション"
	},
	"chatwork:hr": {
		"prefix": "hr",
		"body": "[hr]",
		"description": "ChatWork:罫線"
	}
}

「info」「hr」「```」と打ったあとにCtrl+Spaceで、候補が保管されるようになります。

実際の設定ファイル変更はこんな感じです。
ChatWork用グローバルスニペット追加 · s2terminal/visualstudiocode-usersetting@132742f

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?