Opening a file in a new window in macOS? - macos

Pretty much what the title says.
I would like when I use File -> Open or Cmd + O to open a file/directory, Atom would open it in a new Atom editor window not in a new tab inside the existing editor window.
Thanks in advance!

If you want to open a file in a new window using Atom in a mac, at most you can deactivate the option "Always Show Tab Bar" in Settings > Packages > tabs AND open the window before opening a file:
You can think a "window" as a "projects" container.. so when you just open a file is like you are opening it in the current project for this reason you will see it in a new tab inside the window.
In this way is like you are opening a one-file project, hidding his single tab bar.
The result:
If you need to switch to another file in the same path or close you can just open the "tree view" (cmd+):

Related

How to open a file in the current editor panel from the Explorer in Visual Studio Code?

I can select the explorer tab in Visial Studio Code by pressing CMD+0.
From there I can open a file in a new editor tab by pressing CTRL+Enter.
Enter starts renaming
CMD+o shows the open file window
But how can I just open the file in the current editor panel without creating a new tab?
We can see in the screenshot that the "selected" (silhouetted) file in the Explorer panel was able to be opened via CTL-Enter: but it is in a new editor panel to the right :
![enter image description here
Let's open another file now using CTL-Enter: we can see there are now three editor panels:
That's clearly going to get problematic pretty rapidly..
Its "SPACE". At least in my installation.
The corresponding setting is filesExplorer.openFilePreserveFocus

Xcode - open current file in a NEW window (a real challenge !)

Say you have File.m showing in the blue area above.
I want File.m to open in a new separate window.
How to do this??
Note that - of course - IF you have the ProjectNavigator showing and IF you can see the filename "File.m", then double-click on the filename and it will open in a new window.
What I want to do is open ANOTHER copy of the "CURRENT" file (the one in the primaryEditor) in a NEW WINDOW - without touching the ProjectNavigator.
Any ideas? Cheers
Note that ... (an excellent page here)
http://realmacsoftware.com/blog/xcode-4-s-less-obvious-shortcuts
if you click on whatever file is in the current primaryEditor, then shift option apple comma that will indeed open the following "freaky little-known Xcode popup" ...
you can then, indeed, choose to open a new window. (So to be clear, that is exactly what I want to do.)
So, I want to be able to do that in one step. Cheers!
In XCode's Preferences you can change the following:
And then right-click within the primary editor and click "Open in Separate Window"
Edit:
Instead of right clicking in the primary editor you can simply type command+option+, (comma)
Open the file what you want to open in the NEW window.
Command + Shift + t
Open the file what you want to open in the separated window.
Command + Option + ,
I wrote a new automator service that does the following steps in Xcode:
Execute the default shortcut for the "Open in..." menu item (Command-O)
(if this isn't your current "Open in" shortcut, the workflow will not work. If you still want to test it, just changed your default shortcut :) )
Go all the way to the left in the weird "Open in" view
hit Enter
Current file opened in new window
The only thing you need to do is install the service on osx and map a shortcut to it.
Here a download to the service:
https://www.dropbox.com/s/486t2iz17o0l9dh/Open-New-Window.zip
INSTALL INSTRUCTIONS
1.Place Service file in folder ~/Library/Services
2. Open "System preferences"
3. > Keyboard
4. > Tab "ShortCuts" > "Service" > "General"
5. > Set your own shortcut for the service
6. Go to XCode and test the service by using your very own shortcut
Tested on OS X Mavericks, Xcode 5.0.1
In XCode 4 you can have a split window via View -> Show Assistant Editor. Then choose the same file which you have already opened in the Primary editor by the small right arrows on top of Assistant Editor.
Thanks
in the ProjectNavigator. If you see the file name: Double click on the file name. It will open in a new window.

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.

How do you open a TextMate tab in an another window?

I have two monitors on my system and sometimes I want to open a tab (i.e. file) from one window in its own window.
Is this possible?
You can't move a tab to a new window (yet? see this suggestion), but you can open a file in a new window from the drawer. Right-click the file in the drawer and choose "Open filename in New Window."
Find next is ⌘+G.
Find Next is Cmd-g. Moving a tab is View > Move to New Window. Exploring the menus would be a good idea.
Ignore me, confused editors (see comments).

How to make FuzzyFinder pluggin open files in a new graphical tab in MacVim?

When I use FuzzyFinder plugin to open a new file in MacVim, it opens the new file at the same tab in a new buffer.
How to tell FuzzyFinder to open thoses files in a new MacVim tab?
Just founded the answer at http://www.vim.org/scripts/script.php?script_id=1984
You can open a selected item in
various ways:
<CR> (|g:fuf_keyOpen|) - opens in a previous window.
<C-j> (|g:fuf_keyOpenSplit|) - opens in a split window.
<C-k> (|g:fuf_keyOpenVsplit|) - opens in a vertical-split window.
<C-l> (|g:fuf_keyOpenTabpage|) - opens in a new tab page.
...instead of hitting return, I should press <CTRL-L> to open in a new tab

Resources