Sublime Text 3 for Python andweb developers配置开发环境

本文详细介绍了如何配置Sublime Text 3编辑器以更好地支持Django框架开发。包括安装必要的插件、自定义设置及编译环境的搭建。

最近开始学习Django框架,一直用ST3来编辑但没有好好配置它,所以很是丑陋又不方便,于是就花了大半天查教程,基本算配置完了,记录以下配置的过程:

  1. 下载安装ST3

  2. 安装package.control插件,用来后面在线查找和下载插件(具体安装网上一搜都是)

  3. 参考此网址的教程ST配置教程来初步下载插件。

  4. 使用快捷键ctrl+shift+p打开搜索框,输入package这里写图片描述
    选择install package就可搜索插件并下载

  5. 选择教程中的插件安装,我安装了如下插件:各插件具体是有和作用可以readme
    这里写图片描述

  6. 配置setting-user
    打开preferences->setting-user,输入用户的自定义配置,我参考上面两个教程后的配置如下:

{
    "always_show_minimap_viewport": true,
    "auto_complete_delay": 500,
    "bold_folder_labels": true,
    "color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
    "detect_indentation": false,
    "detect_slow_plugins": false,
    "draw_minimap_border": true,
    "enable_telemetry": false,
    "ensure_newline_at_eof_on_save": true,
    "file_exclude_patterns":
    [
        ".*",
        "*.pyc",
        "*.pyo",
        "*.exe",
        "*.dll",
        "*.obj",
        "*.o",
        "*.a",
        "*.lib",
        "*.so",
        "*.dylib",
        "*.ncb",
        "*.sdf",
        "*.suo",
        "*.pdb",
        "*.idb",
        ".DS_Store",
        "*.class",
        "*.psd",
        "*.db"
    ],
    "folder_exclude_patterns":
    [
        ".svn",
        ".git",
        ".hg",
        "CVS",
        "__pycache__"
    ],
    "font_size": 12,
    "highlight_modified_tabs": true,
    "ignored_packages":
    [
        "Vintage"
    ],
    "indent_guide_options":
    [
        "draw_active",
        "draw_normal"
    ],
    "indent_to_bracket": true,
    "preview_on_click": false,
    "rulers":
    [
        79
    ],
    "shift_tab_unindent": true,
    "show_panel_on_build": false,
    "soda_classic_tabs": true,
    "soda_folder_icons": false,
    "theme": "SoDaReloaded Dark.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_automatic_white_space": true,
    "trim_trailing_white_space_on_save": true,
    "wrap_width": 80
}

最后设置编译环境,找了好多教程,最后看到stackflow的一个问题后,新建了一个build system:

{
    "cmd": ["start", "cmd", "/k", "c:/python27/python.exe", "$file"],
    "selector": "source.python",
    "shell": true,
    "working_dir": "$file_dir"
}

changing the path to your Python executable as appropriate. Then, go to Tools -> Build System and create Python_cmd, and when you hit CtrlB to build, a new cmd window will open up with your file running. The /k option returns to the command prompt, without closing the window, after your program is done running so you can examine output, tracebacks, etc.

终于基本配置完了ST3,虽然其中配置过程很多不理解的地方,有待以后慢慢理解,附最后完成的效果:这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值