Skip to content

Include Chrome Linux support #1

@thalesmello

Description

@thalesmello

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 :WebCompleteBrowser that 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions