首页 新闻 会员 周边 捐助

sublime如何在离线情况下正常使用pyv8插件

0
悬赏园豆:5 [待解决问题]

大家好,我们公司是非互联网公司,无网化办公的(有专门的上网去)。我是一名前端。现在想离线环境下使用sublime。其中有一些插件依托于pyv8这个插件。

但是无网环境下打开插件后,发现左下角pyv8 loading[=]这个小标志。之后就出现了问题。文件只能打字,不能→backspace,很多键都失效了。

您可以做个试验,首先断网,其次在开机后首次打开sublime3,就会发现,左下角有pyv8 loading的提示。

JeffreyYe的主页 JeffreyYe | 初学一级 | 园豆:197
提问于:2016-02-01 22:19
< >
分享
所有回答(1)
1

Loading https://api.github.com/repos/emmetio/pyv8-binaries/contents 请求的是这个地址,自己配置项hosts,让它指向你的服务,然后返回如下的字符串:

[
  {
    "name": ".gitignore",
    "path": ".gitignore",
    "sha": "496ee2ca6a2f08396a4076fe43dedf3dc0da8b6d",
    "size": 9,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/.gitignore?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/.gitignore",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/496ee2ca6a2f08396a4076fe43dedf3dc0da8b6d",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/.gitignore",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/.gitignore?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/496ee2ca6a2f08396a4076fe43dedf3dc0da8b6d",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/.gitignore"
    }
  },
  {
    "name": "README.md",
    "path": "README.md",
    "sha": "f305d92451a5e5bcc0e345151ca981474e7f744c",
    "size": 1699,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/README.md?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/README.md",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f305d92451a5e5bcc0e345151ca981474e7f744c",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/README.md",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/README.md?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f305d92451a5e5bcc0e345151ca981474e7f744c",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/README.md"
    }
  },
  {
    "name": "pyv8-linux32-p3.zip",
    "path": "pyv8-linux32-p3.zip",
    "sha": "f60af1cdf57fce96dcfb08333c8b843be5257b62",
    "size": 7813444,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux32-p3.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux32-p3.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f60af1cdf57fce96dcfb08333c8b843be5257b62",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux32-p3.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux32-p3.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f60af1cdf57fce96dcfb08333c8b843be5257b62",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux32-p3.zip"
    }
  },
  {
    "name": "pyv8-linux32.zip",
    "path": "pyv8-linux32.zip",
    "sha": "ac6d2a1c876d1622aaa39cc77bdeec8f09ae86ae",
    "size": 7889216,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux32.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux32.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/ac6d2a1c876d1622aaa39cc77bdeec8f09ae86ae",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux32.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux32.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/ac6d2a1c876d1622aaa39cc77bdeec8f09ae86ae",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux32.zip"
    }
  },
  {
    "name": "pyv8-linux64-p3.zip",
    "path": "pyv8-linux64-p3.zip",
    "sha": "a22304a4e9bc98da62467b3d3fad8eaac83b5c39",
    "size": 7890108,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux64-p3.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux64-p3.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/a22304a4e9bc98da62467b3d3fad8eaac83b5c39",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux64-p3.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux64-p3.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/a22304a4e9bc98da62467b3d3fad8eaac83b5c39",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux64-p3.zip"
    }
  },
  {
    "name": "pyv8-linux64.zip",
    "path": "pyv8-linux64.zip",
    "sha": "29fc9f71cffb9e766cff25e7b50ede86837bee8f",
    "size": 8018554,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux64.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux64.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/29fc9f71cffb9e766cff25e7b50ede86837bee8f",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-linux64.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-linux64.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/29fc9f71cffb9e766cff25e7b50ede86837bee8f",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-linux64.zip"
    }
  },
  {
    "name": "pyv8-mac106.zip",
    "path": "pyv8-mac106.zip",
    "sha": "da8d1110d23c6eba79e86dd78792ef69340e59ea",
    "size": 3119644,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-mac106.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-mac106.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/da8d1110d23c6eba79e86dd78792ef69340e59ea",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-mac106.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-mac106.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/da8d1110d23c6eba79e86dd78792ef69340e59ea",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-mac106.zip"
    }
  },
  {
    "name": "pyv8-osx-p3.zip",
    "path": "pyv8-osx-p3.zip",
    "sha": "cac719a547387675ff3d06804fb91691eae78c2d",
    "size": 2937636,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-osx-p3.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-osx-p3.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/cac719a547387675ff3d06804fb91691eae78c2d",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-osx-p3.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-osx-p3.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/cac719a547387675ff3d06804fb91691eae78c2d",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-osx-p3.zip"
    }
  },
  {
    "name": "pyv8-osx.zip",
    "path": "pyv8-osx.zip",
    "sha": "156096456024e99193094adc3bf24aa589275cc8",
    "size": 3055650,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-osx.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-osx.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/156096456024e99193094adc3bf24aa589275cc8",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-osx.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-osx.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/156096456024e99193094adc3bf24aa589275cc8",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-osx.zip"
    }
  },
  {
    "name": "pyv8-win32-p3.zip",
    "path": "pyv8-win32-p3.zip",
    "sha": "8e1f9de32e4cb350c0587a6ab3b8bc54a3d42ed6",
    "size": 1620867,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win32-p3.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win32-p3.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/8e1f9de32e4cb350c0587a6ab3b8bc54a3d42ed6",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-win32-p3.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win32-p3.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/8e1f9de32e4cb350c0587a6ab3b8bc54a3d42ed6",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win32-p3.zip"
    }
  },
  {
    "name": "pyv8-win32.zip",
    "path": "pyv8-win32.zip",
    "sha": "4dba00a2887ac1490d9d543245745689ebebf669",
    "size": 1605924,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win32.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win32.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/4dba00a2887ac1490d9d543245745689ebebf669",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-win32.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win32.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/4dba00a2887ac1490d9d543245745689ebebf669",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win32.zip"
    }
  },
  {
    "name": "pyv8-win64-p3.zip",
    "path": "pyv8-win64-p3.zip",
    "sha": "f10748a176d49fb4b464f256f48f1a3131112596",
    "size": 1973979,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win64-p3.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win64-p3.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f10748a176d49fb4b464f256f48f1a3131112596",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-win64-p3.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win64-p3.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/f10748a176d49fb4b464f256f48f1a3131112596",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win64-p3.zip"
    }
  },
  {
    "name": "pyv8-win64.zip",
    "path": "pyv8-win64.zip",
    "sha": "ea0660fb5d50826c9bb408650a94acec874d7da5",
    "size": 2016283,
    "url": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win64.zip?ref=master",
    "html_url": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win64.zip",
    "git_url": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/ea0660fb5d50826c9bb408650a94acec874d7da5",
    "download_url": "https://raw.githubusercontent.com/emmetio/pyv8-binaries/master/pyv8-win64.zip",
    "type": "file",
    "_links": {
      "self": "https://api.github.com/repos/emmetio/pyv8-binaries/contents/pyv8-win64.zip?ref=master",
      "git": "https://api.github.com/repos/emmetio/pyv8-binaries/git/blobs/ea0660fb5d50826c9bb408650a94acec874d7da5",
      "html": "https://github.com/emmetio/pyv8-binaries/blob/master/pyv8-win64.zip"
    }
  }
]
幻天芒 | 园豆:37207 (高人七级) | 2016-02-02 08:41

您好,非常感谢您的回答。请问具体如何配置hosts?是把这段代码粘贴到hosts文件尾部吗?能否给个hosts文件的配置模板。

支持(0) 反对(0) JeffreyYe | 园豆:197 (初学一级) | 2016-02-02 13:34

@pageye: 不是哈,如何配置hosts文件,建议你查下网上。这个是pyV8发起的对外请求。

原理就是将pyV8的请求转向到你自己写的服务器上,这样来避开外网访问。

 

另外,推荐VS Code编译器。

支持(0) 反对(0) 幻天芒 | 园豆:37207 (高人七级) | 2016-02-02 13:51

@幻天芒: 我大致了解了一下hosts文件,可以这么做吗?

0.0.0.0  https://api.github.com/repos/emmetio/pyv8-binaries/contents  将请求的网站进行重定向以达到屏蔽的目的。是这个意思吗?

支持(0) 反对(0) JeffreyYe | 园豆:197 (初学一级) | 2016-02-02 16:28

@pageye: 大概是这个意思,但是似乎你需要指定一个可访问的地址。你这个hosts配置文件有点问题。不过思路是这样的。

支持(0) 反对(0) 幻天芒 | 园豆:37207 (高人七级) | 2016-02-03 09:29
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册