VS代码中是否有快捷方式来实施开玩笑的TODO测试?
当我拥有的时候:
test.todo('customer can order a pizza');
我想要一个将行转换为以下路程的快捷方式,
test('customer can order a pizza', async () => {
<|>
});
其中&lt; |&gt;
是光标位置。
可以使用摘要吗?理想情况下,我希望在触发转换之前不必选择整个线。
还是有这样做的扩展名?
When I have:
test.todo('customer can order a pizza');
I would like a shortcut that would transform the line to:
test('customer can order a pizza', async () => {
<|>
});
where <|>
is the cursor position.
Is it possible using snippets? Ideally, I would prefer not to have to select the whole line before triggering the transform.
Or is there an extension that does this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(3)
您可以使用扩展名多command
you can use the extension multi-command
请查看jest片段到VSCODE https://marksetplace.visalstplace.visalstudio.com/itemnemnememnemes?itemnems?itemnems? = andys8.jest-snippets
Check jest snippets to vscode https://marketplace.visualstudio.com/items?itemName=andys8.jest-snippets
基于 @riov8 的
答案键盘快捷键(JSON)从命令调色板和粘贴:
我选择
cmd+shift+i
“实现”,请随时选择您喜欢的快捷方式。Based on answer from @rioV8, I was able to make it work ???? thanks a ton ????
Open
Preferences: Open Keyboard Shortcuts (JSON)
from command palette, and paste:I chose
cmd+shift+i
for "implement", feel free to choose which ever shortcut you like.