|
|
Delete line, duplicate line, key bindings in Xcode and Mac OS X text system14th December 2009 13:05:30 by Richard Bennett Firstly you've probably read my other concerns about delete line and duplicate line, in that I can't believe any modern IDE or text editor wouldn't include these as standard. Luckily however the Mac OS X text system does include modifiable key bindings. There's a couple of posts on the web about how to do it, but they're either too vague to be useful, or they implement the commands clumsily. Here's a step by step of how I do key bindings for delete line and duplicate line in Xcode:
This gives you option-e and option-E to delete the current line, and option-d and option-D to duplicate the current line. If you want control instead of option, then change the tilde "~" in the key binding dict to caret "^", and then quit and relaunch Xcode. If you add these definitions to ~/Library/KeyBindings/DefaultKeyBinding.dict as well, then they should work in other IDEs and editors as well. |


Creative Commons