Sublime Forum

Is there a browse for path feature?

#1

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!

0 Likes

#2

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.

0 Likes

#3

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.

0 Likes

#4

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.

0 Likes

#5

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.

0 Likes

#6

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

And …/ will bring you up a directory

0 Likes

#7

That’s not really possible with the api… Plus I find this way faster…

0 Likes