I was typing in Visual Studio Code and I slammed at a lot of keys and from that moment for some reason when I press ctrl + alt + n I get } and can't run my program with that keysbind anymore eveh tho it stil says over the run button that ctrl + alt + n is stil shortcut for it, can someone please help me reset that so i can run my program with ctrl + alt + n.
Have you looked here to see your existing shortcuts? The search box at the top is quite friendly:
File > Preferences > Keyboard shortcuts
Have you looked here to see the list of all commands, with their shortcuts (if any)?
View > Command Palette
Related
I'm using VS Code on Ubuntu and by default, shortcuts for copy and past in Terminal are Ctrl + Shift + C and Ctrl + Shift + V. Is there any way to change these combinations?
Thanks!
click the manage icon in the bottom left corner
then click keyboard shortcuts type terminal in the search bar
Can you anyone provide the shortcut for collapse all files in visual studio code explorer?
I personally prefer not to create new shortcuts. As #Mark pointed out on the answer of #JayChase there is an existing shortcut, but it requires the explorer to be in focus. Therefore I combine the shortcut mentioned by #JayChase with another standard shortcut, to get the desired behaviour.
command + 0 (focusses on explorer).
command + left-arrow
An additional benefit over this approach is that I usually want to focus on the explorer view if I want to collapse the folders.
Open the Keyboard Shortcut by pressing Ctrl + K then Ctrl + S and search for Collapse, you will see the Collapse Folders in Explorer key binding (It is empty by default). Press the + button to add your desired key binding.
Now you can enjoy your shortcut.
it's cmd/ctrl + shift + up-arrow
You can collapse all folders using cmd/ctrl left-arrow.
First, click anywhere in the explorer window to activate it, then use the shortcut.
On Windows and Linux.
Ctrl + Left arrow
On Mac:
⌘ + Left arrow
When the Explorer is active, you could use the Workbench list based shortcuts. list based shortcuts include collapse, collapse all, expand, expand all, toggle expand/collapse
To see what are the shortcuts open Keyboard Shorcuts -> Search for list. . Here you find shortcuts for collapse, collapse all, expand, expand all, toggle expand/collapse. These shortcuts work when the Explorer is active, as the Explorer works as a list.
Below is a screenshot for Mac.
If you would like to define a shortcut, without activating the Explorer, then I would recommend - cmd+k ctrl+c. You could add this by opening Keyboard Shorcuts -> Search for Collapse Folders in Explorer -> Click the edit button after hovering over the the Command you want to edit.
VS Code Version : 1.26.1 (1.26.1)
Mac version : 10.13.6
How to customize keyboard shortcuts in visual studio code?
For example I want to change Rename to Shift - F6 instead of F2
Go to menu Preferences -> Keyboard Shortcuts
Shortcut in windows its CTRL+k then CTRL+k
Shortcut in mac CMD+k then CMD+s
Search for the command that you are trying to customise short cut
Click on the edit button on the side(Pencil symbol)
Type your custom keyboard short cut and press Enter
Instructions for Windows:
Press Ctrl + K and then Ctrl + S and the Keyboard Shortcuts page will open.
Instructions for MacOS:
The corresponding shortcut is Cmd + K and then Cmd + S
Normally a new tab with title Keyboard Shortcuts will appear. You can modify any shortcut by pressing the edit icon left to the command name and assigning the desired shortcut.
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
Often when I'm working in Eclipse, I'll be in a perspective (say debug) and doing stuff there, then I want to maximize a file I'm looking at. I double-click it, and work on it, then double-click again to minimize back to the debug perspective.
Is there a hot-key to do this from the keyboard?
Ctrl + M will maximize/restore the editor area.
If you can't remember all shortcuts, then just learn Ctrl + Shift + L. That will show a list of available shortcuts.
Also: http://www.shortcutworld.com/en/win/Eclipse.html#link_11
Link http://www.vogella.com/tutorials/EclipseShortcuts/article.html
Link: Maximize code tab in eclipse shortcut