3 Star 0 Fork 0

g8up / sublimetext3-plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMD.py 467 Bytes
一键复制 编辑 原始数据 按行查看 历史
g8up 提交于 2018-03-03 12:34 . 设置编码;更新备注
# coding=utf-8
import os, sublime_plugin, sublime
class CmdCommand(sublime_plugin.TextCommand):
def run(self, edit):
'打开 CMD,目录切换到当前文件目录'
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)
Python
1
https://gitee.com/g8up/sublimetext3-plugin.git
git@gitee.com:g8up/sublimetext3-plugin.git
g8up
sublimetext3-plugin
sublimetext3-plugin
master

搜索帮助