Is there a Visual Studio Code command for Developer: Reload Webviews? - visual-studio-code

Is there a VSC command that is related to Developer: Reload Webviews?

It is the workbench.action.webview.reloadWebviewAction command.
You can confirm this if you open the Command Palette, search for the Developer: Reload Webviews command and hit the gear icon at right. It will open the Keyboard Shortcuts panel, filtered with #command:workbench.action.webview.reloadWebviewAction.
Hope this helps

Related

How to unfreeze the terminal in VScode after CTRL+S?

I purposefully froze my terminal with CTRLS in visual studio code, so that I could inspect the fast log messages scrolling through. Normally, you can unfreeze it again with CTRLQ.
However, it seems that vscode catches this second shortcut and instead of unfreezing my terminal, it opens this popup in the middle of the screen - which disappears as soon as I release the keys...
This seems to be called the "Quick Open View".
I assume that there is a way to send the "unfreeze" signal to the terminal. How?
My solution for now was to detach tmux in vscode, then connect over ssh using a normal terminal, attach tmux, send the CTRLQ there, detach and exit again, and re-attach in vscode.
you can remove any shortcuts you want. go to file > preference > keyboard shortcuts
type "ctrl q"
and adapt as you wish
I also ran into this issue,
I found that if you go into File -> Preferences -> keyboard shortcuts
When you find the Ctrl-q shortcut, you can right click it and choose to remove it,
then the Ctrl-q will work to resume the terminal

how can i access terminal in visual studio code which is not working?

I opened terminal in vs code but the path is not coming. On clicking the terminal also the text is not appearing which I am typing. I am not able to type anything in terminal.
Go to the View menu of VScode. Then click on the menu option "Integrated Terminal". This will open the terminal window at bottom of VScode window.

Visual studio code how to add a keybinding for a command palette entry

For example, I would like to add a key binding Ctrl+R Ctrl+T for the entry:
Python: Run Python File In Terminal
Many thanks.
You can do that in the Preferences -> Keyboard Shortcuts section. Search for "Run Python File in Terminal", select the command and press the little + sign on the left.
You can start the process of creating a keybinding for a command in the command palette while in the command palette as of v1.52 (it is in the Insiders' Build now). A Gear icon has been added on the right of each command that you hover over. Click it. (To not use the mouse, arrow down or type to your desired command, hit Tab Tab to focus the Gear icon and hit Enter). Demo:

Can't get "View in Browser" or tool tip to work in Visual Studio Code editor

I can't get two features in Microsoft's Visual Studio Code to work.
1) I can't activate the "View in Browser" extension.
2) The tool tip feature isn't displayed in the editor.
Thanks in advance.
I would suggest you re-install the latest version from vscode
Open vscode, press F1, then type 'ext install[space]', [space] = space key;
Select "Extensions: Install Extension", then type 'view in browser'; Click bottom right 'tree' like logo to install extension; then Restart Now.
Open vscode, create an html file, then press Ctrl + F1 to view the html in your default browser.
Reference:
https://marketplace.visualstudio.com/items?itemName=qinjia.view-in-browser
Instead of using View in browser extension, I suggest you to use View in Default Application Extension.
Press F1 and narrow down the list commands by typing extension
Select the Extensions: Install Extension command.
Search for this extension by typing in the text view in default application
Once installed, you will be prompted to restart your instance of Visual Studio Code to use the extension
After saving your HTML file, press first ctrl+k and then ctrl+b.Your HTML file will be open in your default browser
Go To File - > Settings.
It will open a new window to the right.
Add your proxy settings there as:
"http.proxy" : "value".
Restart the Visual Studio Code.
It should work.

How to open a shell command prompt inside Visual Studio Code?

When using Visual Studio Code, how do I run command-line programs, such as a choco (Chocolatey) command? Do I need to have a separate Command Line (CMD.exe) running outside VS Code, or is there a hotkey/window within Code where I can run those commands?
I see the "Command Palette", but it is not entirely clear what command engines run in that palette.
For integrated terminal use Ctrl+`
From the release notes:
With the May release, we are rolling out the initial version of an integrated terminal. You can open the terminal using Ctrl+`, from the View | Toggle Integrated Terminal menu, or from the View > Toggle Integrated Terminal command in the Command Palette.
https://web.archive.org/web/20160616204248/http://code.visualstudio.com/updates/#_workbench (the 1.2.0 May release in 2016)
Use CMD+Shift+C or CTRL+Shift+C but it will only open a new outside editor standard bash console.
I hope they will implement an integrated console.
Can open it with this menu options: View > Integrated Terminal
Default keyboard shortcut for integrated terminal is Ctrl+`
In vscode you can use multiple integrated terminals.
If you want open another one use Ctrl+Shift+`
vscode keys shortcuts are rendered assuming a standard US keyboard layout. If you use a different keyboard layout, please read how can see the representation in your current keyboard.
It's easy, open this menu options: File > Preferences > Keyboard Shortcuts
and on the Default Keyboard Shortcut search the command workbench.action.terminal.toggleTerminal then point you mouse to info icon and can see the combination. For me is Ctrl+ñ because I'm using Spanish keyboard layout.
Also it's cool create an personal shortcuts to toggle into terminals. Open this menu options: File > Preferences > Keyboard Shortcuts and on the keybinding.json tab put this:
[
{
"key": "ctrl+pageup",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},{
"key": "ctrl+pagedown",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
}
]
Now when the cursor are focus on terminal, and have more than one terminal, you can navigate through every one with the combinations Ctrl+Page Down for previous terminal and Ctrl+Page Up for next terminal.
Tip: If you are focus on the editor, the same keyboard shortcuts can be used to navigate through tabs.
For mac Cmd + j
For win Ctrl + j
#brady321's answer is only for US keyboards:
Note: The following keys are rendered assuming a standard US keyboard layout.(https://code.visualstudio.com/Docs/customization/keybindings)
For instance, UK keyboards use Ctrl+':
You can find your shortcut in File > Preferences > Keyboard Shortcuts searching for workbench.action.terminal.toggleTerminal. If you're not using a US keyboard, it will show you the equivalent shortcut using your keyboard layout:
To check what the shortcut to open a native console looks like, try to find workbench.action.terminal.openNativeConsole in the shortcuts file.
More information about integrated terminal at: https://code.visualstudio.com/docs/editor/integrated-terminal
test with the Ctrl + J keys in ubuntu
As MCBL wrote, there is no integrated console. You can vote for this feature here: UserVoice - Integrated terminal <-- dead link.
3rd party Edit
Uservoice is no longer used and the link above is dead. The feature request for an integrated terminal might be this one.
In the contrary you may also run a terminal inside your visual studio code tool by simply doing the following:
Go to " View > Integrated Terminal " or use the shortcut key " Ctrl + ' "
I believe this is available on later versions of visual studio code. I could do this on version 1.7.0-insider.
Ctrl+ `
Integrated Terminal In Visual Studio Code, you can open an integrated
terminal, initially starting at the root of your workspace. This can
be very convenient as you don't have to switch windows or alter the
state of an existing terminal to perform a quick command line task.
To open the terminal:
Use the Ctrl+`keyboard shortcut with the backtick character.
Use the View | Toggle Integrated Terminal menu command. From the
Command
Palette (Ctrl+Shift+P), use the View:Toggle Integrated Terminal
command.
https://code.visualstudio.com/docs/editor/integrated-terminal
I am using vsCode 1.9.1. there are 2 ways as I know
You can easily open it by hitting Ctrl + ` key.
Go to View->Integrated Terminal like below image
Test this, This works for me
Ctrl + ñ
Ctrl + `
ctrl + j
On my UK MacBook, when I look in my keyboard shortcuts for VS Code (Code > Preferences > Keyboard Shortcuts), Toggle Integrated Terminal has the keybinding Crtl+`.
However, the shortcut works on Ctrl+§, which is the key on my MacBook that is the same place as the ` on a UK Windows keyboard.
You can take the text editor of the Microsoft, but you can't take the etc, etc.
Go to File > Preferences > Keyboard Shortcuts or use shortcut Ctrl+K Ctrl+S.
Type to search in keybindings : workbench.action.terminal.new.
Double click on Keybinding and add the shortcut you want (Super+T is unused in default config).
Since the Debug Console does not support programs that need to read input from the console, you can enable an external, native console by setting the attribute externalConsole to true in your launch configuration.
lauch.json just write: "externalConsole" : true
I used custom shortcut. Add below keybind to the keybinds.json:
[
{
"key": "ctrl+,",
"command": "workbench.action.terminal.toggleTerminal"
}
]
To open keybinds.json
CTRL + SHIFT + P then type Keyboard and click to Open Keyboard Shortcuts
The best way to run command line programs is to use the terminal window provided inside VS Code. This way tou will not switch any apps. But to make switching between terminal and other windows I recommend the following :
To open up a terminal - Ctrl + `
To open up second terminal - when you are running a node script in the first terminal and it is blocked and you need to run second script at the same time - Ctrl + Shift + `
To focus/switch back on terminal without reopening :
Press F1 and then type keyboard shortcuts
Find workbench.action.terminal.focus and set it to Ctrl + \ - this slash is usually located right next to your right Ctrl key. This makes switching between code and terminal very easy because Ctrl + ` and Ctrl + \ are invoked with your right hand and index finger.
Switch the Integrated Terminal to CMD
Open the Integrated Terminal: Ctrl + `
If a Bash terminal is opened while you want a Command Prompt (cmd), simply run the command: cmd, in the terminal to switch it to Command Prompt.
Also for MAC its Ctrl+Shift+.
I prefer you to change to a custom one.
Open up Command Palette by Command+Shift+P.
Type 'Keyboard Shortcuts...' - Select Preferences: Open Keyboard Shortcuts
.
See Terminal: Create New Integrated Terminal option there. Double-tap it to change it to a custom one.
.
For me:
ctrl + shift + `
Seems to have done the trick with the default VSCode settings.
If you hover your cursor over the +-button to add a new terminal, you can actually see what you need to press for the shortcut.