一、官方網站地址css
二、Windows 10html
一、雙擊下載的.exe文件安裝,安裝路徑不要有中文目錄python
一、打開Tools > Build System > New Build System..windows
二、點擊New Build System後,會生成一個空配置文件,在這個配置文件內覆蓋配置信息,本文python安裝路徑爲「C:/Python/Python36」,(注意區分正反斜槓,請將路徑換成python實際安裝路徑),而後按ctrl+s,將文件保存在默認路徑,文件名命名爲「Python3」微信
{
"cmd": ["C:/Python/Python36/python.exe","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
}測試
如圖:字體
三、打開Tools > Build System,選擇新建好的Python3便可網站
測試ui
一、新建test.py文件,輸入簡單python語句,按Ctrl+B運行url
一、打開Preferences –>>Settings(Settings User),在右側添加以下代碼(font_face及font_size可根據我的喜愛更改)
二、效果以下
4、安裝Package Control(官網教程)
第一種方法:在線安裝
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
注:上面代碼僅適用於Sublime Text 3,若是是Sublime Text2請使用以下代碼:
import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
關掉並從新打開Sublime Text 3,若是在Perferences->package settings中能看到package control這一項,則表示安裝成功。
第二種方法:手動安裝
一、點擊 Preferences > Browse Packages… 菜單
二、Browse up a folder and then into the Installed Packages/ folder
三、Download Package Control.sublime-package and copy it into the Installed Packages/ directory
四、Restart Sublime Text
一、經過Package Control安裝其餘插件
1.按下Ctrl+Shift+P調出命令面板
2.輸入install 調出 Install Package
3.在列表中選中要安裝的插件,或者輸入插件名,根據命令面板中的過濾結果,選擇要安裝的插件
二、經過Package Control查看已安裝的插件
1. 按下Ctrl+Shift+P調出命令面板
2. 輸入"package",在下拉列表找到"Package Control: list packages",選中後回車,能夠顯示所有插件列表。
介紹
Full-featured code intelligence and smart autocomplete engine
Jump to Symbol Definition - Jump to the file and line of the definition of a symbol.
Imports autocomplete - Shows autocomplete with the available modules/symbols in real time.
Function Call tooltips - Displays information in the status bar about the working function.
支持語言
JavaScript, ES6, Mason, XBL, XUL, RHTML, SCSS, Python, HTML, Ruby, Python, XML, XSLT, Django, HTML5, Perl, CSS, Twig, Less, Smarty, Node.js, Tcl, TemplateToolkit, PHP.
Installation
1.Control+Shift+P打開Package Control控制檯
2.輸入install,選擇關聯出來的install package
3.輸入sublimecodeintel,而後點擊列表提示的sublimecodeintel安裝
4.安裝完成以後,文本框會出現以下顯示,或者能夠經過【Preferences>Package Settings】中查看到已安裝的sublimecodeintel插件
5.打開preferences->packages settings ->Package Control ->Settings-User,檢查是否有以下紅框代碼,若是沒有得手動添加
6.點擊preferences中的browse Packages,進入SublimeCodeIntel文件夾,在當前的路徑下新建 codeintel文件夾(windows中文件命名的時候爲 codeintel. ),以後進入到 codeintel文件夾中,新建文件「config.log」文件,打開輸入(下文以路徑「C:/Python/Python36」爲例,實際配置時請根據具體安裝路徑修改):
"python3":{ "python":"C:/Python/Python36/python.exe", "pythonExtraPaths":[ "C:/Python/Python36/DLLs", "C:/Python/Python36/Lib", "C:/Python/Python36/Lib/lib-tk", "C:/Python/Python36/Lib/site-packages", ] }
如圖:
7.保存,重啓Sublime Text 3
測試
新建文件並保存爲.py文件,輸入代碼測試
SublimeREPL
介紹
添加快捷鍵後,可直接運行當前文件,很是方便
Launch python in local or remote(1) virtualenv.
Quickly run selected script or launch PDB.
Use SublimeText Python console with history and multiline input.
使用方法
代碼粘貼:
[ { "keys": ["f5"], "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command", "args": { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" } } ]
測試
一、新建test.py文件,例如:
二、上文中SublimeREPL插件設置的快捷鍵是F5,因此按F5運行成功以下
若是出現如下報錯信息(C:\Python\Python36\python.EXE: can't open file '$file_basename': [Errno 2] No such file or directory)說明你的python程序沒有保存運行致使的結果,
解決方法是 先保存您要運行的python文件,在使用F5運行。
介紹
安裝插件後,能夠經過快捷鍵按照模板快速新建文件
使用方法
一、安裝SublimeTmpl插件後,打開Preferences->Package Settings->SublimeTmpl->Settings User,添加如下內容
{ "disable_keymap_actions": false, // "all"; "html,css" "date_format" : "%Y-%m-%d %H:%M:%S", "attr": { "author": "wxwinder",
"微信公衆號":"透霧", "email": "bravexz@163.com", "link": "http://www.cnblogs.com/bravexz/" } }
如圖:
二、添加快捷鍵,打開Preferences->Key Bindings,添加紅框中的快捷鍵代碼
[ { "caption": "Tmpl: Create python", "command": "sublime_tmpl", "keys": ["ctrl+alt+n"], "args": {"type": "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" } } ]
如圖:
測試
打開Sublime Text 3,上文中SublimeTmpl插件設置的快捷鍵是"Ctrl+alt+n",按快捷鍵後成功新建文件以下
介紹
提供了主題更換功能,可根據我的喜愛選擇
使用方法
一、安裝ColorSublime插件完成後,打開Preferences->Color Scheme...,選擇主題
Anaconda
介紹
代碼提示等許多功能,必備
安裝方法
一、Preferences->Package Settings->Anaconda->Settings Default,修改"python_interpreter"爲實際Python安裝路徑
二、Preferences->Package Settings->Anaconda->Settings User,添加以下內容
{ "python_interpreter":"C:/Python/Python36/python.exe", "suppress_word_completions":true, "suppress_explicit_completions":true, "comlete_parameters":true, "swallow_startup_errors":true, "anaconda_linting":false }
如圖:
測試
一、打開Sublime Text3,新建任意*.py文件,輸入語句測試,如圖