Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7861901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:55:24+00:00 2026-06-02T22:55:24+00:00

There is a Duplicate command in the Edit Menu (with a default shortcut of

  • 0

There is a Duplicate command in the Edit Menu (with a default shortcut of ⌘D), but it is (as Halley pointed out) meant for duplication in the Interface Builder part of Xcode.

So, how do you (easily) duplicate a line in Xcode 4?


Related question (with a working answer) for Xcode 3 … and which does not work for Xcode 4.


Why not just copy & paste?

Because it is tedious and entails too much hand-acrobatics:

either (1): moving to line beginning and then pressing ⇧^E, then copying with ⌘C, moving to new line, alligning cursor, and finally pasting with ⌘V;

or (2): ^A (set cursor to line begining), ^SPACE (set mark), ^E (set cursor to line ending), ⇧^W (Select to Mark; customized), copy, new line, etc.

As Frank Schröder (in the related question) put it:

The whole point is NOT to use the Cmd-C/Cmd-V shortcuts.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:55:25+00:00Added an answer on June 2, 2026 at 10:55 pm
    1. Go to this folder which contains dark side of the force:

      • Xcode 4.2 or prior: /Developer/Library/PrivateFrameworks/IDEKit.framework/Resources
      • Xcode 4.3 or later: /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources.
    2. Open IDETextKeyBindingSet.plist.

    3. Add a new dictionary and a new command item as the screenshot below (name them what you want):
      Editing the plist

      That’s: selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:

    4. Restart Xcode and go to Preferences – Key Bindings, search for your command.

    5. Set a key combination for the command:
      Key Bindings

    6. Finally unleashed the power of key bindings on Xcode… Enjoy it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument Edit: This has nothing
Possible Duplicate: Shell Programming: What's the difference between $(command) and command It seems there
Possible Duplicate: PHP: Is there a command that can delete the contents of a
Possible Duplicate: Keyboard shortcut to paste clipboard content into command prompt window (Win XP)
Possible Duplicate: “Web interface” to PHPUnit tests? Are there any PHP unit testing systems
Possible Duplicate: Are there any Git command to combine all our ugly commits together
Possible Duplicate: Aliasing a command in vim So I have to edit waf wscript
When there were duplicate JARs with different versions, the behavior was very inconsistent. Does
I have a data frame with 50000 rows and 200 columns. There are duplicate
Possible Duplicate: Is there a tool that can display a SVN repository visually (

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.