vrome icon indicating copy to clipboard operation
vrome copied to clipboard

investigate loading vim as a textarea (optional)

Open hbt opened this issue 12 years ago • 5 comments

investigate the vim modes + libraries out there and see if they're any good.

build a list and test

hbt avatar Jun 22 '12 19:06 hbt

best ones so far

http://codemirror.net/demo/vim.html http://gpl.internetconnection.net/vi/

possible integration problems:

  • ESC

Implementation:

  • add command to transform the current input (textarea) into vim editor (toggle)
  • when in vim mode, you need to use C-ESC to leave because ESC will be used by the vim editor in the browser
  • you can always use the external editor if needed. However, this will offer an advantage when you install the extension on a machine where you can't install ruby + the server

hbt avatar Jun 22 '12 22:06 hbt

Looks cool, but why not use :q or :w to leave the textarea?

jinzhu avatar Jun 26 '12 05:06 jinzhu

check vim-in-textarea together with online demo

jakub-m avatar Dec 29 '12 16:12 jakub-m

@jakub-m thank you

I remember this ticket required some integration work so that ESC switched to normal mode within the input instead of Vrome taking over and removing the focus from the input.

Does that mean users will have to press ESC again to go back to Vrome or another key to switch the vim mode?

It requires more thought before implementation

hbt avatar Dec 29 '12 16:12 hbt

@hbt: unfortunately I wont give you any hints on how to integrate Vrome and vim-in-textarea, I don't know the details of the first one.

If it happened that you integrated vrome and vim-in-textarea, as Vim user I would expect that Esc key switches state to command mode, and is not bubbled up to the browser. Sometimes Esc makes textarea to loose focus. Loosing focus in Vim on each Esc would be quite annoying...

For example, <Esc><Esc> would be a good way to jump back to Vrome

jakub-m avatar Dec 29 '12 16:12 jakub-m