- On the main menu, choose .
- Press Ctrl+C Command C or Ctrl+Insert Command Insert.
- Click the Copy button
on the toolbar.
Tip
The Ctrl+DCommand D keyboard shortcut clones a line at the caret or a selected arbitrary fragment of text.
- Open the desired file in the editor, then choose on the main menu or press Ctrl+Shift+CCommand Shift C.
- Select the desired file in the Project tool window and choose on the context menu of the selection.
- Select the desired item in the Project tool window.
Note
Besides references to classes and other files selected in the Project view, IntelliJ IDEA also allows copying references to packages, selected in the Package view.
- On the main menu, choose , or press Ctrl+Alt+Shift+CCommand Alt Shift C.
- Select the desired fragment in the editor.
-
Do one of the following:
- On the main menu, choose .
- Press Ctrl+X Command X or Shift+Delete Shift Delete.
- Click the Cut button
on the toolbar.
- Place the caret in the location where you you want to paste content.
-
Do one of the following:
- On the main menu, choose .
- Press Ctrl+V Command V or Shift+Insert Shift Insert.
-
Click the Paste button
on the toolbar.
Note
If you perform paste in a Java file, the further behavior depends on the settings in the Auto Import page of the Editor options. If the Ask option has been selected, select the necessary imports from the list of missing imports. In all other cases, the last clipboard entry is pasted silently.
- On the main menu, choose .
- Press Ctrl+Alt+Shift+VCommand Alt Shift V.
- On the main menu, choose or press Ctrl+Shift+V Command Shift V or Ctrl+Shift+Insert Command Shift Insert.
- In the Choose Content to Paste dialog box select the desired entry from the list of recent Clipboard entries, and click OK.

