Skip to main content
Noble Desktop/1 min read

Duplicate Lines in Sublime Text

Duplicate Lines Shortcut

Mac

Cmd-Shift-D — duplicates the current line below.

Windows / Linux

Ctrl-Shift-D — same behavior across platforms.

No Selection Needed

Just place your cursor anywhere on the line you want to duplicate.

Multi-Line

Select multiple lines first, then the shortcut duplicates the whole block.

Master Web Development at Noble Desktop

Noble Desktop's Full-Stack Web Development Certificate covers HTML, CSS, JavaScript, and the modern web stack.

To quickly duplicate a line of code, place the cursor anywhere in the line and hit Cmd–Shift–D(Mac) or Ctrl–Shift–D (Windows).

Ct duplicate line

Learn more Sublime Text Coding Tips. These coding tips are covered in our hands-on coding classes and bootcamps in NYC.