Use letters in the gutter instead of relative line numbers for jumping #11048
Unanswered
godalming123
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From what I understand, the most efficient way to jump vertically in helix is to use relative line numbers in the gutter with the
j
andk
motions. However, there are a couple problems with this:j
andk
motions work on visual lines, but the relative line numbers in the gutter work with semantic lines in a file (although I think that it might be possible to makej
andk
work with semantic lines in the helix config.)My approach to fix both of these issues is as follows:
Instead of relative line numbers, letters could be shown in the gutter
When a user pressed these letters, it would jump the cursor to that line while keeping the same horizontal position
The algorithm to determine these letters would go as follows:
;
, or if the line being navigated to is below the cursor, then the letters can start withz
(view mode can be rebound toV
)z
or;
, then helix would count in base 9 as the lines move further away from the cursor, using the keys<space>
,a
,s
,d
,f
,h
,j
,k
,l
for each base 9 digit.All of the letters in the algorithm would be configurable for people using alternate keyboard layouts, with helix automatically counting in a different base if a different number keys are listed (EG: if someone wants to use all of the letter keys to count, then base 26.) The same keys and algorithm that counts in a specific base could also be used for already existing goto word feature, allowing users to for example have goto word only suggest keys that are on the home row.
Beta Was this translation helpful? Give feedback.
All reactions