C:\Java\IdeaProjects\java>java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
12、从右到左应用后缀代码完成功能,以避免在编码时向后插入符号。 输入一个点。 要更改的代码片段之后,然后选择所需的选项。 要查看带有后缀模板的建议列表,还可以按Ctrl + J。 Postfix code completion is applied from right to left to avoid backward caret jumps when coding. Type a dot . after the code fragment that you want to change and select the desired option. To see the suggestion list with postfix templates, you can also press Ctrl+J.
13、要通过从装订线中拖动断点来删除断点,请按Ctrl + Alt + S组合键,转到“构建,执行,部署” |“展开”。 调试器,然后选择“拖动到编辑器”或单击鼠标中键。 单击断点将随后切换其状态(启用/禁用)。 To remove breakpoints by dragging them from the gutter, press Ctrl+Alt+S, go to Build, Execution, Deployment | Debugger and select Drag to the editor or click with middle mouse button. Clicking a breakpoint will then toggle its status (enabled/disabled).
14、Press Ctrl+Shift+E to get a list of recently viewed or changed code fragments: 按Ctrl + Shift + E获取最近查看或更改的代码片段的列表:
15、To select a part of your code, drag your mouse while pressing Ctrl . 要选择一部分代码,请在按住Ctrl的同时拖动鼠标。
16、You can use your favorite shell from the built-in Terminal. In the Settings/Preferences dialog Ctrl+Alt+S , go to Tools | Terminal and specify the path to your shell executable. 您可以从内置终端使用您喜欢的外壳。 在“设置/首选项”对话框Ctrl + Alt + S中,转到“工具” |“设置”。 终端并指定您的Shell可执行文件的路径。
17、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: 可以轻松地将任何具有相同语义的Java类转换为Kotlin类。 为此,只需选择代码| 在主菜单上将Java File转换为Kotlin File:
18、When using Code Completion, you can accept the current selection in the suggestions list with Ctrl+Shift+Enter. IntelliJ IDEA Community will not only insert the selected string, but also turn the current code construct into a syntactically correct one (balance parentheses, add missing braces and semicolons, and so on). 使用“代码补全”时,您可以通过Ctrl + Shift + Enter接受建议列表中的当前选择。 IntelliJ IDEA社区不仅将插入选定的字符串,还将当前的代码构造转换为语法正确的构造(平衡括号,添加缺少的花括号和分号,等等)。
19、You can inject SQL into a string literal (Alt+Enter | Inject language or reference | ) and then use coding assistance for SQL. 您可以将SQL注入字符串文字中(Alt + Enter |注入语言或引用| ),然后对SQL使用编码帮助。
20、To search for a code pattern or a grammatical construct, select Edit | Find | Search Structurally. 要搜索代码模式或语法结构,请选择“编辑” |“语法”。 查找| 结构搜索。
21、To evaluate any expression while debugging your program, select the expression in the editor and press Alt+F8 要在调试程序时求值任何表达式,请在编辑器中选择表达式,然后按Alt + F8
22、To switch between opened files and tool windows, use the Switcher Ctrl+Tab . For navigation, press and hold Ctrl (Windows and Linux) or Command (macOS) and use the Up and Down arrow keys or Tab and Shift+Tab, and Alt. Press Delete or BackSpace to close an editor tab or hide a tool window. 要在打开的文件和工具窗口之间切换,请使用切换器Ctrl + Tab。 要进行导航,请按住Ctrl键(Windows和Linux)或Command键(macOS)并使用向上和向下箭头键或Tab和Shift + Tab和Alt。 按Delete或BackSpace关闭编辑器选项卡或隐藏工具窗口。
23、Press Ctrl+E (View | Recent Files) to view the list of recently opened files. 按Ctrl + E(查看|最近文件)以查看最近打开的文件列表。 You can also bring up the results of the recently performed usage searches. For this, go to Edit | Find | Recent Find Usages or select Recent Find Usages from the context menu of the Find tool window: 您还可以调出最近执行的用法搜索的结果。 为此,请转到“编辑”。 查找| 最近的查找用法或从“查找”工具窗口的上下文菜单中选择“最近的查找用法”:
24、You can copy text from the editor as rich text to paste it into any other editor that recognizes RTF. Make sure the Copy as rich text by default checkbox is selected on the Editor | General page of the Settings/Preferences dialog Ctrl+Alt+S . 您可以将文本从编辑器复制为富文本格式,然后将其粘贴到任何其他可识别RTF的编辑器中。 确保在“编辑器” |“编辑器”中选中了“默认复制为富文本格式”复选框 “设置/首选项”对话框的“常规”页面Ctrl + Alt + S。