Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.14k stars 299 forks source link

Snippet vars should be optional #1302

Open Naatan opened 8 years ago

Naatan commented 8 years ago

Reference: http://forum.komodoide.com/t/how-to-make-a-wrapper-conditional-text-using-snippets/2654

Hello, I wrote many Snippets to "wrap" code, this is an example to wrap between php tags:

<?php [[%w]] ?>

works pretty good, but sometimes I would like to use this snippets without any text (php tags only) to start writting later, like this:

<?php ?>

Then komodo give me an error because [[%w]] is mandatory, and the tag is not inserted.

stramin commented 5 years ago

Hi guys, this request returned to how it was before on Komodo 11.1.1

It was working on the previous version (Snippet vars were optional), but they are mandatory again :(

th3coop commented 5 years ago

@starmin, i'm not aware of anyone fixing this issue and it looks like no one looked at it. Are you sure you're not mistaken? Can you provide examples that worked then didn't work or is it the same one as in this ticket description? What version did it work in?

stramin commented 5 years ago

I don't know which was the previous version I was using, maybe 11.1.0

When I used the snippet with no text selected I got exactly this text:

<?php [[%w]] ?>

it included this literal part "[[%w]]" selected, so i could write any text to replace it, it was very easy for me.

If you guys didn't work on this, then it was fixed magically...

OR

the previous version was using a different system folder and a different snippet image I don't know why I have these 2 folder but they has been there for many years and I don't know which one is used on every Komodo version.

th3coop commented 5 years ago

Komodo IDE is a Mozilla artifact and doesn't effect Komodo in any way that the user should notice. As always, KomodoIDE (no space) is the profile folder.

If you guys didn't work on this, then it was fixed magically...

Maybe, but I doubt it. I suspect the your use case changed. Although, maybe some code changed in the toolbox this release and I didn't realize it. I'll double check now.

th3coop commented 5 years ago

Hrm might have been this fix that changed it: https://github.com/Komodo/KomodoEdit/issues/3569

stramin commented 5 years ago

It looks like these "switch bugs" when you fix it and it breaks another image

th3coop commented 5 years ago

That gif it too accurate haha