关于sublime3的配置笔记

1.安装的插件有Anaconda, GitGutter, SublimeCodeIntel

Anaconda会有长度超过80警报的问题, 影响写代码的时候的判断,

所以将Preferences/Packages Setting/Anaconda/Setting User 中加入以下代码

{
    "anaconda_linting_behaviour": "save-only",
    "python_interpreter": "/usr/bin/python",
    "extra_paths":
    [
        "/home/mellcap/.virtualenvs/py2dj18/bin/python",
        "/home/mellcap/.virtualenvs/py2dj18/local/lib/python2.7/site-packages/",
    ],
    "pep8_ignore":
    [
        "E501","C0301","W0142","W0402","R0201","E1101","E1102","C0103","R0901","R0903","R0904","C1001","W0223","W0232","W0201","E1103","R0801","C0111"
    ]
}

其中mellcap是我的用户名, py2dj18是虚拟环境,根据自己的修改以下就可以了.

2.SublimeCodeIntel会自动匹配并联想词汇, 这在换行的时候非常麻烦, 每次点Enter 都会误打出代码,

解决办法分两步:第一步是在Perferences/setting User 中加入

    "auto_complete_commit_on_tab": true,

然后看Perferences/KeyBindings Default中

{ "keys": ["enter"], "command": "commit_completion", "context":
        [
            { "key": "auto_complete_visible" },
            { "key": "setting.auto_complete_commit_on_tab", "operand": false }
        ]
    },

如上代码是不可以修改的,所以自己在Perferences/KeyBindings User中加入以下代码:

[
    { "keys": ["enter"], "context":
        [
            { "key": "setting.auto_complete_commit_on_tab", "operand": true }
        ]
    },
]

以上就配置完毕了.

posted @ 2015-07-24 10:28  Mellcap  阅读(479)  评论(0编辑  收藏  举报