-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
VIM Visual Mode #80
base: main
Are you sure you want to change the base?
VIM Visual Mode #80
Conversation
Committing review suggestion. Co-authored-by: Har Jing Daryl <[email protected]>
Accepting review suggestion Co-authored-by: Har Jing Daryl <[email protected]>
Oh whoops, sorry, I'm a bit of a github newbie too. I think this diff also includes the commits from the guest mode pr. Is this fine and just gets resolved whenever the other pr is merged? Still sad that the diff from the guest feature shows up in your review though. Will be moving this pr to a draft in the meantime. |
You will likely need to rebase once I merge your other PR to the main branch. |
Sorry for the inaction regarding this PR, have been busy. Seems like this branch is currently not rebased on main. I will do that and review it soon. Thanks! |
Please add new keybindings to the README. |
Applying suggested change. Co-authored-by: Har Jing Daryl <[email protected]>
No worries! Thanks for reviewing! Thanks for rebasing too!
Added! Lmk if reasonable wording! I've also included your changes and re-manually tested by building + running and testing that selecting in visual mode still works manually. Thanks! |
im not too familiar with visual mode on VIM, so i am not sure what it does and how the behaviour translates to mangadesk. i guess it works something like text selection, just that it works with rows here. do correct me if im wrong. from my testing, it works well, but there are a few quirks:
|
@@ -189,6 +189,12 @@ func (p *MangaPage) setHandlers(cancel context.CancelFunc) { | |||
return event | |||
}) | |||
|
|||
p.Table.SetSelectionChangedFunc(func(row, _column int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment on what this binding does would be useful. See line 182 of same file for example.
@@ -234,6 +242,37 @@ func (p *MangaPage) ctrlAInput() { | |||
p.markAll() | |||
} | |||
|
|||
func (p *MangaPage) selectRange(from, to int) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment for this function and the one below would also be great.
Addresses #79
Pressing Shift+V or v in the manga page will toggle something similar to vim's visual mode. (It's not fully 1:1 with vim's visual mode as you can't select things horizontally).
This lets you select a range of manga easily + it has the side effect of letting you select all manga chapters with
ggvG
.Testing
Manual testing by runnging
go build
and then./mangadesk
.