The editor basics
IntelliJ IDEA's editor supports all the standard features of a text editor such as selecting text, searching, cutting, copying, and pasting. Let's start with some basic editor commands and then focus on more advanced features of IntelliJ IDEA, such as syntax-aware selection, clipboard history, code reformatting, smart code completion, and code inspections.
To duplicate a line of code (or a selected block) use Ctrl + D (PC) or cmd + D (Mac). To remove a line of code or selected block, use Ctrl + Y (PC) or cmd + Y (Mac).
Sometimes it may be useful to comment portions of code. To use the line comment, press Ctrl + / (PC) or cmd + / (Mac). If you favor the block comment, use Shift + Ctrl + / (PC) or Shift + cmd + / (Mac). IntelliJ ...
Get IntelliJ IDEA Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.