Sublime2 for Mac OSX配置(Python developer)

Sublime2 for Mac OSX(Python developer)編輯器


團隊對代碼規範要求愈來愈高了以後,我就必須用到AutoPEP8之類的插件了。ide


雖然Vim很流行,可是調配起來仍是有點麻煩。看到又輕又強的Sublime以後,就決定把它做爲主編輯器了。ui


必裝的一個插件管理器:url


一、Package Controlspa


主頁:https://packagecontrol.io/installation .net

安裝:快捷鍵ctrl+` 或者View > Show Console menu插件


import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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')3d


把上面這段粘貼進去,回車,成功後會顯示:Please restart Sublime Text to finish installationrest


重啓後,Command+Shift +P快捷鍵能夠打開包管理器(前提是Package Control已經安裝成功)代碼規範

選擇Package control:Install Package。


跳出輸入框以後往裏面輸入插件名字,就能夠安裝了。 


經常使用的兩個插件:


一、AutoPEP8(快速格式化代碼)

二、SublimeCodeIntel(多種代碼自動補全)

相關文章
相關標籤/搜索