Sublime Text 3 - open a CMD prompt in the current project directory or directory (Windows)

The solution for Sublime Text 2 is here Sublime Text 2 - open the CMD prompt in the current directory or project directory (Windows) . But this script does not work in ST3.

+4
source share
1 answer

A simpler solution is to install SublimeREPL , there is a REPL shell. You can add a layout to your user configuration. However, this will open the shell inside Sublime.

If you prefer, the old script still works. Instead of putting them ( cmd.py and Context.sublime-menu ) in the cmd directory, you put them in the cmd directory, which should be uppercase.

And I simplified the script, here:

 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') 
+10
source

Source: https://habr.com/ru/post/1498566/


All Articles