Visual studio 在可视代码上插入带有宏的新行
根据您正在使用的代码,设备上的React本机热重新加载并非始终正常工作,因此我们必须重新加载应用程序 因此,我正在编写一个代码snipet来重新加载我的android设备。我总是在可视代码上保存一个文件,就像RN热重新加载一样 我的疑问是:如何向脚本中添加命令以添加新行? 类似于:Visual studio 在可视代码上插入带有宏的新行,visual-studio,visual-studio-code,visual-studio-macros,Visual Studio,Visual Studio Code,Visual Studio Macros,根据您正在使用的代码,设备上的React本机热重新加载并非始终正常工作,因此我们必须重新加载应用程序 因此,我正在编写一个代码snipet来重新加载我的android设备。我总是在可视代码上保存一个文件,就像RN热重新加载一样 我的疑问是:如何向脚本中添加命令以添加新行? 类似于:editor.action.insertNewLine Obs:我找不到这方面的参考资料,如果你有建议的话,谢谢 "macros": { "runCommandInTerminal": [ {
editor.action.insertNewLine
Obs:我找不到这方面的参考资料,如果你有建议的话,谢谢
"macros": {
"runCommandInTerminal": [
{
"command": "cursorMove",
"args": {
"to": "wrappedLineEnd",
}
},
"editor.action.insertNewLine",// command to add new line here
{
"command": "type",
"args": {
"text": "adb shell input text \"RR\" "
}
},
{
"command": "cursorMove",
"args": {
"to": "wrappedLineStart",
"by": "wrappedLine",
"value": 1,
"select": true
}
},
"workbench.action.terminal.runSelectedText",
"editor.action.clipboardCutAction",
"workbench.action.files.save",
],
}
在搜索和阅读参考资料后,我找到了一个解决方案。 如果有人对我的GitHub感兴趣: