• Stars
    star
    689
  • Rank 64,132 (Top 2 %)
  • Language
    HTML
  • Created almost 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

podtagger

Automated ID3 tagging for podcasts
Ruby
9
star
53

VSCode-Bunch

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

itunescontrol-tmbundle

iTunes Controller for TextMate, highly experimental
Ruby
2
star
65

Dictionary-tmbundle

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

omf-packages

1
star
67

Marked

Marked.app - MultiMarkdown Preview Everywhere
1
star
68

homebrew-thelab

Ruby
1
star
69

htmlexperiments

Just dicking around
1
star