I am currently working on VS Code with GitHub Copilot.
But when I have a suggestion:
And I press "Tab" to accept the suggestion, Vs Code adds a tab in the code:
Someone know how to resolve this ?
Explanation
In fact VS Code has a prioritization for the same shortcuts.
A custom shortcut is more prioritized than a default shortcut.
If you have a shortcut for your tab key in your VS Code, that can disorganize the prioritization of the default shortcut.
Solution
I don't find a solution to give a prioritization for a shortcut, so I set the default for all shortcuts using the tab key:
Note: is important to click on "Reset keybinding" to take the default prioritization.
Other solution
It's probably possible that VS Code gives a prioritization with the date of the last update of your shortcut. But I don't try this solution because you need to update all the shortcuts and we have several shortcuts for tab key.
Related
I would like to change the keyboard shortcut for quick fix in Visual Studio 2013, so that it matches the ReSharper equivalent (which I only use on my office machine). How can I do it?
One way to do it is to enter on the menu 'Tools', 'Customize' and click on the 'Keyboard...' button near the 'Close' button.
Inside this option you can search for the commands by name (I couldn't find the Quick Fix here), maybe you want the Edit.FormatDocument one, that makes the indentation for the documents automatically.
If you can't find this option, tell me your quick fix actual keyboard shortcut, so I'll be able to check which function it calls.
I did some research on the R# QuickFix option and maybe what you want is this is the option you want: View.ShowSmartTag.
Look at this doc: Identify and customize keyboard shortcuts in Visual Studio
Background
I was using the keyboard without paying much attention. Then I triggered something, then my selected code top:0 becomes <top:0></top:0> I think this is useful for me but I don't know what key (was a 3-key-combo) I have pressed.
Question
How to see action history like in Microsoft Office Word/Powerpint/Excel?
I did ...
Look up in user-defined key bindings.
Searched possible extension settings.
Searched VScode official documents.
You can do that just by pressing tab or enter after typing what you want. What that key does is it selects the first available suggested action, and in this case it is the emmet abbreviation of "create HTML tag". You can see more information in the visual studio code documentation here and the official emmet documentation here
Also for your information, you can press Ctrl + Shift + P and then type Developer: Toggle Keyboard Shortcuts Troubleshooting. This will open your console and it will announce every key you press, the thing is this does not have any history of whatever you did prior to opening it so there is no way to view history.
I want to cycle through this menu with keyboard but not using Up/Down arrow keys. But I can't find any information on the internet.
After more research, an acceptable solution would be replace the native quick fix menu with keyboard-quickfix extension, and set keybindings for the extension.
I used to able to comment or uncomment multiple lines of code by pressing ctrl+/
# x = 10
# print(x)
But now I press ctrl+/, it becomes the following:
...
I tried to search for solution online, and I believe it is because the Windows shortcut somehow overwrite the shortcut in VS code. But I cannot find a solution.
I tried:
1.Reset the shortcut
2.Reinstall VS code
They don't work. Any help is appreciated.
First of all see which keyboard layout you are using on your System. Change the Keyboard layout to US-Keyboard if US keyboard is not selected.
If it is US keyboard then,
The shortcut key might have changed.
You can edit your preferences on VS code.
Goto File > Preferences > Keyboard Shortcuts
Search for Toggle Line Comments.
Click on edit icon and press your desired shortcut key
It could also be caused due to the same key bindings for shortcuts.The Keyboard Shortcuts editor has a context menu command Show Same Keybindings, which will filter the keybindings based on a keyboard shortcut to display conflicts. To view same key bindings follow the above steps till Step 3.
Now right click on the Toggle Line commands and click Show same key bindings.
It depends on what language you are programming.
But if you want to type # character you can hold down shift key and press number 3 on your keyboard.
I encounter this problem before. You should press shift key to switch back to type English and try again.
I am using VS Code with the excellent vscodevim extension. When I navigate to a code that has a Quick Action available I can ctrl + . to activate the drop down context menu.
Is there a way to select toggle through the list of available items using the keyboard - other then the arrows keys. As a point of information, within Visual Studio it is possible using tab, this does not work in VS Code.
Why? 'cause I love my MS ARC keyboard but I hate the rocker arrow keys.
This is a known issue for linux users using vscode with advanced shortcuts like vim extension in your case, for some reason quick fix contextual menu is unattached from vscode shortcuts which makes shortcuts not work. A really easy workaround to use with a graphical interface is HotKey.
HotKey > https://github.com/autokey/autokey for Linux and create your own shortcut.