Re: Newbie questions about XCode
Re: Newbie questions about XCode
- Subject: Re: Newbie questions about XCode
- From: Ken Thomases <email@hidden>
- Date: Sat, 6 Feb 2010 13:07:00 -0600
There are definitely areas in which Xcode could stand some improvement. I would point out, though, that it is scriptable and you can assign keyboard shortcuts to scripts.
Julian Wood's complaints about Command-/ (Un/Comment Selection) might be remedied by editing the script bound to that key combination.
Similarly, his "select next larger semantic chunk surrounding current selection" might be implementable, for some languages, with a script.
Also, Xcode's text system uses a key bindings system that's similar to Cocoa's general key binding system, although it differs in some respects. Cocoa's key binding system has an interesting feature where you can assign a key combination to perform a sequence of operations and/or insert some arbitrary text. You can use this with Xcode's key bindings.
See this page for a valuable description of Cocoa's text binding system: http://www.hcs.harvard.edu/~jrus/Site/Cocoa Text System.html
To use it, first, in Xcode's preferences, create a custom key binding set by duplicating one of the existing ones. Then, quit Xcode. The created file will be in ~/Library/Application Support/Xcode/Key Bindings. You can edit it with Property List Editor or a plain text editor.
This could certainly be used to achieve the "open a new line from the middle of the current one" feature. I haven't tested, but I think you'd add to the "text" dictionary:
<key>$\0x0D</key>
<array>
<string>moveToEndOfLine:</string>
<string>insertNewline:</string>
</array>
That binds it to Shift-Enter.
Roland King complained that he gave up on modifying Xcode's file templates because they were replaced when Xcode upgraded. That's because he edited the system templates in /Library or /Developer/Library. If you copy the templates to ~/Library/Application Support/Developer/Shared/File Templates, and edit them there, your edits won't be blown away by upgrades.
Regards,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden