Open thorade opened 8 years ago
I prefer the compact version containing \n
and so on.
OK, compact versus multiple lines is one difference.
Another difference is that Boris uses something like ${1:ClassName}
.
Do you understand what it does?
I guess this are just labelled placeholders similar to comments. But I am not sure.
I need to read more about how snippets work https://atom.io/docs/latest/using-atom-snippets https://github.com/atom/snippets
The ${1:ClassName}
prefills the entry with "Classname". It's useful as a reminder of what goes there.
I see! Thanks for the explanation.
Sounds like the best way here is to close this pull request and start over from Raphaels snippets, adding these ${1:ClassName}
defaults. If nobody insists, I will close this pull request this afternoon.
There are even more differences between both versions, e.g. for model.
I think it is good to add the equation block, however I think the description should not be added, since it could be annoying to have it everywhere. What do you think?
What happens when you cycle through the tab-marks? Is the placeholder/default value marked so that it can be overwritten without marking the text first or do yo uhave to mark the default value to overwrite it?
The default value is already selected so that you can replace it by just typing.
I do not have a strong opinion on the default values, my impression is they do offer small advantages and bring almost no disadvantages.
I only use the snippets for if
and for
anyway.
I might start using snippets also for model
and block
etc, I just tested it and I like how one can write the model name at two places simultaneously!
I find the snippet name string unnecessarily verbose, e.g. "Modelica function definition" vs. "function" -- it's already clear, if you're in a Modelica file, that the snippets will be Modelica snippets, and it could be that during use this takes unnecessarily much space in the autocomplete popup (but I haven't tried that out).
You are right. I will close this pull request without merging it. We can then start from Raphaels version (currently on master) and add only the parts that we like.
there's no need to close it (e.g. the rest looked better than the old one imo), we could have just updated/shortened the new description strings.
Well, then @bilderbuchi and @lochel have to discuss and decide whether we want the short or long version. @tshort do you have a strong opinion on this?
My reasons for preferring the long version:
I would propose something like 776bbf0ad0abeeda5f48823336ddbc2de75f23e7.
We should somehow define consistent default values for model/record/function/block/class names. Probably Unnamed
should be fine.
so, should we go forward with this? At this point I don't have a preference either way.
I don't have a preference either way.
On Tue, Mar 15, 2016 at 9:41 AM, Christoph Buchner <notifications@github.com
wrote:
so, should we go forward with this? At this point I don't have a preference either way.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub:
https://github.com/modelica-tools/atom-language-modelica/pull/15#issuecomment-196822797
the only thing that would be great would be to lose the "Modelica ..." prefix of all the snippet names, as that is imo pretty redundant.
Also, no preferences on my side
Boris' snippets contain default values for certain place holders.
The converted snippets from Boris' package define more or less the same snippets (snippet for
while
is missing). I believe the version from Boris is more readable, using new line instead of new line character\n
. Do we want a blank line before every snippet?