ActiveState Community

Better snippet description in toolbox

Posted by bursian on 2009-10-28 01:31

Hi,
for Tcl I use a LOT of snippets (because that language is so verbose). I don't want to use the mouse most of the time, so I use them as abbreviations (Ctrl-T). Naturally, abbrevs should be short, so I have "s", "se", "sa", "sb", "sg" etc. as snippet names, which makes it very quick to use them... as long as I remember what "se" stands for :-)

Sometimes when I need a less frequently used snippet, I don't remember that, so I open the toolbox and want to select the appropriate snippet there. Now the problem shows up: In the list I see all the short abbrevs, and nothing else.

So it would be great if Komodo had a possibility to assign a readable description (maybe two or three words) AND an abbreviation to a snippet. In the toolbox, it would be best if both was shown, for example instead of "se" the list entry would read "string equal [se]" and could be inserted via abbreviation "se" or the mouse.

Does that make sense to you? Is that feature available and I just did not find it? In the attached image you can see that the toolbox listing just doesn't make too much sense currently for me...

AttachmentSize
toolbox.png5.92 KB

dreftymac | Wed, 2009-10-28 08:56

Greetings,

The issue you mention is one that has been brought up previously. Thanks for adding your input, here are two bug entries that are related to your request:

http://bugs.activestate.com/show_bug.cgi?id=84611
http://bugs.activestate.com/show_bug.cgi?id=84610

Generally, you are free to submit any feature request as a komodo bug:

http://bugs.activestate.com/query.cgi?format=specific&product=Komodo

There are various ways around this limitation, but you would have to do some investigation of the Komodo API and macro or add-on programming for a satisfactory solution.

Another Komodo user may have a macro or something that addresses this issue. Or, perhaps one of the komodo devs will follow-up with additional tips or information.

bursian | Wed, 2009-10-28 09:15

Oh yes, I see, the first bug report you mention is exactly what I was talking about. Thanks for your kind reply, and sorry for the unnecessary noise...

ericp | Wed, 2009-10-28 10:17

Bursian, please meet bug http://bugs.activestate.com/show_bug.cgi?id=84611

I think a simple possibility is to take the abbreviation to be the
first word of a snippet's name. Then our sample snippets could
work with names like

"pdo: print date, time, and code to get weather in oslo"

That sound good?

bursian | Wed, 2009-10-28 11:22

...exactly what I would need.

ericp | Wed, 2009-10-28 11:29

I need to figure that one out....

- Eric

toddw | Wed, 2009-10-28 11:43

bursian | Wed, 2009-10-28 11:51

Eric, I tried to test your patch. But I couldn't get it to work. I openedthe komodo.jar with IZarc, replaced the file abbrev.js and rewrote the jar with IZarc. The file was replaced fine (double checked), but komodo no longer starts: The file jar:file:///C:/Program Files/ActiveState Komodo IDE 5/lib/mozilla/chrome/komodo.jar!/content/komodo.xul cannot be found. Please check the location and try again.

Anything wrong in my approach? Does the jar have to be signed, or any other special treatment? I run the latest Komodo IDE, version 5.2.1, build 34168, platform win32-x86.

bursian | Fri, 2009-10-30 02:41

Any help regarding my problem with the patch? I'm lost...

ericp | Fri, 2009-10-30 09:19

First, Komodo is telling you that it's looking for the jar file
at that location. If it is there, can you view its contents with
unzip ? On Windows I use zip and unzip to manage jar files; I'm
not familiar with IZarc.

And like the subject says, if you don't feel like tracking this
down, you can always reinstall. The files under
[C:/Program Files/ActiveState Komodo IDE 5] are treated as
a readonly view, so you won't lose any settings or data
(you will use any patches you've applied, though).

I see there haven't been any nightlies built since I checked
in the fix, but you can also keep your eye on
http://downloads.activestate.com/Komodo/nightly/komodoide/2009/
(subdir 10 today, subdir 11 next week) for updates.

- Eric

- Eric

bursian | Fri, 2009-10-30 14:02

Thanks for your advice. Reinstall is not necessary, I saved a copy of the original komodo.jar before I made my modifications. And if I copy that one back, all is fine. The modified one was in the right place and can be opened and inspected, with IZarc and with WinZip. The file komodo.xul is still in there, as expected. So I'm completely lost why the Komodo startup app complains.
You think it should work, and there is no basic problem in my approach?

ericp | Fri, 2009-10-30 14:03

is that often when something goes wrong, you get little or know feedback.
All I can infer from that message is that Mozilla couldn't find the
komodo.jar file, but there's no further info why.

- Eric

bursian | Fri, 2009-10-30 14:14

Well, I just saw the nightly build 35805 should have your patch, at least the change log says so. So I'll try that. Don't know how to use these *.mar update files, so I'll have to download the full package...

bursian | Fri, 2009-10-30 14:47

...just installed build 35805, and it works like a charm. Great work, Eric. Thanks!

ericp | Fri, 2009-10-30 14:49

Thanks,
Eric