Re: [Geany-devel] Changes to templates

2011-03-20 Thread Lex Trotman
On 21 March 2011 02:19, Colomban Wendling lists@herbesfolles.org wrote: Le 20/03/2011 00:09, Lex Trotman a écrit : Agreed. But supporting both single and multiline comments as a filetype setting seems still a good idea. I think it should go near the top of the to-do list.  We have been

Re: [Geany-devel] Changes to templates

2011-03-19 Thread Colomban Wendling
Le 19/03/2011 00:55, Matthew Brush a écrit : On 03/18/11 14:10, Colomban Wendling wrote: we got two new lines. I'm not saying it's OK, just that this is logical (read ahead). I thought I had tested this exact scenario and it was still adding a newline, but like you said, it doesn't. As

Re: [Geany-devel] Changes to templates

2011-03-18 Thread Colomban Wendling
Le 15/03/2011 23:15, Matthew Brush a écrit : On 03/15/11 14:10, Colomban Wendling wrote: Le 15/03/2011 21:08, Matthew Brush a écrit : [...] I noticed Geany's default templates end with 2 trailing newlines, perhaps that should be changed to 1 to sort of split the difference? Not sure I

Re: [Geany-devel] Changes to templates

2011-03-18 Thread Matthew Brush
On 03/18/11 14:10, Colomban Wendling wrote: we got two new lines. I'm not saying it's OK, just that this is logical (read ahead). I thought I had tested this exact scenario and it was still adding a newline, but like you said, it doesn't. As said, the code don't add new lines, though it's

Re: [Geany-devel] Changes to templates

2011-03-16 Thread Thomas Martitz
On 16.03.2011 00:29, Lex Trotman wrote: Fix filetypes.c to use /* */ style comments rather than C++ style comments. I'd personally agree with this change, but it has a drawback: multi-line C comments can't be nested. So the comment/un-comment command becomes a little less useful since it'd

Re: [Geany-devel] Changes to templates

2011-03-16 Thread Lex Trotman
On 16 March 2011 20:57, Thomas Martitz thomas.mart...@student.htw-berlin.de wrote: On 16.03.2011 00:29, Lex Trotman wrote: Fix filetypes.c to use /* */ style comments rather than C++ style comments. I'd personally agree with this change, but it has a drawback: multi-line C comments can't

Re: [Geany-devel] Changes to templates

2011-03-16 Thread Matthew Brush
On 03/16/11 02:57, Thomas Martitz wrote: On 16.03.2011 00:29, Lex Trotman wrote: For CTRL+E, it's user configurable even, isn't it? Then I see no problem. But defaulting to //-style seems sane because it's very annoying to work around the nested comment problem. So then Java and PHP and all

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Росен Стоянов
Since there's an open thread for templates, i'll post my suggestion here. Is it possible to use a color for keywords in a specific language (const, var, public, private, protected, if, else etc.) and another for build in functions (like echo, print, substr in PHP and toString, toLowerCase in

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Matthew Brush
On 03/15/11 09:54, Colomban Wendling wrote: Le 15/03/2011 04:12, Matthew Brush a écrit : [...] Make a constant for the amount of indentation used for template comments, so that they are consistent and also set to a more reasonable value of 3 instead of 8. Related to feature request: Specify

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Matthew Brush
On 03/15/11 10:13, Росен Стоянов wrote: Since there's an open thread for templates, i'll post my suggestion here. Is it possible to use a color for keywords in a specific language (const, var, public, private, protected, if, else etc.) and another for build in functions (like echo, print, substr

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Colomban Wendling
Le 15/03/2011 21:08, Matthew Brush a écrit : On 03/15/11 09:54, Colomban Wendling wrote: Le 15/03/2011 04:12, Matthew Brush a écrit : Strip all leading and trailing whitespace on the text read from template files. What if somebody *wants* whitepaces/newlines at the end of her template? I

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Matthew Brush
On 03/15/11 14:10, Colomban Wendling wrote: Le 15/03/2011 21:08, Matthew Brush a écrit : On 03/15/11 09:54, Colomban Wendling wrote: Le 15/03/2011 04:12, Matthew Brush a écrit : Strip all leading and trailing whitespace on the text read from template files. What if somebody *wants*

Re: [Geany-devel] Changes to templates

2011-03-15 Thread Lex Trotman
Hi Guys, But the actual output comment block looks like this:  start=  /*   * foo.c   * ...   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,   * MA 02110-1301, USA.   *   *   */  end Notice the 2nd newline that gets added in here from somewhere.  I

Re: [Geany-devel] Changes to templates

2011-03-14 Thread Matthew Brush
Sorry all, I've been having mail client issues, I hope this goes to the list this time. Cheers, Matthew Brush (codebrainz) Original Message Subject:Re: [Geany-devel] Changes to templates Date: Sun, 13 Mar 2011 11:53:46 -0700 From: Matthew Brush matthewbr

Re: [Geany-devel] Changes to templates

2011-03-13 Thread Lex Trotman
On 13 March 2011 19:18, Matthew Brush matthewbr...@gmail.com wrote: Hi, I wasn't sure if I should make a feature request or a bug report, so if needed, let me know which and I'll file it on the project site. The patch attached to this message does a few things, sorry I didn't split them

Re: [Geany-devel] Changes to templates

2011-03-13 Thread Lex Trotman
On 14 March 2011 05:53, Matthew Brush matthewbr...@gmail.com wrote: On 03/13/11 03:19, Lex Trotman wrote: I don't think this is a good idea since g_strstrip() doesn't actually change the size recorded in the GString, it might appear to work sometimes but it might also fail. Note that a

Re: [Geany-devel] Changes to templates

2011-03-13 Thread Matthew Brush
On 03/13/11 20:23, Lex Trotman wrote: It seems to me that the assumption is that the template file encoding is UTF-8 or ASCII (as a subset of UTF-8) as its contents are just pasted straight into the Scintilla buffer. The standard templates are ASCII, but it may not be true for user defined