How to close an open window of eclipse - eclipse

I have opened another window in eclipse by mistake using Window->New Window...
I don't find where to close it.
do you know how?
EDIT:
I am using linux FVWM so I don't have the close button.
Thanks.

By default it has a Close button mark with [X] at top. By clicking on it or pressing ALT + F4 you can close it Or you can also exit it from File menu. File-->Exit. But this option will exit all the windows of eclipse means all eclipse instance will be closed. So better if you go with First option.
Hope this helps.
Edit:
To close a window you could use somthing like this in linux fvmw:
AddToFunc close_window
+ I ThisWindow ($0) Close
Key F11 W SCM close_window
This would close the current focused window when you hit ALT-CTRL-SHIFT-F11.
Also take a look at this: Window options in FVWM

Two routes I know of :
- (CTRL + F6) to list all open windows and navigate between them
- Select the 'offender'
- (CTRL + F4) to close it.
or
- (CTRL + SHIFT + F4) to close all the windows

I use awesome-wm, and i have the same problem. I solve it using the shortcut to close current window. On awesome-wm it's Mod4-Shift-c.
Hope that help.

Related

How to close the search toggle for vscode?

This is an extremely stupid question... but how do I close/toggle the search box in vscode?
I hit [ cmd + shift + f ] to do a global search, but then I need to reach for my mouse to actually close the box to allow for more screen space.
I've searched through their issues, and there seems to be another user in the past who also experienced something similar --> https://github.com/Microsoft/vscode/issues/32613 , but the solution provided of cmd - b only works for closing the sidebar.
My developer speed has drastically dropped since this issue, and I'm certain there's been a fix.
Please help. :(
**added in picture here -->
Press CTRL + SHIFT + E. It will switch to and focus the explorer.
Your search results are appearing in the panel, not the sidebar.
To toggle the panel:
pc/mac: ctrl + ` (backtick)
mac: ⌘ + J
However, if you want your search results to appear in the sidebar (which I think is the default behavior), then add this line to your settings:
"search.location": "sidebar"
Similar to what Vijey has mentioned, you can use the Toggle Panel keyboard shortcut which will do the job for me. On A mac the shortcut is
⌘ Command+J
I'm coming from sublime where the search results appear in a new tab - making it much easier to close the results (just like closing an other tab)
The best way to get rid of the search panel is by doing the following: -
On a windows computer, press and hold CTRL + Q
A window will then pop up, you can then release Q when the window pops up but you still have to hold down the CTRL key to keep the pop up open
3.Now use your mouse to click on the option called explorer and the search menu is now gone
There is no keyboard shortcut to close the search panel. However, you can create a shortcut yourself as shown in the attached image.
1) Go to File > Preferences > Keyboard Shortcuts.
2) Search for the command 'Close Panel' and set it to your convenient keyboard shortcut.
In the image below, I set it to Ctrl+F8.
If the search box displays in the sidebar (see Amr Noman's answer on how to set that up if it isn't already), How do you close the search box and go back to your project folders? In this case, there is no tab you can close with a click of the mouse. One way is to set up a keymap shortcut, e.g.
{
"key": "cmd+'",
"command": "workbench.files.action.showActiveFileInExplorer"
},
You can figure this out by going to Preferences -> Keyboard Shortcuts and searching for sidebar. One of the hits is described as "File: Reveal Active File in Side Bar"
More generally, any action that hides your project folder view in the sidebar can be cancelled by this shortcut.

Go to definition and back to reference in Visual Studio Code

I'm currently using VSCode and am trying to use the F12 shortcut which takes me to a definition of an object/function. When I want to go back to the reference, I can't seem to find the right way to do it. With VS community I used Shift + F12.
I've try different combinations, such as Alt + F12 or Shift + F12 but all I get is a peek definition of the element which is not useful at all; it's just a popup showing the same element in the same file I'm at. I've seen answers to this question but pertaining to VS 2010 which are no longer applicable or doesn't work with VSCode.
Question: What is the shortcut to Go Back once you've used F12 to Go to the definition?
For macOS it is ⌃- (Ctrl + -) by default. And for Windows: (Alt + LeftArrow)
According to the vscode keyboard shortcuts documentation page, the navigateBack action defaults to Ctrl+Alt+-.
In my keybindings.json file, I've rebound it to ctrl+- using:
{ "key": "ctrl+-", "command": "workbench.action.navigateBack" }
You can open the Keyboard Shortcuts to find the shortcuts.
Preferences > Keyboard Shortcuts
Search for Go, and it’ll show the Go Back and Go Forward shortcuts.
In macOS:
Go Back: ⌃- (Ctrl+-)
Go Forward: ⌃⇧- (Ctrl+shift+-)
[
{
"command": "workbench.action.navigateBack",
"key": "ctrl+-"
},
{
"command": "workbench.action.navigateForward",
"key": "ctrl+shift+-"
}
]
Shift + F12 should be working for you. There is a box on the right of the peek view which lists all the references. You are seeing the peek view to the reference you went to (the definition) but on the right are more. That boundary between the two can be dragged left and right so perhaps yours is not visible - trying dragging the peek view box right boundary to the left after you hit Shift+F12. Do you see a list of references there? Double-clicking the one you started from originally will take you back to it.
Edit:
v1.29 added some nice functionality for listing the references in the sidebar. See references view.
List All References in the context menu or Shift+Alt+F12
Results are stable and individual results can be cleared, which is great if you use the view as a To Do list. You can use F4 and Shift+F4 to navigate through results without taking your hands off the keyboard.
ALT + Left Arrow and ALT + Right Arrow worked for me. VS code listed all shortcuts in pdf keyboard-shortcuts-windows.pdf.
To see all keyboard shortcuts go to menu bar Help->Keyboard Shortcuts Reference. It will open pdf that contains all shortcuts.
Alt + Left arrow worked for me or Go menu and then Back.
Try goto-symbol-stack.
This extension implements a stack tracking the positions only when the goto-definition is triggered by Alt+], and allows the user go back to the reference using Alt+[. No annoying cursor movement in the stock navigation(Alt+←).
For those using the VSCodeVim extension, it would be Ctrl + o and Ctrl + i
An alternative approach is to use the Ctrl+Alt+Click shortcut, which will open the definition in a new pane to the right. This can then be closed with the usual Ctrl+F4 key combination.
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
ref
1.Go Definition - F12 or Right click and Click Go to Definition Option
2.Back to Reference - Alt + Left Arrow
Go to definition F12
Back to declaration Ctrl + F12
Next : Ctrl + F12
Back : Alt + LeftRow (<--)
For Windows is working.
I have a similar problem. Fix it by installing this JDK 8 to VSCode
In Version: 1.62.3 under Ubuntu:
it's just F12 again
it's bound to both:
Go to Definition
and
goToNextReference

how to jump from editor to explorer window in eclipse(shortcut key)

is there any shortcut key to jump from writing editor to explorer window or console ?
see the photo suppose I am writing code and I want to move project explorer window with out mouse use.so is there any shortcut key for that ?
Yes I got the answer
ctrl + shift + f7 or ctl+f7
To find all the shortcuts in Eclipse; Window - preferences: General - keys
Then you might want to look into the plugin Mousefeed, it will tell you if the action you performed with the mouse has a keyboard shortcuts. It will not help with switching views thought

How to clear console history

It's possible to browse the commands previously run in the console by pressing the up and down arrow keys. I want to clear this history. How can I do this?
You can now just right click on the console area and select "Clear console history".
If you want to clear the list of last typed commands, follow these steps:
(Step 1 and 2 are important, don't skip them!)
Undock the console (click on the icon in the bottom-left corner, ).
(if you don't see , but , then hold the mouse pressed for a few seconds to get the desired icon)
Press Ctrl + Shift + J to open the console for this console. (On OSX use Cmd + Option + i)
Go to the Resources tab, "Local Storage", chrome-devtools://devtools.
Right-click on the item with key "consoleHistory", and choose "Delete".
Done! You may close the new console, and then dock the previous one if wanted. The console history will be gone when you reload the console.
If you just want to clear the console log (not the commands), just press Ctrl + L.
You could also use Incognito mode if you don't want to keep the list of commands you're going to type.
I found a quick way to do this with cool keyboard shortcut:
Inside chrome console
Press Ctrl + Shift + P
You will see this awesome command palette opened:
type clear and you will find it :)
That's it!
If you don't want to have this console history (like myself), simply disable it from the devtool's configuration options (see on the image) below ...
This is very simple, just right click the console window and select Clear console history, then refresh the page.
Please note, refreshing/reloading that tab is required.
Simply enter clear() in the chrome console to remove all previous text there.
I ended up here looking for how to do the same thing in Firefox.
In case anyone else does the same, there is a clearHistory command in the Firefox console which will do just that.
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/The_command_line_interpreter#Helper_commands
You can do that now easily with
cmd + shift + p
Type "clear"
Choose Clear console history
It can also be fixed by going to the developer tool settings and resetting to defaults.. (this will not reset 'Chrome', only developer tools options)
Open Chrome devtools
Go to settings (or press Windows ->F1 / OS X -> FN + F1)
Reset to the defaults
This way you will lose your developer settings, but for me the only thing that mattered was turning cache off again..
These shortcuts Clear Console.
⌘ K or
Ctrl L

Switching between side by side text windows in Eclipse

I have an eclipse window with two tabs open side by side so that I can see the text of both files simultaneously. Is there a keyboard shortcut that allows me to switch which window I am editing?
I usually use Ctrl + F6, it will pop-up a small context menu were with all editors and windows, by default it switch you to the next editor in the list. And
Ctrl + Shift +F6 goes to the previous editor in the list.
It's not exactly what you asked for, but i cannot found simple shortcut for switching windows. You can read this article for more info
You can also create your own perspectives (Window --> Save Perspective As...) and easily switch between them:
Ctrl + F8 Next perspective
Ctrl + Shift + F8 Previous perspective