參考文獻(xiàn)
參考1:http://www.reibang.com/p/8ff629b155dd? 【使用Atom配置python(windows)】
參考2:https://www.cnblogs.com/reshuffle/p/12895432.html 【atom的python配置】
參考3:http://www.reibang.com/p/7f28fc14116a?from=timeline【Atom使用指南】
參考4: https://blog.csdn.net/offbye/article/details/51691324【老外收集的Atom編輯器最好的一些插件】
背景:安裝好了python2和python3成翩,并讓兩者并存。設(shè)置好了python2和python3栅炒、pip2和pip3
安裝好了atom术羔,沒有安裝anaconda级历。根據(jù)《本辦法學(xué)python3中文版》使用power shell運(yùn)(windows 終端)行python腳本,故而沒想過使用IDE.?
主要根據(jù)參考1和參考2玩讳,選擇了以下package嚼贡。由于今天網(wǎng)絡(luò)有問題,python3 -m pip install XXX全部失敗樟澜,因此?linter-pydocstyle叮盘、?linter-flake8都沒裝
安裝的package有:????
linter(必裝), 在atom中安裝該插件毒费,同時它會綁定幾個用戶界面插件蝗罗。語法檢查功能推薦
autocomplete-paths路徑自動補(bǔ)全
autocomplete-python-jedipython 自動補(bǔ)全
minimap代碼小地圖
platformio-ide-terminal在界面下方添加終端【默認(rèn)使用windows powershell終端運(yùn)行py腳本蝌戒,否則根據(jù)需要設(shè)置,參考1】
atom-python-run按f5可以執(zhí)行你的腳本桩匪,但是會有彈出窗口
highlight-selected雙擊變量以追蹤
minimap- highlight-selected代碼小地圖中也同時追蹤【暫時沒安裝】
simple-drag-drop-text文件內(nèi)拖拽文本
========[次日網(wǎng)絡(luò)變好傻昙,就安裝了以下]==============
?(1)linter-pydocstyle、?linter-flake8
先是趁著網(wǎng)絡(luò)好僻爽,pip3 install flake8,成功后在atom的settings的install就可以搜索到這兩根插件贾惦。
(2)atom-beautify美化代碼格式(ctrl + alt + b)【由于需要安裝autopep8,昨天沒安裝】
先 pip3 install autopep8
再在atom的settings的install就可以搜索atom-beautify
輸入where.exe autopep8看看安裝路徑
跑去這個atom-beautify 設(shè)置须板,找到executables碰镜,設(shè)置autopep8
然后選中你的代碼,右鍵习瑰,找到beautify editor contents 就可以了
(3)autocomplete-plus插件設(shè)置
找到Keymap for confirming a suggestion
將當(dāng)中的選項(xiàng)選為tab绪颖,這樣按enter就是回車不會自動補(bǔ)全了
使用筆記
使用atom-beautify美化代碼的時候,有錯誤提示:E501 line too long 警告
這是因?yàn)閜ython代碼有一個格式檢查工具 flake8 , 對代碼規(guī)范化確實(shí)很有幫助甜奄,但有時候也很煩柠横,比如行長度限制,默認(rèn)為79课兄。