Home Download Buy Blog Forum Support

Opening a project from command line

Opening a project from command line

Postby Swimming_Bird on Mon Sep 12, 2011 7:53 pm

Doing subl --project registers the project. So if the project isn't already open it'll open it in a new window, otherwise it opens up a new empty project, very odd behavior.

Opening the sublime-project file just pops it into the editor.

I'm looking for a good way to hop straight into a project from a macro or something similar.
Swimming_Bird
 
Posts: 15
Joined: Tue Sep 06, 2011 3:55 pm

Re: Opening a project from command line

Postby jps on Mon Sep 12, 2011 11:35 pm

Could you explain what you're trying to do in more detail? The described behaviour sounds correct to me.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Opening a project from command line

Postby Swimming_Bird on Tue Sep 13, 2011 4:05 pm

current behavior:

If the project isn't open:
$ subl --project foo.sublime-project :arrow: open foo project in new window

If the project is open:
$ subl --project foo.sublime-project :arrow: open empty window

desired behavior for unopened project:
$ subl --project foo.sublime-project :arrow: open foo project in main window and focus on app
$ subl -n --project foo.sublime-project :arrow: open foo project in new window and focus on said window

desired behavior for opened project:
$ subl --project foo.sublime-project :arrow: focus on window with foo project opened
$ subl -n --project foo.sublime-project :arrow: focus on window with foo project opened
Swimming_Bird
 
Posts: 15
Joined: Tue Sep 06, 2011 3:55 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 39 guests