1 下载sublimetext3 (不要下载最新版Version: Build 3207 不好找licence)
https://www.unyoo.com/2320.html(参考这个,需要指定版本windows或mac的可以看这个)
https://download.sublimetext.com/sublime_text_3_build_3200_x64.tar.bz2 (我用的是这个版本)
放到ubuntu里面,解压
tar -xvf sublime_text_3_build_3200_x64.tar
配置subl启动sublime
sudo ln -s /code/sublime_text_3/sublime_text /usr/bin/subl
配置sublime
1 输入license
修改hosts:
vi /etc/hosts 添加下面两行
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
在sublime上输入license
— BEGIN LICENSE —–
ZYNGA INC.
50 User License
EA7E-811825
927BA117 84C9300F 4A0CCBC4 34A56B44
985E4562 59F2B63B CCCFF92F 0E646B83
0FD6487D 1507AE29 9CC4F9F5 0A6F32E3
0343D868 C18E2CD5 27641A71 25475648
309705B3 E468DDC4 1B766A18 7952D28C
E627DDBA 960A2153 69A2D98A C87C0607
45DC6049 8C04EC29 D18DFA40 442C680B
1342224D 44D90641 33A3B9F2 46AADB8F
—— END LICENSE ——
安装 Package Control
安装好后退出重启
ctrl + shift + p 调出Package Control 窗口 输入install 并选中install package
安装以下几个插件:
安装库(根据自己所需,我使用的是国内的阿里镜像):
pip3 install flake8 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install pandas -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install scipy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install numpy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install pytest -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install aiohttp -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3 install hyper -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
配置sublime插件
代码检查:sublimelinter
看到如上图所示时,把左边的配置全部拷贝到右边的配置里并把开头的default更改为user
然后把配置中 "mark_style": "outline",更改为:"mark_style":“squiggly underline”
代码自动补全功能 anaconda
{
"pep8": false,
"python_interpreter": "/usr/bin/python3",
"supress_word_completions": true,
"supress_explicit_completions": true,
// "complete_parameters": true,
"anaconda_linting": false
}
配置取消自动升级,tab键自动转换4个空格等
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme",
"font_size": 13,
"ignored_packages":
[
"Vintage"
],
"theme": "Brogrammer.sublime-theme",
"update_check": false
}
运行REPL 配置 F5 运行 F1 显示交互模式CMD ALT+B停止运行
输入:
[
{"keys":["f1"],
"caption": "SublimeREPL: Python",
"command": "run_existing_window_command", "args":
{"id": "repl_python",
"file": "config/Python/Main.sublime-menu"}}
,
{"keys":["f5"],
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command", "args":
{"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"}}
,
{ "keys": ["alt+b"], "command": "exec", "args": {"kill": true} }
]
修改:sublime flake8 line too long错误提示修改
找到python的安装路径,C:\..\Python36\Lib\site-packages\flake8文件夹下,用记事本打开defaults.py,查找“MAX_LINE_LENGTH” 修改成155或其他
然后就可以愉快的写代码了(感受下)
参考:
https://blog.csdn.net/Qton_CSDN/article/details/70176106
https://www.unyoo.com/2320.html
https://gist.github.com/tarikmanoar/1956ef3191e1ea43c3982cd61bc75e07
https://www.cnblogs.com/zhaof/p/8126306.html
https://blog.csdn.net/qq_27366789/article/details/80666343
https://blog.csdn.net/david_xtd/article/details/78839858
https://blog.csdn.net/weixin_33738578/article/details/93453267