Set Encoding functionality
I am in the process of changing all files on my computer system from ISO 8859-1 to UTF-8. This is a slow, manual process because I rather want to make everything right, than miss something; but anyway, the suggestion here is about geany.
Right now if you wish to change the encoding to UTF-8, you have to do this (at the least via the main menu interface):
Go to:
Document -> Set Encoding -> Encoding -> Unicode (UTF 8)
This is too much work, in my opinion; but the even bigger issue is that many of the encodings I will, quite honestly, never need.
So my feature request here is - could this be improved?
Now I understand that for different people they may prefer to use other encodings than I do, so geany has to be flexible - no problem here.
I will make some suggestions next - please feel free to pick up on any idea that is deemed useful, and discard the others:
1) Sort the entries there alphabetically. I think this would help avoid any confusion. Right now "SE Asian" appears before "Unicode" and "West European" appears on top. Which suits me of course, since I am in Europe too, but ... I'd rather prefer alphabetical listing. Or as an option (but it may be better to be more consistent). This is not so important though.
2) I would suggest adding a short list of drop-downs here, e.g. the "top 3" or something. For example, if a user selects the main encoding more than 5 times then geany could realize that this may be a common operation - so what could then happen? That entry could appear on the bottom of that side-pane (not sure how it is called ... some gtk menu entry or gtk radio label button or something like that).
This new entry could have the same name as normal such as Unicode (UTF-8) and it would allow users to quickly change the encoding after having done so a few times before. That would save me a little work.
3) Perhaps a shortcut could be assigned somewhere easily; ideally some key combination for this task (right now I have not figured out whether this is possible right now, so disregard if it is; I am learning geany slowly as I go; am far from expert level right now).
4) Perhaps intercept on right click mouse button context menu, with some option to add this to some default keybinding or something from there.
Anyway - these are mostly just semi-random ideas. The more general comment is that it may be useful to improve geany here, since I think this may be a task that a few people may have to do every now and then (e. g. when having downloaded some files or working with legacy files, although geany also already seems to have an option to load up files in a specific encoding, which is nice; but this does not seem to work or perhaps I haven't fully understood it, since the bottom status still shows encoding :iso something, even when i save it; right now I have to manually change the encoding on every file like that. It works but is slow.)
Geany is an IDE/editor, so converting large numbers of files encodings is not considered a common use-case. So the efficiency of the UI for that purpose has not been optimised.
To convert lots of files you would be better off using `iconv` on the command line or possibly in a script.
So its unlikley that any complex changes to the UI or a keybinding GUI in this area will happen unless somebody contributes it.
Its possible the menu order could be sorted, but again somebody has to do it.
Alphabetical order for categories might make sense, but I'm not convinced it'd help much. And the categories themselves could be questioned as well.
Allowing to set a shortcut would probably be good like for everything else, but it should not get in the way by polluting the keybindings configuration -- but that could probably be easily handled.
A "top N" doesn't seem like worth the hassle to me because I don't expect this to be used often enough to improve things a lot for the user. I have to agree with @elextr that these options seem seldom used to me -- useful, yes, but not something I expect people to use every day.
I'd suggest looking at e.g. the [Commander plugin](https://plugins.geany.org/commander.html) for accessing this quickly at least in the meantime. And possibly if you're really using this very often and in a specific way, consider writing a simple plugin that would present a UI more suited to your needs.
In the end, IMO the best solution I see would to allow binding all these to shortcuts, but as @elextr would say, Somebody Has to Do It™, and it might not be totally trivial to do it right.
github-comments@lists.geany.org