什么是最有用的 Intellij IDEA 键盘快捷键? [英] What are the most useful Intellij IDEA keyboard shortcuts?

查看:30
本文介绍了什么是最有用的 Intellij IDEA 键盘快捷键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一些谷歌搜索,希望能找到一篇关于 IDEA 快捷方式的帖子,类似于 Jeff 在 Visual Studio 快捷方式上的帖子(Visual Studio .NET 2003 和 2005 键盘快捷键),但并没有真正发现任何有用的东西.希望这个问题的答案能填补空白.

I did a bit of googling hoping to find a post on IDEA shortcuts similar to Jeff's post on Visual Studio shortcuts (Visual Studio .NET 2003 and 2005 Keyboard Shortcuts), but didn't really spot anything that helped. Hopefully the answers to this question will fill the void.

推荐答案

这些是我最常用的键盘快捷键

These are some of my most used keyboard short cuts

编辑器中的语法感知选择在插入符号处选择一个单词,然后选择源代码的扩展区域.例如,它可能会选择一个方法名称,然后是调用该方法的表达式,然后是整个语句,然后是包含块等:Ctrl+W

Syntax aware selection in the editor selects a word at the caret and then selects expanding areas of the source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, then the containing block, etc.: Ctrl+W

Basic Code Completion,完成方法、关键字等:Ctrl+空格

Basic Code Completion, to complete methods, keywords etc.: Ctrl+Space

转到声明.使用它导航到代码中某处使用的类、方法或变量的声明:Ctrl+B

Go to Declaration. Use this to navigate to the declaration of a class, method or variable used somewhere in the code: Ctrl+B

引入变量重构,从表达式创建变量.此表达式甚至可能不完整或包含错误.从版本 8 开始,IDEA 会在未选择文本时智能地选择一个可能的表达式:Ctrl+Alt+V

Introduce Variable Refactoring, to create a variable from an expression. This expression may even be incomplete or contain errors. Since version 8, IDEA intelligently selects a likely expression when no text is selected: Ctrl+Alt+V

转到类,在编辑器中快速打开任何类:Ctrl+N

Go to Class, to quickly open any class in the editor: Ctrl+N

要打开任何文件,而不仅仅是类:Ctrl+Shift+N

To open any file, not just classes: Ctrl+Shift+N

注释/取消注释当前行或选择:Ctrl+/Ctrl+Shift+/

Comment/Uncomment current line or selection: Ctrl+/ and Ctrl+Shift+/

Quick JavaDoc Popup 以在文本光标处显示方法或类的 JavaDoc:Ctrl+Q (Ctrl+JMac OS X)

Quick JavaDoc Popup to show the JavaDoc of the method or class at the text cursor: Ctrl+Q (Ctrl+J on Mac OS X)

Smart Type Completion 使用适合当前上下文的类型的方法调用或变量完成表达式:Ctrl+Shift+空格

Smart Type Completion to complete an expression with a method call or variable with a type suitable in the current Context: Ctrl+Shift+Space

重命名重构以重命名任何标识符.也可以查看评论、文本文件和不同语言:Shift+F6

Rename refactoring to rename any identifier. Can look in comments, text files and across different languages too: Shift+F6

在弹出窗口中选择以在任何视图(项目视图、结构视图或其他)中快速选择当前编辑的元素(类、文件、方法或字段):Alt+F1

Select in Popup to quickly select the currently edited element (class, file, method or field) in any view (Project View, Structure View or other): Alt+F1

突出显示文件中的用法.将文本光标放在任何标识符上而不选择任何文本,它将显示文件中使用该变量、方法等的所有位置.在 throws、try 或 catch 关键字上使用它以显示抛出异常的所有位置.在implements关键字上使用它来突出显示已实现接口的方法:Ctrl+Shift+F7

Highlight Usages in File. Position the text cursor on any identifier without selecting any text and it will show all places in the file where that variable, method etc. is used. Use it on a throws, try or catch keyword to show all places where the exception is thrown. Use it on the implements keyword to highlight the methods of the implemented interface: Ctrl+Shift+F7

这篇关于什么是最有用的 Intellij IDEA 键盘快捷键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆