Last active
August 29, 2015 14:00
-
-
Save HereChen/11201279 to your computer and use it in GitHub Desktop.
sublime: open cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sublime_plugin | |
class CmdCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
file_name=self.view.file_name() | |
path=file_name.split("\\") | |
current_driver=path[0] | |
path.pop() | |
current_directory="\\".join(path) | |
command= "cd "+current_directory+" & "+current_driver+" & start cmd" | |
os.system(command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment