I'm not sure somebody already developed it but I needed and after googling without success I've implemented myself.
If it already exists please point me to the right direction.
The macro allows to color view tabs by language
Consider I want to implement it as extension with a pref panel from which user can set style for all Komodo supported language but if it already developed I will discard my code.
Should be cool also to collect different styles (like stylish)
I've added on 5 styles (PHP, Javascript, HTML, CSS, all XML dialects) and color combinations are very ugly, I know :(

| Attachment | Size |
|---|---|
| ColorTabByLang.kpz | 3.03 KB |
Perhaps an icon in front of each tab can improve the appearance a bit? Just a thought.
Do you say icon replacing color? Sure can be done
Both options can be added and user can choose
- only icon
- only color
- both
But I need someone draws icons :P
--
dafi
Enhance KomodoEdit with MoreKomodo
Yeah that can be tough, no designers around : ) I am no good either. Anyway, it was just a though should you consider to add more features at some point.
> But I need someone draws icons :P
Why don't you use the default icons from the respective languages sites?
I would recommend using the famfamfam icons, since this is what Komodo uses.
I just tested icons out of curiousity and it's aint that hard to implement but it doesn't really have any added value imo.. the colors alone are sufficient for me :)
langMap["PHP"] = "color: #000 !important; background-color: #9999CC !important; background-image: url('http://www.objix.net/images/php_icon.png') !important; background-repeat: no-repeat; background-position: left; padding-left: 18px;";Once again Stan; you are my hero! :)
Personally I wouldn't use an icon feature.
One thing that I've been longing for since a long time though, is to have a double tab bar.. and by that I mean have the tabs spread over 2 bars (vertically positioned underneath each other). Once a certain amount of tabs are open.. pretty much the same way Firefox does it :) Anyway, this is not related to this macro in any way.. but since you seem quite experienced in the field.. perhaps you'd be interested to make such a modification :)
I think I don't deserve the hero award, not just yet at least :)
> but since you seem quite experienced in the field
I'm not so experienced (sob sigh) :(
A double tab isn't so easy (IMHO) but I like the idea
--
dafi
Enhance KomodoEdit with MoreKomodo
Oops.. I'm a bit embarrassed.. I read Stan as the last replier and assumed it was his macro .. Very sorry about that! (You are still my hero though, Stan ;))
My praise goes to you dafi, a simple Macro but a very nice idea :) This will make my work in Komodo Edit a lot more intuitive.
I'm this kind of hero
--
dafi
Enhance KomodoEdit with MoreKomodo
Dafi,
Oh very dangerous indeed. Here's what Dafi's TODO list looks like: "My next macro will transfer everyone's abilities to code in their programming language of choice to ME!"
Ultimate power :D
LOL
--
dafi
Enhance KomodoEdit with MoreKomodo
langMap["Smarty"] = "color: #000 !important; background-color: #F0C040 !important;";
To match the Smarty homepage :)
Smarty added
--
dafi
Enhance KomodoEdit with MoreKomodo
Since you suggested it would be cool if everyone would share their styles; here's mine..
(only includes the ones I use myself).
langMap["JavaScript"] = "color #000 !important; background-color: #BCE9AD !important;";
langMap["PHP"] = "color: #000 !important; background-color: #9999CC !important;";
langMap["Smarty"] = "color: #000 !important; background-color: #F0C040 !important;";
langMap["HTML"] = "color: #000 !important; background-color: #DAF1F0 !important;"; langMap["JavaScript"] = "color #000 !important; background-color: #BCE9AD !important;"; langMap["PHP"] = "color: #000 !important; background-color: #9999CC !important;"; langMap["Smarty"] = "color: #000 !important; background-color: #F0C040 !important;";On a side note, you should really place an event handler in your script and have it execute on startup instead.. as in it's current state it would not color tabs that are launched when restoring the last session on startup.
I'm working to the extension, no more macro
The first version (without UI to define colors) is ready
--
dafi
Enhance KomodoEdit with MoreKomodo
I've released the extension version of the macro.
Something is changed from the macro behavior, the patterns are based on file names.
Only a few file are colored (only my own favorites).
If you want I can add any other file scheme combination.
Share you color scheme ;)
You can download from colortab
--
dafi
Enhance KomodoEdit with MoreKomodo
Is there an easy way to import / export color schemes? In order to share them.. :p
Under profile there is the folder dafizilla and inside it the file colortab.json, you can copy it to a different profile directory to 'export' settings.
I want to add a section on website with color schemes preview and download feature but only if the extesion will have a few users.
You can quicky open the profile directory using the macro I use for myself.
.getService(Components.interfaces.nsIProperties)
.get("PrefD", Components.interfaces.nsILocalFile)
.clone();
Components.classes["@activestate.com/koSysUtils;1"]
.getService(Components.interfaces.koISysUtils)
.ShowFileInFileManager(currProfPath.path);
var currProfPath = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("PrefD", Components.interfaces.nsILocalFile) .clone(); Components.classes["@activestate.com/koSysUtils;1"] .getService(Components.interfaces.koISysUtils) .ShowFileInFileManager(currProfPath.path);--
dafi
Enhance KomodoEdit with MoreKomodo
Regardless; here are mine:
*.css;
color: rgb(0, 0, 0); background-color: rgb(246, 250, 125); border: 1px solid #000 !important; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; background-image: url(http://naatan.com/kbg.png);
*.html;*.htm;*.tpl
color:#000; background-color:#FFCC99; border: 1px solid #000 !important; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; background-image: url(http://naatan.com/kbg.png);
*.js;
color: rgb(0, 0, 0); background-color: rgb(190, 206, 161); border: 1px solid #000 !important; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; background-image: url(http://naatan.com/kbg.png);
*.php;*.inc
color: rgb(0, 0, 0); background-color: rgb(197, 212, 242); border: 1px solid #000 !important; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; background-image: url(http://naatan.com/kbg.png);
*
background-image: url(http://naatan.com/kbg.png);
It would be really cool if there was a way you could define different styles depending on the state of the tab (ie; selected, hovered or not selectd).
> It would be really cool if there was a way you could define different styles depending on the state of the tab (ie; selected, hovered or not selectd).
I'm working on it but honestly isn't critical from me, but believe me I'm working on it...
--
dafi
Enhance KomodoEdit with MoreKomodo