Mac环境下Sublime 3 配置 Anaconda 实现python自动补全

  1. 按照Sublime Text 3安装与插件配置
    安装好 package control
  2. 按照sublime text3 下搭建python IDE环境 –Anaconda插件篇安装好Anaconda
    不过的我的python_interpreter地址的跟作者不一样,是/usr/local/Homebrew/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/bin/python3.6
    是通过在终端敲 which python3找到快捷路径,右键查看“显示简介”找到真实路径
    并且作者的Settings-Users配置有误,最后达到自动补全,并不自动显示document的配置如下:
{
    // https://github.com/DamnWidget/anaconda/blob/master/Anaconda.sublime-settings
    "python_interpreter": "/usr/local/Homebrew/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/bin/python3.6",
    "complete_parameters": false,//自动补全函数时是否匹配必要参数

    "complete_all_parameters": false,//自动补全函数时是否匹配所有参数

    "suppress_word_completions": false,//禁止代码补全

    "suppress_explicit_completions": false,//禁止精确补全

    "auto_formatting": true,//代码格式检查

    "enable_docstrings_tooltip": false,// 显示文档
    "enable_signatures_tooltip": false,//在悬浮窗中显示方法签名
    "display_signatures": false//显示方法签名


}

最后,参照Anaconda Github 复制好了/Users/apple/Library/Application\ Support/Sublime\ Text\ 3/Packages/Python/Completion\ Rules.tmPreferences

大功告成

小技巧:在sublime中全选,可以看出空格处的字符是tab还是space,这样可以解决“TabError: inconsistent use of tabs and spaces in indentation”的问题。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值