1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 325 forks source link

How to import js file into config? #646

Open sandric opened 6 years ago

sandric commented 6 years ago

As stated in docs, you can define custom js evaluation with codeblocks like that:

getIP() -> {{
httpRequest({url: 'http://api.ipify.org/?format=json', json: true},
            function(res) { Status.setMessage('IP: ' + res.ip); });
}}

Is there a way to import js file into config and then simply call function evaluation, like this:

import "my_scripts.js"

getIP() -> {{ function_defined_in_myscripts(); }}