16/11/15 idea的一些简便操作

1 代码重构

 

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:

提取变量重构代码可以帮助您简化复杂的语句。例如,在下面的代码片段中,您可以选择一个表达式的代码:

BufferedInputStream bis=new BufferedInputStream(new FileInputStream(filePath));


and press Ctrl+Alt+V (Refactor | Extract | Variable...). This will result in the following: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:
并按Ctrl + Alt + V(重构| |提取变量……)。这将导致以下:提取变量重构代码可以帮助您简化复杂的语句。例如,在下面的代码片段中,您可以选择一个表达式的代码:


and press Ctrl+Alt+V (Refactor | Extract | Variable...). This will result in the following:

并按Ctrl + Alt + V(重构| |提取变量……)。这将导致以下:

 

InputStream in=new FileInputStream(filePath);
BufferedInputStream bis=new BufferedInputStream(in);

 

 

2 注释

 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.     

 

3、ctrl+alt+s进入idea的设置

4、ctrl+shift+alt+s进入当前项目的设置

 

posted @ 2016-11-15 09:29  guodaxia  阅读(118)  评论(0编辑  收藏  举报