Pycharm Tip of the Day

Ctrl + F12

You can quickly navigate in the currently edited file with Ctrl+F12 (Navigate | File Structure).
It shows the list of members of the current class. Select an element you want to navigate to and press the Enter key or the F4 key.
To easily locate an item in the list, just start typing its name.
您可以使用Ctrl + F12(导航|文件结构)快速导航当前编辑的文件。
它显示了当前类的成员列表。 选择要导航到的元素,然后按Enter键或F4键。
要轻松找到列表中的项目,只需输入其名称即可。

Shift + F6

You can easily rename your local variables with automatic correction of all places where they are used.
To try it, place the caret at the variable you want to rename, and press Shift+F6 (Refactor | Rename). Type the new name in the popup window that appears, or select one of the suggested names, and press Enter.
您可以轻松地重命名本地变量,并自动更正使用它们的所有位置。
要尝试它,请将插入符号放在要重命名的变量上,然后按Shift + F6(重构|重命名)。 在出现的弹出窗口中键入新名称,或选择一个建议的名称,然后按Enter键。

Tab

When using Code Completion, you can accept the currently highlighted selection in the popup list with Tab key.
Unlike accepting with the Enter key, the selected name will overwrite the rest of the name to the right of the caret. This can be especially useful for replacing one method or variable name with another.
使用代码完成时,您可以使用Tab键接受弹出列表中当前突出显示的选项。
与使用Enter键接受不同,所选名称将覆盖插入符号右侧的其余名称。 这对于用另一个方法或变量名替换一个方法或变量名称尤其有用。

Shift + Click

Did you know that you can close tabs in the editor and the tool windows of PyCharm without actually using the context menu commands? It is enough to point with your mouse cursor to a tab to be closed, and click the middle mouse button, or just use the Shift+click combination.
您是否知道可以在编辑器和PyCharm的工具窗口中关闭选项卡而不实际使用上下文菜单命令? 只需将鼠标光标指向要关闭的选项卡,然后单击鼠标中键,或只使用Shift +单击组合即可。

Alt + F1

To quickly select the currently edited element (class, file, method or field) in any view (Project view, Structure view or other), press Alt+F1.
要在任何视图(项目视图,结构视图或其他)中快速选择当前编辑的元素(类,文件,方法或字段),请按Alt + F1。

The speed search is available in all the tree views: just start typing and you’ll quickly locate the necessary item.
速度搜索在所有树视图中都可用:只需开始输入,您就可以快速找到所需的项目。

Esc Shift + Esc F12

The Esc key in any tool window moves the focus to the editor.
Shift+Esc moves the focus to the editor and also hides the current (or last active) tool window.
The F12 key moves the focus from the editor to the last focused tool window.
任何工具窗口中的Esc键都会将焦点移动到编辑器。
Shift + Esc将焦点移动到编辑器并隐藏当前(或最后一个活动的)工具窗口。
F12键将焦点从编辑器移动到最后一个聚焦工具窗口。

Ctrl+Alt+V

The Extract Variable refactoring helps you simplify complicated statements in your code. For example, in the code fragment below, you can select an expression in the code, and press Ctrl+Alt+V (Refactor | Extract | Variable).
Extract Variable重构可帮助您简化代码中复杂的语句。 例如,在下面的代码片段中,您可以在代码中选择一个表达式,然后按Ctrl + Alt + V(Refactor | Extract | Variable)。这里写图片描述

Ctrl+D

Ctrl+D in the editor duplicates the selected block or the current line when no block is selected.
当没有选择块时,编辑器中的Ctrl + D会复制所选块或当前行。

Ctrl+Shift+方向键

The Code | Move Statement Up/Down action is useful for reorganizing the code lines in your file, e.g., for bringing a variable declaration closer to the variable usage.
For example, select a code fragment and press Ctrl+Shift+向上箭头 or Ctrl+Shift+向下箭头.
守则| Move Statement Up / Down操作对于重新组织文件中的代码行很有用,例如,使变量声明更接近变量用法。
例如,选择一个代码片段并按Ctrl + Shift +向上箭头或Ctrl + Shift +向下箭头。这里写图片描述

Ctrl+Shift+J

The Ctrl+Shift+J shortcut joins two lines into one and removes unnecessary spaces to match your code style.
Ctrl + Shift + J快捷键将两行连接成一行,并删除不必要的空格以匹配您的代码样式。

Ctrl+P

If the cursor is between the parentheses of a method call, pressing Ctrl+P brings up a list of valid parameters.
如果光标位于方法调用的括号之间,则按Ctrl + P会显示有效参数列表。这里写图片描述

Ctrl + Shift + Backspace

Ctrl+Shift+Backspace (Navigate | Last Edit Location) brings you back to the last place where you made changes in the code.
Pressing Ctrl+Shift+Backspace a few times moves you deeper into your changes history.
Ctrl + Shift + Backspace(导航|上次编辑位置)将您带回到您在代码中进行更改的最后位置。
按Ctrl + Shift + Backspace几次可以让您更深入地了解更改历史记录。

Ctrl+Shift+F7

Use Ctrl+Shift+F7 (Edit | Find | Highlight Usages in File) to quickly highlight usages of some variable in the current file.
Use F3 and Shift+F3 keys to navigate through highlighted usages.
Press Esc to remove highlighting.
使用Ctrl + Shift + F7(编辑|查找|突出显示文件中的用法)可以快速突出显示当前文件中某些变量的用法。
使用F3和Shift + F3键浏览突出显示的用法。
按Esc键删除突出显示。

  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值