PyCharm 快捷键

来源:互联网 发布:redis与mysql区别 编辑:程序博客网 时间:2024/04/30 01:23

____tz_zs笔记

未完


翻译自2017.2版pycharm的官方英文文档:http://download.csdn.net/download/tz_zs/9921836


编辑(Editing)

Ctrl + Space

Basic code completion (the name of any class, method or variable)

基本的代码(类、方法、属性)的只能补完提示

Ctrl + Alt + Space

Class name completion (the name of any project class independently of current imports)

没有在项目中出现过的类名的智能提示,看成是Ctrl + Space的强化就行

Ctrl + Shift + Enter

Complete statement

本语句完成,在下方新起一行(感觉和Shift + Enter并没什么区别)

Ctrl + P

Parameter info (within method call arguments)

查看参数的信息,在方法括号内使用,可以看到方法应该输入的参数

Ctrl + Q 

Quick documentation lookup

快速查看文档,在pycharm内快速查看当前方法的文档说明

Shift + F1

External Doc

打开方法的外部文档(使用浏览器打开官网文档地址)

Ctrl + mouse over code   

Brief Info

这个快捷键是按住Ctrl并且鼠标滑到代码上,查看代码的简介

Ctrl + F1

Show descriptions of error or warning at caret

显示关于错误或警告的描述信息(在有错误的地方使用才有提示的)

Alt + Insert

Generate code... 

翻译是生成代码,事实上是“新建文件”的快捷键

Ctrl + O 

Override methods 

 重载方法

Ctrl + Alt + T

Surround with...

包裹,可以快捷的使用if、while、try等语句包裹你所选中的代码

Ctrl + /

Comment/uncomment with line comment

注释和取消注释,单行注释

Ctrl + Shift + /

Comment/uncomment with block comment

注释和取消注释,块注释

Ctrl + W

Select successively increasing code blocks

选中光标所在的那一块代码

Ctrl + Shift + W

Decrease current selection to previous state

减少选中,比如:你选中了一大片,按这个快捷键就会缩小你的选择范围

Ctrl + Shift + ]

Select till code block end

选中当前光标位置到代码块的结尾

Ctrl + Shift + [

Select till code block start

选中当前光标位置到代码块的开始

Alt + Enter

Show intention actions and quick-fixes

显示提示存在的问题和修复的方法

Ctrl + Alt + L 

Reformat code

快速的格式化代码(让你的代码格式整齐)

Ctrl + Alt + O

Optimize imports

优化导包

Ctrl + Alt + I 

Auto-indent line(s)


Tab

Indent selected lines

缩进选中的行

Shift + Tab

Unindent selected lines

减少选中行的缩进

Ctrl + X , Shift + Delete

Cut current line or selected block to clipboard

剪切当前行

Ctrl + C , Ctrl + Insert

Copy current line or selected block to clipboard

复制当前行

Ctrl + V , Shift + Insert

Paste from clipboard

粘贴

Ctrl + Shift + V

Paste from recent buffers...

会弹出最经你的粘贴板(最近你复制的那些都在里面)

Ctrl + D

Duplicate current line or selected block

重复当前行(相当于向下复制一行)

Ctrl + Y

Delete line at caret

删除光标所在的行

Ctrl + Shift + J

Smart line join

减少行的数量。也就是行尾加分号,把多行代码缩到一行

Ctrl + Enter

Smart line split 

在光标当前位置分割换行

Shift + Enter

Start new line

开始新的一行

Ctrl + Shift + U

Toggle case for word at caret or selected block

将选中的部分全部变换成大写/小写

Ctrl + Delete

Delete to word end 

从光标位置删除到单词末尾

Ctrl + Backspace

Delete to word start 

从光标位置删除到单词开始

Ctrl + NumPad+

Expand code block 

展开代码块(作用同代码栏左边的加号按钮)

Ctrl + NumPad-

Collapse code block 

折叠代码块(作用同代码栏左边的减号按钮)

Ctrl + Shift + NumPad+

Expand all

展开所有代码

Ctrl + Shift + NumPad-

Collapse all

折叠所有代码

Ctrl + F4

Close active editor tab

关闭当前代码编辑页面

运行(Running)

Alt +Shift + F10

Select configuration and run

弹出可选的运行项

Alt +Shift + F9

Select configuration and debug

弹出可选调试项

Shift+F10

Run

运行

Shift+F9

Debug

调试

Ctrl+Shift + F10

Run context configuration from editor

从当前编辑框运行

Ctrl+Alt + R

Run manage.py task

运行manage.py任务

调试(Debugging)

F8 / F7

Step over/into

运行到下一步/进入方法

Shift+F8

Step out

跳出方法

Alt +F9

Run to cursor

运行到光标所在的地方

Alt +F8

Evaluate expression

Ctrl+Alt + F8

Quick evaluate expression

F9

Resume program

继续运行程序

Ctrl + F8

Toggle breakpoint 

添加/删除断点

Ctrl + Shift + F8

View breakpoints

查看断点

导航(Navigation)

Ctrl+N

Go to class

查找类

Ctrl+Shift + N

Go to file

查找文件

Ctrl+Alt + Shift + N

Go to symbol

查找方法

Alt+Right

Go to next editor tab

去下一个编辑页

Alt +Left

Go to previous editor tab

去上一个编辑页

F12

Go back to previous tool window 

回到工具窗口

Esc

 Go to editor (from tool window) 

从工具窗口回到编辑窗口

Shift + Esc

Hide active or last active window

隐藏窗口

Ctrl+Shift + F4

Close active run/messages/find/... tab

关闭活动运行/信息/发现等选项卡

Ctrl+G

Go to line

跳转到指定行

Ctrl+

 Recent files popup 

弹出最近打开的文件

Ctrl + Alt +Right      

Navigate forward 

向前跳转

Ctrl + Alt +Left           

Navigate back

向后跳转

Ctrl+Shift + Backspace 

Navigate to last edit location

导航到最近的编辑位置

Alt +F1                                

Select current file or symbol in any view

在任何视图查找当前的文件或方法

Ctrl+B , Ctrl + Click            

Go to declaration

跳转到方法或类声明的地方

Ctrl+Alt + B                        

Go to implementation(s)

跳转到实现的地方

Ctrl+Shift + I                       

Open quick definition lookup

快速查看选中代码的定义

Ctrl+Shift + B                     

Go to type declaration

  • 跳转到方法定义处

Ctrl+U                                 

Go to super-method/super-class

跳转到父类方法

Alt +Up / Down                 

Go to previous/next method 

去之前/下一个方法

Ctrl + ] / [  

Move to code block end/start 

Ctrl + F12          

File structure popup

Ctrl+H                                 

Type hierarchy 

Ctrl + Shift + H      

Method hierarchy 

Ctrl + Alt +H    

Call hierarchy

F2 / Shift + F2                     

Next/previous highlighted error

F4                                        

 Edit source

Ctrl+Enter                         

View source

Alt +Home                        

Show navigation bar

F11                                         

Toggle bookmark

Ctrl+Shift + F11                  

Toggle bookmark with mnemonic

Ctrl+#[0-9]                         

Go to numbered bookmark

Shift+F11                            

Show bookmarks

Search/Replace

Ctrl+F / Ctrl + R               

Find/Replace

F3 / Shift + F3                    

Find next/previous

Ctrl+Shift + F                     

Find in path

Ctrl+Shift + R                    

Replace in path

UsageSearch

Alt +F7 / Ctrl + F7            

Find usages / Find usages in file

Ctrl+Shift + F7                   

Highlight usages in file

Ctrl+Alt + F7                     

Show usages

Refactoring

F5/ F6                                 

Copy / Move 

Alt +Delete 

Safe Delete 

Shift + F6         

Rename

Ctrl+F6                               

Change Signature

Ctrl+Alt + N                      

 Inline

Ctrl+Alt + M                   

Extract Method 

Ctrl + Alt +V                    

Extract Variable 

Ctrl + Alt +F                    

Extract Field

Ctrl+Alt + C                       

Extract Constant

Ctrl+Alt + P                       

Extract Parameter

VCS/Local History

Ctrl+K                                 

Commit project to VCS 

Ctrl + T       

Update project from VCS 

Alt +Shift + C 

 View recent changes

Alt + BackQuote (`)           ‘

VCS’ quick popup

LiveTemplates

Ctrl+Alt + J                        

Surround with Live Template

Ctrl+J                                  

Insert Live Template

General

Alt +#[0-9]                         

Open corresponding tool window

Ctrl+S                                

Save all

Ctrl+Alt + Y                        

Synchronize

Ctrl+Shift + F12                 

Toggle maximizing editor

Alt +Shift + F                     

 Add to Favorites

Alt +Shift + I                       

Inspect current file with current profile

Ctrl+ BackQuote (`)           

Quick switch current scheme

Ctrl+Alt + S                       

Open Settings dialog

Ctrl+Shift + A                     

Find Action

Ctrl+Tab                            

Switch between tabs and tool window












原创粉丝点击