This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is a bit of a mess to say the least, but it does have a load of examples in it. | |
// Most of it is cobbled together from various blogs. Applications need to be restarted for | |
// any changes to take effect. | |
// If you puts this stuff in '~/Library/KeyBindings/DefaultKeyBinding.dict', most proper mac | |
// applications will honour it (not Xcode though - that now has its own copy inside the app | |
// bundle, and uses a different format I think). | |
// The use most is at the end: | |
// move line up/down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Translates an objective C method call on the pasteboard, | |
# as copied from the docs, into MacRuby syntax, placing it | |
# back on the pasteboard. | |
# @example | |
# '+ (NSColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha' | |
# => 'colorWithCalibratedRed(red, green:green, blue:blue, alpha:alpha)' | |
string = `pbpaste` |