summaryrefslogtreecommitdiffstats
path: root/DefaultKeyBinding.dict
diff options
context:
space:
mode:
authorBrett Terpstra2012-04-22 12:23:03 -0500
committerBrett Terpstra2012-04-22 12:23:03 -0500
commit9131d92c1cd6c0dcc2932e0a23b9c74e4b87d35a (patch)
tree4790670d72482dfcdf4d372006b244bdb9aac315 /DefaultKeyBinding.dict
parenta1a8613d3b8d80318af48327c089c661720bc6ba (diff)
downloadKeyBindings-9131d92c1cd6c0dcc2932e0a23b9c74e4b87d35a.tar.bz2
new keybindings for paragraph navigation
Diffstat (limited to 'DefaultKeyBinding.dict')
-rw-r--r--DefaultKeyBinding.dict22
1 files changed, 20 insertions, 2 deletions
diff --git a/DefaultKeyBinding.dict b/DefaultKeyBinding.dict
index bbf6aa4..e04150b 100644
--- a/DefaultKeyBinding.dict
+++ b/DefaultKeyBinding.dict
@@ -69,8 +69,8 @@
"^@\UF702" = (setMark:, moveToBeginningOfParagraph:, moveRight:, deleteBackward:, swapWithMark:, moveLeft:);
// > Control-shift-command-left arrow
- // Full outdent - Deletes all leading space (or first word) of line/paragraph
- "^$@\UF702" = (setMark:, moveToBeginningOfParagraph:, selectWord:, delete:, swapWithMark:, moveLeft:);
+ // Full outdent - Deletes all leading space of line/paragraph (updated)
+ "^$@\UF702" = (setMark:, moveToBeginningOfParagraph:, insertText:, " ", moveLeft:, selectWord:, delete:, swapWithMark:);
// modify selection up by paragraph (Command Option Shift Up)
"@~$\Uf700" = (selectParagraph:, moveParagraphBackwardAndModifySelection:);
@@ -81,6 +81,17 @@
// modify selection right by word
"^~$\UF703" = (selectWord:, moveWordRightAndModifySelection:);
+ // Move to first Alphanumeric character of line (new)
+ "@~^\UF702" = (moveToBeginningOfParagraph:,moveWordRight:, moveWordLeft:);
+ // Move to first non-whitespace character of line (new)
+ "@~\UF702" = (moveToBeginningOfParagraph:, insertText:, " ", moveLeft:, selectWord:, moveRight:, setMark:, moveToBeginningOfParagraph:, deleteForward:, swapWithMark:, moveLeft:);
+ // Select to first character of line with leading space (new)
+ "@~$\UF702" = (setMark:,moveToBeginningOfParagraph:,selectWord:, moveRight:, selectToMark:);
+ // Move to last non-whitespace character of paragraph (new)
+ "~@\UF703" = (moveToEndOfParagraph:, insertText:, " ", selectWord:, moveLeft:, setMark:, moveToEndOfParagraph:, deleteBackward:, swapWithMark:);
+ // Move to end of paragraph and delete trailing whitespace (new)
+ "^~\UF703" = (moveToEndOfParagraph:, insertText:, " ", selectWord:, deleteBackward:);
+
// TextMate Command-Return (Command Enter)
"@\U000D" = (moveToEndOfParagraph:, insertNewline:);
// Insert blank line above paragraph (Command Shift Enter)
@@ -123,6 +134,11 @@
// decrease markdown header level
"@~-" = (setMark:, moveToBeginningOfParagraph:, deleteForward:, swapWithMark:, moveLeft:);
+ // Add hard break for current line and insert newline below (new)
+ "^~\U000D" = (moveToEndOfParagraph:, insertText:, " ", selectWord:, deleteBackward:, insertText:, " ", insertNewline:);
+ // Break line at cursor and add Markdown hard line break (new)
+ "^@\U000D" = (insertText:, " ", insertNewline:);
+
"^@w" = { // Multi-stroke Markdown commands
// force carriage return in text field
"\U000A" = (insertNewlineIgnoringFieldEditor:);
@@ -272,4 +288,6 @@
"@$\Uf728" = (deleteToEndOfParagraph:);
// Delete to beginning of paragraph
"@$\177" = (deleteToBeginningOfParagraph:);
+ // Right mouse click (useless, doesn't maintain cursor position)
+ "@~7" = (setMark:, rightMouseDown:, swapWithMark:);
} \ No newline at end of file