Duplicate Lines

Sometimes you want to duplicate the current line or a selected block of code.

Press ⌘D (macOS) / Ctrl+D (Windows/Linux) in the editor to duplicate a selected block, or the current line when no block is selected.


Related Resources

Reformat Your Code
Reformat Your Code
Reformat a specific piece of code or the whole file according to your preferences.
Creating Code
Creating Code
IntelliJ IDEA can help create code for you saving your fingers.
Using regex
Using regex
Using language injection to work with Regex.