This question already has answers here:
How to trigger documentation popup in vscode
(7 answers)
Closed 2 years ago.
In some IDEs, Intellij IDEA for example, pressing control + j will display the docstring like this question. How do I get similar functionality for VS code?
The best I've found is cmd + shift + space for mac
Settings
This three settings in the picture will help.
Click to thing that you want to its documentation with mouse
Use keybinding that given below
Show Hover
Definition Preview Hover
Ctrl+K + control+I might work. You can change to your favorite hotkey combination by change setting in Keyboard Shortcuts (Ctrl+K + control+S)
There are 2 ways in Visual Studio Code (version 1.34.0) to show quick documentation:
short version -> mouse hover elements which you want to lookup
long version -> after short version appears, press 'ctrl' key twice (if you press 'ctrl' key once, the long version documentation appears as long as you hold the 'ctrl' key)
The VSCode shortcuts Command is Show Hover, just change it to ^ j or whatever and you are ready to go.
Don't forget to resolve the conflicting shortcuts if any.
Related
I used to be able to be able to Ctrl+F to search whatever was logged in VS Code. Now, for some unknown reason, the search bar doesn't show up when I type in Ctrl+F.
I am on version 1.57, which is the latest at this time.
This question if for the Debug Console which isn't the tab I am looking at.
Click anywhere inside the output panel, and then press Ctrl + F
I realized that the Vim extension is what is causing this. Ctrl+F is for scrolling and although previously Vim keyboard shortcuts didn't work in the output panel, they seem to have been extended to it recently see this issue I raised.
This tells me that I could use ⌃ + Space combination in order to display suggestions for my code. However, ctrl + Space ( ^ key is ctrl as far as I know) only seems to change the input language keyboard in my system. Nothing else seems to work.
Try Option + Escape, on mac.
The mac keyboard shortcut ctrl + space for switching input sources overrides the VSCode one. Because of this, VSCode added a new keybinding just for mac, Option + Escape
This is actually called intellisense, and the new keyboard shortcut was added in the November 2019 update.
You can disable the macOS shortcut in System Preferences → Keyboard → Shortcuts.
Alternatively you can set up a custom keybinding for this command in VS Code, so that it no longer conflicts with your system shortcut. Please refer to the official documentation.
Recently, ⌘I (i.e. command + i) is also a by default key binding for triggering suggestions.
On MacOS Ventura,
Go to System Settings
Select Keyboard on the Left panel
Select "Keyboard Shortcuts"
Select Input Sources and toggle the switch labelled "Select the previous input source".
Quit vscode and relaunch
I encountered an issue with toggle comment in visual studio code on Ubuntu. Default hot key was "ctrl+/", it didn't respond when I click on a line of code or highlighted the line of code. I changed the hot key to "ctrl+l" under preference -> Keyboard Shortcuts and it didn't respond too.
I tried to google this but nobody seems to encounter this issue or posted this question.
Is there something else I need to enable to make this work?
In my case it was due to the fact that VS Code 'didn't know' the language the file was written in. I was editing a .cmake file and VS Code does not 'understand' CMake syntax when installed out-of-the-box.
Installing a 'CMake' extension enabling CMake syntax highlight also enabled the 'Toggle Line Comment' [Ctrl+/] shortcut to work.
(I'm guessing without the specified language VS Code simply does not know which symbol to use to comment out the lines - e.g. '//' or '#' or else).
This the issue because in ctrl + /
/ -> is numpad divide
or
/-> simple / the key not present in numpad
so if you try any of these combinations one will definitely work, if u want to work with numpad one only you can go to
File-> Preferences -> Keyboard shortcuts (there search for toggle line comment and give your own shortcut)
For me, in VSCode has a error with ctrl + } and ctrl + shift + } 'cause is inversly and no show correctly the keys to hit.
You must redirect to Keyboard Shortcuts - Visual Studio Code, and search the shortcut "Comment", and hit:
blockComment: Insert ctrl + } when you hit ctrl + shift + }.
commentLine: Insert ctrl + shift + } when you hit ctrl + }.
The Shortcuts show like this
I hope that help for you.
That how I solved it. Open File/Preferences/Keyboard Shortcuts or type ctrl+K ctrl+S VSCode preferences. Then click {} button in the top-right corner. In the last version on Sep 16, 2019, it looks like a file with the arrow. Now you see keybindings.json, at the bottom there is a button Define keybindings - click and type in the form there "Ctrl+/" It will show you all commands with your combination. I found and commented the one from Emmet
` {
"key": "ctrl+/",
"command": "editor.emmet.action.toggleComment",
"when": "editorTextFocus && !editorReadonly"
},`
There was a conflict.
I had the same problem and I didn' found the answer in the internet, but eventually I found it on my own.
My system is Linux Mint and my computer is a Thinkpad 440p with an brazilian Portuguese keyboard. This keyboard doesn't have a Right Control key, and then key usually associated with it is used for slash (/) and interrogation mark if pressed with shift. Mint has a good driver for it, mapping it to the correct symbol. I have never had issue with any other code editor or software.
However VSCode by default bypass this keymap done by the system and uses raw code com from keyboard hardware. This can be changed in setting, keyboard dispatch. I change it from "code" to "keymap" and then it worked like a charm.
I was looking at default keybindings but didn't find it.
Is it even possible by default to toggle between opened tabs in VS Code?
If no, maybe you know extension for doing so?
Thanks!
On a Mac, ctrl-tab does exactly what you're asking for. I'm not sure what the equivalent is for Windows or Linux.
In windows CTRL+PgUp to previous tab and CTRL+PgDown to next tab.
When using Visual Studio Code on Linux/Windows, you can use CTRL + PAGE_UP to switch to the previous tab, and CTRL + PAGE_DN to switch to the next tab. You also have the ability to switch to tabs based on their (non-zero relative) index. You can do so, by pressing and holding ALT , followed by a number (1 through 9).
For more details: check here
This question already has answers here:
showing in popup window method implementation in intellij
(2 answers)
Closed 5 years ago.
enter image description hereenter image description here
In eclipse , you can view origin code pressing SHIFT; but in IDEA, I must press CTRL + MOUSE DOWN to another page to look it. Can IDEA like Eclipse?
In IntelliJ, it called Quick Definition. It is bound to Alt+Space or Cmd+Y in my environment, however, it would be different depending on keymap.
Open your Preferences dialog > Keymap and find quick definition in the right pane of the dialog. You will be able to see the key binding for that.