Skip to content

Instantly share code, notes, and snippets.

View Sidelobe's full-sized avatar

Lorenz Bucher Sidelobe

View GitHub Profile
@Sidelobe
Sidelobe / duplicate_line_xcode.md
Last active August 21, 2025 16:00 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplication (without overwriting your clipboard)

I find this shortcut extremely useful in Xcode: duplicate one or several lines without losing what you have on the clipboard.

UPDATE: it seems Xcode finally added this feature as of version 14: one can now select text and use the usual duplicate shortcut (Cmd-D)

Bind keys to duplicate lines in Xcode

  1. To add custom key bindings in Xcode, you have to edit this file (su privileges required): '/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/Current/Resources/IDETextKeyBindingSet.plist