Home Download Buy Blog Forum Support

Sidebar Icons - Way of targeting a specific filename?

Sidebar Icons - Way of targeting a specific filename?

Postby kabadesu on Tue Aug 12, 2014 9:48 pm

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>scope</key>
    <string>???</string>
    <key>settings</key>
    <dict>
        <key>icon</key>
        <string>file_type_gitignore</string>
    </dict>
</dict>
</plist>


Hello,

Not sure if this is the right place to ask. I've been hunting around the internet, trying to find the answer to this, but I don't think I'm asking the right question of google.

Anyway. I'm trying to target a specific filename, of a file in the sidebar, to add a special icon to it. I want to be able to add special icons to things like .gitignore and bower.json, packages.json, while keeping regular .json files kinda dull. Is there any way of targeting a specific filename?

Any hints would be appreciated.
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Sidebar Icons - Way of targeting a specific filename?

Postby kabadesu on Wed Aug 13, 2014 1:35 am

Furthermore, being able to do something like the following would be great.

Code: Select all
<key>filename</key>
<string>*.psd</string>
kabadesu
 
Posts: 31
Joined: Wed Feb 29, 2012 9:28 am

Re: Sidebar Icons - Way of targeting a specific filename?

Postby ctf0 on Fri Aug 22, 2014 5:42 am

here is for the json
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>scope</key>
    <string>source.json</string>
    <key>settings</key>
    <dict>
        <key>icon</key>
        <string>file_type_node</string>
    </dict>
</dict>
</plist>

so make a folder call "Theme - Default" in ur packages folder and save the file as json.tmPreferences (you can name it anything u want as ST only check whats inside the file not the file name it self) ,about the dotfiles so it targets all the hidden files am still hunting that too.
ctf0
 
Posts: 11
Joined: Thu May 15, 2014 7:49 pm

Re: Sidebar Icons - Way of targeting a specific filename?

Postby enshrined on Tue Aug 26, 2014 11:03 pm

How about targeting by filename rather than extension?
For example, setting a certain icon for JS files and then a separate one for gulpfile.js?
enshrined
 
Posts: 2
Joined: Tue Aug 26, 2014 10:58 pm
Location: Cornwall, UK

Re: Sidebar Icons - Way of targeting a specific filename?

Postby FichteFoll on Wed Oct 15, 2014 12:46 am

Not possible.
FichteFoll
 
Posts: 407
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany


Return to Plugin Development

Who is online

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