我真的很喜欢 IntelliJ IDEA 的“移动语句”快捷键(Ctrl + Shift + ↑/↓)。但是——我不确定这是否只是 ActionScript 编辑的错误—— move 语句并不总是我想要的,有时在编辑 AS 代码时也不正确。
所以我只需要移动一组线条上下移动。Eclipse 快捷方式是 Alt + ↑/↓,并且不按语句方式移动。在 IntelliJ IDEA 中是否存在一个等价物?
You can move several lines together with move statement. Are you trying to move partial lines? I don't think there's a way in Idea.
The LineMover plug-in works very well and is an acceptable solution.
Open Setings -> Keymap then search for "move line" via the upper right searchbox.
Under the Code folder you'll see:
The actions you're looking for are (as you may guess) the move line actions.
As other people have said this is already available as a command. You can configure the short cut to your liking, but by default (at least in IntelliJ 10) it is bound to ALT + SHIFT + ↑ and ALT + SHIFT + ↓
shift + alt + ↑/↓
you can find All short cuts HERE
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
Please find some useful shortcut for IntelliJ:
Step over (Go To next Step or line) : F8
Step into (Go into function) : F7
Smart step into : Shift + F7
Step out : Shift + F8
Run to cursor : Alt + F9
Evaluate expression : Alt + F8
Resume program : F9 [Mac = Cmd + ALT + R]
Toggle breakpoint : Ctrl + F8 [Mac = Cmd + F8]
View breakpoints : Ctrl + Shift + F8 [Mac = Cmd + Shift + F8]
Ctrl + Shift + N
Open specific class and press,
Ctrl + F12
Ctrl + G
Declaration : Ctrl + B
Implementation : Ctrl + Alt + B
Response Type Declaration : Ctrl + Shift + B
Super class override Method : Ctrl + U
Ctrl + Alt + L
Click on relevant class (Red color field) and press,
Alt + Enter
Select valid class as per requirement
Select specific method and press,
Ctrl + Alt + H
Single Line : Select specific line and press, Ctrl + /
Multiple Line : Select Multiple Line and Press, Ctrl + Shift + /
(Note : Same operation for uncomment the code)
Hit Shift twice > write "line" > Show Line Numbers (the line doesn't have the toggle)
View > Active Editor > Show Line Number
Full class selection : Ctrl + A Method Selection : Select Method Name and press, Ctrl + W
To complete methods, keywords etc press,
Ctrl + Space
Copy : Ctrl + C
Paste : Ctrl + V
Specific File : Ctrl + F
Full Project : Ctrl + Shift + F
Open Switcher Popup : Ctrl + Tab
Continue press Ctrl and use ↑/↓/←/→ for move one place to another
Backward : Ctrl + Alt + ← (Left-Arrow)
Forward : Ctrl + Alt + → (Right-Arrow)
F2 or (Shift + F2)
Select specific method name and press,
Ctrl + Q
Ctrl + Shift + A
Thanks...
try command+shift+up/down this will auto adjust the indentation