Home Download Buy Blog Forum Support

Get path of selected node in side bar

Get path of selected node in side bar

Postby ljwagerfield on Tue Apr 16, 2013 4:19 pm

How can I get the path of the selected node in the sidebar?

This could be a file or folder, and may not necessarily be the actively opened view/buffer... so please don't suggest the following :P

Code: Select all
self.view.file_name()
ljwagerfield
 
Posts: 4
Joined: Sun Apr 14, 2013 12:58 pm

Re: Get path of selected node in side bar

Postby skuroda on Wed Apr 17, 2013 5:14 pm

You can't right now, or at least I don't know of a way. The closest you could get is view.file_name() though as you pointed out, that's lacking.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am

Re: Get path of selected node in side bar

Postby ljwagerfield on Fri Apr 19, 2013 1:54 pm

Thanks Skuroda,

On an unrelated note: where can I make feature suggestions for the AdvancedNewFile plugin? Specifically:

When using autocomplete for folders (i.e. hitting tab), the current functionality causes the next folder to cycle through a list of all subfolders if there is more than one. Great - I like that :) However, how do I quickly *select* one of these suggestions and then continue pressing tab? I would like a workflow similar to the following:

Code: Select all
Type: 'sr'
<tab> src/
<tab> src/scala/
<tab> src/scala/domain (notice no trailing '/')
<tab> src/scala/shared (notice no trailing '/')
<forward-slash> src/scala/shared/
<tab> src/scala/shared/my/
<tab> src/scala/shared/my/stuff/


Currently the autocomplete for selecting the next sub-folder becomes disabled after you hit a directory with multiple folders, requiring you to type the first letter of the next subfolder to get things going again.
ljwagerfield
 
Posts: 4
Joined: Sun Apr 14, 2013 12:58 pm

Re: Get path of selected node in side bar

Postby skuroda on Fri Apr 19, 2013 8:07 pm

Yea, I need to make some updates to that, specifically the auto complete stuff. Things are a bit tricky because it relies on the built in auto complete functionality. I'm hesitant to pull it out completely because I know some users use ctrl+space to bring up the list of entries, rather than just tabbing through. Anyways, all issues/feature request should be posted at https://github.com/skuroda/Sublime-Adva ... state=open
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests