Home Download Buy Blog Forum Support

Command line opening at line#, column#

Re: Command line opening at line#, column#

Postby jps on Sun Mar 23, 2008 3:52 am

Sublime does accept files on the command line (that's how it works with WinSCP, for example), but because it allows multiple files on the command line, files with spaces in the name must be quoted. IPython doesn't appear to quote the files it sends by default, which would account for the behavior you're seeing if there's spaces in the file names.

It appears that an editor hook can be written for IPython to make it pass command line parameters as Sublime Text requires.

There's no support for line and column numbers on the command line yet, but it's straightforward to add, so I'll put in in the next beta. Unless someone speaks out, the format will be filename:line:column, with the :column portion being optional.

If you pass --multiinstance on the command line, then the files will be opened in new process rather than the existing one (if any).
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Command line opening at line#, column#

Postby SteveCooperOrg on Sun Mar 23, 2008 9:19 am

Jon -- when you are in that neck of the woods, could you also have a look at opening multiple files from the explorer menu? That is, if I select two files, right-click and choose 'Oen in Sublime Text', neither file opens, rather than both. One at a time if fine, though.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Command line opening at line#, column#

Postby jps on Sun Mar 23, 2008 9:53 am

Steve - I looked into that recently, and the answer seems to be that if you want to be able to accept multiple files via the explorer context menu, then the only option is a shell extension, rather than the simple registry setting that's in place now.

It'll happen eventually, but it's not a priority atm.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Command line opening at line#, column#

Postby SteveCooperOrg on Sun Mar 23, 2008 10:07 am

yeah, I've just noticed -- it doesn't even send two single-item commands, does it? weird.
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Command line opening at line#, column#

Postby adrian on Mon Mar 24, 2008 7:33 pm

SteveCooperOrg wrote:Jon -- when you are in that neck of the woods, could you also have a look at opening multiple files from the explorer menu? That is, if I select two files, right-click and choose 'Oen in Sublime Text', neither file opens, rather than both. One at a time if fine, though.


Probably nothing new to you, but as a temporary solution, select multiple files you want to edit and drag and drop them to Sublime Text. You can also drag the files to the Sublime tab on the taskbar, wait till Sublime pops up and then release the files in the text editor area. Sounds more tedious than it is and works quite quick actually.
adrian
 
Posts: 3
Joined: Thu Mar 20, 2008 9:55 am

Re: Command line opening at line#, column#

Postby SteveCooperOrg on Mon Mar 24, 2008 8:03 pm

yep, that'll sort me out. Cheers, adrian!
Maybe what you're looking for is at the http://www.sublimetextwiki.com
SteveCooperOrg
 
Posts: 193
Joined: Thu Mar 20, 2008 9:53 am

Re: Command line opening at line#, column#

Postby jps on Tue Mar 25, 2008 8:40 am

Also FYI, it appears to work under Vista.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests