Skip to content

Instantly share code, notes, and snippets.

@MacHu-GWU
Created August 16, 2017 20:24
Show Gist options
  • Save MacHu-GWU/2ed42dfc38c13cc673d25eea43fc07f7 to your computer and use it in GitHub Desktop.
Save MacHu-GWU/2ed42dfc38c13cc673d25eea43fc07f7 to your computer and use it in GitHub Desktop.
PyCharm Shortcuts and Keymap

在默认设置的基础上加一些个人的自定义。

  • Windosw下使用Default。
  • MacOS下使用MacOS.
Edit
Description Windows MacOS Linux
Title Case (标题化字符串, 每个单词第一个字母大写, 其他小写)      
Swap Case (交换大小写)      
Upper Case (全部大写)      
Lower Case (全部小写)      
Select
Description Windows MacOS Linux
Select All (选择全部) Ctrl + A Cmd + A  
Expand Selection Line (选择光标所在行)      
Expand Selection to Word (选择光标所在的单词)      
Expand Selection to Paragraph (选择光标所在的段落)      
Add Previous Line (添加光标所在的 上一行 到 "已选择")      
Add Next Line (添加光标所在的 下一行 到 "已选择")      
Select Between Bracket (选择括号之间的内容)      
Editing
Description Windows MacOS Linux
Find (搜索文本) Ctrl + F Ctrl + F  
Find in Directory (在目录中的所有文件中搜索文本) Shift + Ctrl + F Shift + Ctrl + F  
Replace (替换) Ctrl + R Ctrl + R  
Replace in Directory (在目录中的所有文件中替换文本) Shift + Ctrl + R Shift + Ctrl + R  
Find and Select Next (找到并选择 下一个 匹配) Ctrl + G Cmd + G  
Find and Select Previous (找到并选择 上一个 匹配) Shift + Ctrl + G Shift + Cmd + G  
Find and Select All (找到并选择全部)      
Find and Add Select Next (找到并将 下一个 匹配添加到已选项)      
Find and Multiple Edit (搜索到 所有 匹配后同时编辑) Ctrl + F -> Alt + Enter Ctrl + F -> Alt + Enter  
General
Description Windows MacOS Linux
Insert Line After (在 下面 另起一行, 光标跳到 下一行) Shift + Enter Shift + Enter  
Insert Line Before (在 上面 另起一行, 光标跳到 上一行) Ctrl + Alt + Enter Cmd + Alt + Enter  
Duplicate / Delete Line (复制/删除 该行) Ctrl + D / Ctrl + Alt + D Cmd + D / Cmd + BackSpace  
Indent / Unindent Line (增加/减少 该行缩进) Tab / Shift + Tab Tab / Shift + Tab  
Move Line Up/Down (移动该行) Shift + Alt + Up/Down Shift + Alt + Up/Down  
Join Lines (连接多行) Ctrl + Shift + J Ctrl + Shift + J  
Multiline Editing (多行同时编辑) Alt + Click/Drag or Press Ctrl Twice + Up/Down to select lines Cmd + Click/Drag or Press Alt Twice + Up/Down to select lines Alt + Click/Drag or Press Ctrl Twice + Up/Down to select lines
Sort Lines (多行排序)      
Navigation
Description Windows MacOS Linux
Previous/Next Tab (上/下 一个标签) Alt + Left/Right Shift + Cmd + [ / ]  
Previous/Next Cursor (上/下 一个游标所在) Ctrl + Alt + Left/Right Cmd + Alt + Left/Right  
Jump Between Bracket (在匹配的括号之间跳转) Ctrl + Shift + M Ctrl + M  
Menu
Description Windows MacOS Linux
Settings (设定) Ctrl + Alt + S Cmd + ,  
Pluggin (插件)      
IDLE
Description Windows MacOS Linux
Copy Name (复制文件/文件夹名)      
Copy Absolute Path (复制绝对路径) Shift + Ctrl + C Shift + Cmd + C  
Open in Explorer/Finder/File Manager (在文件浏览器中打开) Ctrl + Shift + I Ctrl + Shift + I  
Open in Sublime Text (使用Sublime Text打开) Ctrl + Shift + S Ctrl + Shift + S  
Open in Default Application (使用默认的App打开)      
Run Last File (运行上次运行的脚本) Shift + F10 Ctrl + R  
Select and Run (选择一个脚本运行) Alt + Shift + F10 (2 is the current file) Alt + Ctrl + R (2 is the current file)  
Debug Last File (调试上次运行的脚本) Shift + F9 Ctrl + D  
Select and Debug (选择一个脚本调试) Alt + Shift + F9 (2 is the current file) Alt + Ctrl + D (2 is the current file)  
Open Command Line/Terminal (打开命令行) Alt + F12 Alt + F12  
Fold/Unfold All Once (折叠/打开 代码一次) Ctrl + +/- Ctrl + +/-  
Fold/Unfold All Recursively (折叠/打开 全部代码) Ctrl + Shift + +/- Ctrl + Shift + +/-  
Bookmark Here (为某处添加书签) F11 F3  
Show ALl Bookmark (浏览所有的书签) Shift + F11 Cmd + F3  
Python
Description Windows MacOS Linux
Comment/Uncomment (注释/取消注释) Ctrl + / Ctrl + /  
Navigate to Previous/Next Method (上/下一个函数) Alt + Up/Down Ctrl + Up/Down (Has to disable MacOS's shortcut Mission Control and Application Window)  
Move Method/Class Up/Down (移动整个函数和类的位置) Ctrl + Shift + Shift + Cmd + Up/Down  
Find Usage (在项目中查找用例) Alt + F7 Alt + F7  
Find Usage in File (在本文件中查找用例) Ctrl + F7 Cmd + F7  
Highlight Usage in File (高亮本文件中的所有用例) Shift + Ctrl + F7 Shift + Cmd + F7  
Go to Declaration (到第一次的声明处) Ctrl + B Cmd + B  
Go to Implementation (到实现处, 可能有多个) Ctrl + Alt + B Cmd + Alt + B  
View Definition (快速查看定义) Ctrl + Shift + I Alt + Space  
View Document (快速查看文档) Ctrl + Q F1  
Pep8 Reformat (Pep8风格化代码) Ctrl + Alt + L Cmd + Alt + L  
Optimize Import (自动整理Import) Ctrl + Alt + O Ctrl + Alt + O  
Rename Variable (重命名变量) Shift + F6 Shift + F6  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment