-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Chrome Linux support #1
Comments
I just implemented a working version of it in Chrome Linux using 1st method because it's easier for me. Here's the script in case anyone wants to use it. |
I'm also interested on adding support for Chrome Linux, probably using the Chrome Native Messaging Protocol. Just in case, did you do something I can use as a base, @thalesmello ? |
Thanks for your support @brunogsa I hadn't started working on this yet. A native client support would be more than welcome! |
I tried to find the simplest solution available, but the best option for now seems to create a Chrome Extension that gather the words, so we can source them into vim. This plugin would required the user install this extension. Also, I'm concerned about the performance. Sorry about my absence, |
You can gather words every time the user loads the page or content changes.
Installing an extension would be ok
…On Thu, Feb 22, 2018, 01:15 Bruno Agostini ***@***.***> wrote:
I tried to find the simplest solution available, but the best option for
now seems to create a Chrome Extension that gather the words, so we can
source them into vim.
This plugin would required the user install this extension.
What do you think about it?
Also, I'm concerned about the performance.
I'm still studying if it's possible to gather words only when a window /
tab become active.
Sorry about my absence,
Let me know what you think!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABEz4tPeHVMqKCjY9HxP1M7iE8nBJQHqks5tXOnRgaJpZM4KIE-I>
.
|
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:
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 alesser burden if we include a command such as
:WebCompleteBrowser
that alreadystarts the browser with the appropriate flags.
change, write the text of the current page to a temporary file in the operating
system.
The text was updated successfully, but these errors were encountered: