As a user, I'd like to be able to move to the top and bottom of a document quickly #14
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#14
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
having the ability to move to the top or bottom of a document would be a great add for users. I am torn as to whether it should be something like
:top
or a hot key:T
. Using the hot key presents an issue asb
andB
are both in use, so bottom (or beginning if we flipped the logic) could be a problem. (T)op and (E)nd could maybe work, but is a little weird. Commands may work best.:top
&:bottom
. Given that top and bottom arent necessarily everyday use items, just nice to haves, the added effort of a command may not be the end of the world. Using:beg
&:end
would reduce keystrokes and still make sense. I'll await some comments on the subject before proceeding.Add TOP and BOTTOM hotkeys/commandsto As a user, I'd like to be able to move to the top and bottom of a document quicklyI'd recommend keys first, then a command.
It's mentioned that the keys are mapped similar to
vim
, and it could be useful to keep consistency with vim keys for additional functions.less
also has keys similar to vim, and is maybe closer tobombadillo
in terms of functionality, so it could also be considered a useful model when there's no equivalent in vim.A similar approach could be taken for issue #13, as well as commands (but not in this case as I'll mention at the end).
In vim the commands are for moving the cursor:
gg - go to the first line of the document
G - go to the last line of the document
In less, the commands in the manual are:
g < ESC-< * Go to first line in file (or line N).
G > ESC-> * Go to last line in file (or line N).
I don't quite understand why it's written this way, but it's g to jump to the first line and G to jump to the last line. HOME and END work as well.
To keep your fingers mostly on the home row, consistent with existing keys as well as those in other applications, I'd recommend:
g - jump to the start of the document
G - jump to the end of the document
If you want to consider using arrow keys in the future for navigation, HOME and END would be good additions at a later date.
Finally, for commands, it seems there is not an equivalent set of commands in vim or less that don't conflict with the use of
:1
to navigate links. Either of your suggestions would be good, and I think I would prefer:beg
and:end
.Awesome! I agree that
g
andG
are a good call. I am not set up to do true vim stylegg
, but your suggestion ofg
definitely fits the bill!Home and End are definitely good ideas for the future too.
I'll try and get started on this issue this weekend. Thank you very much for the input :)
Closed by #19
Per @asdf 's advice hot keys have been added for
g
andG
to take a userhome
andend
respectively. For the time being commands have not been added (the addition of commands can be revisited later if after some use, users feel they would be beneficial).