1.To open any class in the editor quickly, press Ctrl+N (Navigate | Class) and start typing the name of the class. Choose the class from a drop-down list that appears.
You can open any file in your project in a similar way by using Ctrl+Shift+N (Navigate | File)
1.要快速打开编辑器中的任何类,请按Ctrl+N(导航|类)并开始输入类的名称。从出现的下拉列表中选择类。
您可以使用Ctrl+Shift+N以类似的方式打开项目中的任何文件(导航|文件)
2.The Code Completion feature lets you quickly complete different kinds of statements in the code. For example, start typing a class name and press Ctrl+空格 to complete it. When multiple choices are available, they are shown in the lookup list.
2.代码完成特性允许您快速完成代码中的不同类型的语句。例如,输入一个类名并按Ctrl +空格来完成它。当多个选项可用时,它们将显示在查找列表中。
3.You can quickly find all places where a particular class, method or variable is used in the whole project by positioning the caret at the symbol's name or at its usage in code and pressing Alt+F7 (Edit | Find | Find Usages in the popup menu).
3.您可以通过将插入符号定位到符号的名称或在代码中的用法,并按Alt+F7(编辑|,找到弹出菜单中的|查找用法),快速找到在整个项目中使用特定类、方法或变量的所有位置。
4.To quickly see the documentation for a class or method at caret, press Ctrl+Q (View | Quick Documentation).
4.要在插入符号中快速查看类或方法的文档,请按Ctrl+Q(查看|快速文档)。
5.To navigate to the declaration of a class, method or variable used somewhere in the code, position the caret at the usage and press Ctrl+B (Navigate | Declaration). You can also click the mouse on usages with the Ctrl key pressed to jump to declarations.
5.要导航到代码中某个地方使用的类、方法或变量的声明,请将插入符号放置在使用位置并按Ctrl+B(导航|声明)。您还可以使用Ctrl键单击鼠标,以跳转到声明。
6.You can easily rename your classes, methods and variables with automatic correction of all places where they are used.To try it, place the caret at the symbol 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.
6.您可以轻松地重命名您的类、方法和变量,并自动纠正所有使用它们的地方。
要尝试,将插入符号放在要重命名的符号上,然后按Shift+F6(重构| rename)。在出现的弹出窗口中键入新名称,或选择其中一个建议的名称,然后按Enter。
7.You may easily override methods of the base class by pressing Ctrl+O (Code | Override Methods).To implement methods of the interfaces that the current class implements (or of the abstract base class), use Ctrl+I (Code | Implement methods).
7.您可以通过按Ctrl+O(代码|覆盖方法)轻松覆盖基类的方法。
要实现当前类实现的接口(或抽象基类的接口)的方法,请使用Ctrl+I(代码|实现方法)。
8.The SmartType code completion greatly helps to find methods and variables that are suitable in the current context, by analyzing the expected type of the whole expression. So doing, IntelliJ IDEA pinpoints the top five most suitable results and highlights them on the blue background. For example, type
SmartType代码补全通过分析整个表达式的预期类型,极大地帮助查找适合当前上下文的方法和变量。这样做,IntelliJ IDEA就能找到最适合的五个结果,并在蓝色背景上突出它们。例如,输入
and press Ctrl+Shift+空格:
The SmartType completion also works after the return keyword, in an assignment, in an argument list of a method call and other places.
SmartType补全还可以在return关键字之后,在赋值中,在方法调用的参数列表和其他地方。
9.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.
9.当使用代码完成时,您可以使用Tab键接受弹出列表中当前突出显示的选择。
与接受输入键不同,选择的名称将覆盖到插入符号右侧的其他名称。这对于用另一个方法或变量名替换一个方法或变量名特别有用。
10.Did you know that you can close tabs in the editor and the tool windows of IntelliJ IDEA 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.
10.你知道吗,你可以关闭编辑器和IntelliJ IDEA的工具窗口中的标签,而不用使用上下文菜单命令?只需将鼠标指针指向要关闭的选项卡,然后单击鼠标中键,或者使用Shift+单击组合即可。
11.Using Alt+Insert (Code | Generate) in the editor, you can easily generate getter and setter methods for any fields of your class.
在编辑器中使用Alt+Insert(代码|生成),您可以轻松地为类的任何字段生成getter和setter方法。
12.To quickly select the currently edited element (class, file, method or field) in any view (Project view, Structure view or other), press Alt+F1.
12.要在任何视图(项目视图、结构视图或其他视图)中快速选择当前编辑的元素(类、文件、方法或字段),请按Alt+F1。
13.The speed search is available in all the tree views: just start typing and you'll quickly locate the necessary item.
13.在所有树视图中都可以找到速度搜索:只要开始键入,就可以快速找到必要的条目。
14.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.
14.任何工具窗口中的Esc键将焦点移动到编辑器。
Shift+Esc将焦点移动到编辑器,并隐藏当前(或最后一个活动)工具窗口。
F12键将焦点从编辑器移动到最后一个焦点工具窗口。
15.When you want to catch exceptions thrown by some code fragment, select it in the editor, press Ctrl+Alt+T (Code | Surround With) and choose try / catch. The catch blocks for all the exceptions thrown inside the block will be generated automatically.You can customize the bodies of the generated catch blocks on the Code tab of File | Settings | File and Code Templates.Use other items in the list to surround with other constructs.
15.当您希望捕获由某些代码片段抛出的异常时,请在编辑器中选择它,按Ctrl+Alt+T(代码| around With),然后选择try / catch。块中抛出的所有异常的catch块将自动生成。
可以在File | Settings | File和Code模板的Code选项卡上定制生成的catch块的主体。
使用列表中的其他项来包围其他构造。
16.The SmartType code completion may be used after the new keyword, to instantiate an object of the expected type. For example, type and press Ctrl+Shift+空格:
16.SmartType代码完成可以在new关键字之后使用,以实例化预期类型的对象。例如,输入
Ctrl+Shift+空格:
17.To navigate to the implementation(s) of an abstract method, position the caret at its usage or its name in the declaration and press Ctrl+Alt+B.
Ctrl+W (extend selection) in the editor selects the 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. You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor.
17.要导航到抽象方法的实现,请将插入符号的用法或名称置于声明中,并按Ctrl+Alt+B。
编辑器中的Ctrl+W(扩展选择)选择插入符号处的单词,然后选择源代码的展开区域。例如,它可以选择一个方法名,然后是调用这个方法的表达式,然后是整个语句,然后是包含块等等。
18.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...). This will result in the following:
18.提取变量重构可以帮助您简化代码中的复杂语句。例如,在下面的代码片段中,您可以在代码中选择一个表达式:
并按Ctrl+Alt+V(重构|提取|变量…)。这将导致以下结果:
19.You can comment or uncomment lines and blocks of code using Ctrl+/ and Ctrl+Shift+/.Ctrl+/ comments or uncomments the current line or selected block with single line comments (//...).Ctrl+Shift+/ encloses the selected block in a block comment (/*...*/).To uncomment a commented block press Ctrl+Shift+/ anywhere inside it.
19.您可以使用Ctrl+/和Ctrl+Shift+/注释或取消注释行和代码块。
按Ctrl+/ comments或取消对当前行或选定块的注释(//…)。
Ctrl+Shift+/将选中的块放在一个块注释中(/*…*/)。
要取消注释,请按Ctrl+Shift+/任何地方。
20.When you need to cast an expression value to the required type the SmartType code completion will help you. For example, type and press Ctrl+Shift+空格 to see what happens.
20.当您需要将表达式值转换为所需的类型时,SmartType代码完成将对您有所帮助。例如,输入
并按Ctrl + Shift +空格看看会发生什么。
21.Ctrl+D in the editor duplicates the selected block or the current line when no block is selected.
21.在编辑器中按Ctrl+D复制选中的块或当前行,但没有选择任何块。
22.Live Templates allow you to generate many typical code constructs in seconds! For example, type
in a method and press the Tab key to see what happens.
Use the Tab key to move between the template fields. See File | Settings | Live Templates for more details.
22.Live Templates允许您在几秒钟内生成许多典型的代码构造!例如,键入一个方法,然后按Tab键查看会发生什么。
使用Tab键在模板字段之间移动。有关详细信息,请参阅文件|设置| Live模板。
23.The CodeCompletion feature can suggest a name for a variable when you declare it. For example, start typing and press Ctrl+空格.
You can customize name prefixes for local variables, parameters, instance and static fields in File | Settings | Code Style.
23.CodeCompletion功能可以在声明变量时为其建议一个名称。例如,开始键入并按Ctrl+空格.
您可以在“文件”|“设置”|“代码样式”中自定义局部变量、参数、实例和静态字段的名称前缀。
24.If the cursor is between the parentheses of a method call, pressing Ctrl+P brings up a list of valid parameters.
24.如果游标位于方法调用的圆括号之间,按Ctrl+P将显示有效参数列表。
25.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.
25.Ctrl+Shift+Backspace(导航|最后一个编辑位置)让您回到您在代码中进行更改的最后一个位置。
按下Ctrl+Shift+Backspace几下,你就能更深入地了解更改历史
26.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.
26.使用Ctrl+Shift+F7(编辑|查找|突出显示文件中的用法)可以快速突出显示当前文件中某些变量的用法。使用F3和Shift+F3键浏览突出显示的用法。按Esc删除高亮。
27.Use Code | Reformat Code to reformat code according to your code style preferences (File | Settings | Code Style).You can also use Code | Optimize Imports to automatically optimize imports (remove unused imports, etc.). To access the corresponding settings, use File | Settings | Code Style | Imports.
使用Code | Reformat Code根据您的代码风格偏好重新格式化代码(File | Settings | Code style)。您还可以使用Code | Optimize Imports来自动优化导入(删除未使用的导入,等等)。通过“File | settings | Code Style | Imports”进入相应的设置。
28.To see your local history of changes in a file, invoke Local History | Show History from the context menu. You can navigate through different file versions, see the differences and roll back to any previous version.Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature!
28.要查看文件中更改的本地历史记录,请从上下文菜单中调用local history b| Show history。您可以浏览不同的文件版本,查看差异并回滚到以前的任何版本。使用相同的上下文菜单项查看目录上的更改历史。使用此功能,您将永远不会丢失任何代码!
29.Press Alt+Q (View | Context Info) to see the declaration of the current method without the need to scroll to it.
29.按Alt+Q(查看|上下文信息)来查看当前方法的声明,而不需要滚动到它。
30.Ctrl+E (View | Recent Files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it.
30.Ctrl+E(查看|最近的文件)带来一个最近访问的文件的弹出列表。选择所需的文件并按Enter键打开它。
31.Use F2/Shift+F2 keys to jump between highlighted syntax errors.Use Ctrl+Alt+向上箭头/Ctrl+Alt+向下箭头 shortcuts to jump between compiler error messages or search operation results.To skip warnings right click on the validation side bar / marker bar and choose Go to high priority problems only.
31.使用F2/Shift+F2键在突出显示的语法错误之间跳转。使用Ctrl+Alt+向上箭头/Ctrl+Alt组合键+向下箭头 在编译器错误消息或搜索操作结果之间跳转的快捷方式。若要跳过警告,请右键单击验证侧栏/标记栏,然后选择“仅转到高优先级问题”。
32.Use Ctrl+J to complete any valid Live Template abbreviation if you don't remember it. For example, type it and press Ctrl+J to see what happens.
32.如果您不记得,请使用Ctrl+J填写任何有效的Live Template缩写。例如,键入它并按Ctrl+J查看会发生什么。
33.To show separator lines between methods in the editor, open the editor settings and select the Show method separators check box in the Appearance page.
33.要在编辑器中显示方法之间的分隔线,请打开编辑器设置,并在“外观”页面中选中“显示方法分隔符”复选框。
34.When using basic code completion (Ctrl+空格), type any characters that exist anywhere in an identifier.
34.使用基本代码完成时(Ctrl+空格), 键入标识符中任何位置存在的任何字符。
35.Use Alt+向上箭头 and Alt+向下箭头 keys to quickly move between methods in the editor.
35.使用Alt+向上箭头 和Alt+向下箭头 键在编辑器中的方法之间快速移动。
36.Ctrl+Shift+J shortcut joins two lines into one and removes unnecessary space to match your code style.
36.Ctrl+Shift+J快捷键将两行合并为一行,并删除不必要的空格以匹配您的代码样式。
37.Use Refactor | Copy to create a class which is a copy of the selected class. This can be useful, for example, when you need to create a class which has much in common with some existing class and it's not feasible to put the shared functionality in a common superclass.37.使用Refactor|Copy创建一个类,该类是所选类的副本。例如,当您需要创建一个与某些现有类有很多共同点的类,而将共享功能放在一个公共超类中是不可行的时,这可能会很有用。
38.Use the Ctrl+Shift+V shortcut to choose and insert recent clipboard contents into the text.
38.使用Ctrl+Shift+V快捷键选择最近的剪贴板内容并将其插入到文本中。
39.To see the inheritance hierarchy for a selected class, press Ctrl+H (Navigate | Type Hierarchy). You can also invoke the hierarchy view right from the editor to see the hierarchy for the currently edited class.
39.要查看所选类的继承层次结构,请按Ctrl+H(导航|键入层次结构)。您也可以直接从编辑器中调用层次结构视图,以查看当前编辑的类的层次结构。
40.Right-clicking on a breakpoint marker (on the bar to the left from the text) invokes the speedmenu where you can quickly enable/disable the breakpoint or adjust its properties.
40.右键单击断点标记(在文本左侧的栏上)会调用速度菜单,您可以在其中快速启用/禁用断点或调整其属性。
41.To easily evaluate the value of any expression while debugging the program, select its text in the editor (you may press a Ctrl+W a few times to efficiently perform this operation) and press Alt+F8.
41.要在调试程序时轻松计算任何表达式的值,请在编辑器中选择其文本(您可以按Ctrl+W几次以有效地执行此操作),然后按Alt+F8。
42.To quickly evaluate the value of any expression while debugging the program, hold Alt and click this expression to see its value and calculate it, call a method, etc.
42.要在调试程序时快速计算任何表达式的值,请按住Alt键并单击此表达式以查看其值并进行计算、调用方法等。
43.Use Basic Completion (Ctrl+空格) for completing words in text and comments in files of many different types.All the words from the current file that start with the typed prefix will appear in the lookup list.
43.使用基本完成(Ctrl+空格) 用于完成文本中的单词和许多不同类型文件中的注释。当前文件中以键入前缀开头的所有单词都将出现在查找列表中。
44.The shortcuts such as Ctrl+Q (View | Quick Documentation), Ctrl+P (View | Parameter Info), Ctrl+B (Navigate | Declaration) and others can be used not only in the editor but in the code completion popup list as well.
44.快捷方式,如Ctrl+Q(查看|快速文档)、Ctrl+P(查看|参数信息)、Ctrl+B(导航|声明)和其他快捷方式,不仅可以在编辑器中使用,也可以在代码完成弹出列表中使用。
45.When using Code Completion, you can accept the currently highlighted selection in the popup list with the period character (.), comma (,), semicolon (;), space and other characters.The selected name is automatically entered in the editor followed by the entered character.
45.使用“代码完成”时,您可以接受弹出列表中当前突出显示的选择,其中包含句点(.)、逗号(,)、分号(;)、空格和其他字符。所选名称将自动在编辑器中输入,后面跟着输入的字符。
46.To help you learn the purpose of each item in the main menu, its short description is shown in the status bar at the bottom of the application frame when you position the mouse pointer over this item.
46.为了帮助您了解主菜单中每个项目的用途,当您将鼠标指针放在该项目上时,应用程序框架底部的状态栏中会显示其简短描述。
47.For the pattern search in the Go to Class, Go to Symbol and Go to File pop-up frames, use * and space symbols.* stands for any symbols.Space at the end means the end of a pattern, and the preceding string will be considered not just a prefix but a whole pattern. The list of the suggested names will be reduced accordingly.
47.对于“转到类”、“转到符号”和“转到文件”弹出框中的模式搜索,请使用*和空格符号。*代表任何符号。末尾的空格表示模式的末尾,前面的字符串将不仅仅被视为前缀,而是整个模式。建议的姓名列表将相应减少。
48.When you invoke the Move refactoring (F6) on a nested class that is declared static, you are provided with an option to either make it a top-level class, or move it to another class.
48.当您对声明为静态的嵌套类调用Move重构(F6)时,您可以选择将其作为顶级类,也可以将其移动到另一个类。
49.You can use the Extract Variable refactoring even on incomplete statements. Just press Ctrl+Alt+V, and choose the desired expression:
49.即使在不完整的语句上,也可以使用提取变量重构。只需按Ctrl+Alt+V,然后选择所需的表达式:
50.To open any particular method or field in the editor quickly, press Ctrl+Alt+Shift+N (Navigate | Symbol) and start typing its name.Choose symbol from the drop-down list that appears.
50.要在编辑器中快速打开任何特定方法或字段,请按Ctrl+Alt+Shift+N(导航|符号)并开始键入其名称。从出现的下拉列表中选择符号。
51.Use Alt+Shift+C to quickly review your recent changes to the project.
51.使用Alt+Shift+C快速查看您最近对项目所做的更改。
52.Use Basic Completion (Ctrl+空格) within HTML, CSS and other files, for completing image file names.
52.使用基本完成(Ctrl+空格) 在HTML、CSS和其他文件中,用于完成图像文件名。
53.You can start referring to an Ant property or target even if it is not defined yet. An intention action feature will suggest you to automatically create the necessary tag, without the need for you to leave your current editing location.
53.您可以开始引用Ant属性或目标,即使它还没有定义。意向操作功能将建议您自动创建必要的标记,而无需离开当前的编辑位置。
54.With a single keystroke, you can apply another code style/coloring scheme or keymap right from the editor. Just press Ctrl+` (View | Quick Switch Scheme), to specify the scheme you want to change.
54.只需一次按键,您就可以从编辑器中应用另一种代码样式/着色方案或键映射。只需按Ctrl+`(查看|快速切换方案),即可指定要更改的方案。
55.Use Ctrl+Shift+Enter to complete a current statement such as if, do-while, try-catch, return (or a method call) into a syntactically correct construct (e.g. add curly braces).
55.使用Ctrl+Shift+Enter将当前语句(如if、do while、try catch、return(或方法调用))完成为语法正确的结构(例如添加大括号)。
56.When in the Go to Class, Go to Symbol, or Go to File popup, you can ease the search by filtering the lookup list with the help of the "camel words" prefixes.
56.在Go to Class(转到类)、Go to Symbol(转到符号)或Go to File(转到文件)弹出窗口中,您可以借助“camel words”前缀过滤查找列表,从而简化搜索。
57.Use Ctrl+Shift+I (View | Quick Definition), to quickly review definition or content of the symbol at caret, without the need to open it in a new editor tab.
57.使用Ctrl+Shift+I(查看|快速定义),可以快速查看插入符号的定义或内容,而无需在新的编辑器选项卡中打开它。
58.You can use Basic Completion (Ctrl+空格) in HTML, CSS and JavaScript files, for completing attributes, parameters, tags, selectors, etc.
58.您可以使用“基本完成”(Ctrl+空格) 在HTML、CSS和JavaScript文件中,用于完成属性、参数、标记、选择器等。
59.The Edit | Copy Reference action can be used to insert a reference to a field/method/class/file into the current position in the editor.For example, go to the java.util.Collections JDK class, place the cursor within the EMPTY_MAP field and press Ctrl+Alt+Shift+C:
Then return to your source code and press Ctrl+V:
You can also copy references in the GotoClass/GotoSymbol/GotoFile dialogs. Just press Ctrl+C on any element in the lookup list.
59.编辑|复制引用操作可用于将对字段/方法/类/文件的引用插入编辑器中的当前位置。例如,转到java.util.Collections JDK类,将光标放在EMPTY_MAP字段中,然后按Ctrl+Alt+Shift+C:
然后返回到源代码并按Ctrl+V:
也可以在“转到类”/“转到符号”/“转至文件”对话框中复制引用。只需在查找列表中的任何元素上按Ctrl+C即可。
60.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 variable usage.
60.Code|Move Statement Up/Down操作可用于重新组织文件中的代码行,例如,使变量声明更接近变量用法。
61.Select a code fragment and press Ctrl+Shift+向上箭头 or Ctrl+Shift+向下箭头.The following pictures show an initial location of a code fragment, and the results of moving the selected fragment up and down.
When nothing is selected in the editor, the line at the cursor will be moved.
61.选择一个代码片段,然后按Ctrl+Shift+向上箭头 或Ctrl+Shift组合键+向下箭头.以下图片显示了代码片段的初始位置,以及上下移动所选片段的结果。
当编辑器中未选择任何内容时,光标处的行将被移动。
62.By pressing Alt+Shift+F10 you can access the Run/Debug dropdown on the main toolbar, without the need to use your mouse.
62.按Alt+Shift+F10,无需使用鼠标即可访问主工具栏上的“运行/调试”下拉菜单。
63.The Quick Definition Viewer (Ctrl+Shift+I) can also be used for items in lookup lists that appear on code completion and class/file/symbol navigaton commands.
63.快速定义查看器(Ctrl+Shift+I)也可用于代码完成和类/文件/符号导航命令中出现的查找列表中的项目。
64.You can use Basic Completion (Ctrl+空格) within Java String literals and in other file types, for completing .properties keys.
64.您可以使用“基本完成”(Ctrl+空格) 在Java字符串文字和其他文件类型中,用于完成.properties键。
65.You can quickly review all styles currently applied to an HTML tag, by right-clicking the tag name and selecting Show Applied Styles For Tag from the context menu:
65.您可以快速查看当前应用于HTML标记的所有样式,方法是右键单击标记名称,然后从上下文菜单中选择“显示应用的标记样式”:
66.You can quickly view the image referenced at caret by using the Quick Definition (Ctrl+Shift+I). The underlying image will be opened in a popup instead of a separate editor tab.
66.您可以使用快速定义(Ctrl+Shift+I)快速查看插入符号处引用的图像。基础图像将在弹出窗口中打开,而不是单独的编辑器选项卡。
67.It is possible to rename CSS selectors directly from HTML. Position the caret at the selector to be renamed and press Shift+F6 (Refactor | Rename).
67.可以直接从HTML中重命名CSS选择器。将插入符号放在要重命名的选择器上,然后按Shift+F6(Refactor|Rename)。
68.Navigation bar is a quick alternative to the Project view.
68.导航栏是“项目”视图的快速替代选项。
69.Use Alt+Home keyboard shortcut to show the navigation bar, and arrow keys to locate the necessary files or folders.
69.使用Alt+Home键盘快捷键显示导航栏,使用箭头键定位必要的文件或文件夹。
70.The Version Control tool window shows all deleted, modified, and unversioned files in a single view. Use keyboard shortcut to show or hide this tool window.From the Version Control tool window you can perform all the necessary version control actions: commit changes, manage changelists, put resources under version control, examine differences and more.
70.版本控制工具窗口在单个视图中显示所有已删除、修改和未转换的文件。使用键盘快捷键显示或隐藏此工具窗口。从“版本控制”工具窗口,您可以执行所有必要的版本控制操作:提交更改、管理更改列表、将资源置于版本控制之下、检查差异等等。
71.If you notice that IntelliJ IDEA works slowly, consider the possibility to reduce the number of folders under antivirus protection.Each antivirus check in your project consumes resources. You can significantly improve the performance, if you exclude certain folders from the antivirus protection.
71.如果您注意到IntelliJ IDEA工作缓慢,请考虑减少受防病毒保护的文件夹数量的可能性。项目中的每次防病毒检查都会消耗资源。如果将某些文件夹排除在防病毒保护之外,则可以显著提高性能。
72.You can quickly open a Maven project by selecting a pom.xml file in the File | Open dialog. The corresponding Maven project is imported with default settings, without launching the wizard.
72.通过在“文件|打开”对话框中选择pom.xml文件,可以快速打开Maven项目。使用默认设置导入相应的Maven项目,而不启动向导。
73.If you don't want to commit some of your changes to the repository, you can set them aside for a while, by moving to a separate changelist, or by putting them to a shelf. Select such file in the Local tab of the Changes tool window, and on the context menu choose Move to Another Changelist, or Shelve Changes.
73.如果你不想将一些更改提交到存储库,你可以将它们搁置一段时间,方法是移到一个单独的更改列表中,或者将它们放在架子上。在“更改”工具窗口的“本地”选项卡中选择此类文件,然后在关联菜单上选择“移动到另一个更改列表”或“搁置更改”。
74.You can quickly open an Eclipse project by selecting a .classpath or .project file in the File | Open dialog. The corresponding Eclipse project is imported with default settings, without launching the wizard.
74.通过在“文件|打开”对话框中选择.classpath或.project文件,可以快速打开Eclipse项目。使用默认设置导入相应的Eclipse项目,而不启动向导。
75.You can bring forward the list of all usages of a class, method or variable across the whole project, and quickly jump to the selected usage. To do that, place the caret at the symbol's name or at its usage in code and press Ctrl+Alt+F7 (Edit | Find | Show Usages in the main menu), scroll the list and click the desired usage.
75.您可以提前列出整个项目中类、方法或变量的所有用法,并快速跳转到所选用法。要执行此操作,请将插入符号放在符号的名称或代码中的用法处,然后按Ctrl+Alt+F7(在主菜单中编辑|查找|显示用法),滚动列表并单击所需用法。
76.To quickly find a menu command or toolbar action, you do not need to look through the menus. Just press Ctrl+Shift+A (Help | Find Action on the main menu) and start typing the name of the action. Choose the desired action from the suggestion list.
76.要快速找到菜单命令或工具栏操作,您不需要浏览菜单。只需按Ctrl+Shift+A(主菜单上的帮助|查找操作),然后开始键入操作的名称。从建议列表中选择所需的操作。
77.To quickly find and run an inspection, press Ctrl+Alt+Shift+I and start typing the name of the inspection or its group. Choose the desired inspection from the suggestion list and then specify the desired scope.
77.要快速查找并运行检查,请按Ctrl+Alt+Shift+I并开始键入检查或其组的名称。从建议列表中选择所需的检查,然后指定所需的范围。
78.You can quickly find a setting you need in the Settings/Preferences dialog, without browsing through the numerous options. Just type some characters that, in your opinion, exist in the option description, and the list of settings will reduce to the matching ones. Select the desired entry, and see the setting that contains the entered characters highlighted:
78.您可以在“设置/首选项”对话框中快速找到所需的设置,而无需浏览众多选项。只需键入一些您认为存在于选项描述中的字符,设置列表就会减少到匹配的字符。选择所需的条目,然后查看包含突出显示的输入字符的设置:
79.You can create code constructs using statement completion. Start typing a method declaration or a statement, and press Ctrl+Shift+Enter after the opening parenthesis. The braces are created, with the caret placed inside:
79.您可以使用语句完成来创建代码构造。开始键入方法声明或语句,并在左括号后按Ctrl+Shift+Enter。创建大括号,插入符号位于其中:
80.You can view all methods of the implemented interfaces in a class, if you place the caret at the implements keyword in the class declaration, press Ctrl+Shift+F7, and select the desired interface from the list:
80.您可以查看类中已实现接口的所有方法,如果将插入符号放在类声明中的implements关键字处,按Ctrl+Shift+F7,然后从列表中选择所需接口:
81.When searching for a text string in a file, use recent history: with the search pane already open, click the down arrow to show the list of recent entries.
81.在文件中搜索文本字符串时,请使用最近的历史记录:在搜索窗格已打开的情况下,单击向下箭头以显示最近条目的列表。
82.When you are finding text in the current file (Ctrl+F), you don't need to type the whole search string: Basic Code Completion is available in the search field. Start typing, press Ctrl+空格, and select the desired string from the suggestion list.
82.当你在当前文件中查找文本时(Ctrl+F),你不需要键入整个搜索字符串:基本代码完成在搜索字段中可用。开始键入,按Ctrl键+空格, 并从建议列表中选择所需的字符串。
83.To view all exit points of a method, place the caret at one of them, e.g. the return statement, and press Ctrl+Shift+F7:
83.要查看方法的所有出口点,请将插入符号放在其中一个出口点,例如return语句,然后按Ctrl+Shift+F7:
84.You can view all statements within the method where certain exceptions can be caught. Just place the caret at the throws keyword in a method declaration, press Ctrl+Shift+F7 and select the desired exception class from the list. This will also work for try and catch.
84.您可以查看方法中可以捕获某些异常的所有语句。只需将插入符号放在方法声明中的throws关键字处,按Ctrl+Shift+F7,然后从列表中选择所需的异常类。这也适用于尝试接球。
85.When you press Alt+Enter to invoke a quick fix or intention action, press the right arrow key to reveal the list of additional options.Depending on the context, you can choose to disable inspection, fix all problems, change inspection profile, etc.
85.按Alt+Enter键调用快速修复或意向操作时,按向右箭头键显示附加选项列表。根据上下文,您可以选择禁用检查、修复所有问题、更改检查配置文件等。
86.Ctrl+Click (on Windows) or Cmd+Click (on MacOS) a tab in the editor to navigate to any part of the file path. Select the necessary element in the drop-down, and the corresponding file path opens in an external browser (e.g., in the Explorer, if your OS is Windows).
86.Ctrl+Click(在Windows上)或Cmd+Click(在MacOS上)在编辑器中的一个选项卡上导航到文件路径的任何部分。在下拉列表中选择必要的元素,相应的文件路径将在外部浏览器中打开(例如,如果您的操作系统是Windows,则在资源管理器中)。
87.IntelliJ IDEA lets you jump from your check-in comment to an issue in your task tracker.All you have to do is to define issue navigation patterns in the Settings | Version Control | Issue Navigation dialog:
When you commit a changelist, and type the check-in comment, make sure it matches one of your issue navigation patterns. Later, when you browse through the changelists in the repository, such comments turn into hyperlinks:
Clicking a hyperlink brings you directly to an issue in your task tracker.
87.IntelliJ IDEA允许您从签入注释跳到任务跟踪器中的问题。您所要做的就是在“设置”|“版本控制”|“问题导航”对话框中定义问题导航模式:
当您提交变更列表并键入签入注释时,请确保它与您的问题导航模式之一相匹配。稍后,当您浏览存储库中的变更列表时,这些注释会变成超链接:
单击超链接将直接进入任务跟踪器中的问题。
88.IntelliJ IDEA simplifies your work with colors in CSS files. The color properties have the icons of the corresponding color in the left gutter area of the editor.Click color icons to choose the desired color from the color picker.
88.IntelliJ IDEA使用CSS文件中的颜色简化了您的工作。颜色属性在编辑器的左侧栏区域中具有相应颜色的图标。单击颜色图标可从颜色选择器中选择所需的颜色。
89.IntelliJ IDEA helps create test cases directly from class declaration. With the caret at the class name in the editor, press Alt+Enter, and choose Create Test from the suggestion list:
89.IntelliJ IDEA帮助直接从类声明创建测试用例。使用编辑器中类名处的插入符号,按Alt+Enter,然后从建议列表中选择“创建测试”:
90.You can easily make column selection by dragging your mouse pointer while keeping the Alt key pressed.
90.您可以在按住Alt键的同时拖动鼠标指针,轻松进行列选择。
91.You don't need to guess which index.html file you are looking at...Make the editor tabs and lines in navigation lists stand out using the File Colors page of the project settings.
91.你不需要猜测你正在看哪个index.html文件…使用项目设置的“文件颜色”页面,使导航列表中的编辑器选项卡和行脱颖而出。
92.If nothing is selected in the editor, and you press Ctrl+C, then the whole line at caret is copied to the clipboard.
92.如果编辑器中没有选择任何内容,并且按Ctrl+C,则插入符号处的整行都会复制到剪贴板。
93.You can move any file to a changelist of your choice. To do that, just choose Move to Another Changelist on the file context menu in the Version Control tool window:
93.您可以将任何文件移动到您选择的更改列表中。要做到这一点,只需在“版本控制”工具窗口的文件上下文菜单上选择“移动到另一个更改列表”:
94.Keep your source code typo-free with the help of the built-in Spellchecker.All texts, including comments, textual strings and literals, are inspected against the pre-defined dictionaries. All typos are highlighted, which leaves you with the task of choosing the correct word, accepting the current spelling, or disabling inspection.Use Alt+Enter to see the list of available actions.
94.借助内置的拼写检查器,确保源代码没有拼写错误。所有文本,包括注释、文本字符串和文字,都会根据预定义的词典进行检查。所有拼写错误都会突出显示,这将使您需要选择正确的单词、接受当前拼写或禁用检查。使用Alt+Enter可查看可用操作的列表。
95.If you lack words in the pre-defined dictionaries, you can create your own ones. A custom dictionary is a mere textual file with a .dic extension, with each word starting on a new line.All you have to do is to point to the directories where your dictionaries are stored, in the Spelling of the Settings dialog.
95.如果你在预定义的词典中缺少单词,你可以创建自己的词典。自定义词典只是一个扩展名为.dic的文本文件,每个单词都从一行开始。您所要做的就是在“设置”对话框的“拼写”中指向存储词典的目录。
96.All your most indispensable VCS commands are just one-click away...Choose VCS | VCS Operations Popup on the main menu, and get a popup with the VCS commands that are relevant to the current context:
96.只需点击一下即可获得所有最不可或缺的VCS命令。。。在主菜单上选择VCS|VCS操作弹出菜单,并获得一个弹出菜单,其中包含与当前上下文相关的VCS命令:
97.Use the Switcher (Ctrl+Tab) to switch between open files and tool windows. Keeping Ctrl pressed, use the Up and Down arrow keys, Tab or Shift+Tab, Alt for navigation; use Delete or BackSpace to close editor tab or hide a tool window.
97.使用切换器(Ctrl+Tab)在打开的文件和工具窗口之间切换。按住Ctrl键,使用上下箭头键、Tab键或Shift+Tab键、Alt键进行导航;使用Delete或BackSpace关闭编辑器选项卡或隐藏工具窗口。
98.You can easily open an external file for editing, if you just drag it from the Explorer or Finder to the editor.
98.只要将外部文件从资源管理器或查找器拖动到编辑器中,就可以轻松打开外部文件进行编辑。
99.There are two ways of closing all tabs in the editor, except the current one:First, right-click the editor tab, and choose Close Others on the context menu.Second, keeping the Alt key pressed, click on the editor tab.
99.除了当前选项卡外,有两种方法可以关闭编辑器中的所有选项卡:首先,右键单击编辑器选项卡,然后在上下文菜单上选择“关闭其他选项卡”。其次,按住Alt键,单击编辑器选项卡。
100.You can jump directly to any deeply buried file, if you press Ctrl+Shift+N, and type just a couple of characters of the enclosing directories and file names:
Use either a slash or a backslash as a delimiter.
100.如果按Ctrl+Shift+N,只需键入几个字符的封闭目录和文件名,就可以直接跳到任何深埋的文件:
使用斜线或反斜线作为分隔符。
101.To open any class or file in the editor at the desired line, press Ctrl+Shift+N (Navigate | File), start typing the name, and choose the one from the suggestion list. Then type the colon (:) and a line number.The selected file will open with the caret at the specified line.
101.要在编辑器中的所需行打开任何类或文件,请按Ctrl+Shift+N(导航|文件),开始键入名称,然后从建议列表中选择一个。然后键入冒号(:)和行号。选定的文件将在指定的行中以插入符号打开。
102.Version control annotations show the latest changes of each line in one click.Just right-click an annotation and use the Show Diff command in the context menu.
102.版本控制注释一次性显示每一行的最新更改。只需右键单击注释并使用上下文菜单中的“显示差异”命令。
103.To compare two directories, select one or both of them in the Project view and press Ctrl+D.
103.要比较两个目录,请在“项目”视图中选择其中一个或两个目录并按Ctrl+D。
104.To compare two jar files, select one or both of them in the Project view and press Ctrl+D.
104.要比较两个jar文件,请在Project视图中选择其中一个或两个,然后按Ctrl+D。
105.If you need more workspace, you can hide the tool windows bars: click in the lower left corner.If necessary, you can show the tool window buttons just for a moment. To do that, press the key Alt (for Windows/*nix) or Command (for Mac) twice and keep it down. While the key is pressed, the tool window buttons are visible.
105.如果你需要更多的工作空间,你可以隐藏工具窗口栏:点击左下角。如果需要,你可以显示工具窗口按钮一会儿。要做到这一点,请按两次Alt键(适用于Windows/*nix)或Command键(适用于Mac),并将其按住。按下该键时,可以看到工具窗口按钮。
106.You can exclude any file from your project. As a result, such a file will be ignored by indexing, inspection and code completion.In the Project tool window, select the file you want to ignore, and choose Mark as plain text in its context menu.If necessary, you can always return the file to its original type using the Mark as <file type> context menu command.
106.你可以从你的项目中排除任何文件。因此,这样的文件将被索引、检查和代码完成所忽略。在“项目”工具窗口中,选择要忽略的文件,并在其上下文菜单中选择“标记为纯文本”。如有必要,您可以始终使用“标记为<文件类型>”上下文菜单命令将文件返回到其原始类型。
107.When using basic code completion (Ctrl+空格), you don't need to type upper-case letters in CamelHump names. It is enough to type the initial letters of the camel names in lower case, and they will be smartly recognized.
107.使用基本代码完成时(Ctrl+空格), 你不需要在骆驼驼峰的名字中键入大写字母。只要用小写字母键入骆驼名字的首字母就足够了,它们就会被巧妙地识别出来。
108.The keyboard shortcut Ctrl+K enables you to quickly invoke the Commit Changes dialog.This dialog shows all modifications in project, gives summary information of file status and suggests improvements before check-in.
108.键盘快捷键Ctrl+K使您能够快速调用“提交更改”对话框。该对话框显示项目中的所有修改,提供文件状态的摘要信息,并在签入之前提出改进建议。
109.It is very easy to toggle between find and replace functionality.When you perform search and replace in a file, pressing Ctrl+F shows the search pane. Pressing Ctrl+R adds field, where you can type the replace string.While in the Find in Path dialog, you can switch to replace by pressing Ctrl+Shift+R. Same way, press Ctrl+Shift+F to hide the Replace with field, and switch to mere search.
109.在查找和替换功能之间切换非常容易。当您在文件中执行搜索和替换时,按Ctrl+F会显示搜索窗格。按Ctrl+R添加字段,您可以在其中键入替换字符串。在“在路径中查找”对话框中,您可以按Ctrl+Shift+R切换到替换。同样,按Ctrl+Shift+F隐藏“替换为”字段,然后切换到仅搜索。
110.If you are working on a large project, with numerous TODO items, filter them by scopes.Use the Scope-Based tab in the TODO tool window to show only those items that pertain to the scope of interest.
110.如果您正在处理一个包含大量TODO项的大型项目,请按作用域对其进行筛选。使用TODO工具窗口中的“基于作用域”选项卡,仅显示与感兴趣的作用域相关的项。
111.TODO tool window lets you preview each of the encountered TODO items - just click the preview button on the toolbar.
111.TODO工具窗口允许您预览遇到的每个TODO项目-只需单击工具栏上的预览按钮。
112.If a method signature has been changed, IntelliJ IDEA highlights the tags that ran out of sync with the documentation comment and suggests a quick fix:
112.如果方法签名已更改,IntelliJ IDEA会突出显示与文档注释不同步的标记,并建议快速修复:
113.When working with a lengthy list of tasks, you don't need to delete them one by one. Select several tasks, using Shift or Control/Command keys, click the right arrow, and then click Remove.
113.当处理一长串任务时,你不需要一个接一个地删除它们。使用Shift键或Control/Command键选择多个任务,单击向右箭头,然后单击“删除”。
114.If there are too many run/debug configurations of the same type, you can group them into folders, and thus distinguish them visually.
114.如果有太多相同类型的运行/调试配置,可以将它们分组到文件夹中,从而在视觉上区分它们。
115.In the Live Templates settings, use speed search to find templates with certain text in the template abbreviation, body or description.Start typing the desired text, and the list of available templates will shrink to show matching templates only:
115.在Live Templates设置中,使用快速搜索查找模板缩写、正文或描述中包含特定文本的模板。开始键入所需文本,可用模板列表将缩小,仅显示匹配的模板:
116.You can avoid escaping backslashes in your regular expressions. Start typing a regular expression, then press Alt+Enter and choose Edit RegExp. The regular expression opens in a separate tab in the editor, where you can type backslashes as is.All changes are synchronized with the original regular expression, and escapes are presented automatically. When ready, just press Esc to close the regular expression editor.
116.在正则表达式中可以避免转义反斜杠。开始键入正则表达式,然后按Alt+Enter并选择“编辑RegExp”。正则表达式在编辑器的一个单独的选项卡中打开,您可以在其中按原样键入反斜杠。所有更改都与原始正则表达式同步,并自动显示转义。准备好后,只需按Esc键即可关闭正则表达式编辑器。
它们在“收藏夹”工具窗口中可见,您可以根据需要固定或浮动该窗口:
117.Speed up HTML, XML or CSS development with Emmet.Enable this framework in the corresponding page of the Editor | Emmet node (Settings/Preferences):
117.使用Emmet加快HTML、XML或CSS的开发。在编辑器| Emmet节点的相应页面中启用此框架(设置/首选项):
118.To view which line separators style is used in the current file, look at the Status Bar:
To change the current line ending style, just click the spinner.
118.要查看当前文件中使用的行分隔符样式,请查看状态栏:
要更改当前的线条结束样式,只需单击微调器。
119.You do not need to open a file in the editor to change its line separator style. Use the Project tool window instead: select one or more files, or folders, point to File | Line Separators on the main menu, and then choose the desired line ending style.For a directory, new line separator applies recursively.
119.您不需要在编辑器中打开文件来更改其行分隔符样式。请改用Project工具窗口:选择一个或多个文件或文件夹,指向主菜单上的“文件”|“行分隔符”,然后选择所需的行尾样式。对于目录,新的行分隔符将递归应用。
120.If you place the caret at certain symbol and press Ctrl+Alt+Shift+T, you will see the list of refactorings applicable to the current context.
120.如果将插入符号放在某个符号处,然后按Ctrl+Alt+Shift+T,您将看到适用于当前上下文的重构列表。
121.You want your bookmarks and breakpoints to be always at hand, so that you can easily navigate through them?
They are visible in the Favorites tool window, which you can dock or float as required:
121.你希望书签和断点总是在手边,这样你就可以轻松地浏览它们吗?
122.You can drag an external file from the Explorer or Finder, and drop it onto the Favorites tool window.
122.您可以从资源管理器或查找器中拖动外部文件,然后将其放在收藏夹工具窗口中。
123.Tune the IntelliJ IDEA tool windows layout to make better use of your screen.Toggle between the vertical and side-by-side placement of the tool windows by Ctrl+Click/Cmd+Click on the splitter:
123.调整IntelliJ IDEA工具窗口布局,以更好地利用屏幕。通过Ctrl+Click/Cmd+Click在拆分器上切换工具窗口的垂直和并排位置:
124.You don't need to leave IntelliJ IDEA to work with your favorite shell. Just click the Terminal tool window button, and enjoy using the embedded local terminal.
124.您不需要离开IntelliJ IDEA就可以使用您最喜欢的shell。只需单击终端工具窗口按钮,即可享受使用嵌入式本地终端的乐趣。
125.For the embedded local terminal, you can define your favorite shell, default tab name, and other settings. Choose File | Settings on the main menu, and then open the page Terminal.
125.对于嵌入式本地终端,您可以定义您喜欢的外壳、默认选项卡名称和其他设置。在主菜单上选择“文件”|“设置”,然后打开“终端”页面。
126.Enable the horizontal scrolling with the mouse wheel by holding the Shift key.IntelliJ IDEA allows you to search through the classes, files, tool windows, actions, settings, and symbols of your project by double pressing the Shift key.
126.按住Shift键,使用鼠标滚轮启用水平滚动。IntelliJ IDEA允许您通过双击Shift键搜索项目的类、文件、工具窗口、操作、设置和符号。
127.When using autopopup Code Completion, you can select the first item using Ctrl+.. The selected name is automatically entered in the editor followed by dot.
127.使用autopopup代码完成时,可以使用Ctrl+..选择第一个项目。。所选名称将自动输入编辑器中,后面跟着句点。
128.When an autopopup completion is active, Ctrl+向下箭头 and Ctrl+向上箭头 will close it and move the caret down or up in the editor.
128.当autopopup完成处于活动状态时,Ctrl+向下箭头 和Ctrl+向上箭头 将关闭它并在编辑器中向下或向上移动插入符号。
129.When in the Code Completion lookup, you can ease the search by filtering the list with the help of the "camel words" prefixes.
129.在代码完成查找中,您可以通过使用“camel-words”前缀过滤列表来简化搜索。
130.Pressing the same shortcut after you have invoked Smart-type Completion when there's an array of expected type in context will suggest to get an element from this array.
130.当上下文中有一个预期类型的数组时,在调用智能类型完成后按下相同的快捷键将建议从该数组中获取一个元素。
131.Pressing the same shortcut after you have invoked Smart-type Completion when a collection type is expected will search for arrays with same component type and suggest to convert them using Arrays.asList() call.
131.当需要集合类型时,在调用智能类型完成后按相同的快捷方式将搜索具有相同组件类型的数组,并建议使用arrays.asList()调用进行转换。
132.Pressing the same shortcut after you have invoked Smart-type Completion will search for chained expressions which have expected type.
132.在调用智能类型完成后按相同的快捷方式将搜索具有预期类型的链接表达式。
133.When using Code Completion, you can accept the currently highlighted selection in the popup list with the Ctrl+Shift+Enter, IntelliJ IDEA will not just insert the selected string, but also will do its best to turn current code construct into syntactically correct one (balance parentheses, add missing braces and semicolons, etc.)
133.当使用代码完成时,您可以通过Ctrl+Shift+Enter接受弹出列表中当前突出显示的选择,IntelliJ IDEA不仅会插入所选字符串,还会尽最大努力将当前代码结构转换为语法正确的代码结构(平衡括号、添加缺失的大括号和分号等)
134.When using Code Completion in Java, you can accept the currently highlighted selection in the popup list with the exclamation sign (!) character. It will be inserted before the boolean method or variable you were completing, thus negating the whole expression.
134.在Java中使用代码完成时,您可以接受弹出列表中当前突出显示的带有感叹号(!)字符的选择。它将被插入到您正在完成的布尔方法或变量之前,从而否定整个表达式。
135.To quickly complete a method call of a static method located anywhere in your project, libraries or JDK, enter a prefix and press Ctrl+空格 twice. You'll see all the matching methods. If you want the method you chose to be imported statically, press Alt+Enter and see what happens:
135.要快速完成位于项目、库或JDK中任何位置的静态方法的方法调用,请输入前缀并按Ctrl+空格 两次您将看到所有的匹配方法。如果希望静态导入所选的方法,请按Alt+Enter,然后查看会发生什么:
136.When you invoked Basic Completion (Ctrl+空格) in Java and didn't find your desired class in the list, it means that it's not yet imported in current file. Pressing Ctrl+空格 once more to view all accessible classes.
136.当您调用基本完成时(Ctrl+空格) 在Java中,并且没有在列表中找到您想要的类,这意味着它还没有导入到当前文件中。按Ctrl键+空格 再次查看所有可访问的类。
137.Pressing the same shortcut after you have invoked Smart-type Completion when an array type is expected will search for collections with same component type and suggest to convert them using toArray() call.
137.当需要数组类型时,在调用智能类型完成后按相同的快捷方式将搜索具有相同组件类型的集合,并建议使用toArray()调用进行转换。
138.You can switch between sorting completion variants by relevance or alphabetically by using an icon at the bottom right:
138.您可以使用右下角的图标,按相关性或字母顺序在排序完成变体之间切换:
139.Postfix code completion is applied "from right to left" and lets you avoid backward caret jumps when coding. After the code fragment that you want to change, type a dot (.), optionally press Ctrl+J and select the desired option.
139.Postfix代码补全是“从右到左”应用的,可以在编码时避免向后插入符号跳跃。在要更改的代码片段之后,键入一个点(.),可以选择按Ctrl+J并选择所需的选项。
140.Scratch files allow you experiment and prototype right in the editor, without creating any project files.To create a scratch file, press Ctrl+Alt+Shift+Insert, and then select its language.
140.草稿文件允许您在编辑器中进行实验和原型制作,而无需创建任何项目文件。要创建草稿文件,请按Ctrl+Alt+Shift+Insert,然后选择其语言。
141.If you've changed a live template, it becomes blue. If you want to return to the original text, right-click such a blue template, and choose Restore defaults on the context menu.Add several cursors to your editor. To do that, press Ctrl twice and hold the key, and then press the arrow keys.On Mac use Alt instead of Ctrl.
141.如果你更改了一个实时模板,它就会变成蓝色。如果你想返回到原始文本,右键单击这样一个蓝色模板,然后在上下文菜单上选择“恢复默认值”。在编辑器中添加几个光标。要执行此操作,请按住Ctrl键两次,然后按箭头键。在Mac上,请使用Alt而不是Ctrl。
142.Clone the cursor strictly upwards or downwards. To do that, press Ctrl+Shift+A, type Clone caret, and then choose the desired action.
142.严格向上或向下克隆光标。要执行此操作,请按Ctrl+Shift+A,键入克隆插入符号,然后选择所需的操作。
143.When choosing a live template from a suggestion list, press Ctrl+Q to view quick documentation - to be sure you make a right choice:
143.从建议列表中选择实时模板时,请按Ctrl+Q查看快速文档,以确保您做出了正确的选择:
144.IntelliJ IDEA makes it possible to launch the embedded local terminal using keyboard only. Press Alt+F12, and see the terminal running.
144.IntelliJ IDEA使得仅使用键盘就可以启动嵌入式本地终端。按Alt+F12,然后看到终端正在运行。
145.Make your printouts (File | Print) nice and informative with the help of keywords.For example, use $DATE$ and $TIME$ to specify the exact date and time of the printout.
145.借助关键字使您的打印输出(文件|打印)美观且信息丰富。例如,使用$DATE$和$TIME$指定打印输出的确切日期和时间。
146.When in a Code Completion lookup, press Ctrl+Q to show documentation for a lookup item, including class constructors.So doing, if a class has more than one constructor, the links are shown:
Following a link shows documentation for the selected constructor.
146.在代码完成查找中,按Ctrl+Q显示查找项的文档,包括类构造函数。这样,如果一个类有多个构造函数,则会显示链接:
下面的链接显示了所选构造函数的文档。
147.Have you noticed the buttons marking differences in the Differences viewer?You can simply apply differences between panes, by clicking one of these chevron buttons.Keep the Ctrl key pressed, and the chevron buttons change to . Click one of these buttons to append contents of the current pane of the Differences viewer to the other pane.If you keep Shift pressed, the chevrons turn into . Click this button to revert changes.
147.你注意到差异查看器中标记差异的按钮了吗?您只需单击其中一个V形按钮,即可应用窗格之间的差异。按住Ctrl键,V形按钮将更改为。单击其中一个按钮可将“差异”查看器当前窗格的内容附加到另一个窗格。如果按住Shift键,则V形将变为。单击此按钮可恢复更改。
148.Hover your mouse pointer over a warning, error stripe or just some section of source code on the scroll bar outside of the scroll box, and you will see a lens:
If the lens annoys you, get rid of it by clearing the check box on the context menu of the code analysis marker:
148.将鼠标指针悬停在滚动框外滚动条上的警告、错误条或源代码的某个部分上,你会看到一个镜头:
如果这个镜头让你烦恼,请清除代码分析标记上下文菜单上的复选框:
149.To select multiple fragments in the "column mode", keep Control+Alt+Shift(on Windows and Linux) or Cmd+Alt+Shift(on MAC), and drag your mouse cursor:
149.要在“列模式”中选择多个片段,请保持Control+Alt+Shift(在Windows和Linux上)或Cmd+Alt+Sift(在MAC上),然后拖动鼠标光标:
150.You can easily select multiple fragments of text. To do that, it's enough to keep Alt+Shift and drag your mouse cursor:
150.你可以很容易地选择多个文本片段。要做到这一点,只需按住Alt+Shift键并拖动鼠标光标即可:
151.To select multiple words, press Alt+Shift, place the caret at each word to be selected and double-click the left mouse button.
151.要选择多个单词,请按Alt+Shift,在要选择的每个单词处放置插入符号,然后双击鼠标左键。
152.You don't need to invoke quick documentation explicitly (Ctrl+Q) - if you just move your mouse pointer over the desired symbol, the quick documentation pop-up window will show automatically.To enable this feature, select the check box Show quick doc on mouse move in the editor settings.152.您不需要显式调用快速文档(Ctrl+Q)-如果您只需将鼠标指针移动到所需的符号上,快速文档弹出窗口就会自动显示。要启用此功能,请在编辑器设置中选中“鼠标移动时显示快速文档”复选框。
153.To see all the available scratch files, choose Scratches view in the Project tool window.
153.要查看所有可用的暂存文件,请在“项目”工具窗口中选择“暂存”视图。
154.Did you know that it's possible to copy rich text ?Make sure that the check box Copy rich text by default in the General page of the Editor settings/preferences is selected:
154.你知道可以复制富格文本吗?确保选中“编辑器设置/首选项”的“常规”页面中的“默认情况下复制富格文本”复选框:
155.Did you know that you can remove just those tool window buttons you don't currently need?It's quite easy to do - just right-click the button you want to hide, and on the context menu choose Remove from Sidebar .
155.你知道吗,你可以只删除那些你目前不需要的工具窗口按钮?这很容易做到——只需右键单击要隐藏的按钮,然后在上下文菜单上选择“从边栏删除”。
156.To open any particular file in the editor quickly, press Ctrl+Shift+N (Navigate | File) and start typing its name.Choose symbol from the drop-down list that appears.
156.要在编辑器中快速打开任何特定文件,请按Ctrl+Shift+N(导航|文件)并开始键入其名称。从出现的下拉列表中选择符号。
157.Ctrl+Y in the editor deletes the whole line at the caret.
157.编辑器中的Ctrl+Y删除插入符号处的整行。
158.Pressing Alt+/ helps complete words in the visible scope - so doing, the prototypes are highlighted.
Use Alt+Shift+/ to do same in reverse order.
158.按Alt+/有助于完成可见范围内的单词-这样,原型就会突出显示。
使用Alt+Shift+/以相反的顺序执行相同操作。
159.Mind that you can move method parameters in both declaration and invocation. To do that, use Ctrl+Alt+Shift+向左箭头/Ctrl+Alt+Shift+向右箭头.Moreover, it's possible to propagate such a move in a method declaration to the method invocations - just immediately after move press Alt+Enter, and choose Apply signature change.
159.请注意,您可以在声明和调用中移动方法参数。要执行此操作,请使用Ctrl+Alt+Shift+向左箭头/Ctrl+Alt+Shift组合键+向右箭头.此外,可以在方法声明中将这样的移动传播到方法调用中——移动后立即按Alt+Enter,然后选择Apply signature change。
160.Use Analyze | Inspect Code to run code analysis for the whole project or a custom scope and examine the results in a friendly view.
160.使用Analyze | Inspect Code对整个项目或自定义范围运行代码分析,并在友好的视图中检查结果。
161.A special variant of the Code Completion feature invoked by pressing Ctrl+空格 twice allows you to complete XML tag names from namespaces not declared in the current file. If the namespace is not declared yet the declaration is generated automatically.
161.通过按Ctrl键调用的代码完成功能的一个特殊变体+空格 两次允许您从当前文件中未声明的名称空间中完成XML标记名。如果尚未声明命名空间,则会自动生成声明。
162.Refer to a non-existing target tag in your Ant build file, and IntelliJ IDEA will suggest you to automatically create the corresponding tag. This intention action will not even make you change your current editing location.
162.参考Ant构建文件中不存在的目标标记,IntelliJ IDEA将建议您自动创建相应的标记。此意向操作甚至不会使您更改当前的编辑位置。
163.You can inject SQL into a string literal (Alt+Enter | Inject language or reference | <SQL dialect>) and then use coding assistance for SQL.
163.您可以将SQL注入字符串文字(Alt+Enter |注入语言或引用|<SQL方言>),然后使用SQL的编码辅助。
164.Kotlin is a powerful, concise and expressive language crafted by JetBrains.IntelliJ IDEA supports it out-of-the-box.To create a Kotlin file, right-click the target folder, and choose the corresponding option on the New menu:
164.Kotlin是JetBrains精心打造的一种强大、简洁、富有表现力的语言。IntelliJ IDEA支持开箱即用的语言。要创建Kotlin文件,请右键单击目标文件夹,然后在“新建”菜单上选择相应的选项:
165.IntelliJ IDEA provides two Kotlin project types: Kotlin (JVM) and Kotlin (JavaScript):
165.IntelliJ IDEA提供了两种Kotlin项目类型:Kotlin(JVM)和Kotling(JavaScript):
166.IntelliJ IDEA allows you to easily call a Java code from Kotlin:
166.IntelliJ IDEA允许您轻松地从Kotlin调用Java代码:
167.One can easily convert any Java class to the Kotlin one with the same semantics.To do that, just choose Code | Convert Java File to Kotlin File on the main menu:
167.可以很容易地将任何Java类转换为具有相同语义的Kotlin类。要做到这一点,只需在主菜单上选择Code|convert Java File to Kotlin File: