-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open the project #43
Open the project #43
Conversation
Open the newly created project in new window instead of opening its directory.
|
||
__ST3 = int(sublime.version()) >= 3000 | ||
if __ST3: | ||
from STProjectMaker.configuration import ConfigurationReader | ||
else: | ||
from configuration import ConfigurationReader | ||
|
||
def subl(args=[]): | ||
# learnt from SideBarEnhancements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a proper doc string here.
@@ -225,7 +240,8 @@ def customize_project(self): | |||
self.rename_files() | |||
self.find_project_file() | |||
self.read_configuration() | |||
self.window.run_command("open_dir", {"dir":self.project_path}) | |||
subl(["-n", self.project_file]) | |||
#self.window.run_command("open_dir", {"dir":self.project_path}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment.
@@ -6,13 +6,28 @@ | |||
import sublime | |||
import sublime_plugin | |||
|
|||
import subprocess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may also use the inbuilt exec
module.
I believe it is cleaner to stick to ST's own modules, even if they only wrap the same python core modules.
Use like:
sublime.active_window().run_command("exec", args)
See: http://docs.sublimetext.info/en/latest/reference/commands.html?highlight=commands
|
||
__ST3 = int(sublime.version()) >= 3000 | ||
if __ST3: | ||
from STProjectMaker.configuration import ConfigurationReader | ||
else: | ||
from configuration import ConfigurationReader | ||
|
||
def subl(args=[]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name should be more descriptive. What about open_project_window
?
The args
should default to None
, not a list object here.
args
should not be named other than args
, as the convention reserves *args
for overloading.
@audinue Thank you for your effort out into this PR. I believe it is a great step forward to a better user experience! I left a couple of minor comments throughout the code. If you address those, we may proceed with merging. |
Closing in favor of fresh PR #53 |
Open the newly created project in new window instead of opening its directory.