From b29c1bfa8439e24d2b33df4a4f4b0b2c7e3a0f60 Mon Sep 17 00:00:00 2001 From: Adam McLain Date: Fri, 4 Nov 2011 04:40:36 -0700 Subject: [PATCH 1/3] Added example of multiple command keyboard binding. --- jad.idekeybindings | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/jad.idekeybindings b/jad.idekeybindings index 5569ce7..35db7bc 100644 --- a/jad.idekeybindings +++ b/jad.idekeybindings @@ -354,6 +354,17 @@ deleteWordBackward: ~ deleteWordBackward: + + ^_ + + moveForward: + moveToEndOfParagraph: + + ^o + + insertNewlineIgnoringFieldEditor: + moveBackward: + Version 3 From f738669694654edf9e059fbba191ef958323049d Mon Sep 17 00:00:00 2001 From: Adam McLain Date: Fri, 4 Nov 2011 09:46:58 -0700 Subject: [PATCH 2/3] Setting example multi-action to unique key mapping. --- jad.idekeybindings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jad.idekeybindings b/jad.idekeybindings index 35db7bc..93744cb 100644 --- a/jad.idekeybindings +++ b/jad.idekeybindings @@ -354,8 +354,7 @@ deleteWordBackward: ~ deleteWordBackward: - - ^_ + ^] moveForward: moveToEndOfParagraph: From 87fdbce5a64535f137cb951d548450632f2b3fa5 Mon Sep 17 00:00:00 2001 From: Adam McLain Date: Sat, 5 Nov 2011 22:53:39 -0700 Subject: [PATCH 3/3] Update with working multi-action custom key bindings. --- IDETextKeyBindingSet.plist | 305 +++++++++++++++++++++++++++++++++++++ README.markdown | 5 +- 2 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 IDETextKeyBindingSet.plist diff --git a/IDETextKeyBindingSet.plist b/IDETextKeyBindingSet.plist new file mode 100644 index 0000000..7a720ad --- /dev/null +++ b/IDETextKeyBindingSet.plist @@ -0,0 +1,305 @@ + + + + + Cancellation + + Cancel + cancelOperation: + + Case Changes + + Capitalize Word + capitalizeWord: + Lowercase Word + lowercaseWord: + Uppercase Word + uppercaseWord: + + Code Completion + + Select Next Completion + nextCompletion: + Select Previous Completion + previousCompletion: + Show Completion List + complete: + + Deletions + + Delete + delete: + Delete Backward + deleteBackward: + Delete Backward by Decomposing Previous Character + deleteBackwardByDecomposingPreviousCharacter: + Delete Forward + deleteForward: + Delete Subword Backward + deleteSubWordBackward: + Delete Subword Forward + deleteSubWordForward: + Delete Expression Backward + deleteExpressionBackward: + Delete Expression Forward + deleteExpressionForward: + Delete Word Backward + deleteWordBackward: + Delete Word Forward + deleteWordForward: + Delete to Beginning of Document + deleteToBeginningOfDocument: + Delete to Beginning of Line + deleteToBeginningOfLine: + Delete to Beginning of Paragraph + deleteToBeginningOfParagraph: + Delete to End of Document + deleteToEndOfDocument: + Delete to End of Line + deleteToEndOfLine: + Delete to End of Paragraph + deleteToEndOfParagraph: + + Find & Replace + + Find Next + findNext: + Find Previous + findPrevious: + Replace + replace: + Replace All + replaceAll: + Replace and Find Next + replaceAndFindNext: + Replace and Find Previous + replaceAndFindPrevious: + + Graphical Element Transposition + + Transpose + transpose: + Transpose Words + transposeWords: + + Insertions and Indentations + + Indent + indent: + Insert Backtab + insertBacktab: + Insert Container Break + insertContainerBreak: + Insert Double Quote without Extra Action + insertDoubleQuoteIgnoringSubstitution: + Insert Line Break + insertLineBreak: + Insert Newline + insertNewline: + Insert Newline and Leave Selection Before It + insertNewlineIgnoringFieldEditor:, moveBackward: + Insert Newline without Extra Action + insertNewlineIgnoringFieldEditor: + Insert Paragraph Separator + insertParagraphSeparator: + Insert Single Quote without Extra Action + insertSingleQuoteIgnoringSubstitution: + Insert Slash + insertRightToLeftSlash: + Insert Tab + insertTab: + Insert Tab without Extra Action + insertTabIgnoringFieldEditor: + + Mark & Yank + + Delete to Mark + deleteToMark: + Select to Mark + selectToMark: + Set Mark + setMark: + Swap with Mark + swapWithMark: + Yank + yank: + Yank and Select + yankAndSelect: + + Scrolling + + Center Selection in Visible Area + centerSelectionInVisibleArea: + Scroll Left + scrollTabWidthLeft: + Scroll Line Down + scrollLineDown: + Scroll Line Up + scrollLineUp: + Scroll Page Down + scrollPageDown: + Scroll Page Up + scrollPageUp: + Scroll Right + scrollTabWidthRight: + Scroll to Beginning of Document + scrollToBeginningOfDocument: + Scroll to End of Document + scrollToEndOfDocument: + + Selection + + Move Backward + moveBackward: + Move Backward Extending Selection + moveBackwardAndModifySelection: + Move Down + moveDown: + Move Down Extending Selection + moveDownAndModifySelection: + Move Forward + moveForward: + Move Forward Extending Selection + moveForwardAndModifySelection: + Move Left + moveLeft: + Move Left Extending Selection + moveLeftAndModifySelection: + Move Paragraph Backward + moveBackward:, moveToBeginningOfParagraph: + Move Paragraph Backward Extending Selection + moveParagraphBackwardAndModifySelection: + Move Paragraph Forward + moveForward:, moveToEndOfParagraph: + Move Paragraph Forward Extending Selection + moveParagraphForwardAndModifySelection: + Move Right + moveRight: + Move Right Extending Selection + moveRightAndModifySelection: + Move Subword Backward + moveSubWordBackward: + Move Subword Backward Extending Selection + moveSubWordBackwardAndModifySelection: + Move Subword Forward + moveSubWordForward: + Move Subword Forward Extending Selection + moveSubWordForwardAndModifySelection: + Move Expression Left + moveExpressionBackward: + Move Expression Left Extending Selection + moveExpressionBackwardAndModifySelection: + Move Expression Right + moveExpressionForward: + Move Expression Right Extending Selection + moveExpressionForwardAndModifySelection: + Move Up + moveUp: + Move Up Extending Selection + moveUpAndModifySelection: + Move Word Backward + moveWordBackward: + Move Word Backward Extending Selection + moveWordBackwardAndModifySelection: + Move Word Forward + moveWordForward: + Move Word Forward Extending Selection + moveWordForwardAndModifySelection: + Move Word Left + moveWordLeft: + Move Word Left Extending Selection + moveWordLeftAndModifySelection: + Move Word Right + moveWordRight: + Move Word Right Extending Selection + moveWordRightAndModifySelection: + Move to Beginning of Document + moveToBeginningOfDocument: + Move to Beginning of Document Extending Selection + moveToBeginningOfDocumentAndModifySelection: + Move to Beginning of Line + moveToBeginningOfLine: + Move to Beginning of Line Extending Selection + moveToBeginningOfLineAndModifySelection: + Move to Beginning of Paragraph + moveToBeginningOfParagraph: + Move to Beginning of Paragraph Extending Selection + moveToBeginningOfParagraphAndModifySelection: + Move to End of Document + moveToEndOfDocument: + Move to End of Document Extending Selection + moveToEndOfDocumentAndModifySelection: + Move to End of Line + moveToEndOfLine: + Move to End of Line Extending Selection + moveToEndOfLineAndModifySelection: + Move to End of Paragraph + moveToEndOfParagraph: + Move to End of Paragraph Extending Selection + moveToEndOfParagraphAndModifySelection: + Move to Left End of Line + moveToLeftEndOfLine: + Move to Left End of Line Extending Selection + moveToLeftEndOfLineAndModifySelection: + Move to Right End of Line + moveToRightEndOfLine: + Move to Right End of Line Extending Selection + moveToRightEndOfLineAndModifySelection: + Page Down + pageDown: + Page Down Extending Selection + pageDownAndModifySelection: + Page Up + pageUp: + Page Up Extending Selection + pageUpAndModifySelection: + Select All + selectAll: + Select Line + selectLine: + Select Paragraph + selectParagraph: + Select Word + selectWord: + + Undo/Redo + + Redo + redo: + Undo + undo: + + Writing Direction + + Make Base Writing Direction Left to Right + makeBaseWritingDirectionLeftToRight: + Make Base Writing Direction Natural + makeBaseWritingDirectionNatural: + Make Base Writing Direction Right to Left + makeBaseWritingDirectionRightToLeft: + Make Text Writing Direction Left to Right + makeTextWritingDirectionLeftToRight: + Make Text Writing Direction Natural + makeTextWritingDirectionNatural: + Make Text Writing Direction Right to Left + makeTextWritingDirectionRightToLeft: + + + Custom Bindings + + + Move to end of line and add semi-colon + moveToEndOfLine:, insertText:, ; + synthesize + setMark:, moveWordBackward:, deleteToMark:, insertText:, @synthesize , yank:, insertText:, = m_, yank:, insertText:, ;, insertNewline: + nil value + insertText:, = nil;, insertNewline: + + Prepend class method to message + moveToEndOfParagraph:, insertText:, class], moveToBeginningOfParagraph:, moveWordRight:, moveForward:, insertText:, [, moveToEndOfParagraph: + Prepend "p (int)" to message + moveToBeginningOfParagraph:, insertText:, p (int) + + + + diff --git a/README.markdown b/README.markdown index 38878ff..f8467a4 100644 --- a/README.markdown +++ b/README.markdown @@ -1,6 +1,9 @@ Copy `jad.idekeybindings` into `~/Library/Developer/Xcode/UserData/KeyBindings/`, creating directories as necessary. - Or clone the repo directly into this directory: $ cd ~/Library/Developer/Xcode/UserData/ $ git clone git@github.com:jad/xcode4-key-bindings.git KeyBindings + +To see an example of implementing multi-action key bindings look at IDETextKeyBindingsSet.plist. + +To use these bindings copy `IDETextKeyBindingsSet.plist` into `/Developer/Library/PrivateFrameworks/IDEKit.framework/Resources/` then open Xcode's Key Bindings preferences and assign a key combination to them.