Jelmerro / Vieb

Vim Inspired Electron Browser - Vim bindings for the web by design
https://vieb.dev
GNU General Public License v3.0
1.34k stars 65 forks source link

Integrate a Vim-like text editor/plugin in a new mode similar to insert mode #61

Open ipod825 opened 4 years ago

ipod825 commented 4 years ago

This was a comment in #51, but I think it deserves its own thread.

The suggestion is to add a new mode InputfieldNormal in input field such that entering keys does not edit the input field but moves the cursor like in vim. For e.g., w moves the cursor using and b moves the cursor using and k moves the cursor using etc. And i brings back the insert mode.

Jelmerro commented 4 years ago

I personally do not see the use in such an additional mode, because if I wanted to have Vim bindings for typing text, I would just switch to actual Vim to do so. This is already possible using action.editWithVim, which can be called by default with <C-i> from insert mode (if you are inside a textfield).

While I will not work on emulating the text-editor part of Vim inside Vieb, I do welcome other people to work on this if they really care for such a feature to be integrated in Vieb.

ipod825 commented 4 years ago

action.editWithVim doesn't work on sites like google doc.

I can work on this later.