1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 325 forks source link

Call scripts when input box has focus #650

Open Lighter84 opened 6 years ago

Lighter84 commented 6 years ago

I think using JavaScript code blocks is a great feature. From normal mode they can be run using the call command in some mapping like map ci :call myJavaScriptFunction\<CR>

Yet, this does not work as an insert mapping, i.e., when for example an input box is focused: imap \<C-h> :call myJavaScriptFunction\<CR>

Is there another way to call such a code block when an input box has the focus?