adobe/brackets — pull request #818 by peterflynn (2012-05-07 20:50:12+00:00)
Title: Duplicate line/selection command

This adds a new Edit > Duplicate command that duplicates the selected text, or if no selection, the current line. Many other text editors have such a command.

I bound it to my favorite shortcut, Ctrl/Cmd+D, but there's little consistency among other apps. Sublime uses Ctrl/Cmd+Shift+D, TextMate uses Ctrl+Shift+D (not Cmd), Coda uses Cmd+Alt+Up/Down (only for full-line duplicate), IntelliJ uses Ctrl/Cmd+D.

Unit tests are included here.