In XCode actually there is no closing and openning tabs and you can undo whenever you can even if you open another file and go back.
In Eclipse when you close a tab and then later re-open it you cannot undo of course.
Is there a quick way to do this?
You can't undo actions if you have closed the tab (which seems logic: if it's closed, it's not in use). A solution is to use the local history, which can be found when you:
Right-click the file in a navigation view and select Team > Show Local History.
you will see a different version of your file for each save you've made. From there you can compare, or restore it from a certain date.
note: You can change local history properties in:
Window ->Preferences > General > Workspace > Local History
(e.g.: if you want Eclipse to keep files longer or to keep more files)
Related
When I have a multiple file with changes in VSCode I often want to go trough the changes without staging.
I cannot do this because as soon as I click on one file with changes in "Source Control => Changes" the file is revealed in the sidebar and I have to navigate back to "Source Control" to review the changes of another file. In the past this wasn't the case. In order to open the file regularly (without diff) I could manually go to the Explorer and the file was selected.
When files are staged I can click on them and they will not be revealed in the sidebar. This behavior is what I would also like to have for files that are not staged.
What is causing this behavior (I use VSCode v1.74.2)? In the past this wasn't the case.
Update: This behavior is caused by an extension I need (Sigasi). They made an update and for some reason this caused the described unwanted behavior.
Hello from the Sigasi support department. ;)
The Sigasi extension for VS Code comes with a dedicated Project View to bring some useful Eclipse File System features to our VS Code extension.
One of the features this Project View offers, is to link the Project View with the editor in focus. This allows to quickly spot where you are in the project file hierarchy.
This feature can easily be disabled by going to the Project View and clicking the icon that controls the link with the editor. I'm linking a screenshot showing the link with editor setting.
It seems this feature at the moment is more intrusive than intended. We plan to adjust this feature so that it isn't active if the Project View is not visible or collapsed.
In Visual Studio Code, whenever I close a file, the next open file becomes active in the editor and the Side Bar moves to that file's location in the folder structure. This is usually not the behavior I want. I often want to open another file in the same location as the one I just closed, but now my Side Bar has shifted around to what could be a totally different place in a large project.
I like the behavior of the main Visual Studio product where the Solution does not automatically shift. Instead, if I want to see where in the solution a file is, I can use a keyboard shortcut to move there ("Find File in Solution"), instead of automatically moving there every time the active file changes.
Is there any way to change/disable this functionality in VSCode?
The is an option explorer.autoReveal in settings (either user or workspace) which controls if the explorer should automatically reveal files when opening them.
Open VS User Settings (Preferences > User Settings). This will open two side-by-side documents.
Add a new "explorer.autoReveal": false setting to the User Settings document on the right if it's not already there. This is so you aren't editing the Default Setting directly, but instead adding to it.
Save the User Settings file.
in Version: 1.42.1
Open VS User Settings (Preferences > User Settings).
Search for "explorer auto reveal" without quotes.
Now uncheck the checkbox.
There is a new setting in v1.46 that will select the files in the explorer but not scroll to reveal them:
We have introduced a new value focusNoScroll to the
explorer.autoReveal setting. For this value Explorer will
automatically select files when opening them but will not reveal them.
from v1.46 release notes.
So that setting will highlight the active editor in the explorer but not scroll to it.
In Eclipse (CDT) when I close a modified file's tab in the code editor, I'm prompted with whether or not I want to save the file. Unlike when I run the project, I'm not given an option to autosave the file when closing a tab in the prompt that comes up. I haven't been able to find one yet, but is there any setting in the Eclipse Preferences that disable these prompts and automatically save modified files when I close their tabs (not every x time)?
You can use auto save feature in eclipse neon. See this answer also look at other answers to this question Eclipse save automatically
I know this is a foolish question. When I do a git compare (Project -> Right click -> Compare with), comparison opens in Synchronization panel instead of Compare window panel.
I am unable to understand git synchronization and thus not able to compare my branches.
I don't want git synchronization window panel. I need a git compare tree panel.
Please Help
The synchronization (since Egit 3.1) is for the difference between the working tree (including not committed changes) and a branch or tag.
As mentioned in "Compare editor and Synchronize View":
If you use any of the submenu actions of Compare With on a single file, a compare editor will be shown, otherwise (since EGit 3.1) the Synchronize View will be opened that lets you browse the changes;
by double-clicking on a changed file in this view, a compare editor will be opened for this file.
In the toolbar of the Synchronize View you can select the Sychronize Model you want to use for presenting the changes you are inspecting.
To get only a compare view, you can also follow the section "Compare working tree with last commit":
The difference between a resource in the current working directory and in the last commit in the current branch can be viewed from the context menu Compare With > HEAD revision.
This feature is also available in the Commit dialog.
Double clicking on an entry in the Commit dialog opens a compare dialog.
I would like to save actually open files (tabs) and revert session (group of files) next time. Is there any options in NetBeans IDE 7.1.2? I know that NetBeans save automatically list of files that were opened when I quit the IDE. How to save opened files and switch between sessions?
You are looking for Project Groups. Take a look at the File > Project Group menu.
There you can create Project Groups that defines a list of opened projects. You can then switch from groups and the chosen projects will be opened/closed.
Netbeans saves the list of opened files per project so:
if your groups do not share projects, you'll get the behaviour you want.
if your groups share projects, the files opened in theses projects will follow you when switching between the groups.
<3 Netbeans
Try Tab Groups.
In Netbeans (at least in version 7.3.1), click:
Window > Configure Window > New Document Tab Group
Now, open a new file and it should open in a separate window.
Then, you can toggle the Maximize Window / Restore Window buttons to switch between your windows / tab groups.
Restore Window Button
Maximize Window Button
This is a convenient way to switch between sets of files, although you technically aren't saving these sets as you asked in your question. It does remember these tab groups when you close and reopen Netbeans, though.