The string "_Join Lines" doesn't explain the sequence of how the lines are joined. A description like "Concatenate Lines" would fit better I think. The strings are located at:
- data/geany.glade:6938 - src/keybindings.c:508
The command does more than literally concatenate the selected lines, indentation is removed from the second and subsequent lines, and trailing whitespace is also removed.
Also `_J` is a suitable unique accelerator code, but `_C` which would be the obvious one is already taken.
So the action is to **"Conc_atenate lines and remove white spaces (and tabs?)"**. I suggest to use the accelerator key `_a` as this is the most audible in spoken language.
Also, would using `_U` not be more consistent in the same menu instead of **"U_ncomment Line(s)"** ?
As I said it does not simply concatenate lines. The lines are joined in a way that has a reasonable chance of producing reasonably formatted code, not simply deleting the line breaks. "Join lines" seems to be the most common term used by editors for the operation, google found Eclipse, IntelliJ, emacs, vim in page one.
Yeah, `_U` would probably be better, maybe not being U is a hangover from when there was another U in the menu, git would know. When removing the other it was a good thing not to change `_U` to do something different and so confuse users. But anyway its now what it is and may induce howls of protest if we change it (maybe next major release the whole accelerators thing can be cleaned up).
VS Code use "Join Lines" name too.
I was not familiar with this _join lines_ feature, so possible there is no better way to introduce users to it. About the the `_U`, I see no collision with other keys in "en_US" language mode. See the screenshot below (so instead of `Alt`+`E`+`F`+`N` we could choose `Alt`+`E`+`F`+`U`): ![geany_pull_down_menu](https://github.com/geany/geany/assets/7198614/470c1494-7392-4240-932c-e86712...)
As I said above, although there is no `_U` clash now, that does not exclude that there was a clash in the past, menus change.
As I noted if anyone cares they can check in git history.
Even when a clashing accelerator is removed from a menu it is still not a good idea to reorganise the rest of the menu because users who operate software via the keyboard (by choice or lack of mouse) get to learn these sequences eg `Alt+e f n` for uncomment lines, and are unhappy if they are changed. They get even more unhappy if accelerators are changed for "no reason" just to use the `_U`.
Closed #3590 as completed.
github-comments@lists.geany.org