



Hi,
I've been working on polishing my HTML/CSS-oriented toolbox for Komodo Edit. This is the result (see attached file). It's not complete yet, but if you want to give it a try and share your opinion that'd be great. :)
The toolbox mostly contains snippets, including one that transforms "word|" into "<word>|</word>" (where "|" is the cursor) -- it was hard to understand how to do this one.
Snippets for single HTML elements have keybord shortcuts that go like "Insert + Key". This is what I did for me, and it works fine for me, but it requires one to change the key binding for "Toggle Insert/Replace mode", which is not so nice. So I'm open to suggestions for another key shortcut scheme.
I intend to use the Abbreviations feature as well (Komodo 4.3), but since it's only included in Komodo 4.3 alpha I don't know how it works exactly. How does Komodo know where to look for Abbreviations snippet? In the alpha2 release there is an Abbreviations folder in the standard toolbox, but what happens if you import an additional toolbox with its own Abbreviations folder?
More info on that would be great.
There are some useful links included. Tell me if I've forgotten something obvious, or included something dubious. ;)
Edit 2008-02-21: updated to 0.0.3. HTML 60% complete, CSS 30% complete. No Abbreviations yet.
Edit 2008-04-21: updated to 0.0.5. (Did I forgot to upload 0.0.4? That could be the case...) Improved a few things and reorganized some elements, but no big improvement.
| Attachment | Size |
|---|---|
| Komodo HTML-CSS toolbox - v0.0.5.kpz | 64.23 KB |
Nice work.
That's a pretty impressive collection of snippets and references there. I love the icon usage :D
Cheers,
Todd
Glad you like it.
By the way, I didn't use the "Maintain indentation context after insertion" feature for my snippets. It sounds nice, but sadly it's broken: when the indentation is done with tabs, then each new line of the snippet is prefixed with... regular spaces. So if you have an empty line with three tabs, and include a multi-line snippet with "Maintain indentation context after insertion" on, the first line will keep the three tabs but the following ones will start with three regular spaces.
Any chance that this will be fixed in 4.3?
Komodo should check what's on the line before the cursor, and keep every continuous whitespace (regular spaces and tabs alike) from the start of the line as a pattern for prefixing the next lines.
If this is fixed for 4.3, I'll use the "Maintain indentation context after insertion" feature for my multi-line snippets.
This is the following bug, you can add yourself to the CC list (and if your bugzilla preferences are setup to receive notifications), then you'll get a notifcation email of when and for which build the bug is fixed.
http://bugs.activestate.com/show_bug.cgi?id=72127
I have been working on patch for this yesterday, still needs some work, but it's getting there.
Cheers,
Todd
Another question: is there a way to offer multiple choices for the %ask function in snippets?
What would be great would be to be able to do, say:
position: [[%(ask:Position:static|relative|absolute|fixed)]];Then the user would be prompted with a dialog containing a list of pre-configured values: static, relative, absolute, and fixed.
I only seem to be able to configure one default value:
position: [[%(ask:Position:static)]];Did I miss something? And if there is no mechanism for multiple choices, should I file a feature request?
I think this is a good feature request and should be added as a Komodo enhancement request. You can do this by going to the Komodo bugzilla page:
http://bugs.activestate.com/enter_bug.cgi?product=komodo
And then log the bug with a severity of "7-Enhancement".
Thanks,
Todd
Logged bug: http://bugs.activestate.com/show_bug.cgi?id=75045
Refined some HTML snippets (whole portions are still missing though) and added some useful CSS snippets.
No Abbreviations yet.
I think I will ask for help (maybe in a separate topic) for some macros I thought of. For instance a bulletproof macro that takes a multi-line selection and turns it into a list of <p>, <li>, etc. I have a simple "taggify" snippet already (would like to turn it into a slightly more powerful macro as well), but a "batch taggify" macro would be great. Or maybe one macro could do it, with enough conditions.
Thanks for posting this, Florent. It's awesome!
Hi Florent,
Nice job, it's awesome what you did. I'm also thinking that it would be nice
to have a tree with Mozilla's CSS specific pseudo-classes and properties under
the browser specific stuff section, like -moz-border-radius or ::moz-selection. What do you say?
http://developer.mozilla.org/en/docs/CSS_Reference:Mozilla_Extensions
This might be a nice addition. But I'm not sure what I should add to the toolbox. A list of properties, one snippet for each property with some information? Duplicating the Mozilla documentation is not a good idea.
So for now I think I'll just add a link to that documentation, and to the documentation for other browsers. Please tell me if you had something else in mind.