Re: Improve word boundaries for text widgets

2014-10-05 Thread Sébastien Wilmet
On Sat, Oct 04, 2014 at 08:54:03PM +0200, Sébastien Wilmet wrote: On Sat, Oct 04, 2014 at 02:10:02PM -0400, Matthias Clasen wrote: My main motiviation is that 'we follow TR29' is much better in terms of documenting it, testing it and diagnosing bugs in than 'do what vim does'. That would

Re: Improve word boundaries for text widgets

2014-10-04 Thread Sébastien Wilmet
On Fri, Oct 03, 2014 at 10:25:36PM -0400, Matthias Clasen wrote: I think I want the default in GtkTextView/Pango to stay basically Unicode. So the vfunc may be needed sooner if you want to have vim-like behaviour in GtkSourceView. What do you mean by basically Unicode? The problems in GTK+: -

Re: Improve word boundaries for text widgets

2014-10-04 Thread Matthias Clasen
On Sat, Oct 4, 2014 at 8:24 AM, Sébastien Wilmet swil...@gnome.org wrote: On Fri, Oct 03, 2014 at 10:25:36PM -0400, Matthias Clasen wrote: I think I want the default in GtkTextView/Pango to stay basically Unicode. So the vfunc may be needed sooner if you want to have vim-like behaviour in

Re: Improve word boundaries for text widgets

2014-10-04 Thread Sébastien Wilmet
On Sat, Oct 04, 2014 at 12:30:43PM -0400, Matthias Clasen wrote: I mean that it is the right default behavior to follow Unicode TR 29. If we want to follow Unicode TR 29, then we should use the is_word_boundary PangoLogAttr attribute, see: https://bugzilla.gnome.org/show_bug.cgi?id=530405 As I

Re: Improve word boundaries for text widgets

2014-10-04 Thread Paul Davis
On Sat, Oct 4, 2014 at 1:48 PM, Sébastien Wilmet swil...@gnome.org wrote: On Sat, Oct 04, 2014 at 12:30:43PM -0400, Matthias Clasen wrote: For tayloring the text segmentation behavior for special situations, such as code instead of natural language, a vfunc is the right approach. Does

Re: Improve word boundaries for text widgets

2014-10-04 Thread Matthias Clasen
On Sat, Oct 4, 2014 at 1:52 PM, Paul Davis p...@linuxaudiosystems.com wrote: But the Vim word boundaries improve the behavior also for normal text, not just code. Vim can be used to write mails and documents. this is none of my business, but it seems fairly clear to me what matthias wants:

Re: Improve word boundaries for text widgets

2014-10-04 Thread Sébastien Wilmet
On Sat, Oct 04, 2014 at 02:10:02PM -0400, Matthias Clasen wrote: My main motiviation is that 'we follow TR29' is much better in terms of documenting it, testing it and diagnosing bugs in than 'do what vim does'. That would work if TR29 specifies clearly the different word boundaries to use for

Re: Improve word boundaries for text widgets

2014-10-03 Thread Matthias Clasen
On Sat, Sep 27, 2014 at 7:39 AM, Sébastien Wilmet swil...@gnome.org wrote: On Sat, Sep 27, 2014 at 12:47:31AM -0400, Matthias Clasen wrote: I agree that we probably need a vfunc - there's different use cases that need different variants: natural language, code, xml, etc. For best results, we

Re: Improve word boundaries for text widgets

2014-09-28 Thread Christian Hergert
On 09/27/2014 04:52 AM, Sébastien Wilmet wrote: I'm doing exactly this in Builder today for VIM style `w` and `b`. Ctrl+right is the same as 'e' in Vim: go to the next word end. Ctrl+left is the same as 'b' in Vim: go to the previous word start. Is there a good reason to choose 'w' instead

Re: Improve word boundaries for text widgets

2014-09-27 Thread Sébastien Wilmet
On Sat, Sep 27, 2014 at 12:47:31AM -0400, Matthias Clasen wrote: I agree that we probably need a vfunc - there's different use cases that need different variants: natural language, code, xml, etc. For best results, we may even want a way to use different word breaking rules in different

Re: Improve word boundaries for text widgets

2014-09-27 Thread Sébastien Wilmet
On Fri, Sep 26, 2014 at 04:37:52PM -0700, Christian Hergert wrote: I'm doing exactly this in Builder today for VIM style `w` and `b`. Ctrl+right is the same as 'e' in Vim: go to the next word end. Ctrl+left is the same as 'b' in Vim: go to the previous word start. Is there a good reason to

Re: Improve word boundaries for text widgets

2014-09-26 Thread Christian Hergert
On 09/26/2014 06:13 AM, Sébastien Wilmet wrote: I would like to improve the word boundaries for the text widgets: GtkTextView, GtkEntry and GtkLabel (anything else?). More precisely the word boundaries used for word movements (Ctrl+arrow) and word selection (double click). Currently the