How do you close a tab in Dr Racket - racket

I keep accidently hitting ctrl-t in Doctor Racket, and then when it opens a new tab, the only way I know how to get rid of the unwanted new tab is by closing everything and reopening the files I want to edit.
Is there a better way?

While the tab you want to close is active, you can either select "File -> Close" in the menu or use the keyboard shortcut Ctrl+W to close it.

Yes. In the file menu you have the option called "Close" It will only close the active window so if there are more tabs only the active one will be closed.
You can do the shortcut instead, which is CTRL+w for a Windows or Linux system while its CMD+w on MacOS. If you see in the menu there are hints on these shortcuts.

Related

See unsaved changes in vscode

Sometimes when closing vscode, or a tab therein, I get a dialogue asking "Do you want to save the changes you made to filename?" However, the unsaved edits are actually from a previous session that was closed without such a query, probably when turning off the computer, so I can't remember if it was meaningful edits, or maybe just an accidental key-press, like a shortcut gone wrong; and doing undo to revisit the last edits doesn't work either.
My question: How can I see the diff between the saved version of a file, and the version in the editor window? I think it would be nicest just to have a "show diff" option in the dialogue, but for now I'm also happy with a command line diff command.
I'm using ubuntu 20.04.
I'm using VSCode version 1.52.1 on MacOS and I had a similar problem that may not be the same problem, but I'm guessing it will work for you as well.
When you're in the Explorer view, in the upper left part of Explorer you have your "Open Editors." If that shows a dot to the left indicating that the buffer has changes in it, you can right click the file name and select "Compare with Saved." This will open another buffer to the side that will show you any unsaved changes.
To get rid of that window (it took me a bit to figure this out I'm sorry to say!), you can click the 'X' to the left of the extra buffer in "Open Editors."
Hope this works for you!
A few bright notes for the keyboard players out there:
The command you are asking about has a default shortcut. Unless you've applied a keyboard map extension, the Ctrl+Kd arpeggio opens the very same diff view between the active and saved versions of the current file. The default shortcut to close an editor tab (be it the diff or a file or anything at all) is Ctrl+W.
The command, like any command in VSCode, is also accessible via the Ctrl+Shift+P command dropdown (on Linux, F1 opens it too). Start typing e.g. compa sav (it saves your keyboard wear and tear to shorten words to a prefix which is unambiguous enough), and the list will shrink dynamically to just a few commands. Yours is File: Compare Active File with Saved. When it's close to the top enough, navigate the list of commands with the down arrow and execute it with Enter. As a bonus, you may click on the little gear to the right of the command currently highlighted in the list and redefine its shortcut, if you use it very often and prefer a chord shortcut to the default arpeggio one. Sorry, there does not seem to be a shortcut in lieu of the gear click. If there is, please let me know!
But if you really, really want to right-click on the filename in the Open Editors view of the Explorer sidebar, you can open that view directly with, you guessed it, a shortcut: Ctrl+Ke. And if you change your mind on a dime right at this moment, or realize that you in fact never had a mouse to do the right-click in the first place, use Shift+F10 to drop down the "right-click menu", properly called the context menu, which you navigate with arrows and execute with Enter (that's kinda a common theme, as you probably noticed). This works mostly anywhere the right-click does.
While in the Open Editors view, to switch to an editor file tab, move the selection to the desired file. Press Space to bring the file into view but stay in the Open Editors view, or Enter to bring the file into view and shift the keyboard focus to it. Pressing Ctrl+Shift+E brings focus back to the editor from any view in the Explorer sidebar. The same shortcut moves focus to the Explorer sidebar from the editor.
Happy ♬ k'boarding ♬!
ctrl+shift+P (or command+shift+P on mac) and fuzzy search for "compare changes with saved files"

Is there a shortcut to close source tabs in the devtools debugger?

As pictured here, I'm wondering if there is a keyboard shortcut to close these tabs either one by one or in bulk
AltW or OptW (Mac) to close the active tab. See Sources panel keyboard shortcuts.
CtrlShiftP or ⌘ShiftP then type clo and it'll show you "Close All" command.
Right-click a tab name > select Close all.

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.

Keyboard shortcut to cycle between opened editors in vscode

What is the keyboard shortcut Ctrl+` actually meant to do?
According to https://code.visualstudio.com/Docs/customization/keybindings, you can use Ctrl+` to "Cycle Between Opened Editors".
Viewing the vscode Explorer, I can see that there are several "working files", but pressing Ctrl+` does nothing.
I miss being able to use the "standard" keyboard shortcuts Ctrl+W or Ctrl+F6.
(Note: I found that Ctrl+Tab does the job!)
Another problem with Ctrl+` is that the symbol is not easily accessible on, for example, a Norwegian keyboard layout. What am I missing here?
When you open multiple documents side by side (Ctrl+Click in file list), this shortcut lets you switch between them.

Eclipse: How to close multiple windows

Once you have a bunch (20+) source windows open in Eclipse is there way to close them with clicking all the close buttons on the tabs? It takes a long time and if you double click the middle button it maximises the window instead.
I guess worst case I'll learn to write a plugin that just closes them all, but ideally I want a little list box that I can easily close them in, like the buffer list in emacs or the window list in devstudio.
Right click one of the source tabs, then click "Close all". This is in Eclipse 3.4, don't know what version it was first available in.
Beside the "Close All" functionality kbrasee mentioned you can work with a "buffer list" using Window / Navigation / Switch to Editor (or Ctrl+Shift+E). In this dialog you can select multiple editors for saving / closing.
Maybe this is a little bit unrelated to your question but you can limit the number of open files by selecting "Window > Preferences > General > Editors > Number of opened editors before closing". If you set it to 8, opening the 9th file will close the file you visited most early.
For a fast and selective solution you can click with the mouse wheel (yes!) into the middle of a tab you want to close. You don't have to target the close X.
To close all your open files in Eclipse, simply goto File -> Close all
First if you use the right click mouse on the tabs you can choose either Close All or Close Others.
Second you can press Ctrl+Shift+W to close all the opened tabs.
An addition to what mentioned by others,
If the undesired tabs are related to a project, you can right click the project name and choose close project, all its taps will be closed