wustho / epr

CLI Epub Reader
MIT License
1.2k stars 49 forks source link

Adding vim-style counts to commands #14

Closed dsanson closed 5 years ago

dsanson commented 5 years ago

Okay. Here is a pull request to add vim-style count commands, as discussed in issue #5. It enables counts for:

Scroll down Scroll up Page down Page up Next chapter Prev chapter Shrink Enlarge

It also enables counts for the movement commands when viewing the table of contents.

I made some changes to your key bindings:

dsanson commented 5 years ago

I should say: the [count] movements make no attempt to extend beyond each chapter: if you are on the second to last page of a chapter, for example, and you do 20<space>, it goes to the last page of the chapter, rather than 18 pages into the next chapter.

wustho commented 5 years ago

whoaa, sorry just read this...

Thanks for making it before the end of the year! I actually tried to implement your advice on making vim counter movement, but didn't work out well since I made the basic movement to complicated...

Cool, let me try it first...

wustho commented 5 years ago

woww [counter]set width works seamlessly, thanks for this dsansonn, really appreciate it