How can i switch windows in vscode quickly - visual-studio-code

I just find it is very hard to switch windows.Is there any tool or key-Binding ?
I already find some material on vscode site.

Each window has his own shortcut key, you cant use to switch windows using only one key. You can use their predefined keys to switch between windows.
Probably the most common are:
switching to the sidebar Ctrl + b
Selecting files in sidebar Ctrl + Shift + e
switch to terminal Ctrl + `
Opening the folder Ctrl + K O
Switching to files Ctrl + 1 for first file Ctrl + 2 for second and so on
You can find this link here for complete keybinding for VS Code

Related

Keyboard shortcuts for Copy/Paste disabled when using vim extension

I am using VisualStudioCode with the extension VsCodeVim Version 1.10.2.
Ctrl + v is mapped to select region and I don't know what Ctrl + c does. It does not change the copy buffer, because when I paste into another application, it pastes the ??previous?? clipboard contents.
I was able to copy/paste with the Edit-Menu and Right-Click menu. So my question is:
How can the keyboard shortcuts for copy/paste be accessed/enabled?
Adding the following lines to your settings.json disables the handling of Ctrl + C, Ctrl + V and Ctrl + X by VsCodeVim.
"vim.handleKeys": {
"<C-c>": false,
"<C-v>": false,
"<C-x>": false,
},
Without these lines Ctrl + C works for me when selecting words via 'VISUAL' mode. I can now use Ctrl + V to paste the clipboard into any other editor. Or I can use Ctrl + Shift + V to paste into VsCode Editor without entering 'INSERT' mode.
But when in 'INSERT' mode Ctrl + C will not work, since Ctrl + C will normally abort any commands. Ctrl + V on the other Hand works as usual.
Note: I tested this with Visual Studio Code Version 1.38.1 and VsCodeVim Version 1.10.2
You have to be in INSERT mode, for Ctrl-Shift-v to paste.
From normal mode, Ctrl-v enters block visual mode, if you want char or line visual mode you use v and Shift-v respectively... Then presumably copy and cut with Ctrl-Shift-(c/x) would work.
Alternatively you can try this suggestion.

Open already opened file in a different editor group in Visual Studio Code

What I am looking for is a way to do the following in Visual Studio Code:
Go to Definition on a symbol (which often opens a new file in the same editor group)
Open this newly opened file in a editor group next to current
... and switch back to the original file
Is there a command / key binding that would let me do 2nd bullet item?
Short Answer
Ctrl + Alt + → does that on Windows.
Details
This is my normal flow:
F12 to go to a symbol definition.
Ctrl + Alt + → to open the file on the right.
On Linux or iOS
Find the equivalent shortcut by opening File > Preferences > Keyboard Shortcuts (or running Open Keyboard Shortcuts in the command palette), and searching for these two commands:
workbench.action.moveEditorToNextGroup
workbench.action.moveEditorToPreviousGroup
If you are here, like me, looking for a way to open files in the next group, by Ctrl + Click.
Then adding Alt to the combination may do the trick. My VSCode version is 1.60.
!IMPORTANT: The new tab opened via Ctrl + Alt + Click, will always be to the right of the current. So, if you have already opened two groups, then move the tab to the left to have new tabs at the right, otherwise it will create third group.
in mac os you can use this key binding cmd + \
in windows you can use this key binding CTRL + \
I'm pretty sure what you're looking for is a combination of the answers above. I find this works:
Ctrl + \ View: Split Editor
Ctrl + Alt + → View: Move Editor into Next Group
Equivalently
(no default keybinding) View: Split Editor into Right Group
Caveat: if the file is already open in the other editor group, then it will be opened (not "cloned"). There may be a configuration setting to alter this behavior, but I couldn't find one quickly.
The result looks as follows. Suppose you are in some file on the left, and there is another editor group on the right (e.g. after executing Ctrl + \). After running the two commands above, then the currently open file will still be open on the left, but will also be open in the editor group on the right.
Tip: if you don't feel like assigning a keybinding, but would like to access the command (relatively) quickly, just type
Ctrl + Shift + P srg

Productive Eclipse Shorcuts

I currently use a variety of keyboard shortcuts in Eclipse such as:
Ctrl + Shift + R: Open Resources
Ctrl + F6: Switch Files in Editor
Ctrl + Q, ? To switch to desired window
Ctrl + Alt + R: To Restart My server
Ctrl + O: To view an outline of a class
F12: to go to the editor
What are some other productive shortcuts I may not be using?
Shift + Ctr + L
This opens the list of keyboard shortcuts ;-)
My favorite is quick access: Ctrl+3 and start typing anything you are looking for...
Here are my frequently used hot keys and I do think they improve my productivity very much
Alt+/ to use the code templates that are defined in the Windows→Preferences→Java→Editor→Template
Ctrl + Shift + R to find files of any type.
Ctrl + Shift + O to organize imports and import the missing imports automatically
Ctrl + Click on a variables / functions to go to its declaration
Ctrl + T on a method or class shows the whole inheritance tree, for example all methods which implement an interface.

Eclipse: how to switch between console window and editor?

I'm using Eclipse for Python and R development. How can I jump between editor tab and console window using a keyboard shortcut / hotkey?
Go view Console: Shift + Alt + Q + C
You can switch to Editor using Ctrl + F7.
Ctrl + Shift + L displays all the shortcuts in Eclipse.
I've found the following works:
Toggle between views: Ctrl + Shift + F7
Switch Editor: Ctrl + Shift + F6
Go to R Console (In StatET perspective): Ctrl + R, C
However, the first two are not a direct route back to the editor and require use of the arrow keys and Ctrl + 7 does not work for me. Any other ways to go directly back to the last editor used?
For RStudio:
Ctrl+1 : focus to source
Ctrl+2 : focus to console
More shortcuts are mentioned under the 'View' menu.

Eclipse - List of default keyboard shortcuts

Is there a list of the default Eclipse keyboard shortcuts? I'm generally looking for language agnostic things like starting the debugger or deleting an entire line in the source editor.
Rather than a full list of shortcut (JGlass mentions for Eclipse 4.6 this pdf), I prefer using only a few shortcuts:
CTRL+Shift+L: "Show Key Assist", List of shortcuts (depending on the context)
CTRL+3: Quick Access
Source: "Good features of Eclipse 3.6 (Eclipse Helios) JDT, 2011, from Sony Thomas"
Those two covers almost everything.
You can add two others:
CTRL+1: Quick Fix
ALT+Shift+F1: Plug-in Spy
Note that Eclipse 2019-09 now shows key bindings when command is invoked.
For presentations, screen casts and learning purposes, it is very helpful to show the corresponding key binding when a command is invoked.
When the command is invoked (via a key binding or menu interaction) the key binding, the command's name and description are shown on the screen.
Key binding of triggered command shown on screen
You can activate this in the Preferences dialog via the Show key binding when command is invoked check box on the General > Keys preference page.
To toggle this setting quickly the command 'Toggle Whether to Show Key Binding' can be used (e.g. via the quick access).
As VonC said you can get alist of short cuts with the following command.
Ctrl + Shift + L "Show Key Assist", List of shortcuts (depending on the context)
SHORTCUTS FOR DEVELOPMENT
But here are some which you will use often during your development.
Ctrl + Shift + P Switch between openning and closing braces.
Ctrl + Shift + R Open any file quickly without browsing for it in the Package Explorer. This shortcut opens a dialog box that accepts the name of the file you’re looking for.
Ctrl + Shift + T Open a type (e.g.: a class, an interface) without clicking through interminable list of packages. If what you want is a Java type, this shortcut will do the trick.
Ctrl + O Go directly to a member (method, variable) of a class file, especially when there are a lot of methods.
Ctrl + Shift + F Format code.
Ctrl + Shift + / Comment out XML or JSP code.
Ctrl + L Go to line number N in the source file.
Ctrl + E Show a list of open editors.
Ctrl + F6 Move between open editors.
Ctrl + 1 Quick Fix.
Ctrl + 3 Quick Access.
Ctrl + Q Go to the last edit location.
Ctrl + T Go to a supertype/subtype.
Ctrl + I Indent selected code block.
Ctrl + + Move to one problem (i.e.: error, warning) to the next (or previous) in a file.
F3 Go to a type declaration.Alternatively, you can hold Ctrl down and click (ie: Ctrl + Click) the hyperlinked variable.
SHORTCUTS FOR VARIABLE GENERATION
Ctrl + 2 + L Generate return value type and variable assignment
Alt + Shift + L Generate return value type and variable assignment. but here you can make selections.
SHORTCUTS FOR DEBUGGING
F8 Resume
CTRL + F8 Resume.
F5 Step Into
F6 Step Over
F7 Step Return
CTRL R Run to Line.
F11 R Debug
CTRL + SHIFT + B Toogle Break Point
You can find further shortcuts under :
Help → Help Contents → Java Development User Guide → Reference → Menus and Actions
Previous answer not quite correct as in Eclipse you can redefine keyword shortcuts (as I often do).
You can always access current list of defined shortcuts by pressing Ctrl + Shift + L in Eclipse (on Windows at least).
The full list of defaults in Eclipse 4.6 and earlier versions can be obtained from this GIT Hub page:
https://github.com/pellaton/eclipse-cheatsheet specifically https://github.com/pellaton/eclipse-cheatsheet/raw/master/eclipse4.6/eclipse-shortcuts-4.6.0.pdf