Skip to content

Instantly share code, notes, and snippets.

@CamCodesSwiftly
Last active March 14, 2025 15:56
Show Gist options
  • Save CamCodesSwiftly/cc46867277d91ce7166b7ef1316e6670 to your computer and use it in GitHub Desktop.
Save CamCodesSwiftly/cc46867277d91ce7166b7ef1316e6670 to your computer and use it in GitHub Desktop.
xCode VS Code Keybindings

Custom xCode Keybindings from VS Code

It is beyond me why these are not standard keybindings.

1. Copy Lines Downwards

Copy all lines that are highlighted, without the need to highlight entire lines, (selection is extended automatically) and insert it below.

2. Copy Lines Upwards

Copy all lines that are highlighted, without the need to highlight entire lines, (selection is extended automatically) and insert it above.

3. Copy Line

Copy the entire line without the need to highlight it all explicitly.

4. Cut Line

Cut the entire line without the need to highlight it all explicitly.

5. New Line Above

Insert a new line above, regardless of where your cursors is right now, without breaking the line you are on.

6. New Line Below

Insert a new line below, regardless of where your cursors is right now, without breaking the line you are on.

<key>Cam's Custom Commands</key>
    <dict>
        <key>Copy Lines Downwards</key>
	<string>selectParagraph:, delete:, yank:, moveToBeginningOfParagraph:, yank:, moveUp:, moveToEndOfParagraph:</string>
        <key>Copy Lines Upwards</key>
    	<string>selectParagraph:, copy:, moveToBeginningOfParagraph:, moveUp:, moveToEndOfLine:, insertNewlineIgnoringFieldEditor:, paste:, deleteBackward:</string>
	<key>VS Copy Line</key>
	<string>selectParagraph:, copy:</string>
	<key>VS Cut Line</key>
	<string>selectParagraph:, copy:, delete:</string>
	<key>VS New Line Above</key>
	<string>moveUp:, moveToEndOfLine:, insertNewlineIgnoringFieldEditor:</string>
	<key>VS New Line Below</key>
	<string>moveToEndOfLine:, insertNewlineIgnoringFieldEditor:</string>
    </dict>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment