brookhong / Surfingkeys

Map your keys for web surfing, expand your browser with javascript and keyboard.
https://chrome.google.com/webstore/detail/surfingkeys/gfbliohnnapiefjpjlpjnehglfpaknnc
MIT License
5.39k stars 479 forks source link

Call external instance of vim? #539

Closed fd0 closed 3 years ago

fd0 commented 7 years ago

Hi,

while I really like the internal VIM (ACE), for some fields I'd like to call an external instance of e.g. gvim with custom extensions loaded. Other "vim" extensions like cvim provide this ability, but require running a local web server which takes the data and manages the instances of vim. Since all local users can connect to the web server, this is not a good solution.

What I have in mind is running gvim via "native messaging", like this: https://github.com/rosmanov/chrome-bee

Here's an example extension that uses native messaging: https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/docs/examples/api/nativeMessaging

That'd give the extension control over which gvim instances run without having to interface with a web server. The downside is that users need to do some installation steps.

Are you interested in adding this?

deadcyclo commented 6 years ago

I for one certainly would love this. However, it needs to be configurable to use whatever command one likes for launching the editor (so some love for us who don't use vi as well). Would also be great if it could be implemented as an API-ish function, so we could use it in custom configurations to call other external commands, such as custom shell scripts for our own methods.

leiserfg commented 5 years ago

Python is on Mac and Linux (like most of the users of this extension) maybe we can add a simple python server as "driver" for running commands in the background that way we can call vim for edit inputs or mpv for watch youtube videos.

gibfahn commented 5 years ago

Sounds like GhostText, which does all this (clients for different editors like vim-ghost, keyboard shortcut to trigger, works on any text box).

tecfu commented 1 year ago

Neovim Server Setup: https://github.com/brookhong/Surfingkeys/blob/master/src/nvim/server/Readme.md