Intellij 常用命令

来源:互联网 发布:淘宝宝贝图片制作 编辑:程序博客网 时间:2024/04/29 07:14

Find a class

Ctrl + N

Add Unimplemented or Override Methods

The default shortcut is CTRL-I and CTRL-O.


To add a line

  • Press Shift+Enter to add a new line after the one where the caret is currently located and move the caret to the beginning of this new line.

  • To duplicate a line or fragment

  1. Place the caret at the line to be duplicated, or select the desired fragment of text.
  2. Press Ctrl+D.

To remove a line

  • Press Ctrl+Y to delete the line at caret.

To move a line

  1. Place the caret at the line to be moved.
  2. Do one of the following:
    • On the main menu, choose Code | Move Line Up or Code | Move Line Down.
    • Press Shift+Alt+Up or Shift+Alt+Down.

To move a statement up or down

  1. Select a statement to be moved, or just place the caret at the first or last lines of a multi-line statement. Note that if moving a statement is not allowed in the current context, the commands will be disabled.
  2. Do one of the following:
    • On the main menu, choose Code | Move Statement Up/Move Statement Down.
    • Press Ctrl+Shift+Up or Ctrl+Shift+Down.

To move code element to the left or to the right

  1. Place the caret at the desired code element, or select the elements to be moved.
  2. Do one of the following:
    • On the main menu, choose the commands Code | Move Element Left or Code | Move Element Right
    • Press Ctrl+Shift+Alt+Left or Ctrl+Shift+Alt+Right


How do you input commandline argument in IntelliJ IDEA

Windows, Linux, some Macs:

ALT+SHIFT+F10, Right, E, Enter, Tab, enter your command line parameters, Enter. ;-)

Mac with "OS X 10.5" key schema:

CTRL+ALT+R, Right, E, Enter, Tab, enter your command line parameters, Enter.


0 0
原创粉丝点击