• Stars
    star
    689
  • Rank 65,628 (Top 2 %)
  • Language
    HTML
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DefaultKeybindings.dict for Mac OS X

DefaultKeyBinding.dict file (~/Library/KeyBindings/DefaultKeyBinding.dict) for Mac OS X, created by [Brett Terpstra][] and based heavily on work done by Lri. Please note that these bindings won't work in all applications: TextWrangler and TextMate, for example, override these with their own settings.

Installation: Copy the DefaultKeyBinding.dict file to the ~/Library/KeyBindings/ directory (create KeyBindings if it doesn't already exist). Any open applications will need to be re-started before the key bindings will take effect --- or log out and log back in.

The repository includes a script to generate a Dash docset from your customized version of the file. See here for details.

Documentation (last updated 02/18/2022.)

Grouped items begin with the groups shortcut (if exists), followed by a subgroup (if exists) followed by the keys specified.

General Commands
Key Function
βŒƒy replace yank: command with yankAndSelect for use with the kill ring ( defaults write -g NSRepeatCountBinding -string β€œu” defaults write -g NSTextKillRingSize -int 6)
βŒƒβ‡§u Uppercase word
βŒƒβŒ₯u Lowercase word
βŒƒβŒ₯t Titlecase word
βŒƒβŒ₯⇧u Uppercase current paragraph
βŒƒβŒ₯⇧t titlecase paragraph
βŒƒw delete word before cursor
βŒ₯w select word
βŒ₯⇧w select word backward and modify selection
βŒ₯⇧s select entire line/paragraph
βŒ₯s select from beginning of paragraph to last character
βŒƒβŒ₯⇧s select paragraph excluding leading/trailing whitespace (same as ^$@\UF701)
βŒ₯d delete line/paragraph
βŒ₯y copy paragraph
βŒ₯x cut paragraph
βŒ₯p paste paragraph below
βŒ₯⇧p paste paragraph above
βŒƒβ‡§a select to beginning of paragraph and copy
βŒƒβ‡§e select to end of paragraph and copy
βŒ₯q cut to beginning of paragraph
βŒ₯k cut to end of paragraph
βŒ₯o blank line after current
βŒ₯⇧o blank line before current
βŒƒβŒ˜β†‘ Move line up
βŒƒβŒ˜β†“ Move line down
βŒƒβŒ˜β†’ Indent line
βŒƒβŒ˜β† Outdent line (one tab or char)
βŒƒβ‡§βŒ˜β† Full outdent - Deletes all leading space of line/paragraph (updated) ( Control-shift-command-left arrow)
βŒƒβ‡§βŒ˜β†’ Delete trailing space ( Control-shift-command-right arrow)
βŒƒβŒ˜β‡§β†‘ Delete leading and trailing whitespace for paragraph ( Control-shift-command-up arrow)
βŒƒβŒ˜β‡§β†“ Select paragraph without leading or trailing whitespace ( Control-shift-command-down arrow)
βŒƒβŒ₯⇧↑ modify selection up by paragraph (Control Option Shift Up) ( Control-option-shift-up arrow)
βŒƒβŒ₯⇧↓ modify selection down by paragraph (Control Option Shift Down) ( Control-option-shift-down arrow)
βŒƒβŒ₯⇧← modify selection left by word ( Control-option-shift-left arrow)
βŒƒβŒ₯⇧→ modify selection right by word ( Control-option-shift-right arrow)
⌘βŒ₯βŒƒβ† Move to first Alphanumeric character of line ( Control-option-up arrow)
⌘βŒ₯← Move to first non-whitespace character of line
⌘βŒ₯⇧← Select to first word of paragraph modifying selection
⌘βŒ₯⇧→ Select to end of paragraph modifying selection
βŒ₯βŒ˜β†’ Move to last non-whitespace character of paragraph
βŒƒβŒ₯β†’ Move to end of paragraph and delete trailing whitespace
βŒ˜β†© TextMate Command-Return (Command Return)
βŒ˜β‡§β†© Insert blank line above paragraph (Command Shift Return)
⇧βŒ₯␣ Insert space and uppercase next character (Shift-Option-Space)
βŒƒβ‡§β£ Uppercase next character (Control-Shift-Space)
⇧␣ Move cursor forward with spacebar (shift-space)
⌘βŒ₯_ hyphenate next space and move to next word ( this will kill non alphanumeric symbols and punctuation, use only on words)
βŒ₯1 bookmark
βŒ₯2 jump to bookmark
βŒ₯βŒ˜β†© Continue a list item with indentation and include the same delimiter ( Command Option Return)
⇧β‡₯ remove one tab (or character) from start of line (outdent) ( Shift Tab)
⌘βŒ₯b bold selection (Markdown)
⌘βŒ₯i italicize selection (Markdown)
⌘βŒ₯` backtick selection (Markdown)
βŒƒβŒ˜β†© break line with double space (Markdown) ( Control-Command-Return)
⌘βŒ₯= increase markdown header level
⌘βŒ₯- decrease markdown header level
⌘βŒ₯> increase blockquote header level
⌘βŒ₯< decrease blockquote level
βŒƒ< Make selected text into paired HTML tag. Allows attributes, only dupes first word into closing tag (caveat: overwrites your pasteboard)
βŒ₯r repeat character before cursor
βŒ˜β‡§βŒ¦ Forward delete to end of paragraph
βŒ˜β‡§βŒ« Delete to beginning of paragraph ( Command-shift-delete)
⌘βŒ₯7 Right mouse click (useless, doesn’t maintain cursor position)
⌘βŒ₯⇧s Real, honest-to-goodnes Save As…
multi–stroke casing commands (βŒƒβŒ₯c)
βŒƒβŒ₯c c snake_case to camelCase (delete forward and capitalize)
βŒƒβŒ₯c s snake_case word break
Commenting commands (βŒƒβŒ˜c)
βŒƒβŒ˜c / comment with β€œ//”
βŒƒβŒ˜c Β  comment with β€œ#”
βŒƒβŒ˜c ! HTML commenting
βŒƒβŒ˜c * Css Commenting
Multi–stroke Markdown commands (βŒƒβŒ˜w)
βŒƒβŒ˜w ␍ force carriage return in text field
βŒƒβŒ˜w β‡₯ force tab in text field
βŒƒβŒ˜w [ insert reference link [selection][[cursor]]
βŒƒβŒ˜w ] insert reference [selection]: [cursor]
βŒƒβŒ˜w ` Fence code
βŒƒβŒ˜w + Unordered list item with +
βŒƒβŒ˜w - Unordered list item with -
βŒƒβŒ˜w * Unordered list item with *
βŒƒβŒ˜w 8 convert current numbered list item to bullet, handles indentation
βŒƒβŒ˜w 1 convert current bullet list item to numbered
Headlines (removes leading whitespace after inserting hashmarks) (h)
βŒƒβŒ˜w h 1 #
βŒƒβŒ˜w h 2 ##
βŒƒβŒ˜w h 3 ###
βŒƒβŒ˜w h 4 ####
βŒƒβŒ˜w h 5 #####
βŒƒβŒ˜w h 6 ######
Markdown link (l)
βŒƒβŒ˜w l t create a link for selected text, cursor between () [selected text]([cursor]) ( links without selected text first, these can produce a mess using multiple clipboards make a text selection before you run them)
βŒƒβŒ˜w l c create a link for selected text, inserting clipboard as url [[cursor]selected text](clipboard contents)
βŒƒβŒ˜w s SearchLink Basic Link
Link as image (i)
βŒƒβŒ˜w i t same as lt, but with image syntax ![selected text]([cursor])
βŒƒβŒ˜w i c same as lc, but with image syntax ![selected text](clipboard)
βŒƒβŒ˜w i d same as lc, but with image syntax and β€œ+” for Droplr links ![selected text](clipboard+)
Reference links (:)
βŒƒβŒ˜w : t create a reference from selected text
βŒƒβŒ˜w : c create a reference from selected text, clipboard as url
HTML commands (βŒƒβŒ˜e)
βŒƒβŒ˜e = =β€œ[cursor]”
βŒƒβŒ˜e e entity &[cursor];
βŒƒβŒ˜e / https://
βŒƒβŒ˜e t Make previous word into paired HTML tag
HTML Links (a)
βŒƒβŒ˜e a t Insert HTML link for selected text, leave cursor in the href with β€œhttps://” selected
βŒƒβŒ˜e a c Insert HTML link with clipboard as href
HTML Image (i)
βŒƒβŒ˜e i t Insert image tag, any selected text is alt text, leave cursor in src attribute
βŒƒβŒ˜e i c Insert image tag, clipboard as src, any selected text as alt, leave cursor at beginning of alt attribute
Surround commands (βŒƒβŒ˜s)
βŒƒβŒ˜s ( wrap () with spaces
βŒƒβŒ˜s ) wrap () no spaces
βŒƒβŒ˜s [ wrap [] with spaces
βŒƒβŒ˜s ] wrap [] no spaces
βŒƒβŒ˜s { wrap {} with spaces
βŒƒβŒ˜s } wrap {} no spaces
βŒƒβŒ˜s < wrap <> with spaces
βŒƒβŒ˜s > wrap <> no spaces
βŒƒβŒ˜s ' wrap single quotes
βŒƒβŒ˜s ` wrap backticks
Jekyll Shortcuts (βŒƒβŒ˜j)
βŒƒβŒ˜j p Pullquote Liquid Tag
βŒƒβŒ˜j r Raw Liquid Tag
βŒƒβŒ˜j ⇧r Raw Tag for entire paragraph
TaskPaper Tags (βŒƒβŒ˜t)
βŒƒβŒ˜t d @done
βŒƒβŒ˜t p @priority()
βŒƒβŒ˜t n @na
βŒƒβŒ˜t t @today
SearchLink commands (βŒƒβŒ˜g)
βŒƒβŒ˜g g SearchLink Syntax: Google
βŒƒβŒ˜g ⇧a SearchLink Syntax: Amazon
Apple (a)
βŒƒβŒ˜g a i SearchLink Syntax: iOS App
βŒƒβŒ˜g a m SearchLink Syntax: Mac App Store
βŒƒβŒ˜g s SearchLink Syntax: Software
βŒƒβŒ˜g m SearchLink Syntax: IMDB
βŒƒβŒ˜g b SearchLink Syntax: BrettTerpstra.com
βŒƒβŒ˜g p SearchLink Syntax: BrettTerpstra.com Projects
βŒƒβŒ˜g t SearchLink Syntax: Twitter User

This documentation is generated automatically from the comments and commands in the DefaultKeyBinding.dict file. The script document_keybindings.rb is free for use, but it's specifically designed for use with my formatting in the bindings plist (i.e. it's a little finicky).

More Repositories

1

doing

Ruby
1,036
star
2

mdless

Ruby
787
star
3

Slogger

Social logging script for Day One
Ruby
762
star
4

cheaters

Customizable cheat sheet system for OS X
HTML
461
star
5

popclipextensions

Brett's PopClip Extensions
Python
431
star
6

MarkedCustomStyles

Custom Style Repository for Marked2.app
CSS
416
star
7

QuickQuestion

A simple, text-based system for building an easily-searchable knowlegebase on OS X. CLI, LaunchBar and Alfred included.
Shell
188
star
8

Brett-s-TextExpander-Snippets

General-use snippets for TextExpander on Mac
PHP
129
star
9

fish_files

Shell
125
star
10

OTask

Ruby CLI for OmniFocus
Ruby
122
star
11

na

Bash function for displaying next actions in plain-text files per project directory
Shell
113
star
12

nvremind

A scheduled background task to scan nvALT notes for @reminder() tags and trigger notifications based on dates.
Ruby
98
star
13

bunch

Documentation repository for Bunch.app
Ruby
88
star
14

vitag

Ruby
86
star
15

hookapp

HTML
81
star
16

Pinboard-to-OpenMeta

Saves Pinboard bookmarks as local webloc files on a Mac. Can add thumbnails and save PDF's, with external apps. Works with Tags.app or the OpenMeta cli utility.
Ruby
79
star
17

gather-cli

Swift
73
star
18

JekyllPlugins

A small collection of (often lame) Jekyll plugins
SCSS
65
star
19

ubersicht-widgets

CoffeeScript
62
star
20

niftymenu

JavaScript
59
star
21

hook_goodies

AppleScript
59
star
22

snibbets

Ruby
46
star
23

where

Shell
38
star
24

BetterTouchTool-Widgets

Ruby
38
star
25

searchlink

Ruby
34
star
26

howzit_old

Ruby
32
star
27

ExtraInfoPlus

AppleScript
32
star
28

blogsmith-tmbundle

TextMate bundle for blogging platforms with poor/no xmlrpc support
Ruby
31
star
29

bookmark-cli

CLI for OS X that returns a base64 string of bookmark data for a file, or locates a file given a base64 string
Objective-C
31
star
30

popupsCSS

iOS-esque popup styles
28
star
31

jquery-tldr

JavaScript
26
star
32

dotfiles

Various config files
Shell
24
star
33

tagbak

Ruby
24
star
34

nvWikiLink

Universal system for creating plain text wiki links to nvALT notes
Ruby
22
star
35

sidecar

Sidecar jacket for Simplify
HTML
19
star
36

jtag

Ruby
19
star
37

coughbutton

An iPhone-based cough button for your Mac using PHP and MuteMyMic
JavaScript
18
star
38

delimport-pinboard

Index your Pinboard bookmarks using Spotlight on Mac OS X.
Objective-C
18
star
39

CodeReminder

Ruby
17
star
40

MarkdownURLs.safariextension

The source for the TabLinks Safari Extension
JavaScript
16
star
41

na_gem

a command line tool for adding and listing project todos
Ruby
16
star
42

mmd2cheatset

Ruby
16
star
43

howzit

Ruby
14
star
44

notehub

Ruby
14
star
45

reiki

Shell
13
star
46

Character-pair-autocompletion

Character pair autocomplete is now possible on any Mac app using these TextExpander custom snippets including on selected text.
13
star
47

ttscoff.github.com

Brett Terpstra's GitHub website
CSS
12
star
48

bunchcli

Ruby
12
star
49

Twilight2.tmTheme

A mod of the classic Twilight theme for TextMate and Sublime Text
11
star
50

starter-book

An online book.
11
star
51

Sublime-Bunch

Bunch is a Mac automation app that runs on plain text files with the extension `.bunch`. It has its own "language", and this package provides syntax highlighting for Bunch files, as well as light/dark color schemes, snippets for common commands, and completion for app names.
Python
10
star
52

VSCode-Bunch

9
star
53

podtagger

Automated ID3 tagging for podcasts
Ruby
9
star
54

TextBuddyScripts

JavaScript
9
star
55

TabLinks

HTML
8
star
56

loadbar

CoffeeScript
8
star
57

LuckyCharms-tmTheme

A light theme for Sublime Text, VS Code, and Vim
Vim Script
8
star
58

fuzzy_cd

Shell
6
star
59

MailMateMate.mmBundle

Ruby
6
star
60

quix-mann

Merlin Mann's Custom Quix Commands
6
star
61

bookmarklets

Repo to run bookmarklets from inline scripts on github.com
JavaScript
5
star
62

omf-fuzzy_cd

Shell
4
star
63

EditScript

Ruby
3
star
64

marky-api

SCSS
2
star
65

itunescontrol-tmbundle

iTunes Controller for TextMate, highly experimental
Ruby
2
star
66

Dictionary-tmbundle

Various dictionary, spellchecking and thesaurus commands for TextMate
2
star
67

omf-packages

1
star
68

Marked

Marked.app - MultiMarkdown Preview Everywhere
1
star
69

homebrew-thelab

Ruby
1
star
70

htmlexperiments

Just dicking around
1
star