sublime text 3 python 3.6.5环境及常用插件安装

  1.  下载sublime text 3 点击打开链接以及python 3.6.5 点击打开链接
  2. 按照默认选项安装sublime text 3 和python(注意勾选添加环境变量)
  3. 打开sublime单击Tools > Build System > New Build System
    "encoding": "utf-8",  
    "working_dir": "$file_path",  
    "shell_cmd": "C:\\Users\\用户名\\AppData\\Local\\Programs\\Python\\Python36\\python.exe -u \"$file\"",  
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",  
    "selector": "source.python" 
    具体文件路径按照个人安装情况不同而有所变化
  4. 将文件保存为python 3.6.5并在Build System 中将其勾选上
  5. 安装常用插件

    1. 按下Ctrl+Shift+P调出命令面板

    2. 输入install package安装package control

  6. 在package control中输入插件名即可并点击该插件即可完成插件的安装,安装过后的插件可以在Preferences > Package Settings中查询到

  7. 接下来配置快捷键,打开 Sublime > Preferences > Key Bindings,在右侧栏( User 部分)添加下面的代码。下面的代码用 F5 来执行当前 Python 脚本,用 F4 来实现切换至 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"}}
        ,
        {"keys":["f4"],
        "caption": "SublimeREPL: Python",
        "command": "run_existing_window_command", "args":
        {"id": "repl_python",
        "file": "config/Python/Main.sublime-menu"}}

常用插件如下:

SublimeCodeIntel: 代码提示插件  

SideBarEnhancements:增强侧边栏的功能  

SublimeREPL:直接运行当前文件,可以方便调试  

Python pep8 autofromat:代码格式化

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

SublimeLinter:代码检查工具,在仅保存模式下保存会提示错误代码

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

猜你喜欢

转载自blog.csdn.net/why12345678901/article/details/80465396
今日推荐