Kab*_*bie 12

一个更简单的解决方案是安装SublimeREPL,还有一个shell REPL.您可以将keymap添加到用户配置中.但是这打开了Sublime里面的shell.

如果您愿意,旧脚本仍然有效.而不是把它们(cmd.py&Context.sublime-menu)在一个cmd目录下,你把他们在Cmd目录中,应当资本化的.

我在这里简化了脚本:

import os, sublime_plugin

class CmdCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        path, _ = os.path.split(self.view.file_name())
        os.chdir(path)
        os.system('cmd')
Run Code Online (Sandbox Code Playgroud)