Mac環境下Sublime 3 配置 Anaconda 實現python自動補全

  1. 按照Sublime Text 3安裝與插件配置
    安裝好 package control;
    注冊碼: Sublime Text 3 最新注冊碼( 親測可用2019年8月24日更新)

  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”的問題。

sublime注冊碼地址 然后請關閉sublime更新提示,因為更新后需要重新輸注冊碼。很可能你之前網上隨便找的注冊碼,這次再輸入就無效了。

更新:
sublime對key的check越來越嚴了。
在鼓勵大家購買正版的前提下,分享一個通過改ip避過check的方法:

  • Just trick for MAC OS user:
  • After Enter License, close Sublime Text immediately before it is removed
  • Open Terminal, sudo nano /etc/hosts
  • Add this line:
    127.0.0.1 license.sublimehq.com(保存退出時輸入Y后,相當于“另存為”,還需要按enter鍵才能退出)
  • Open Finder, go to /Users/<your_username>/Library/Application Support/Sublime Text 3/Local
  • Select file: License.sublime_license
  • Command+I (right click > Get Info)
  • Check the Locked checkbox in License.sublime_license info modal box
    You will never lost your License.sublime_license file

原貼

PS:
Ubuntu下安裝sublime

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容