-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Description
I would like to include support for Linux, but, as of now, I don't know exactly
what is the best way to accomplish that.
The way this plugin works on the Mac is that it uses Apple Script to communicate
with an Open Instance of Chrome, which in its turn implements an interface of communication. With it I'm able to execute arbitrary JavaScript code in the currently opened page, so I run document.body.innerText to get the page text. Then I parse it and plug into the Vim completion engine.
After research, I've found two possible strategies:
- Start Chrome in remote debugging mode, which then allows you to
communicate with Chrome via HTTP requests. It has the inconvenience that Chrome
has to be started using--remote-debugging-port=9222. Maybe that could be a
lesser burden if we include a command such as:WebCompleteBrowserthat already
starts the browser with the appropriate flags. - Use Chrome native messaging protocol, which could then, on each page
change, write the text of the current page to a temporary file in the operating
system.
tuxflo, adriaanzon, karismatic-megafauna, brunogsa, balta2ar and 2 morepockata