[Geany-Devel] I'm thinking I like Geany...

Colomban Wendling lists.ban at herbesfolles.org
Wed Nov 28 16:50:23 UTC 2012


Le 28/11/2012 16:37, Steven Blatnick a écrit :
> Lex,
> 
> Actually I tried Alt-Up on the file browser and it didn't work for me. 
> I just tried entering that shortcut into compiz, and it doesn't appear
> to be using that shortcut for something else.  (Linux Mint 11 64-bit,
> gnome 2, using geany from yesterday's git).
> 
> I guess this is the right place to make suggestions and/or see if
> development is being already done toward something?

Yes, development questions and discussions happen here, that's the
correct place :)

> I hope nobody minds, since I'm the new guy...

Welcome!

> Also, sorry if any of this is repeat
> from some bug tracker, existing feature I missed, planned feature, or
> otherwise since I don't know the workflow nor features as well.
> 
> Here are a few ideas for features and/or plugins (Disclaimer: I come
> from gedit, so hope nobody minds I refer to it so much):

That's not a problem, but I hope you don't mind if we don't all know
what it the GEdit feature you might refer to ;)

>  1. Allow keyboard shortcuts to be changed from the menus.  Gnome2 at
>     least has the option of allowing gtk apps to set their custom
>     shortcuts by hitting the desired keys while the menu entry is
>     highlighted.  This would make changing the shortcut as simple as
>     finding the functionality in the first place instead of finding it
>     again in the shortcuts menu.  It would also allow you to quickly
>     change a shortcut on certain things quickly (see #2 below)

IIRC GTK guys plan to (or already have?) remove this feature from GTK3,
finding it old and useless.  So we'd have to re-implement if we want
GTK3 support.  Also, I must admit I never used it in any program, and I
can only think of Gimp as a program allowing this -- and even then, it
has an option for this (unchecked by default I think).

Moreover, it has one important issue IMO (at least in Gimp, but I guess
they use the GTK feature): it doesn't ask if trying to assign an already
existing binding, which means if one accidentally maps to an already
existing binding it gets silently overwritten.  And a dialog here would
be quite odd... I don't know.  Also, at least Gimp doesn't allow
changing the binding of an insensitive item (boring when I tried to
remap Undo/Redo for testing).

>  2. External Tools plugin like gedit has that can have a quick-list on
>     the toolbar (I've written a python plugin for gedit to put it on the
>     toolbar, and I love being able to change the shortcuts quickly while
>     selecting the tools I need for a particular project)

Isn't this the same as Custom Commands?  (check out the docs if you
don't know about them)

>  3. File Browser plugin allow creation of new file/folder, renaming of
>     file (even one currently being edited, thereby changing the name on
>     the editor too), and moving a file to trash.  Also, perhaps a
>     feature to show/hide binary files.

I think the geany-plugins' filebrowser plugin already have those
features.  Not sure why there are two distinct plugins though.

>  4. Inline/embedded search (like gedit2's incremental search).  I guess
>     the toolbar search works that way kinda...

I don't quite know GEdit 2's behavior, but I think indeed the toolbar
search field does this.  Is there a problem with it?  I agree that some
fancy UI like Firefox's search could be cool, but I also think that if
the user wants more complex search options, she could very well use the
search dialog, and otherwise use the search field.  I don't think we
could reasonably put all our search dialog options inline.

>  5. Highlight all found instances of a string from the search (like
>     gedit, would apply to string literals, not necessarily regex, from
>     an inline search).

My be interesting indeed (although I probably wouldn't use it myself).
Note that we already have "mark all" in the search dialog, and a plugin
to highlight a word upon double-click ("addons" I think).

>  6. Allow highlighting of all words in a document separate from search
>     highlighting (like gedit's "Smart Hilighting" plugin).

That's the "mark word" "addons" plugin feature I think :)

>  7. Fixed width tabs option on Preferences->Interface->Notebook
>     tabs->Tab positions.  When I move my tabs on the editor to the left
>     or right, I would prefer to be able to fix the width on them so
>     longer file names don't extend the width.  I did this with a python
>     plugin in gedit by allowing the width to be set with a spinner in
>     preferences and then the plugin adjusts the tab's Label property
>     "width-request" from -1 to the width desired.  (I've already started
>     looking into the code to do this in geany, but maybe someone else
>     already is working on this or maybe can do it faster because of
>     familiarity)

In core Geany it would probably go in notebook_new_tab() from
notebook.c.  However, a plugin could probably do it quite easily by
connecting to the signal for new tab created, and modify the label
packing or label size request.

>  8. Is there a way to disable/enable or view/hide the various bottom
>     pane tools independently.  For example, if I never want to use
>     Scratch, then a way to disable it from loading would be nice.

In the "Various" prefs, the "msgwin_*_visible" settings.

>  9. Both the side panel and the bottom panel allow Ctrl+PgUp/PgDown to
>     change tabs like the editor does (awesome!) but unlike the editor,
>     they don't wrap around.  Also, the bottom panel, the terminal
>     emulator interrupts the keyboard shortcut, not allowing it to browse
>     off of it using that keyboard shortcut.

I can't be sure right now for the normal Geany, but without
modifications in this direction my GTK3 branch does loop in all notebooks.

Also, the terminal doesn't eat the strokes either, but there is a
setting in the terminal prefs to choose whether it overrides Geany's
bindings or not.

> 10. Allow a dynamic number of compile tools.  It appears now I can only
>     have the number visible in the UI.  I realize the UI would have to
>     be coded instead of in a glade file to do this.  Alternatively,
>     "External Tools" like functionality would, in my opinion, be more
>     versitile.  It allows any program to be called passing it the same
>     things we pass plus any highlighted text, current line number,
>     current line, etc.

I can't really answer here (Lex probably could ;)), but I think that
only the UI prevents from a dynamic number of build commands.  E.g., I
think the code behind has the ability.

IIRC somebody already started a discussion on changing this UI, not sure
what was the outcome (but either we couldn't find a solution we found
good or nobody felt like doing the required changes).

> 11. Allow executing of highlighted SQL based on a current connection
>     (among a configurable list).  (I did something like this for gedit 2
>     and 3 and I use it all the time.)

That'd be a candidate either for a custom command and an helper script,
or for a plugin :)

> 12. Add a toggle button to the toolbar for turning word wrapping on and off.

Probably easy to do and harmless, since the toolbar is configurable.

> 13. Allow the status bar to change the file-type setting for setting
>     syntax highlighting (gedit style).

This would require a quite massive rewriting of the toolbar code since
currently it's simply a (user-modifiable) formatted string, e.g. it's
one single string, not several label/values (where the value could quite
easily be changed to a combo box or alike).  Though, I agree that the
idea is quite neat -- although I find the GEdit implementation terrible
from it having all items in one single menu, making searching for the
appropriate language really hard.

If we chose to implement this, all configurable items shown in the
status bar could benefit from it (indent type, line ending type,
encoding and filetype).

> 14. "Snap Open" dialog.  Quickly open files by typing the filename and
>     filtering down based on a project's base directory (or otherwise
>     configurable).  The dialog should be configurable to skip files for
>     speed, such as a build directory, .svn/.git and hidden directories, etc.

That'd probably be a great plugin :)  I think GProject (or maybe it's
GeanyPRJ?) has a similar feature.

Ah, and if you want this feature, maybe you'd be interested by the
Commander plugin ;) (it allows to browse the menus and open files using
a search entry).

> 15. Sort alphabetically highlighted lines (see gedit plugin)

That's a candidate for `sort` custom command ;)

> 16. Compact menu option (Like firefox's Compact Menu 2 plugin.  I've
>     done something similar in gedit.)

I don't like this, but a plugin could probably hack around to achieve
this.  Ubuntu's Unity does a similar thing for displaying the app menu
in the desktop top bar.  Also, GTK3 has an (completely mis-though IMO,
but that's not the question :-') thing to achieve this.


Regards,
Colomban


More information about the Devel mailing list