-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
"Better" Home/End/PageUp/PageDown #2131
Comments
There has been some discussion on this especially with Home and End in #1511 These all seem like personal preference to me and I'd prefer to not have them in the default keymap. IMO there's nothing uncomfortable about the goto menu: I prefer
inconsistent with respect to what else? These commands only move the view and the cursor only follows the view because it's not allowed to leave. I think the commands would be doing too much if they also moved the cursor. |
Yeah, I realised some of this might be personal preference. However, I have also just clocked that insert mode has a whole different set of keybindings for moving around, that I think are entirely inconsistent wrt the normal mode keybindings. e.g.
Wrt themselves. They always move the viewport. Sometimes the move the cursor. It'd be nicer to have commands that operate without edge-case "sometimes". FWIW, I came to Helix out of a dislike of the hodge-podge of inconsistency in Vim. One of the main attractions for Helix was reading that it had consistent defaults that worked out-of-the-box. I know many folks love customising their Vim/etc. setups, but personally I'd rather use something simple+consistent+opinionated from someone who has already thought this through (rather than making thinking-this-through another item on the neverending to-do list of my own). Anyway, that doesn't seem to be the case. That's no bash at you or the other contributors to Helix! Perhaps this simply isn't the product for me. Thank you anyway, and I'll keep looking around at some of the other alternatives. |
pageup and pagedown is a disastrous key such that the column will be moved which is probably why the reason it is not done as
Oh, I just realized that, but I think that is due to consistency with GNU readline, it's useful I think. Closing the issue as the proposed keys seemed far too weird,
But yeah, what you showed for Thanks for discussing about this. But if you do have better suggestions on why we still do need it feel free to reopen the issue. |
Like @patrick-kidger, I find myself scrolling quite often. In neovim I use Modo (3D application) used to do this to great effect, and imo much better than any competing product. |
I'm new to Helix and really enjoying it.
In both Vim and Helix, I find myself using Home/End/PageUp/PageDown very frequently -- for example, End to get out of some autocreated close-brackets and close-quotes, and PageUp/PageDown to quickly scroll through a file and refresh my thoughts.
I'm thinking that their implementation in Helix can be improved a bit. I've had a look through the issues and not seen this topic already discussed. Hopefully the following aren't a classic case of a poorly-thought-out suggestion from a new user.
I write "better" in quotes because I recognise that some of these might be subjective.
I ended up adding the following to my
config.toml
almost immediately after getting started with Helix:Obviously I can just keep using this file, but I thought I'd suggest these as perhaps a reasonable modification to the current default keybindings.
So far I'm loving using these: I find it much (much) quicker to quickly scroll through a file than having to shift my finger positions to
C-f
andC-b
. Doubly so when avoiding moving my whole hand to Home and End. I think this is also much more consistent with the current Helix keybindings thanC-f
and friends. (I'm contemplating also rebindingA-l
tow
, etc., although I've not played around with that as much.)These proposed defaults do override the existing behaviour for
J
,K
andge
, but I feel likeJ
andK
are niche enough that they can probably be found a home elsewhere. And realistically I never usege
except in the context ofgegl
.Once again this feels inconsistent. PageUp and PageDown currently do two separate (in principle unrelated) things: (1) they move the view window. (2) they move the cursor. As a result of (2) I find myself using them as a handy way to move the cursor over large regions, which is a use-case that stops working at the start or end of a file. So I would advocate that in this case the cursor is "clipped" to to land on either the start/end of the whole file, or the start of the first/last line of the whole file.
If there's interest, and I can be pointed at where to start, I'd be happy to try making a PR for these. I'm guessing 1. can be accomplished just through changing a default config file somewhere. I'm very new to Rust but would guess at 2. being a good first project.
The text was updated successfully, but these errors were encountered: