[英]Is there a VSCode shortcut to wrap text in a react/react-native fragment?
我发现自己经常使用片段,并希望使用键盘快捷键来使其更容易。
Add this to keybindings.json
将此添加到
keybindings.json
{
"key": "ctrl+k f", // 👈 whatever binding you want. obv.
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "<$1>${TM_SELECTED_TEXT}</$1>"
}
}
Bonus... the cursor is in position to enter the name of any other component if desired.奖励...如果需要,光标可以输入任何其他组件的名称。
Write the following:写下以下内容:
>Emmet >艾美特
Select this option:选择此选项:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.