Re: [gedit-list] How to switch accelerators of snippets and word completion



bart neeneenee de wrote:
>
> Dear gedit developers,
>
> we choose gedit to our favorite development tool (that's why we
> submitted a lot of external tool configurations and plugins at the wiki).
>
> gedit 2.30 comes with fantastic new features like word completion and
> improved snippets. To improve our internal workflow we like to switch
> the behavior of snippets and word completion.
>
> So snippets list showing up without pressing any special key and word
> completion shows up after pressing Ctrl+Space.
>
> We checked the source code but we can't find where the behavior of
> snippets and word completion are defined.
The behavior is defined in the GtkSourceCompletion API. In particular,
there is a function on the provider interface named get_activation. The
provider can use this to indicate when it should be activated. In
Completion.py in the snippets plugin, on line 134, you can see it
returns gsv.COMPLETION_ACTIVATION_USER_REQUESTED. This means that it
will be activated when you press Ctrl+Space.

The word completion on the other hand does not implement this method,
which means in that case the default will be used, where the default is
GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE |
GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED (so both in interactive
mode and in user requested mode).
>
> Please can someone tell me where the behavior of snippets and word
> completion are defined.
> Or how to change the accelerators of snippets and word completion?
Unfortunately you can't configure this behavior at the moment. You can
modify the plugins to do what you want by changing the get_activation
implementation for both. This should be simple for the snippets plugin,
but the word completion plugin is written in C, so you will need to
recompile it.
>
> Best regards.
> Eckhard.
>
>
>
>
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]