Undo closed tab in Eclipse? - eclipse

I was wondering if it were possible in Eclipse PDT to reopen a closed tab by mistake.
For example in Firefox I can do Ctrl + Shift + T.

Try Alt + ← that will go backward in history - if tab is closed it will reopen it.

Yes it's possible. Close a tab and hit the left yellow arrow in the Eclipse menu bar above.
You can adjust the keyboard shortcut for that in the eclipse preferences under General > Keys.
On Mac it's ⌘ + [

Navigating back through the edit history does work sometimes, but not if you close the tab without actually activating it. You can also try Alt + F to access the file menu then hit a number to access the appropriate file in the recent file list.

You may also find the Extended VMM Presentation plugin useful. Among others, it provides a list of the last several closed tabs.
Keep in mind that so far it does not seem to work with the new Eclipse Juno.

Related

VSCode Command Palette (Ctrl + Shift + P) keyboard shortcut isn't working on new installation

When I press Ctrl + Shift + P in VSCode (shortcut for "Command Palette") nothing happens.
Side note: I've just installed VSCode on my new PC (Windows 10,) so it's a fresh installation if that helps (it works on my laptop.) This is unsettling since I can actually see Ctrl + Shift + P listed in the bindings table.
It's important! Since for the most part I use this command to habitually open files.
Now I understand it can be possibly caused by some other software, perhaps -- I'm looking into that (will post what I find, if I ever get it to work.)
If I can't figure it out, I'm simply going to rewire it (at least for now) in key bindings but it's not really what I want to do.
Meanwhile, is there any classic cases that can jam Command Palette, specific to new installation?
This is an actual issue on GitHub There is a good chance it's caused by other software which may be something like:
Password keychains
Screen capture
OBS
(Check any similar software you might use I can almost guarantee that one of the other apps is intercepting it globally. You said it's a new installation, so you probably installed other apps.)
To see all shortcuts or rebind Ctrl + S, then K as per this edit keyboard shortcuts tutorial. Make sure Ctrl+Shift+P is on this list. Another issue that could cause this is your VSCode json settings file is read only or doesn't exist for some reason. A lot less likely, but still worth checking. Good luck with this.
Razer Cortex after the last update started to intercept Ctrl + Shift + P and other keybindings. I've turned it off and it helps, but you can try to change those keybindings in the Cortex settings if that's what causing the problem in your case.
it would be "ctrl + k + s" to see the command list, and yes F1 is the alternative to "Ctrl+shift+P" I also have Razer mouse and it seems to conflict.
For Mac Users
In Mac had the same problem and realized that it occures after triggering Git Lense extention. A quick inspection on key bindings and disabling the non-default binding there solved the problem.
For me, TickTick on the Mac had overtaken the Command+Shift+P. I disabled it in TickTick -> More -> Hotkeys and removing the global shortcut.
A more general way to remove conflicting shortcuts on MacOS:
choose Apple menu > System settings, then click Keyboard in the sidebar. (You may need to scroll down.)
Click Keyboard Shortcuts on the right. A warning icon appears next to conflicting keyboard shortcuts. Double-click the shortcut, then change it.

PhpStorm - Full view on single file

I just started to use PhpStorm and wonder how I can enter full view for a single file?
In NetBeans I could just double click on the file:
...then the full view for that file was shown:
After double clicking on the file again, the normal view is shown again.
Is this also possible in JetBrains PhpStorm?
This is not currently possible.
https://youtrack.jetbrains.com/issue/IDEA-82829 -- watch this ticket (star/vote/comment) to get notified on any progress.
(P.S. This IDEA-166351 looks the same .. so may be marked as duplicate of the first ticket at some point).
To be clear: hiding all tool windows is easy (double click on editor tab or Window | Active Tool Window | Hide All Windows -- Ctrl + Shift + F12 using Default keymap) -- it's "Maximize current editor tab and hide all other tabs" what is missing (absent feature).
Yes, also on JetBrains IDEs (PhpStorm, WebStorm, etc.) is possible to double click on an editor tab to hide the rest of toolbars and sections and get a full clear view of the editor; then if you double click again on the editor tab, you can return to your previous IDE disposition.
Also you can use Ctrl + Shift + F12 combination to hide/show all tool windows. (see here: https://www.jetbrains.com/help/phpstorm/2016.3/manipulating-the-tool-windows.html#d883741e144)

How can I navigate back to the last cursor position in Visual Studio Code?

What is the keyboard shortcut to navigate back to the last cursor position in Visual Studio Code?
The keyboard shortcut commands are Go Forward and Go Back.
On Windows:
Alt + ← ... navigate back
Alt + → ... navigate forward
On Mac:
Ctrl + - ... navigate back
Ctrl + Shift + - ... navigate forward
On Ubuntu Linux:
Ctrl + Alt + - ... navigate back
Ctrl + Shift + - ... navigate forward
I am on Mac OS X, so I can't answer for Windows users:
I added a custom keymap entry and set it to Ctrl + ← + Ctrl + →, while the original default is Ctrl + - and Ctrl + Shift + - (which translates to Ctrl + ß and Ctrl + Shift+ß on my German keyboard).
One can simply modify it in the user keymap settings:
{ "key": "ctrl+left", "command": "workbench.action.navigateBack" },
{ "key": "ctrl+right", "command": "workbench.action.navigateForward" }
For the accepted answer I actually wonder :) Alt + ← / Alt + → jumps wordwise for me (which is kind of standard in all editors). Did they really do this mapping for the Windows version?
This will be different for each OS, based on the information in Key Bindings for Visual Studio Code.
Workbench configuration:
Go Back: workbench.action.navigateBack
Go Forward: workbench.action.navigateForward
Linux:
Go Back: Ctrl+Alt+-
Go Forward: Ctrl+Shift+-
Mac OS X:
Go Back: Ctrl + -
Go Forward: Ctrl + Shift (⇧) + -
Windows:
Go Back: Alt + ⬅️
Go Forward: Alt + ➡️
To answer for your question, for:
Windows use Alt+← for backward, and Alt+→ for forward navigation.
macOS use Ctrl+- for backward, and Ctrl+Shift+- for forward navigation.
Linux use Ctrl+Alt+- for backward, and Ctrl+Shift+- for forward navigation.
You can find the current key-bindings in "Keyboard Shortcuts editor."
You can even edit the key-binding as per your preference.
There is an extension available named Code-Navigation for all the platforms. As an alternative to the keyboard shortcuts it adds buttons to the left side of the status bar.
To set your own keyboard shortcuts (even if that particular keyboard-combo is already taken) you can go to Code > Preferences > Keyboard Shortcuts and set them up there.
Open Settings: Code > Preferences > Keyboard Shortcuts
Find Go Forward and Go Back and set them to whatever you like.
If a key shortcut is double-assigned VSCode will tell you, and you can click-in and change/remove the other ones. eg. by shortcuts were already assigned to indent-in and indent-out.
eg. our main tool is Android Studio on a mac which uses cmd+[ and cmd+] for forward and backward). This is especially powerful with a cmd+click for drilling into functions. (so you can follow your code as if it was an Ariadne's thread in a Minotaur labyrinth. Does help! ( so you jump around the code, diving in and out of functions, and back between files.
For macOS:
⌘ + U: Undo the last cursor operation
You can also try Ctrl + -.
BTW, all the shortcuts are in Keyboard shortcuts for macOS. This is really useful!
Use Alt + ← / →
You can find all shortcuts in Key Bindings for Visual Studio Code.
Mac OS (MacBook Pro):
Back: Ctrl(control) + - (hyphen)
Back forward: Ctrl + Shift + - (hyphen)
As an alternative to the keyboard shortcuts, there is an extension named "Back and Forward buttons" that adds the forward and back buttons to the status bar.
vscode v1.65 is adding a number of new commands for navigating to the last/next edit location or the last/next cursor location.
An edit location means there was an actual edit, whereas a cursor location means that you visited that location but may not necessarily have made an edit there.
By default, editor navigation locations are added whenever you
navigate across editors but also when navigating within editors (for
example, when switching notebook cells or changing selection in text
editors). If you feel that too many locations are being recorded, new
commands have been added that reduce locations to either:
Navigation locations (for example when using Go to Definition)
Edit locations (whenever an editor is changed, for example when typing in a text editor)
from https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_65.md
Cursor locations:
Go Forward in Navigation Locations
"workbench.action.navigateForwardInNavigationLocations"
Go Back in Navigation Locations
"workbench.action.navigateBackInNavigationLocations"
Go to Last Navigation Location
// acts like a toggle between current and last cursor location
"workbench.action.navigateToLastNavigationLocation"
Go Previous in Navigation Locations
"workbench.action.navigatePreviousInNavigationLocations"
Edit locations:
Go Forward in Edit Locations
"workbench.action.navigateForwardInEditLocations"
Go Back in Edit Locations
"workbench.action.navigateBackInEditLocations"
Go Previous in Edit Locations
"workbench.action.navigatePreviousInEditLocations"
Go to Last Edit Location
// acts like a toggle between current and last edit location
"workbench.action.navigateToLastEditLocation"
Associated context keys have been added to make assigning keybindings
more powerful:
canNavigateBackInNavigationLocations: Whether it is possible to go back in navigation locations
canNavigateForwardInNavigationLocations: Whether it is possible to go forward in navigation locations
canNavigateToLastNavigationLocation: Whether it is possible to go to the last navigation location
canNavigateBackInEditLocations: Whether it is possible to go back in edit locations
canNavigateForwardInEditLocations: Whether it is possible to go forward in edit locations
canNavigateToLastEditLocation: Whether it is possible to go to the last edit location
You can go to menu File → Preferences → Keyboard Shortcuts. Once you are there, you can search for navigate. Then, you will see all shortcuts set for your Visual Studio Code environment related to navigation. In my case, it was only Alt + - to get my cursor back.
While the accepted answer is correct, anyone using the Vim extension for VS Code may be frustrated by the fact that navigating backwards takes you through every single cursor movement you've made. This prevents "Go back" from working well for use cases like:
Go to Definition
Poke around at the definition for a while (i.e., move the cursor around)
Go Back to where you were in step 1.
With the Vim extension installed, you'll be stuck doing "Go Back" for every cursor movement you've made (and for me, that's enough to make it almost useless!).
Fortunately, the Vim extension implements jumplists well, so after using VS Code to jump to a new position (i.e., "Go to definition"), you can simply do CTRL+O to go back to the previous jump location.
Last Edit Position v. Last Navigation Position
Go To Last Edit Position:
Ctrl+k Ctrl+q
This was mentioned in sudormfbin's comment but not listed as an answer. This is what I want to do 99% of the time when I think "where was I now?". It is the easiest quickest way to get back to your last position without taking your fingers off keyboard to use the arrow keys and without installing extensions, etc.
Navigate Recent Cursor Positions:
ALT+ ← Back
ALT+→ Forward
Most of the other posted solutions refer to this - moving between "Navigation Locations", i.e., navigating between editor tabs OR within an editor (e.g., you move the cursor on one line, then click on a line 20 spaces above).
For navigating between editor tabs, instead of the above you can do Ctrl+Tab as it will sort all of the tabs in most recent order so you have option to go to others or just release and go back to the last used one. Also without taking fingers off keyboard.
With Visual Studio Code 1.43 (Q1 2020), those Alt+← / Alt+→, or Ctrl+- / Ctrl+Shift+- will also... preserve selection.
See issue 89699:
Benjamin Pasero (bpasero) adds:
going back/forward restores selections as they were.
Note that in order to get a history entry there needs to be at least 10 lines between the positions to consider the entry as new entry.
There are several ways to go back and options to go back in vs code.
To change any of the following things, go to command pannel by pressing ctrl + p and then after typing a >, type what config you need to change:
Then all you need to do is click on the Settings icon (as pointed by 2 in the image) and change the key binding to whatever you want.
Different options you have for going back:
Go to the Last Edit Location
Cursor Undo (meaning: go to last cursor location)
Cursor Redo (Opposite of above)

Missing tabs on netbeans

I'm using Netbeans IDE on daily basis and suddenly my Projects and Files tabs disappeared and I really don't know what to do, I've searched Google and I can't find any suitable and working solution to this problem.
Can someone help me please?
I'm using Netbeans 7.4 on Windows 7 if you need the information.
Thanks!
This is how my Netbeans looks right now, missing Projects and Files tab -
The solution in this case is really simple.
Since Netbeans 7.1 and up just click on the Window button on the upper bar and select the window you want, ex: Projects.
The window tab -
Alternatively you can click on CTRL + (A number from 1 to 7) and a tab with the selected information will be opened.
For example, clicking on CTRL + 1 will open your Projects Tab. Clicking on CTRL + 2 will open the Files Tab.
Enjoy and happy coding!
Click Window > Reset Windows will give you back the old state of all windows!

Is there a shortcut for switching between panels in eclipse?

Eclipse has an MDI structure (Multi Document Interface), so the search panel, the package explorer and the code editor can all be open in one window, but I haven't found a keyboard shortcut for switching between these panels. For example, after I search the code-base, I would love to have a quick shortcut for going back to the code editor.
If I understand your question correct, you are probably looking for Ctrl + F7 and Ctrl + Shift + F7. Other navigational shortcuts can be found in the menu: Window > Navigation.
Not an universal shortcut for going to any panel, but:
Ctrl+Shift+E
allows you to go back to any Editor (although it's still a little heavyweight for quick editor navigation).
And if you want to switch between perspectives its: Crtl + F8 and Ctrl + Shift + F8. You can go to Help > Key Assist... for a full list of shortcuts (this list will change depending on the active editor etc.).
There are two ways to do it.
One is how #VonC did it, in an earlier reply; using CTRL+SHIFT+E which opens a box containing all the panes with their paths.
The other one is to simply use CTRL+E, which will open a pop-up just over your cursor containing the list of panes open. Parse using arrows and ENTER