As a user, I'd like to be able to move to the top and bottom of a document quickly #14

Closed
opened 2019-05-14 19:55:57 +00:00 by sloum · 3 comments
Owner

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 as b and B 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.

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 as `b` and `B` 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.
sloum added the
enhancement
blocked
labels 2019-05-14 19:56:40 +00:00
sloum changed title from Add TOP and BOTTOM hotkeys/commands to As a user, I'd like to be able to move to the top and bottom of a document quickly 2019-05-14 20:08:30 +00:00
Collaborator

I'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 to bombadillo 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.

I'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 to `bombadillo` 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`.
Author
Owner

Awesome! I agree that g and G are a good call. I am not set up to do true vim style gg, but your suggestion of g 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 :)

Awesome! I agree that `g` and `G` are a good call. I am not set up to do true vim style `gg`, but your suggestion of `g` 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 :)
sloum removed the
blocked
label 2019-05-25 03:52:25 +00:00
sloum self-assigned this 2019-05-25 03:52:34 +00:00
Author
Owner

Closed by #19

Per @asdf 's advice hot keys have been added for g and G to take a user home and end 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).

Closed by https://tildegit.org/sloum/bombadillo/pulls/19 Per @asdf 's advice hot keys have been added for `g` and `G` to take a user `home` and `end` 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).
sloum closed this issue 2019-05-25 04:05:12 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#14
No description provided.