Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread elextr
> I didn't meant for this to be the syntax but the result. For the syntax I 
> would rather suggest something like %cursor=function_name% or similar, 
> extending the current syntax in what seems at a glance like a compatible way.

Ok, fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23347078

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread Colomban Wendling
> And yeah a semantic snippet placeholder might be a nice future improvement, 
> but [ ] is a common language syntax, so I suspect it may get used in 
> snippets, so another syntax for indicating the placeholder might be better […]

I didn't meant for this to be the syntax but the result.  For the syntax I 
would rather suggest something like `%cursor=function_name%` or similar, 
extending the current syntax in what seems at a glance like a compatible way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23347074

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread Colomban Wendling
> I disagree that it looks better, I prefer one char. Unfortunately … is 
> troublesome.

Well, I don't feel like `_` really looks like a placeholder in the context of 
programming.  Maybe a space would fit better for only one ASCII character?

> I then chose _ because it's also less likely to mess up the tagmanager due to 
> syntax errors introduced by the ellipsis.

It is indeed, though good parsers should handle it not too badly.  But that 
might be a valid point indeed.  I guess ideally the snippet could provide the 
placeholder, to expand like:
```
def [function_name]([arguments]):
"""[documentation]"""
[body]
```
with `[]` representing the indicator range.  But that's a whole other story.

@codebrainz @elextr opinions on that?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23346900

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-24 Thread Thomas Martitz
I disagree that it looks better, I prefer one char. Unfortunately … is 
troublesome.
I then chose _ because it's also less likely to mess up the tagmanager due to 
syntax errors introduced by the ellipsis.

I don't feel very strong about it, though.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23274521