2.3 KiB
2.3 KiB
Mastering the IDE: Basic Editing
In IntelliJ IDEA you can use typical operating-system shortcuts to perform basic editing:
Operation | Shortcut | Description |
---|---|---|
Cut | &shortcut:$Cut; | Cut a current line or a selected code block to the clipboard. |
Copy | &shortcut:$Copy; | Copy a current line or a selected code block to the clipboard. |
Paste | &shortcut:$Paste; | Paste from the clipboard to the caret location. |
Undo | &shortcut:$Undo; | Undo last operation. |
Redo | &shortcut:$Redo; | Redo last undone operation. |
To select text, press the "Shift" key while moving the caret around the text. Then you can move the caret up, down, left or right, or move it to the end or the beginning of a line:
Operation | Shortcut | Description |
---|---|---|
Up with selection | &shortcut:EditorUpWithSelection; | Move the caret one line up, selecting the text. |
Right with selection | &shortcut:EditorRightWithSelection; | Move the caret one character to the right, selecting the text. |
Move to line end with selection | &shortcut:EditorLineEndWithSelection; | Move the caret to the end of line, selecting the text. |
Move to line start with selection | &shortcut:EditorLineStartWithSelection; | Move the caret to the beginning of line, selecting the text. |
Duplicate the line println("Hello, Kotlin!")
in the example by selecting it
and then copy-pasting it.