Opening files in Xcode editing pane - xcode

When I first started to work with Xcode, single clicking on a file name in the Groups&Files pane would open that file up for editing in the embedded editing pane. Double clicking the file would open it up in a new window for editing.
Now, single clicking the file does nothing. Double clicking the file will open it up in a new window as before.
How can I set xcode to open up the file in the embedded editing pane by single clicking the file name in the Groups&Files pane?

In Xcode 3.x, make sure you're using the Default or All-in-one layout--not Condensed. If the editor pane is not visible, it might be shrunk down to the bottom of the window. Look for a small gray dot at the bottom and double-click it. The editor pane should then expand up.

Related

Visual Studio. How to temporarily open a file with a single click

If I double click on a file in the Visual Studio Solution Explorer (VS2019), it is opened for editing in a new tab on the far left of the tab area. If I double click on another it too is opened in a new tab on the left.
In the past, I have been able to single click on a file and it was shown in a tab that displayed on the far right of the tabs area. If I single clicked on another file, it would replace the text of the first file in the same tab. I could keep doing this and each file was opened temporarily in that same tab. If I edited what was in that tab, it was moved to the left tab area and remained opened even if I single clicked on another file that appeared in a tab on the right.
This was super convenient for when I just wanted to look at a file without editing it any. Could you tell me how to do this? I looked through the configuration settings and didn't see anything. It would be super helpful for reviewing some of the hundreds of new files I need to look at in a new project I am taking over.
The setting you are looking for is Preview selected files in Solution Explorer. It can be found in the Environment -> Tabs and Windows -> Preview Tab settings page:
After turning it on, clicking on a file once in the Solution Explorer will "preview the file" (which is the official name of the feature) in a special preview tab.

Atom Editor - How to fix: Only one tab open at a time

I have a cat. She likes to sit on my keyboard.
I recently downloaded the Atom Editor, and I love it, but I don't know much about the settings. I just came back to having about 50 instances of Atom opened... bc... #catflife. I had to restart the computer.
Right now my window shows the "Project" pane to the left, and an open file on the right. Normally, I can click on "main.js" and "style.css" , and both files will be open on the right side pane, like tabs.
However, only one file is showing. I would like for the tabs to look like this:
style.css | main.js | anotherfile.php | anotherfile.js
But, let's say I click on "style.css" - it appears on the right side. Then I click on "main.js", and the stylesheet disappears (from the right side) and is replaced with "main.js".
Not sure which setting my cat changed, but how do I change it back to seeing a tab view on the right side?
When you click on a file in Atom, its pane is only ”pending” until you make changes to that file. From then on, a second file will be opened in a new pane. The pending state is indicated by the italic text on the tab.
You can force opening a new file by double-clicking on the file. Or you can disable pending panes in the settings:
Maybe your furry friend disabled/removed the tabs package
File-> Settings -> Packages
search for tabs(v0.110.0) and ensure it is installed and enabled.
Right Click on a file in the project tree. Then click split Left/right.

Xcode 5: disable single-click in navigation

So, after struggling with horrible interface choices of Xcode 4, I'm finally on 5.1.1.
The tabs became almost usable. Double clicking can be configured to open a file in a new tab. Good. Double clicking another file opens it in a new tab. Good. Double clicking first file again switches to previously open tab. Good! Double clicking first file while it is open in current tab opens a second tab with that file. Ok, I can live with that, since from there on they just switch from one to another.
So far a surprisingly sane behavior.
Unless you make a single click in the navigation panel by mistake. Single click opens whatever you click in the current tab, all logic and reason be damned.
The question is, how to change single click behavior to "Use separate tab" (or however Xcode refers to that behavior)?
Is there any way to disable single clicks from doing anything at all aside from highlighting the selection?
There's no option to disable the single-click behavior. Two options that get you close to your desired behavior are:
Use a single separate window for most of your tabs. Use a "main" window that has the file navigator visible, and a separate "work" window with the file navigator hidden. If you want to add a tab to the work window, create it in the main window and then drag it's tab over to the work window. This is an extra step, but you'll never have a single click change any of the tabs that you care about (thought it'll still change the primary or focussed editor in the main window, depending on your settings).
Use separate windows for each file. There's a preference setting that lets you create windows instead of tabs when you double-click a file in the file navigator. Use Mission Control instead of the tab bar to navigate between your files.

Xcode 4: Open arbitrary files in assistant editor

Is it possible to open a file that is not part of any project in the assistant editor? Open Quickly can open files in the assistant, but only searches the project itself. If I open an outside file in Xcode, it gets a new window that cannot access the project in its assistants.
With the assistant editor open, drag the file from the left-hand list onto the Jumplist at the top of the assistant editor (where the currently open file is).
Yes, it's possible.
#What. Your answer only works if the file is in the project. You can only drag a file to the Jumplist at the top of the assistant editor if the file is displayed within the file list on the left. This means you would have to add the file to the project before opening. Sometimes, this is not desirable as you may want to open a file from another project for reference while coding.
Steps that I use are: (Tested in Xcode 6 and Xcode 7 Beta)
In Xcode, make sure your Tab Bar is shown. If it is not, click on "View -> Show Tab Bar" in the top menu
Open the file... Go to "File -> Open". Select the arbitrary file you want to open. This will open the file in a new window. (Screenshot 1 below)
Drag the tab in the new window to the tab bar in your main editor. Now, you will have 2 tabs in your main editor and your new window will be gone (Screenshot 2 below)
Next, click on your original tab (Where your main and assistant editor is) and the file will be available in the recent files list. Simply select the file from the recent files list in the assistant editor and you now have the file open in the assistant editor. You can also close the other tab as you no longer need it. (Screenshot 3 below)
Screenshot 1. Simply drag the tab from the new window to the main tab bar.
Screenshot 2, you will now have 2 tabs.
Screenshot 3. Back at your original tab, you now have the option to open the new file within the recent files list in the assistant editor. Click it and you are done.
Screenshot 4. Final result... we have our arbitrary file open in the assistant editor.
Here is what I do (Xcode 9.3) :
Add wanted file to the Xcode project
Open assistant editor with that
file
delete this file (references only) from the Xcode project. Xcode will
remove the file from the assistant editor.
Now go to the assistant
editor "recent files", the file will be there. Select it.
My preferred way to do this is to #include whatever file I want to open in some C file, like this:
#include "/home/julius/path/to/file"
Command-clicking the path will open the file. It's a shame Xcode forces you to use this workaround.
You can drag an arbitrary file on the assistant editor. Then it will be opened there.

Multiple editor windows in Xcode

When coding in Xcode, I double-click a file in the "Groups and files" list, and it opens a new editor window. I have several of these open at once.
Until today.
Today, when I double-click a file in the list, it opens the file in the last editor window I was using, meaning I can only have one editor window up at any one time.
I guess I've switched some option somewhere by mistake. How do I get it back to the way I like it?
I'm using Xcode 3.2.5
In the top right of the editing window is an icon that says "grouped", perhaps you clicked on it by accident.
Click on it so it says "ungrouped", and you'll be back to opening multiple windows.
perhaps preferences>General>Open Counterpart in same Editor

Resources