title: Pycharm 使用技巧總結
- 添加或者修改文件模板
- File->settings->Editor->File and Code Templates->Python Script
- python版本管理切換
- File->settings->Prgject:python->project interpreter
- 已有文件重命名
- 右擊要重命名的文件->refactor->rename
- Python模塊安裝
- File->settings->Prgject:python->project interpreter
- 在PyChram中直接瀏覽文件目錄
- 右擊文件選擇show in explorer
- 斷點調試
- 打斷點
- 使用debug模式運行程序 run->Debug
- 常用快捷鍵
- alt+ctrl+s # 打開設置界面
- tab # 選擇要縮進的代碼,按鍵縮進
- shift+tab # 選擇要縮進的代碼,按鍵增加
- ctrl+d # 復制本行粘貼到下一行
- ctrl+/ # 注釋/取消注釋
- Ctrl + R # 替換
- Ctrl + F # 查找
- Ctrl + Shift + F # 全局查找
- Ctrl + Shift + R # 全局替換
- PyChram設置字體大小
- 步驟:Settings-->Editor-->Colors & Fonts-->Font,然后在size那里調整。
- 要先保存一個新的Scheme,才能調整字體大小。
- 直接運行當前的.py文件
- File->setting->keymap->other->run context configuration,windows下設置為Ctrl+R,mac下設置command+R
- 格式化代碼
- File->setting->keymap->main menu->code->reformat code,設置為 Ctrl+shift+L
- 智能感知忽略大小寫
- File->setting->Editor->Code Completion->case sensitive completion->選擇None