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.
I would like a way of escaping special keys like <C-R> in mapping. My particular use case is makeing a mapping that opens a hinted URI in another browser like Firefox. Consider the mapping
The key sequence <C-R>; is executed as soon as ;f is pressed.
This means that x-hint-command=:sh! firefox ''. Notice that there's no way to get <CR> at the end of this, so after a URI is hinted we're left with :sh! firefox '' in the command line and have to press enter manually to execute the command.
In PR #752 I add the ability to escape with backslash, the result being that the mapping
works as intended. The syntax \<C-R> causes this string to be interpreted as the key sequence <, C, -, R, >. The PR also adds a <Bslash> special key so that <Bslash><C-R> is backslash followed by CTRL-R.
Two questions that need to be answered:
Syntax. Is this syntax ok? Would another syntax be more desirable? Another idea I had was to make <<> into a literal < character, so that instead of \<C-R> you would type <<>C-R>. This would make it so that we don't need to add a <Bslash> special key.
Is there already another way to accomplish the same things a new escape syntax would accomplish?
I would like a way of escaping special keys like
<C-R>
in mapping. My particular use case is makeing a mapping that opens a hinted URI in another browser like Firefox. Consider the mappingThere are two issues with this
<C-R>;
is executed as soon as;f
is pressed.x-hint-command=:sh! firefox ''
. Notice that there's no way to get<CR>
at the end of this, so after a URI is hinted we're left with:sh! firefox ''
in the command line and have to press enter manually to execute the command.In PR #752 I add the ability to escape with backslash, the result being that the mapping
works as intended. The syntax
\<C-R>
causes this string to be interpreted as the key sequence<
,C
,-
,R
,>
. The PR also adds a<Bslash>
special key so that<Bslash><C-R>
is backslash followed by CTRL-R.Two questions that need to be answered:
<<>
into a literal<
character, so that instead of\<C-R>
you would type<<>C-R>
. This would make it so that we don't need to add a<Bslash>
special key.