在Sublime Text 3中,如何具有"Build and Run"的快捷方式.和“仅构建"分别像Sublime Text 2中一样? [英] In Sublime Text 3, how to have shortcuts for "Build and Run" and "Build only" separately like it was in Sublime Text 2?

查看:314
本文介绍了在Sublime Text 3中,如何具有"Build and Run"的快捷方式.和“仅构建"分别像Sublime Text 2中一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Sublime Text 3中,当我们按Ctrl + Shift + B组合键时,可以选择执行构建并运行"或仅构建",而Ctrl + B执行这两者之间的先前选择的操作.但是我希望它像这样,它应该在按Ctrl + Shift + B时​​直接构建并运行,并且仅在像Sublime Text 2中那样按Ctrl + B时​​才能构建.有人可以帮帮我吗?

In Sublime Text 3,when we press Ctrl+Shift+B, we are given the option to either do "Build and Run" or "only Build", whereas Ctrl+B executes the previously chosen operation among the two. But I want it to be like, it should directly build and run when I press Ctrl+Shift+B and only build when I press Ctrl+B like it was in Sublime Text 2. Can someone help me out?

推荐答案

将其添加到sublime-keymap中应该会导致预期的行为:

Addings this to your sublime-keymap should result in the expected behavior:

{ "keys": ["ctrl+b"], "command": "build", "args": { "variant": "" } },
{ "keys": ["ctrl+shift+b"], "command": "build", "args": { "variant": "Run" } },

但是您可能想要重新映射,将选项列表保留为alt + b:

However you might want to remap keep the list of options to alt+b:

{ "keys": ["alt+b"], "command": "build", "args": { "select": true } },

这篇关于在Sublime Text 3中,如何具有"Build and Run"的快捷方式.和“仅构建"分别像Sublime Text 2中一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆