Home Download Buy Blog Forum Support

Open Command Window Here

Re: Open Command Window Here

Postby atomi on Wed Sep 28, 2011 2:27 pm

this works for me, thanks everyone.

open_prompt.py
Code: Select all
import sublime, sublime_plugin, subprocess, os

class OpenPromptCommand(sublime_plugin.TextCommand):
    def run(self, edit, paths=[]):
        retcode = subprocess.Popen(["cmd", "/K", "cd", paths[0]])

Side Bar.sublime-menu
Code: Select all
[
    { "caption": "-", "id": "end" },
    { "caption": "Open Command Window Here", "command": "open_prompt", "args": {"paths": []} }
]
atomi
 
Posts: 342
Joined: Thu Jan 20, 2011 5:06 pm
Location: Los Angeles CA US

Previous

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests