Home Download Buy Blog Forum Support

Is there a browse for path feature?

Is there a browse for path feature?

Postby Harkonenn on Sun Feb 05, 2012 2:17 pm

I've been demo-ing Sublime Text 2 beta on Windows 7 64-bit, and I like it so far. But, I'm used to working in Dreamweaver. In DW, when entering a path attribute, such as an href, the opening quotation mark triggers an autocomplete popup with an option to browse for a file. This is a great time-saver, and I was wondering if there's a similar feature in ST2, or perhaps a plugin?

Thanks!
Harkonenn
 
Posts: 3
Joined: Sun Feb 05, 2012 2:05 pm

Re: Is there a browse for path feature?

Postby C0D312 on Sun Feb 05, 2012 2:31 pm

You can try out my plugin AutoFileName, which does just that. It's available through Package Control or from https://github.com/BoundInCode/AutoFileName

Please let me know if you have any feature requests or issues.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Is there a browse for path feature?

Postby Harkonenn on Sun Feb 05, 2012 5:27 pm

Thanks for the response! Now, since I'm unfamiliar with ST, could you please help me to use the plugin? I placed it in "C:\Users\[me]\AppData\Roaming\Sublime Text 2\Packages\User", but I'm clueless as to how to invoke the command.
Harkonenn
 
Posts: 3
Joined: Sun Feb 05, 2012 2:05 pm

Re: Is there a browse for path feature?

Postby C0D312 on Sun Feb 05, 2012 5:46 pm

First off, place the entire folder (which should include autofilename.py and the README) in Sublime Text 2\Packages, not in the user folder. It shouldn't really matter for this plugin but it's the proper convention.

AutoFileName uses Sublime's Built-in autocomplete to attempt to be as simple and seamless as possible. That way you don't need to memorize another shortcut, etc. To invoke it, press control+space when inside a string (ie. quotes). The plugin will check if the previous character is either / or \ and should provide both relative and absolute path completion.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Is there a browse for path feature?

Postby Harkonenn on Sun Feb 05, 2012 6:02 pm

OK, I have it working now, thanks.

The behavior isn't quite what I expected, but that certainly is NOT a criticism.

I entered an href in an HTML file, opened quotes, entered "/" and then pressed CTRL+SPACE. The plugin brought up a list of files and directories which appear to be based off of the root (C:). What I was hoping for would be something more along the lines of "Browse..." which would just open up a standard Windows file dialog from which I could select the file I want without having to know the path.
Harkonenn
 
Posts: 3
Joined: Sun Feb 05, 2012 2:05 pm

Re: Is there a browse for path feature?

Postby C0D312 on Sun Feb 05, 2012 6:06 pm

BTW. You can get a relative path by typing ./ instead of /

And ../ will bring you up a directory
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Is there a browse for path feature?

Postby C0D312 on Sun Feb 05, 2012 6:09 pm

What I was hoping for would be something more along the lines of "Browse..." which would just open up a standard Windows file dialog from which I could select the file I want without having to know the path.


That's not really possible with the api... Plus I find this way faster...
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am


Return to General Discussion

Who is online

Users browsing this forum: prmaple and 22 guests