fanglingsu / vimb

Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim. The goal of vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience.
https://fanglingsu.github.io/vimb/
GNU General Public License v3.0
1.34k stars 100 forks source link

In normal mode, type "i" key to be in insert mode #605

Closed tyjak closed 4 years ago

tyjak commented 4 years ago

Version: 3.6.0 WebKit compile: 2.26.2 WebKit run: 2.26.4 GTK compile: 3.24.13 GTK run: 3.24.14 libsoup compile: 2.68.3 libsoup run: 2.68.3 Extension dir: /usr/lib/vimb

Steps to reproduce

In an input field in "insert mode" I hit ESC and I perform a CMD (ie. :set caret\<CR>) I hit key "i" and I return back to the input field Ieft, BUT with the letter "i" typed in it.

Expected behaviour

Like in vim, type "i" to be in insert mode aka focused on the last input field you were, if no input field as been focused yet then do like gi command, focus on the first input field found.

Actual behaviour

On insert mode in any input field, I hit key to perform a cmd, and there is no insert command to focus back in the input field I left without have a letter to be inserted in the field.

fanglingsu commented 4 years ago

@tyjak I never thought about such a feature. But it sounds reasonable to me to allow to focus last input field after switching away from input mode.

fanglingsu commented 4 years ago

@tyjak I've added the normal mode i to focus last focused field again if there was one. Could you please check if this works for you too and close the issue if this fits.

tyjak commented 4 years ago

@fanglingsu it works as expected thank you :)

I had an error on first compilation, retry severals times on different revisions, and now it's gone, so it's okay now although I don't know why...

~But I don't know if I mistaken something during the compilation : my augroup and autocommand or not recognize as command anymore.~

~Version : vimb, version 3.6.0-12-ga212b51 System : Arch Linux 5.5.6-arch1-1~

~Error:~

** (vimb:166247): WARNING **: 00:53:18.565: Invalid command in /home/david/.config/vimb/config: 'augroup bookmark'

** (vimb:166247): WARNING **: 00:53:18.565: Invalid command in /home/david/.config/vimb/config: '    autocmd LoadFinished file:///*/bookmark e! bookmarkFileToHtml();'

** (vimb:166247): WARNING **: 00:53:18.566: Invalid command in /home/david/.config/vimb/config: '    autocmd LoadFinished file:///*/bookmark.d/* e! bookmarkFileToHtml();'

** (vimb:166247): WARNING **: 00:53:18.566: Invalid command in /home/david/.config/vimb/config: 'augroup end'
fanglingsu commented 4 years ago

@tyjak It look like you compiled vimb withou autocmmand support. To have autocommands there must be the #DEFINE FEATURE_AUTOCMD in src/config.h.