博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sublime text 3 搭建python ide
阅读量:4657 次
发布时间:2019-06-09

本文共 3481 字,大约阅读时间需要 11 分钟。

SublimeCodeIntel 代码提示插件

安装步骤:
1.打开Package Control[Preferences>>Package Control]
2.输入 install 选择关联出来的install package
3.输入sublimecodeintel,然后选中安装
4.安装完成之后可以通过【Preferences>>Package Settings】中查看到已安装的插件,下面配置Python环境
5.点击preferences中的browse Packages,进入到SublimeCodeIntel,在当前的路径下新建.codeintel文件夹(
windows中文件命名的时候为 .codeintel. ),之后进入到 .codeintel文件夹中,新建文件“config.log”,配置文件中输入(下文以路径“E:/Program Files/python34/”为例,实际配置时请根据具体安装路径修改):
"python3":{ "python":"C:/Program Files/python34/python.exe", "pythonExtraPaths":[ "C:/Program Files/python34/DLLs", "C:/Program Files/python34/Lib", "C:/Program Files/python34/Lib/lib-tk", "C:/Program Files/python34/Lib/site-packages", ] }

 

 

SideBarEnhancements  扩展了侧边栏中菜单选项的数量,提供删除选项

 

 

pylinter  使用该插件可以让 Pyhton 在保存时自动规范,并对违反规范显示图标。

自己在st3中安装了pylinter插件,但是没有成功,出现如下错误:

"Pylinter could not automaticallydetermined the path to lint.py. Please provide one in the settings file usingthe pylint_path variable. NOTE: If you are using a Virtualenv, the problemmight be resolved by launching Sublime Text from correct Virtualenv。

解决方法:

1)到官网https://pypi.python.org/pypi/pylint#downloads下载:pylint-1.xx.tar.gz,dos下运行它,或者直接运行其中的setup.py ,

2)开ST3,然后ctrl+shift+p ,remove package,remove掉这个pylint,package。可以换一个 SublimeLinter 安装。

(安装 pylint

1、下载刚才网页中的gz包,然后用winRAR打开,然后

2、cd到下载好的文件夹内,然后使用python setup.py install   在cmd中输入pylint 有提示则表示安装成功。)

安装完成修改如下配置文件:

{// When versbose is 'true', various messages will be written to the console.// values: true or false"verbose": false,// The full path to the Python executable you want to// run Pylint with or simply use 'python'."python_bin": "python",// The following paths will be added Pylint's Python path"python_path": ["C:/Python36-32/python.exe"],// Optionally set the working directory"working_dir": null,// Full path to the lint.py module in the pylint package"pylint_path": "C:/Python36-32/Lib/site-packages/pylint-1.8.2/pylint/lint.py",// Optional full path to a Pylint configuration file"pylint_rc": null,// Set to true to automtically run Pylint on save"run_on_save": true,// Set to true to use graphical error icons"use_icons": false,"disable_outline": false,// Status messages stay as long as cursor is on an error line"message_stay": false,// Ignore Pylint error types. Possible values:// "R" : Refactor for a "good practice" metric violation// "C" : Convention for coding standard violation// "W" : Warning for stylistic problems, or minor programming issues// "E" : Error for important programming issues (i.e. most probably bug)// "F" : Fatal for errors which prevented further processing"ignore": [],// a list of strings of individual errors to disable, ex: ["C0301"]"disable": [],"plugins": []}

 

SublimeTmpl  新建文件模板插件

1.在settings-user中设置上自己的信息:

{ "disable_keymap_actions": false, // "all"; "html,css" "date_format" : "%Y-%m-%d %H:%M:%S", "attr": { "author": "chen", "email": "reviewcheng@126..com", "link": "http://www.baidu.com/" } }

 

 

 

Terminal 打开一个命令窗口,用于各种命令操作

 

AutoPep8  让在保存代码时自动格式化

1.在settings-user中设置上自己的信息:

{    "format_on_save": true,}
自动将 Python 代码按 PEP8 规范格式化,安装完添加如下配置可自动在保存文件的时候格式化:

Anaconda 自动匹配关键字等实用功能,有效提高开发效率

 

SublimeREPL  代替st3自带的crtl+b 的输出控制台(按esc退出)

定义快捷键 f5

[{"caption": "Tmpl: Create python", "command": "sublime_tmpl", "keys": ["ctrl+alt+n"], "args": {"type": "python"} },{"keys": ["f5"],"caption": "SublimeREPL: Python - RUN current file","command": "run_existing_window_command","args": {"id": "repl_python_run","file": "config/Python/Main.sublime-menu"}}]

 

转载于:https://www.cnblogs.com/nichoc/p/8444635.html

你可能感兴趣的文章
聊聊 CDN 缓存与浏览器缓存
查看>>
参加ORACLE(淄博)测试人员培训第五天
查看>>
简易的学生社团管理(大二课设)
查看>>
动态规划初步 刘汝佳字数 数字三角形
查看>>
Javascript学习笔记一基本数据类型与变量声明
查看>>
针对数据库开发人员的性能调优小提示
查看>>
使用eclipse开发hbase程序
查看>>
vimtutor
查看>>
Intent显示启动与隐式启动
查看>>
使用ftp加IP上传文件
查看>>
使用CSS3中Media Queries兼容不同设备
查看>>
详解C++中基类与派生类的转换以及虚基类
查看>>
字符串方法整理
查看>>
宾得常用镜头群[转自东河寒梅]
查看>>
文件配置文件php 5.4 连接不上 mysql 的真正原因!!
查看>>
Windows环境下 配置memcached (php)
查看>>
Tomcat抛出异常:ClientAbortException: java.net.SocketException: Connection
查看>>
Python18天训练营第二课<基础1>
查看>>
seanborn使用函数regplot回归分析绘图
查看>>
第十篇----------javascript函数的三种定义方式及区别
查看>>