Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End (of line) key behaves undesirable in (soft) Line wrapping mode #949

Open
pepa65 opened this issue Mar 9, 2016 · 15 comments
Open

End (of line) key behaves undesirable in (soft) Line wrapping mode #949

pepa65 opened this issue Mar 9, 2016 · 15 comments

Comments

@pepa65
Copy link

pepa65 commented Mar 9, 2016

When editing a document in (soft) Line wrapping mode (the document line that is longer than the screen width is spread over multiple display lines while keeping the same line number), the End key takes you to the end of the document line. This is understandable, but it keeps being unexpected while editing in the middle of a document line...

My proposal is just to change the defaults:
End = "go to the end of the display line", Alt-End = "go to the end of the document line", Home = "go to the beginning of the display line", and Alt-Home = "go to the beginning of the document line"

When not in Line Wrapping mode, it still works the same, but when in Line Wrapping mode, it's more intuitive.

@elextr
Copy link
Member

elextr commented Mar 9, 2016

You can set them yourself to suit your tatstes Menu->Edit->Preferences->Keybindings

@pepa65
Copy link
Author

pepa65 commented Mar 9, 2016

Yes, thanks, I've done that. I'm just seeking improvements for other users. :-)

@elextr
Copy link
Member

elextr commented Mar 9, 2016

Well its hard to say if they would see them as "improvements". You probably should provide some substantiation or at least support that they are the "right" thing (not saying they aren't, but I don't use wrapped text much so I don't know).

"End" being end of line from which I can start typing, not "some random place where the line wrappped", is pretty universal in editors that I know. Survey of other editors may be a start?

@pepa65
Copy link
Author

pepa65 commented Mar 9, 2016

In soft line wrapping, the 'line' becomes a paragraph. So in the current default settings, if you press End, you go to the end of the paragraph. It's easy to try it out, just set Line Wrapping on, and type a 'line'/paragraph with spaces and several screen lines long, and you'll understand the use case. It's about being intuitive, while still providing the (other) options to advanced users (Alt-End and Alt-Home).

It just so happens when NOT in Line wrapping mode, Geany doesn't go to the end of the display line in either case of End/Alt-End, but it always goes to the end of the document line. Which is what I (and I guess most people) would expect in the normal case of EOL. You could argue that "go to the end of the display line" is currently broken in normal (no-wrapping) mode. But the current behaviour makes it easier to swap the defaults for (Alt-)Home/End, because everything will work as expected.

@elextr
Copy link
Member

elextr commented Mar 9, 2016

That is one model of the buffer contents, but I doubt its the primary model Geany users have.

Geany is fundamentally a programmers editor, and so a "line" is a section of the buffer up to the next line-end sequence, since that is the definition of "line" used in most programming languages. And most programming languages do not have a concept of "paragraph". At times a line may be displayed on more than one display line for convenience (ie wrapped), but going to "end of line" is still going to the next line-end sequence in the buffer, and this is convenient since it is a common point to insert a new programming language statement (on a new line). With this model of the contents "end" is both consistent and convenient in going to the next line end in the buffer, wrapping or not.

The use-case you are describing is more suitable for textual content, where the concept of "paragraph" exists, although most textual markup languages assume a blank line as paragraph termination, not a single line end. But this is not the primary use-case for Geany. And since the wrap point is variable depending on content and display width, the likelyhood of a wrap point being exactly where you want to go is fairly low, so it should not usurp the single key "end" command from the primary use-case.

@pepa65
Copy link
Author

pepa65 commented Mar 9, 2016

Well, thank you for at least engaging with the issue. I am running Geany on my smallest screen, at a ridiculously large font size, and I am at 180 characters screen width -- beyond what any sane coding standard would allow for a line length. And yet, there are use cases for examining text content -- data, html, whatever, that goes way beyond that. Geany provides a soft Line wrapping mode, which I find really useful. But going around editing in that area, it is still surprising when End takes you somewhere you never need to go (in my experience). The wrapping point varies with the screen size, but the point is, you want to visually jump within the screen that you are currently viewing instead of having to walk there with there. Of course, you can remember Alt-End, or, you can remap End and Alt-End -- which I have done, without any disadvantages.

What I am arguing is, that Line wrapping mode is more for textual content. Well, I am glad Geany knows the concept of "go to the end of the screen line" (at least, in Line wrapping mode..!)

@codebrainz
Copy link
Member

I have no personal opinion as I don't use line-wrapping, but it would be useful to get opinions of more people who actually use the feature and would be affected by the change. @pepa65 if you felt strongly enough, you could always ask on the mailing list and see what people think.

@pepa65
Copy link
Author

pepa65 commented Mar 9, 2016

It's really a no-brainer I think. Anyone trying it out would quickly agree that it is what you would expect and what you would want.

The impact of the proposed change would be for people that are using the Line wrapping mode.

I am not familiar with the mailing list, but eventually it could only be decided on by someone in authority. Like I said before, I didn't bring this up for myself, I just changed the settings. But it took me months of frustration, I only just discovered it when I was going to request it as a feature. Not all new users are going to quickly discover this setting, it's just a better default for everybody, that's all I came to say.

@elextr
Copy link
Member

elextr commented Mar 9, 2016

Its great that you think about and offer suggestions to improve the user experience.

That other people have differing thoughts on the subject and differing use-cases is also normal. Saying "its a no brainer" does not provide any support for your case.

My use-case is wrapping of code when using the split window feature to show two files side by side (a C++ header file and the body file). This makes each window narrower than a normal code line, even on wide screen monitors. And in that case I want "end" to maintain its normal functionality, going to the wrap point is a rare anomaly. This is a common use-case, with many languages having separate interface and implementation parts and seeing them both is very useful. It is not an occasional foray into poorly formatted or machine written HTML or minified Javascript.

@bradraiche

This comment was marked as abuse.

@pepa65
Copy link
Author

pepa65 commented Jul 28, 2022

@elextr What would be great then if this behaviour could be set, either as an editor default or per-file.

@elextr
Copy link
Member

elextr commented Jul 28, 2022

@bradraiche as noted above, Geany is primarily a code editor, not a text editor. Code does not have the concept of a paragraph, so the default keybindings match code usage, but they can be changed if your default usage is different.

In my humble opinion, Geany is useless to me strictly because of this single issue.

Sad that you reject a tool because you can't be bothered to change the keybindings, but so be it.

@bradraiche the rest of your rant is out of line, being rude to people who use their own time to create a piece of software for their own use-cases is unacceptable just becaue their use-case does not match yours. Its certainly not the way to get volunteers to do anything for you.

@pepa65 as was said above you can set it yourself editor wide.

@bradraiche

This comment was marked as abuse.

@elextr
Copy link
Member

elextr commented Jul 29, 2022

I often use a text editor, NEVER a "code editor."

As is clear from the About Geany section in the manual, Geany is a code editor, so its not suitable for your use-case. Trying to make the wrong tool fit your use-case is an exercise in frustration.

But as I said its unacceptable to rant at people just because their use-case is not your use-case. That way nobody will be interested in helping you, certainly I am not going to continue the conversation.

As a general comment to all readers, as I said above, Geany is built by volunteer contributors, if someone contributes a PR with additional functionality it can be added, but there is nobody who can be directed to make Geany do anything specific. That this issue has been open for 6+ years without a PR being accepted shows that neither the regular contributors nor anybody else has felt the need for the change of default keybindings.

@bradraiche
Copy link

And THAT is why Geany is useless TO ME ...and anyone else of the 99% of coders who having been using editors that behave as I and others have described.

Congratulations on severely limiting the number of users who actually want to use the super duper unique and special "code editor" that behaves in super duper unique and special ways. Gold star.

Bye.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants