{"id":478,"date":"2019-12-03T23:06:42","date_gmt":"2019-12-03T10:06:42","guid":{"rendered":"http:\/\/wp.gaborhargitai.hu\/?p=478"},"modified":"2019-12-03T23:06:43","modified_gmt":"2019-12-03T10:06:43","slug":"xcode-duplicate-current-line-keyboard-shortcut","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/xcode-duplicate-current-line-keyboard-shortcut\/","title":{"rendered":"Xcode Duplicate Current Line Keyboard Shortcut"},"content":{"rendered":"\n

This is something that should have been implemented ages ago – but for some reason, it’s still not present by default.<\/p>\n\n\n\n

1. Navigate to the following folder using Finder (CMD + Shift + G):<\/p>\n\n\n\n

\/Applications\/Xcode.app\/Contents\/Frameworks\/IDEKit.framework\/Versions\/A\/Resources\/<\/code><\/pre>\n\n\n\n

2. Open the following file in a text editor:<\/p>\n\n\n\n

IDETextKeyBindingSet.plist<\/code><\/pre>\n\n\n\n

3. Add these lines above the last two lines:<\/p>\n\n\n\n

<key>User<\/key>\n<dict>\n    <key>Duplicate Current Lines Down<\/key>\n    <string>selectParagraph:, delete:, yank:, moveToBeginningOfParagraph:, yank:, moveUp:, moveToEndOfParagraph:<\/string>\n    <key>Delete Current Line<\/key>\n    <string>deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:<\/string>\n<\/dict><\/code><\/pre>\n\n\n\n

It should look something like this:<\/p>\n\n\n\n

\"\"
Insert the code just above the last <\/dict> tag<\/figcaption><\/figure>\n\n\n\n

This is a convenient reblog from a GitLab Gist<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"

This is something that should have been implemented ages ago – but for some reason, it’s still not present by default. 1. Navigate to the following folder using Finder (CMD + Shift + G): 2. Open the following file in a text editor: 3. Add these lines above the last two lines: It should look […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,17,33],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/478"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=478"}],"version-history":[{"count":1,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/478\/revisions"}],"predecessor-version":[{"id":480,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/478\/revisions\/480"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}