改行<br>を入力するのが楽になりました。 < > " & '
も楽して入力したいと思いました。これらの実現するにはaltしかなさそうです。
コマンドパレットでキーボードと入力すると、
keybindings.jsonの設定が表示されます。
例えば、alt+2で "になるようにkeybindings.jsonに以下の記述を加えます。
[
//改行
{
"key": "alt+enter",
"command": "type",
"args": {
"text": "<br>\n"
//<br> タグを挿入
},
"when": "editorTextFocus && editorLangId == 'html'"
},
//スペース
{
"key": "shift+space",
"command": "type",
"args": {
"text": " "
//<br> タグを挿入
},
"when": "editorTextFocus && editorLangId == 'html'"
},
// <
{
"key": "alt+,",
// <
"command": "type",
"args": {
"text": "<"
},
"when": "editorTextFocus && editorLangId == 'html'"
},
// >
{
"key": "alt+.",
// <
"command": "type",
"args": {
"text": ">"
},
"when": "editorTextFocus && editorLangId == 'html'"
},
// "
{
"key": "alt+2",
// <
"command": "type",
"args": {
"text": """
},
"when": "editorTextFocus && editorLangId == 'html'"
},
// '
{
"key": "alt+7",
// <
"command": "type",
"args": {
"text": "'"
},
"when": "editorTextFocus && editorLangId == 'html'"
},
// &
{
"key": "alt+6",
// <
"command": "type",
"args": {
"text": "&"
},
"when": "editorTextFocus && editorLangId == 'html'"
},
]
alt+目的のキーを押せば、< > " & 'が挿入されます。
操作の統一のため改行はalt+enterに変更ました。
また、shift+spaceで が挿入されます。
|