Home Download Buy Blog Forum Support

AutoFileName (ST2/ST3)

AutoFileName (ST2/ST3)

Postby C0D312 on Fri Jan 13, 2012 7:56 pm

Do you ever find yourself sifting through folders in the sidebar trying to remember what you named that file? Can't remember if it was a jpg or a png? Maybe you just wish you could type filenames faster. No more.

Whether your making a img tag in html, setting a background image in css, or linking a js file to your html (or whatever else people use filename paths for these days...), you can now autocomplete the filename. Plus it uses the built in autocomplete, so no need to learn another pesky shortcut.

You can download it here: https://github.com/BoundInCode/AutoFileName

Enjoy!

--
Let me know if you have any bugs or feature requests.
Last edited by C0D312 on Sun Jan 22, 2012 2:11 pm, edited 1 time in total.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby weslly on Fri Jan 13, 2012 8:07 pm

This is pretty awesome and useful, thanks!
weslly
 
Posts: 202
Joined: Sun Aug 28, 2011 3:57 am
Location: Brazil

Re: New Plugin: Autocomplete Filenames

Postby rmaksim on Fri Jan 13, 2012 9:54 pm

C0D312 wrote:Let me know if you have any bugs...

Code: Select all
if not '.' in d[:-4]:
    d += '/'

for .css .png .jpg .xxx all fine.
for .js .xx .x .xxxx extra / in the end.
Last edited by rmaksim on Fri Jan 13, 2012 10:02 pm, edited 1 time in total.
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: New Plugin: Autocomplete Filenames

Postby rmaksim on Fri Jan 13, 2012 10:01 pm

C0D312 wrote:Let me know if you have any ... feature requests.

in CSS background: url( "path" );

path can be unquoted
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: New Plugin: Autocomplete Filenames

Postby C0D312 on Sat Jan 14, 2012 12:18 am

rmaksim wrote:
C0D312 wrote:Let me know if you have any bugs...

Code: Select all
if not '.' in d[:-4]:
    d += '/'

for .css .png .jpg .xxx all fine.
for .js .xx .x .xxxx[/color] extra / in the end.


Fixed.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby pod on Sat Jan 14, 2012 4:19 am

Nope, now it is broken (windows).
Also please consider that css url definition might omit quotes.
pod
 
Posts: 37
Joined: Sun Nov 07, 2010 3:32 am

Re: New Plugin: Autocomplete Filenames

Postby C0D312 on Sat Jan 14, 2012 4:53 am

pod wrote:Nope, now it is broken (windows).
Also please consider that css url definition might omit quotes.


Whoops, removed one bug, added another. I know what happened... I'll fix shortly.

As for unquoted urls, I'm working on that still.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby aziz on Sat Jan 14, 2012 2:15 pm

This is extremely cool.
When you're done with bug smashing please submit it to Sublime Text 2 Community Packages http://wbond.net/sublime_packages/community site so that people like me can install it easily and more importantly get the updates automatically.
can't wait to use this one!
PlainTasks: my opinionated todo plugin
tmThemeEditor color-scheme editor for SumblimeText and Textmate (code on github)
aziz
 
Posts: 38
Joined: Thu Jan 12, 2012 6:29 pm

Re: New Plugin: Autocomplete Filenames

Postby rmaksim on Tue Jan 17, 2012 6:32 am

Code: Select all
background:  url("../../../image.gif")
                                  |
                                  ^-cursor

ERROR in string if file
Code: Select all
dir_files = os.listdir(this_dir)

small fix
Code: Select all
        if os.path.isdir(this_dir):
            dir_files = os.listdir(this_dir)
            ...
        else:
            return []
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: New Plugin: Autocomplete Filenames

Postby rmaksim on Tue Jan 17, 2012 6:54 am

Code: Select all
elif "./" in view.substr(sublime.Region(sel-3,sel)):

the code works fine with
Code: Select all
background: url(../);

but don't works with
Code: Select all
background: url(../img/);

small fix:
Code: Select all
elif "/" in view.substr(sublime.Region(sel-2,sel)):


What are your thoughts on this?
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Next

Return to Plugin Announcements

Who is online

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