Xcode set shortcut keys to move up or down the entire line

Source: Internet
Author: User

Set the entire line of code to move up or down:
Find your own configuration file in Xcode:
/applications/xcode.app/contents/frameworks/idekit.framework/versions/a/
Resources/idetextkeybindingset.plist
Edit the Idetextkeybindingset.plist with text and add the following code:

1     <Dict>2         <Key>GDI Duplicate Current Line</Key>3         <string>SelectLine:, copy:, Movetoendofline:,insertnewline:, Paste:, Deletebackward:</string>4         <Key>GDI Delete Current Line</Key>5         <string>Movetoendofline:, Deletetobeginningofline:,deletebackward:,movedown:,movetoendofline:</string>6         <Key>GDI Move Current line up</Key>7         <string>SelectLine:, Cut:, MoveUp:, Movetobeginningofline:, Insertnewline:, Paste:, Movebackward:</string>8         <Key>GDI Move Current line down</Key>9         <string>SelectLine:, Cut:, MoveDown:, Movetobeginningofline:, Insertnewline:, Paste:, Movebackward:</string>Ten         <Key>GDI Insert Line Above</Key> One         <string>MoveUp:, Movetoendofline:, Insertnewline:</string> A         <Key>GDI Insert Line Below</Key> -         <string>Movetoendofline:, Insertnewline:</string> -     </Dict>

This dict is a set of operations that can set shortcut keys, where the key is the name, and the corresponding string is the corresponding set of actions
GDI Duplicate Current line copy the row to the following line
GDI Delete Current Line delete when moving forward
GDI move current lines up to move a row upward
GDI move current lines down move row down
GDI Insert Line Above Adds a blank row above the current line
GDI Insert Line Below adds a blank row below the current line (regardless of whether the cursor is at the end of the row)

3. Restart Xcode, in the Xcode menu, open Preferences, select Key Binding, and search for GDI at the top right:

Xcode set shortcut keys to move up or down the entire line

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.