Open thalesmello opened 8 years ago
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. https://gist.github.com/baongoc124/ab7fab56f9f95363c75ff79b19257b60
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. 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 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 notifications@github.com 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 https://github.com/thalesmello/webcomplete.vim/issues/1#issuecomment-367562209, 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:
--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.