Nick Treleaven | 1 Dec 2008 15:44

Re: tab close icon - Re: SF.net SVN: geany:[3244] trunk

On Sat, 29 Nov 2008 13:48:51 +0100
Enrico Tröger <enrico.troeger@...> wrote:

> >...but now the image on the button is aligned to the right, instead
> >of being centred (but with the button still aligned to the right of
> >the tab).
> 
> Should be fixed in SVN.

Thanks, works fine now.

Regards,
Nick

Walery Studennikov | 1 Dec 2008 16:58
Picon

Re: YAML syntax highlighting support

2008/11/29 Enrico Tröger <enrico.troeger@...>:
>>Thank you.
>>I've made the final version of the patch -- it is attached.
>
> And it was again missing many parts of v2.
> Anyway, I just committed my version to SVN. If anything is missing,
> just tell me.

Yes, it works. Thank you!

--

-- 
Walery Studennikov
http://www.reg.ru/

ioguix | 2 Dec 2008 06:03
Picon
Favicon

Re: Adding auto-close brackets, braces and string

Hi,

Thanks for the feedback ! Your advices and tips are appreciated :)

On Sun, 30 Nov 2008, Enrico Tröger wrote:

> On Fri, 28 Nov 2008 05:55:25 +0100 (CET), ioguix@... wrote:
>
>> Hi,
>>
>> First of all, thanks for this great piece of code that is Geany !
>>
>> Now, I would like to use auto-close brackets, brace and string in
>> Geany. As it doesn't looks very complicated, it could be a fairly easy
>> feature to implement for a first time contributor like me.
>>
>> So here is my proposal:
>> These options will auto-close ( [ { ' and " while typing, positionning
>> the cursor between the pair.
>> Nothing really revolutionar here as some IDE already implement that.
>> Moreover, it sounds this cannot be done using snippets and I can't
>> seriously think about doing a plugin for such a feature (I'm not even
>> sure it's fesable). So I believe it belongs to Geany's core.
>
> As long as it is configurable(i.e. I can disable it :D) I'm fine with
> this. We already have the basic code for this in Geany, even
> though it's only used for LaTeX right now.
> Check auto_close_bracket() in src/editor.c. Remove the check for the
> lexer == latex and add the missing characters (currently it only works
> for { and [.
(Continue reading)

Nick Treleaven | 2 Dec 2008 13:38

Re: Adding auto-close brackets, braces and string

On Tue, 2 Dec 2008 06:03:36 +0100 (CET)
ioguix@... wrote:

> One question: to keep the code readable, I used these macros to
> define the values:
> #define AC_PARENTHESIS 1
> #define AC_CBRACKET 2
> #define AC_SBRACKET 4
> #define AC_SQUOTE 8
> #define AC_DQUOTE 16
> 
> What is your policy about that ? Is it ok or do you prefer to put
> values directly in the code ?

It would be best if you used an (anonymous) enum instead of macros IMO.

Regards,
Nick

Walery Studennikov | 3 Dec 2008 11:11
Picon

Case insensitive search does not work for non-ascii charachers

Hi.

When performing a search inside document using non-ascii characters
(cp1251 encoding in my case)
search is successful only for direct (case-sensitive) match.
Case insensitive search does not work for non-ascii charachers.
"Case sensitive" flag in the dialog is of course unset.

--

-- 
Walery Studennikov
http://www.reg.ru/

Nick Treleaven | 3 Dec 2008 13:56

deprecating pluginmacros.h (Re: Generating an API functions wrapper)

On Thu, 27 Nov 2008 18:35:39 +0000
Nick Treleaven <nick.treleaven@...> wrote:

> I'd like to add this to SVN, maybe somehow deprecating pluginmacros.h,
> but not removing it for a while. In future, genapi.py could add the
> geanyfunctions-> prefix and we could remove pluginmacros.h.

I've added geanyfunctions.h to SVN, but I think we could make
pluginmacros.h deprecated now, with a few small changes:

* Move the geany macro to plugindata.h.
* Add accessor functions for documents_array and filetypes_array.

Then geanyfunctions.h could use the full geany_functions->p_prefix->
syntax, which would require that pluginmacros.h is not included.

I think updating plugins to use geanyfunctions.h would be pretty
straightforward; for most plugins probably just changing the header
include and a regex replace of function pointer syntax. Anyway I'll add
an announcement when the new geanyfunctions.h code is completely ready
for use.

Regards,
Nick

Enrico Tröger | 3 Dec 2008 16:31
Picon
Favicon
Gravatar

Re: deprecating pluginmacros.h (Re: Generating an API functions wrapper)

On Wed, 3 Dec 2008 12:56:04 +0000, Nick Treleaven
<nick.treleaven@...> wrote:

>On Thu, 27 Nov 2008 18:35:39 +0000
>Nick Treleaven <nick.treleaven@...> wrote:
>
>> I'd like to add this to SVN, maybe somehow deprecating
>> pluginmacros.h, but not removing it for a while. In future,
>> genapi.py could add the geanyfunctions-> prefix and we could remove
>> pluginmacros.h.
>
>I've added geanyfunctions.h to SVN, but I think we could make
>pluginmacros.h deprecated now, with a few small changes:
>
>* Move the geany macro to plugindata.h.
>* Add accessor functions for documents_array and filetypes_array.
>
>Then geanyfunctions.h could use the full geany_functions->p_prefix->
>syntax, which would require that pluginmacros.h is not included.
>
>I think updating plugins to use geanyfunctions.h would be pretty
>straightforward; for most plugins probably just changing the header
>include and a regex replace of function pointer syntax. Anyway I'll add
>an announcement when the new geanyfunctions.h code is completely ready
>for use.

Cool, sounds like a plan.

Regards,
Enrico
(Continue reading)

Enrico Tröger | 3 Dec 2008 16:43
Picon
Favicon
Gravatar

Re: Case insensitive search does not work for non-ascii charachers

On Wed, 3 Dec 2008 14:11:28 +0400, "Walery Studennikov"
<despairr@...> wrote:

>Hi.
>
>When performing a search inside document using non-ascii characters
>(cp1251 encoding in my case)
>search is successful only for direct (case-sensitive) match.
>Case insensitive search does not work for non-ascii charachers.
>"Case sensitive" flag in the dialog is of course unset.

I can confirm this and unfortunately, Scite behaves the same. So it is
probably a Scintilla problem but still ugly.

Regards,
Enrico

--

-- 
Get my GPG key from http://www.uvena.de/pub.asc
Frank Lanitz | 3 Dec 2008 19:22
Picon

Re: deprecating pluginmacros.h (Re: Generating an API functions wrapper)

On Wed, 3 Dec 2008 16:31:55 +0100
Enrico Tröger <enrico.troeger@...> wrote:

> On Wed, 3 Dec 2008 12:56:04 +0000, Nick Treleaven
> <nick.treleaven@...> wrote:
> 
> >On Thu, 27 Nov 2008 18:35:39 +0000
> >Nick Treleaven <nick.treleaven@...> wrote:
> >
> >> I'd like to add this to SVN, maybe somehow deprecating
> >> pluginmacros.h, but not removing it for a while. In future,
> >> genapi.py could add the geanyfunctions-> prefix and we could remove
> >> pluginmacros.h.
> >
> >I've added geanyfunctions.h to SVN, but I think we could make
> >pluginmacros.h deprecated now, with a few small changes:
> >
> >* Move the geany macro to plugindata.h.
> >* Add accessor functions for documents_array and filetypes_array.
> >
> >Then geanyfunctions.h could use the full geany_functions->p_prefix->
> >syntax, which would require that pluginmacros.h is not included.
> >
> >I think updating plugins to use geanyfunctions.h would be pretty
> >straightforward; for most plugins probably just changing the header
> >include and a regex replace of function pointer syntax. Anyway I'll add
> >an announcement when the new geanyfunctions.h code is completely ready
> >for use.
> 
> Cool, sounds like a plan.
(Continue reading)

ioguix | 4 Dec 2008 06:02
Picon
Favicon

Patch adding auto-close brackets, braces and string r1


So here is (in attachment) a first patch proposal.

I used anonymous enum as Nick wished.

Moreover, I droped the editor_prefs.complete_snippets test in the 
auto_close_chars function (ex. auto_close_bracket) as it seems there's no 
relation between auto-closing chars and auto-complete snippets.

I only built/tested this code under Linux.

Thanks for your feedbacks !

--

-- 
Guillaume (ioguix) de Rorthais
Attachment (autoclose_chars-r1.patch.gz): application/octet-stream, 6399 bytes

Gmane