inkdropapp / inkdrop-vim

Provides Vim modal control for Inkdrop, blending the best of Vim and Inkdrop
https://www.inkdrop.app/
MIT License
99 stars 9 forks source link

Support hjkl and Ctrl+U/Ctrl+D in Preview mode #13

Closed trietphm closed 4 years ago

trietphm commented 4 years ago

It's great to have vim key-binding in Preview mode (HTML preview) as well. Actually my main use case is to navigate around the docs so having hjkl and Ctrl+U/Ctrl+D is good enough. Thank~

craftzdog commented 4 years ago

Yeah sounds nice!

craftzdog commented 4 years ago

landed in v2.0.0🎉

basyura commented 4 years ago

I think this is correct.

diff --git a/src/vim.js b/src/vim.js
index e20e0fb..ceb881d 100644
--- a/src/vim.js
+++ b/src/vim.js
@@ -921,10 +921,10 @@ class Plugin {
         'vim:scroll-half-screen-down': ({ target }) => {
           target.scrollTop += target.clientHeight / 2
         },
-        'vim:scroll-half-screen-up': ({ target }) => {
+        'vim:scroll-full-screen-up': ({ target }) => {
           target.scrollTop -= target.clientHeight
         },
-        'vim:scroll-half-screen-down': ({ target }) => {
+        'vim:scroll-full-screen-down': ({ target }) => {
           target.scrollTop += target.clientHeight
         },
         'vim:move-to-line': ({ target }) => {
craftzdog commented 4 years ago

@basyura Oops!! Will fix it. Thanks!

craftzdog commented 4 years ago

landed in v2.0.1🎉