Skip to content
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

Rethink about insert/normal mode #63

Closed
ipod825 opened this issue Jun 3, 2020 · 1 comment
Closed

Rethink about insert/normal mode #63

ipod825 opened this issue Jun 3, 2020 · 1 comment
Labels
mode-insert Issues related to insert mode mode-normal Issues related to normal mode wontfix This will not be changed, working as intended

Comments

@ipod825
Copy link

ipod825 commented Jun 3, 2020

This is related to #62 #56 #57.

The behavior of normal mode and insert mode of Vieb is quite different from other vim-inspired browser.

Normal Mode
In other vim-inspired browsers, keys are not all grabbed. Rather, I think they only handle mapped keys. If a key is not mapped, it is passed through to the website. So in site like youtube, <Left>, <Right>, if not remapped, they are passed through and fast-forward/backward the playback.

On the other hand, in Vieb normal mode, all keys are grabbed by Vieb, and unmapped keys are not pass-through. Which make <Left>, <Right> does nothing in yotube. This can be solved if per-site pass through is implemented. However, I think a more user-friendly way is to just pass-through unmapped keys.

Insert Mode
Insert mode in Vieb is more like Normal mode in other vim-inspired browsers, which handle all mapped keys but pass through all unmapped keys to the website. However, when entering insert mode, a side effect is to enter the first input field in the page. So if I want to fast-forward/backward in youtube, I need:

  1. Press i to enter insert mode.
  2. Click the video component to focus at it

While in other vim-inspired browser, this can totally be done without any extra step in normal mode.

The behavior of Vieb and the name Insert mode, IMHO, is counter-intuitive and cause extra burden for simple things. So I think it should be consider to redesign the behavior of these two modes. As a side note, other vim-inspired browser might also provide another mode named pass through, which passes all keys to the web page except for one single key to exit pass through mode.

@Jelmerro Jelmerro added mode-insert Issues related to insert mode mode-normal Issues related to normal mode wontfix This will not be changed, working as intended labels Jun 3, 2020
@Jelmerro
Copy link
Owner

Jelmerro commented Jun 3, 2020

It is quite different and that is by design. One of the main reasons for starting Vieb has been the confusion that most extensions cause by not having a separate modes. For even the most basic actions such as scrolling a page with j and k, the page could sometimes do completely different things.

Switching between modes to do different things is part of the Vim experience, because it gives you the power to separate different functionality without resorting to obscure key combinations or the mouse. This is the same for Vieb's insert mode and normal mode. I will not reconsider this design choice of Vieb and I suggest to look elsewhere if the advantages do not outweigh the negatives for you regarding this mode separation.

The pass-through ticket will remain open, because I consider that to be the solution of this problem, rather than removing the separation of these modes entirely.

@Jelmerro Jelmerro closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mode-insert Issues related to insert mode mode-normal Issues related to normal mode wontfix This will not be changed, working as intended
Projects
None yet
Development

No branches or pull requests

2 participants