Xcode 4: Close all documents? - xcode4

I often do Control-Command-W to close a document. Is there a keyboard shortcut or menu option to close all documents?

I don't think this is possible. Holding down Control-Command-W seems like the best way to close all documents in a single window.

Related

How do I programmatically close the Immersive Reader?

I would like to be able to close the Immersive Reader in code, without the need for user intervention. Is there a way to do this?
You can use the ImmersiveReader.close() function to close the Immersive Reader. The documentation is available here.

Efficiently get rid of all or some objects in RStudio Script pane

I open dataframes all the time in RStudio using View(df) or View(list) which pops open a window in my RStudio script pane as with MASTERstat1 MASTERextract and MASTERbackout1 in the image below:
Is there a way to close all the windows that are NOT SCRIPTS? I inevitably forget to close them and get a ton of them, and stuff gets cluttered.
It looks like it's not currently possible in RStudio, at least as of a month ago.
One sub-optimal workaround mentioned in this answer is to make sure your script tabs are saved and then to close all tabs using Ctrl+Shift+W.
My personal preferred method for closing a lot of unwanted tabs quickly is to use Ctrl+Tab/Ctrl+Shift+Tab for navigating between tabs and Ctrl+W for closing the current tab.
Edit: also potentially useful is Shift+Ctrl+Alt+W, which closes all but the current tab.

Prevent R's newly opened devices to get the focus

When I open a plot from the R console:
I am happy that the device opens on top of the screen so I can see it
I am unhappy that the device gets the focus because I can't type any additional commands then before I navigate back to the console.
How do I get only the first of these two behaviours?
Is there a way to open a new R device on top of the screen without loosing the console focus?
[Update]: According to Carl's comment, calling windows(4.5,4.5,restoreConsole=T) before plot does the trick. But this seems to be just a temporary fix for Windows. Any more generic solution? Or X11, Wayland equivalents?
Found this solution here.
bringToTop(-1)

Sublime Text 2, disable Build output panel/Console automatic scrolling

Apparently everytime a script returns a new line the Build panel/Console on ST2 scrolls to the bottom, which is good so we can always see the latest output information, however when having huge stacks of information with long history it is natural that before a process finished you may want to scroll back and debug the information print before.
Since ST2 always scrolls to the bottom when a new line is inserted into the console, this becomes impossible to achieve.
My question is if is there any way to disable this 'automatic scrolling' for new lines on the build output panel or if somehow it is possible to make it behave just like terminal, where it will only continuing to scroll if your cursor or scroll location is already on the latest item and it becomes inactive as soon as you scroll up.
I hope that makes sense.
thanks in advance
I turns out I was dumb enough to not find out that by double-clicking the console panel it will then stop the scrolling and let me navigate through it. once I scroll again to the bottom, it continues from there.
I'm reasonably sure that this is hardcoded in, but I can be certain since I'm not Jon Skinner :) Most "consoles" act like this, continuously streaming the information as it is collected. Terminal emulators often include a "scroll on output" option to modify this behavior, but in my experience I haven't found anything like this in ST2 or ST3. If your programs are generating the output, you can always sprinkle in statements like print "==========" or something similar to break up the output somewhat, and perhaps give you an idea of where you are when you scroll back through.

plist editing in XCode 4: Can you not move rows anymore?

This one is stupid, and there's probably a ridiculously simple answer I'm just not aware of:
I'm trying to edit the plist for my Settings.bundle to implement preferences in my app. I want to tweak the order of a few groups, but I can't figure out how to move rows around. In XCode 3 you could just drag rows around to rearrange them, but it seems this no longer works in XCode 4. Short of deleting everything and re-recreating them in the correct order, how can I re-arrange the rows?
Thanks.
You can move an entry by grabbing the right side and moving it up, you just can't move it down.
I think it's an annoying gotcha that quite a few have run in to.
Check out:
How do you change a plist's root object type to NSArray in Xcode 4
and:
Change the editor Xcode 4 uses for property lists?
Basically, you can't. Changing the plist editor to textedit was the best solution for me. Also you can right click on the plist file and select "Open As > Source Code" to edit the plist raw.
It looks like the same problem is back in XCode 5. By grabbing it on the right you can drag it around, but you can't drop it anywhere. The only way I found was to open the list as source code like #Ralphleon said, which is simple enough to do if you have basic XML skills.
Update: With the new XCode that comes with Lion and iOS 5, moving rows works again.
Yes the order matters if you care about the order the preferences appear in your app settings.
I just create a new item (+) in the settings list where I would like an existing item placed. Then copy (right mouse click) that existing item and paste it on top of the new item. And then delete any duplicates.
In XCode 5.1, you can drag rows and drop them to a parent item. You can't rearrange siblings directly, but by dropping them on the parent item, the child jumps to the top among the siblings.
Check out the app PlistEdit Pro. It handles everything properly. Not free. But if you're doing lots of plist work it's essential.
Here

Resources