Say I have this:
CGColorSpaceRef space =
CGColorGetColorSpace(col.CGColor);
Is there a hotkey in XCode that lets me join these two lines together into:
CGColorSpaceRef space = CGColorGetColorSpace(col.CGColor);
?
Simplest method I have found: Position your cursor at the end of a line, then CTRL-SHIFT-RIGHT CTRL-SHIFT-LEFT SPACE.
There is no such function like the "J" command in VI.
Old question but I was looking for a way today, and ended up adding:
<key>JoinLines</key>
<dict>
<key>Join Current Line</key>
<string>moveDown:, moveToBeginningOfText:, deleteToBeginningOfLine:, deleteBackward:</string>
</dict>
In file:
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist
(to be edited with sudo)
Then restart XCode, go to preferences -> Key Bindings, and assign some shortcut to "Join Current Line". Seems to work!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With