【问题标题】:Shortcut key to run (build) code up to the current line in SublimeText3?在 Sublime Text 3 中运行(构建)代码到当前行的快捷键?
【发布时间】:2020-09-11 14:00:14
【问题描述】:

我在 macOS 上使用 SublimeText3 来编写我的代码。我想运行/构建一个代码,直到光标所在的当前行。 有快捷键吗?

选择从开头到当前行的所有行的快捷键也会有所帮助。我可以使用它,然后使用键绑定进行构建。

虽然下面给出的示例很短,但我打算在包含许多代码行的脚本中使用它。

.py 脚本示例:

 print("a")
 print("b") #keep cursor here and use key board shortcut to run all lines of code up to this line.
 print("c")

【问题讨论】:

    标签: sublimetext3 sublimetext sublime-text-plugin


    【解决方案1】:

    Sublime Text 没有内置调试器,因此没有运行光标功能。

    可以使用Package Control 安装各种调试插件。其中有 Python Debugger 可能对您有用,因为您在帖子中提到了 Python,而 Sublime Debugger 尝试与 Visual Studio Code 的调试器非常接近

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-23
      • 2016-05-29
      • 2012-07-20
      相关资源
      最近更新 更多