liamcain / AutoFileName

Sublime Text plugin that autocompletes filenames
514 stars 78 forks source link

ignored first "/" #26

Closed blancodima closed 11 years ago

blancodima commented 11 years ago

Hi. Sorry, i don't speak english, but i try describe in use 'Google Translate'.

in my project, I use absolute paths "/", example: background-image: url("/images/bg/bg-pattern.png");

But if I start with the character "/" AutoFileName shows the absolute path of my system, example:

background-image: url("/|
                        root/
                        lib32/
                        usr/
                        bin/
                        media/
                        etc...

how to make that AutoFileName optionally ignore the first "/"? example: in autofilename.sublime-settings { "ignore_first_slash": true } and AutoFileName ignored first "/"

Again, sorry for my english. Thanks.

liamcain commented 11 years ago

Correct me if I'm wrong but there should already be a way to do this. Look at the default settings Preferences > Package Settings > AutoFileName. There is a setting called afn_use_project_root which should let you do this. If that doesn't help, I plan on spending some time fixing this plugin (and adding ST3 support) soon. I just finished up a huge project so I have some free time coming up. Let me know if that helps.

blancodima commented 11 years ago

Hi Liam Cain, thanks for the reply. afn_use_project_root working correctly. Sadly afn_use_project_root not doing of what I mean. afn_use_project_root not work if I use the root directory

Oh, how hard to explain without knowing the English :D my root directory / my project directory /var/www/mysite/www/

if i write src=" AutoFileName use my project directory if i write src="/ AutoFileName use my root directory

now if I write src="image/" AutoFileName find my images but, if I write src="/image/" AutoFileName not find my images

I would want that AutoFileName use the project directory if i wrile src="/


I'll try to explain in another if AutoFileName will ignore the first "/" character, everything is working properly


I hope something understandable from the above :))

liamcain commented 11 years ago

Okay. I understand. I'll submit a fix soon. Thanks for the explanation.

liamcain commented 11 years ago

Fixed in the latest commit on the st3 branch