Xcode 3 had the nifty widget
that split an editing screen in two. I don't see that in Xcode 4. Has Apple decided that I don't need that anymore? ;-)
Middle button under the "Editors" in the top right will split beside each other. I don't likd that as much as the stacking one in xcode 3 though...
EDIT: You probably have to navigate to the same file to get it "split". Again, not as easy as xcode 3...
Related
In the Xcode 14 version there are these sticky headers that show where we are in the current flow of code, they cover up to 3 lines, my problem is my entire top of editor is now covered with 3 lines of Xcode menu and other 3 lines of these sticky headers, is there a way to try and turn them off in Xcode 14, they seem to cover almost 20% of screen area on my 13 inch device also they seem to hide the relevant code I am currently typing .. thanks
Source Editor
New Features
Xcode now pins elements of your code structure to the top of the editor as you scroll through a document. To toggle this behavior, use “Show: Code structure while scrolling” in Xcode’s Text Editing preferences. (10582250)
https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes
Go to Xcode > Preferences > Text Editing > Display > Code Structure When Scrolling
Xcode 9 introduces a new text editor which is fine, but is there a way to but back feature with shrinking and expanding blocks of code as of Xcode 9.0 (9A235) ?
Put the cursor somewhere in the block and press ⌥⌘←. That's much more convenient than the old way.
Is there a quick way to fold and unfold a block of comments in xcode 7?
While I'm trying out new code I like to keep different versions of a "solution" until I decide which one is my favorite and delete the rejected material.
The ability to Fold & Unfold code blocks is set to OFF within Xcode 7.
Steps to change this:
Select Xcode (top left)
Choose Preferences
Navigate to Text Editing (center)
Tick the option Code folding ribbon
Once you've done this, you'll be able to collapse the comments, along with blocks of code.
I hope this helps!
.
Added Picture Reference
Code-folding block comments does not work in Xcode 7 - 7.2.1 in Swift files.
You can, however, hack it by using an empty closure to surround the comments. This will also work with multiple line comments too.
_ = { /* Comment
myCommented.code
*/ }
Definitely a hack, but could save you lots of scrolling around.
In Xcode 3, I could go back to previous editing point within a document by pressing Command+Control+[Left|Right]. (I'm confusing it was Control or Option... However) In Xcode 4, the key combination is assigned to other feature. Code folding..? What did this key change into?
The shortcut in XCode 4 for "Go forward/backward" is "Control" + "Command" + "Arrow"
This is super annoying for me. When I tried to change the shortcut in the Shortcut Editor back to the Xcode 3 way, Xcode crashes. Fun.
Another option for switching to Previous/Next editing position (Go Back/Go Forward) is using two finger swipe (left for Go Back, right for Go Forward). I realize that this is not a keyboard shortcut but if you are using a Trackpad, it is much faster than trying to click on the buttons.
Note: The pointer does need to be in the editor for swiping to work.
Not 100% sure what you mean by "previous editing point", but Command+Option+Left|Right is code folding. I use Option+Left|Right and Control+Left|Right to move back and forth within the code to get to particular points.
A list of Xcode keyboard shortcuts can be found here
In most multi-document editors for windowing environments, Control-TAB will utilize an MRU list to bring the user back to the last visible file. What is the appropriate command to accomplish this in Xcode 3.x?
I currently have Ctrl-TAB mapped to "View|Previous File", however this does not appear to be an MRU. Worse yet, if it hits the "beginning" of the list (should be a circular buffer), it falls back on inserting an actual TAB character into the text editor.
As of Xcode Version 3, there isn't anything that's exactly like the MRU you describe - however, check out the discussion on this page for some options that will get you closer to the behavior you want.
In recent XCode (10.3), when in a code editor press:
ctrl+1, right, right
Then use up and down keys and enter
to select from the MRU sorted list of recent files.
There is even an option to increase the size of the history.
In Xcode 3 (or any Mac application) you can use Command-Tilde (⌘~) to switch between open windows.
In Xcode 4 you use ⌘} for next tab and ⌘{ for previous tab - command shift bracket.
As a side note, for some reason Xcode 4 won't let me set the key binding for previous/next tab to the standard Control-Tab. When I try it puts in Command-Control-Tab.