Coming from Eclipse and having been used to duplicate lines all the time, it\'s pretty strange finding out that Xcode has no such function. Or does it?
I know it\'s
Go to this address :
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet
and then copy IDETextKeyBindingSet.plist file in some where and then open copied file and insert
selectLine:, copy:, paste:, paste: like this picture enter image description here and save it and replace copied file in this address /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet
then restart xcode , open xcode prefences , go to keybinding tab , search for duplicate line(customized) and define short key for it like image below
[1]: https://i.stack.imgur.com/UTeZu.png