How to open the same file twice - appcode

I wonder how to open the same source file twice, meaning in 2 editors side by side?
When I have the first editor opened, pull the file on another editor window, I'll be sent to the 'old' window (I've just opened) and I can not open the same file twice.
Thanks in advnace.

Splitting the editor (from the tab context menu) allows to have 2 copies of the same file open at the same time.

Related

IntelliJ IDEA current file tab closes on opening a different file

Every time I open a new file (single click), the existing file closes by itself. It started happening in the latest version. How do I fix this?
In the Project tool window, click the three vertical dots and uncheck Enable Preview Tab option (which is on by default)

Shortcut for opening the definition file in a split vertical group in vscode

Are there any shortcuts to open the definition (e.g.: a method definition) in a split vertical group? By ctrl + click on the usage of method, it opens in a new tab. It bothers me, because I have to leave my own tab.
(I know that after opening in a new tab, by pressing ctrl + \ it will be open it in a new group, but this also has the same problem: I lose my own tab, and a second problem: when I want to close the definition file, I have to close it from both the 2nd group and the 1st group.)
Are there any shortcuts to open the definition file directly in a new group?
Ctrl+Alt+Click seems to open the definiton file in a split editor.
It'll open to whatever you have this setting:
Workbench > Editor: Open Side By Side Direction // options are right and down
Note that it'll directly open the definiton file in a split editor only if there is a single possible defintion file. For example, you may have both a source and a dist folder with the same files in them (after some task runner commands perhaps). If there is more than one option, vscode will instead open a peek window with the multiple references listed to the right side. You can Ctrl+Click on whichever of those you want to open to the side.

In Intellij IDEA how to compare 2 text files that are not part of an open project

I would like to compare 2 files in intellij. Both files are not part of a specific project.
Is there a way to do so?
I am running Intellij 15 and 16.
The following works for me in IntelliJ IDEA Ultimate 14.1.7 on Windows:
Open the first file in the IDE (either by dragging from Windows Explorer into the window, or by File / Open).
In the view menu, choose "Compare With…"
In the "Select Path" dialog that appears, select the second file (either directly, or by dragging from Windows Explorer into the dialog).
It then opens up in the traditional file comparison pane. If you try to edit one of the files, it presents the usual "Are you sure you want to edit a file that's not in your project" dialog, which one can accept if that's what one is trying to do.
You can use the "compare with clipboard" feature.
From https://www.jetbrains.com/help/idea/2016.1/comparing-files.html#clipboard:
Comparing a File in the Editor with the Clipboard Contents
Open the desired file in the editor.
Right-click the editor pane and
choose Compare with Clipboard on the context menu.
View and manage
differences in the Differences Viewer for Files.
You can use intellij to compare 2 files/clipboard/blank text etc
Use command Shift+Command+A to search Actions
Type "Open Blank Diff Window" to compare random text
type diff for all diff options.
I use this on the command line (with IntelliJ IDEA CE on a Mac):
/Applications/IntelliJ\ IDEA\ CE.app/Contents/MacOS/idea diff ~/Junk/file1.txt ~/Junk/file2.txt
Window > Editor Tabs > Split Vertically
Is that what you're looking for? It's what I was looking for.
Worked for me on Mac OS High Sierra + IntelliJ IDEA 2018.3
- File -> Open
- Select file 1
- View -> Compare with ...
- Select file 2
To use intelli's difference comparison between 2 different files, you can use the Compare With (Right click the file in Project window). There is also an option to Compare File in Editor. To use that option, ensure one file is open and selected, then right click the 2nd file, clicking Compare File in Editor

One-click file opening in AppCode like in Xcode

Can we set AppCode to open a file with one click? The default is two click like on non-macOS systems.
It would be more natural for those used to opening files with one click in Xcode.
In the gear menu for your project, select 'Autoscroll to source'. From the documentation:
If this option is on, AppCode automatically navigates from a file (or a class member) selected in the Project tool window to the corresponding source file (or its fragment) in the editor. If the corresponding file is not currently open, it will open automatically.

Xcode 4 Window question

Is it possible to open multiple windows in Xcode 4 if I want to have multiple files side by side ?
Thanks
You can double click a file in the side panel to open it in its own window. You can also hold down command and double click a symbol within a file to open it's definition in a new window.
There is also the assistant mode where you can have two files open side by side (but in the same window).