Home Download Buy Blog Forum Support

AutoFileName (ST2/ST3)

Re: New Plugin: Autocomplete Filenames

Postby tanepiper on Tue Jan 17, 2012 11:12 am

Instead of using hard coded path separators for Linux/MacOS and Windows, instead use os.path.sep

Code: Select all
dir_len = this_file.rfind(os.path.sep)
tanepiper
 
Posts: 68
Joined: Sun Nov 06, 2011 6:40 am

Re: New Plugin: Autocomplete Filenames

Postby bizoo on Tue Jan 17, 2012 11:20 am

There are plenty of path manipulation functions in the os.path module http://docs.python.org/release/2.6.7/library/os.path.html?module-os.path
Most of them are OS independent.
os.path.split() is probably what you want.
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: New Plugin: Autocomplete Filenames

Postby C0D312 on Tue Jan 17, 2012 7:52 pm

*The plugin is now available through Package Control.*

If you would like to submit a fix or new feature, pull requests are welcome: https://github.com/BoundInCode/AutoFileName/pulls
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby C0D312 on Wed Jan 18, 2012 12:35 am

Just released a fixed that should appease the complainers...
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby pod on Wed Jan 18, 2012 4:22 am

>>Just released a fixed that should appease the complainers...

Thanks, now it looks more stable. As for css, autocomplete still doesn't work for non-quoted url declaration.
pod
 
Posts: 37
Joined: Sun Nov 07, 2010 3:32 am

Re: New Plugin: Autocomplete Filenames

Postby rmaksim on Wed Jan 18, 2012 6:14 am

pod wrote:As for css, autocomplete still doesn't work for non-quoted url declaration.

It works fine.
Your last char in path must contain backslash /, and only then press CTRL+SPACE
for example:
Code: Select all
background: url(./)
background: url(../)
background: url(img/)
background: url(../img/)
                      |
                      ^-cursor after slash
Last edited by rmaksim on Wed Jan 18, 2012 11:48 am, edited 1 time in total.
rmaksim
 
Posts: 59
Joined: Sat Jul 02, 2011 7:31 pm

Re: New Plugin: Autocomplete Filenames

Postby jbrooksuk on Wed Jan 18, 2012 11:34 am

I installed by package manager and can't really see anything happening when coding in PHP?
jbrooksuk
 
Posts: 781
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: New Plugin: Autocomplete Filenames

Postby pod on Wed Jan 18, 2012 3:27 pm

Your last char in path must contain backslash /, and only then press CTRL+SPACE

Yes, that is how I was testing it. I'm on windows7x64, sublime b2165, installed from package manager and I still having issues.
pod
 
Posts: 37
Joined: Sun Nov 07, 2010 3:32 am

Re: New Plugin: Autocomplete Filenames

Postby C0D312 on Wed Jan 18, 2012 8:15 pm

Hmm... for those of you who are having issues, could you please open your console (control + ` ) and tell me what appears after you press control + space?

jbrooksuk wrote:I installed by package manager and can't really see anything happening when coding in PHP?

Could you give me a sample of your code to test with? I don't use PHP and it would be helpful for me to see the problem firsthand. Thanks.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: New Plugin: Autocomplete Filenames

Postby pod on Thu Jan 19, 2012 2:43 am

for those of you who are having issues, could you please open your console (control + ` ) and tell me what appears after you press control + space?

Nothing happens, no errors :(
pod
 
Posts: 37
Joined: Sun Nov 07, 2010 3:32 am

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests