summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DefaultKeyBinding.dict22
-rw-r--r--readme.md36
2 files changed, 54 insertions, 4 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
diff --git a/readme.md b/readme.md
index 723fe71..7d05383 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,4 @@
-DefaultKeyBindings.dict file (`~/Library/KeyBindings/DefaultKeyBindings.dict`) for Mac OS X, created by [Brett Terpstra][] and based heavily on work done by [Lri][lrikeys]. See Lri's [gists][lrigists] and [website][lriweb] for more coding madness. Documentation last updated 03/30/2012.
+DefaultKeyBindings.dict file (`~/Library/KeyBindings/DefaultKeyBindings.dict`) for Mac OS X, created by [Brett Terpstra][] and based heavily on work done by [Lri][lrikeys]. See Lri's [gists][lrigists] and [website][lriweb] for more coding madness. Documentation last updated 04/22/2012.
[lrikeys]: http://www.cs.helsinki.fi/u/lranta/keybindings/
[lriweb]: http://www.cs.helsinki.fi/u/lranta/
@@ -147,7 +147,7 @@ This documentation is generated automatically from the comments and commands in
</tr>
<tr>
<td style="text-align:center;">^⇧⌘←</td>
- <td style="text-align:left;">Full outdent - Deletes all leading space (or first word) of line/paragraph ( Control-shift-command-left arrow)</td>
+ <td style="text-align:left;">Full outdent - Deletes all leading space of line/paragraph (updated) ( Control-shift-command-left arrow)</td>
</tr>
<tr>
<td style="text-align:center;">⌘⌥⇧↑</td>
@@ -166,6 +166,26 @@ This documentation is generated automatically from the comments and commands in
<td style="text-align:left;">modify selection right by word</td>
</tr>
<tr>
+ <td style="text-align:center;">⌘⌥^←</td>
+ <td style="text-align:left;">Move to first Alphanumeric character of line (new)</td>
+</tr>
+<tr>
+ <td style="text-align:center;">⌘⌥←</td>
+ <td style="text-align:left;">Move to first non-whitespace character of line (new)</td>
+</tr>
+<tr>
+ <td style="text-align:center;">⌘⌥⇧←</td>
+ <td style="text-align:left;">Select to first character of line with leading space (new)</td>
+</tr>
+<tr>
+ <td style="text-align:center;">⌥⌘→</td>
+ <td style="text-align:left;">Move to last non-whitespace character of paragraph (new)</td>
+</tr>
+<tr>
+ <td style="text-align:center;">^⌥→</td>
+ <td style="text-align:left;">Move to end of paragraph and delete trailing whitespace (new)</td>
+</tr>
+<tr>
<td style="text-align:center;">⌘↩</td>
<td style="text-align:left;">TextMate Command-Return (Command Enter)</td>
</tr>
@@ -210,6 +230,14 @@ This documentation is generated automatically from the comments and commands in
<td style="text-align:left;">decrease markdown header level</td>
</tr>
<tr>
+ <td style="text-align:center;">^⌥↩</td>
+ <td style="text-align:left;">Add hard break for current line and insert newline below (new)</td>
+</tr>
+<tr>
+ <td style="text-align:center;">^⌘↩</td>
+ <td style="text-align:left;">Break line at cursor and add Markdown hard line break (new)</td>
+</tr>
+<tr>
<td style="text-align:center;">^&lt;</td>
<td style="text-align:left;">Make selected text into paired HTML tag. Allows attributes, only dupes first word into closing tag (caveat: overwrites your pasteboard)</td>
</tr>
@@ -225,6 +253,10 @@ This documentation is generated automatically from the comments and commands in
<td style="text-align:center;">⌘⇧⌫</td>
<td style="text-align:left;">Delete to beginning of paragraph</td>
</tr>
+<tr>
+ <td style="text-align:center;">⌘⌥7</td>
+ <td style="text-align:left;">Right mouse click (useless, doesn&#8217;t maintain cursor position)</td>
+</tr>
</tbody>
</table>