jwkvam / jupyterlab-vim

:neckbeard: Vim notebook cell bindings for JupyterLab
MIT License
975 stars 73 forks source link

Delete cell shortcut different than notebook #9

Open OliverEvans96 opened 6 years ago

OliverEvans96 commented 6 years ago

https://github.com/jwkvam/jupyterlab_vim/blob/863b5496c903cf7982e1d5404adb0bb27ea681ce/src/index.ts#L279

I believe that in the notebook, the shortcut is ctrl-o + d + d. I'm not sure whether this is an intentional or accidental difference.

Thanks for the great work!

jwkvam commented 6 years ago

Thanks @OliverEvans96, yea that was intentional, it's simply my personal preference. I kind of found the length 3 keybindings cumbersome. I think the original reason for setting it to D, D in the notebook was to make it harder to delete cells accidentally. Two things are helping us avoid that here:

  1. This chord actually cuts cells so along with undoing you can still paste it.
  2. Since someone has to hit Ctrl O before D, I think that makes pressing this combo accidentally pretty unlikely.

Regardless, I would like to make this configurable for the user.

OliverEvans96 commented 6 years ago

Gotcha. I assumed it was because the format is ctrl-o + [vim key combo] and the vim hotkey for delete line is d d. Anyway, I agree that it should be configurable!

Thanks for writing back! Oliver

On Mon, Dec 18, 2017, 11:11 AM Jacques Kvam notifications@github.com wrote:

Thanks @OliverEvans96 https://github.com/oliverevans96, yea that was intentional, it's simply my personal preference. I kind of found the length 3 keybindings cumbersome. I think the original reason for setting it to D, D in the notebook was to make it harder to delete cells accidentally. Two things are helping us avoid that here:

  1. This chord actually cuts cells so along with undoing you can still paste it.
  2. Since someone has to hit Ctrl O before D, I think that makes pressing this combo accidentally pretty unlikely.

Regardless, I would like to make this configurable for the user.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jwkvam/jupyterlab_vim/issues/9#issuecomment-352473765, or mute the thread https://github.com/notifications/unsubscribe-auth/APLYIy47l1BnCm62NbPNKTqqFCg4nVR2ks5tBo7CgaJpZM4RER4T .