码迷,mamicode.com
首页 > 其他好文 > 详细

sublime插件

时间:2020-06-25 19:54:53      阅读:94      评论:0      收藏:0      [点我收藏+]

标签:cms   运行   安装   boot   enc   lib   racket   ace   ida   

sublime插件

a.安装Package control

1. 直接用自带的选项功能来安装

tools--install packgage control

2. 爬虫脚本安装

import urllib.request,os,hashlib; 
h = ‘6f4c264a24d933ce70df5dedcf1dcaee‘ + ‘ebe013ee18cced0ef93d5f746d80ef60‘; 
pf = ‘Package Control.sublime-package‘; 
ipp = sublime.installed_packages_path(); 
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); 
by = urllib.request.urlopen( ‘http://packagecontrol.io/‘ + pf.replace(‘ ‘, ‘%20‘)).read();
dh = hashlib.sha256(by).hexdigest(); 
print(‘Error validating download (got %s instead of %s), please try manual install‘ % (dh, h)) 
if dh != h 
else open(os.path.join( ipp, pf), ‘wb‘ ).write(by)

view--show console 或者 按ctrl+`调出console粘贴以上代码

中文镜像网站http://packagecontrol.cn/installation#st3

由于packagecontrol.io容易被墙,访问不稳定,所以需要将Sublime Text安装插件的地址改为中文镜像的地址:修改或新增channels地址

preferences--package settings--package control--settings-user 加入代码

"channels": [ "http://packagecontrol.cn/channel_v3.json" ]

如下:

{
"bootstrapped": true,
"channels": [ "http://packagecontrol.cn/channel_v3.json" , "http://cst.stu.126.net/u/json/cms/channel_v3.json"],
"debug": true,
"in_process_packages":
[
],
"installed_packages":
[
"Anaconda",
"ChineseLocalizations",
"Package Control",
"SideBarEnhancements",
"SublimeLinter-pug-lint",
"SublimeREPL",
"SublimeTmpl"
]
}

安装插件

preference--package control --输入ip

.SublimeREPL-在Sublime 3中运行解释器(Python + virtualenv)

设置快捷键,注意中括号

[{
//运行当前文件
"keys": ["f5"],
"command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "R",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-u", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
},
},

{
//调试当前文件
"keys": ["f8"],
"caption": "SublimeREPL: Python - PDB current file",
"command": "repl_open",
"mnemonic": "D",
"args":
{
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-i", "-u", "-m", "pdb", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
},
}]

.SublimeTmpl-新建文件的模版插件

.ChineseLocaloztions--中文插件

.Bracket Highlighter--代码匹配,可匹配[], (), {}, “”, ”,高亮标记,便于查看起始和结束标记;使用:点击对应代码即可

sublime插件

标签:cms   运行   安装   boot   enc   lib   racket   ace   ida   

原文地址:https://www.cnblogs.com/tengba-2014/p/13192336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!