Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command to toggle docstring in VSCode

What command do I have to use in VSCode to toggle the docstring?

I have searched in settings for docstring, help but nothing that makes sense shows up.

like image 823
user3139545 Avatar asked Mar 28 '18 13:03

user3139545


People also ask

How do you use toggle in VS Code?

Usage. Set your cursor on a word or select a word and press the associated keybinding (Ctrl+r by default on macOS, Alt+r on Windows and Linux). You can also use the VS Code Command Palette and choose the Toggle command, or use the Toggle action in a context menu.

What is Ctrl D in VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.

What is Ctrl P in VS Code?

Quick file navigation# Tip: You can open any file by its name when you type Ctrl+P (Quick Open). The Explorer is great for navigating between files when you are exploring a project. However, when you are working on a task, you will find yourself quickly jumping between the same set of files.


2 Answers

I guess you want parameter suggestions for a method or function. Shortcut for mac is: cmd + Shift + Space.

See other question: Is there a "quick documentation" shortcut for VS code?

For all shortcuts press: cmd + k, cmd + r.

like image 121
Johnny M Avatar answered Oct 18 '22 18:10

Johnny M


You can hit Ctrl + K Ctrl + I. This will execute the editor.action.showHover command and will display the same text that is displayed when you hover over for example a function. Unfortunately there seems to be no corresponding editor.action.hideHover command (I searched the keybindings.json). But it should be possible to hide the text again by pressing the Esc key.

like image 40
HaaLeo Avatar answered Oct 18 '22 20:10

HaaLeo