visual-studio-code

VSCode: Restart an extension automatically when its source has changed

99封情书 提交于 2021-02-07 18:42:25
问题 I'm developing a VSCode extension. Is it possible to automatically have the extension reloaded when I change its source. Currently, I need to press Ctrl + SHift + F5 . 回答1: I guess your extension is written in TS/javascript, so you can use fs.watch to watch your sources, and find a way to run the vscode command workbench.action.reloadWindow , which is from sources of vscode, the function ReloadWindowAction.Run() or directly windowService.reloadWindow() . export class ReloadWindowAction

VSCode: Restart an extension automatically when its source has changed

我只是一个虾纸丫 提交于 2021-02-07 18:41:41
问题 I'm developing a VSCode extension. Is it possible to automatically have the extension reloaded when I change its source. Currently, I need to press Ctrl + SHift + F5 . 回答1: I guess your extension is written in TS/javascript, so you can use fs.watch to watch your sources, and find a way to run the vscode command workbench.action.reloadWindow , which is from sources of vscode, the function ReloadWindowAction.Run() or directly windowService.reloadWindow() . export class ReloadWindowAction

Is it possible to Auth to an OAuth 2.0 API from inside a vscode extension

核能气质少年 提交于 2021-02-07 15:31:33
问题 My team writes a monitoring system which we have recently migrated the definitions of our monitoring into a git repo. These definitions are comprised of some json and powershell files. VSCode is an ideal scenario for editing and dealing with git. The problem is while developing the monitoring it is nice to be able to execute it against a test environment. Previously all editing was done through a web interface and we allowed ad hoc execution of the powershell against test machines through an

Is there a VS Code shortcut to move/select up/down to the next empty line?

自古美人都是妖i 提交于 2021-02-07 14:46:53
问题 I just transitioned from Sublime to VS Code and love it. Wondering if there are equivalent combos, or a way to set them, for jumping/selecting chunks of line, down/up to the next blank line. This is what these looked like for me in ST3: {"keys": ["ctrl+shift+["], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}}, {"keys": ["ctrl+shift+]"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}}, {"keys":

Is there a VS Code shortcut to move/select up/down to the next empty line?

本秂侑毒 提交于 2021-02-07 14:45:52
问题 I just transitioned from Sublime to VS Code and love it. Wondering if there are equivalent combos, or a way to set them, for jumping/selecting chunks of line, down/up to the next blank line. This is what these looked like for me in ST3: {"keys": ["ctrl+shift+["], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}}, {"keys": ["ctrl+shift+]"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}}, {"keys":

VS Code Intellisense is extremely slow

≡放荡痞女 提交于 2021-02-07 13:47:57
问题 I am using VSCode for more than a year and never faced this problem. The project I am working on is huge and VSCode is extremely slow when I am working on this project. I tried other projects and they work fine but what's strange is on the same project, a team of 10+ is working and most of them use VSCode but there seems no problem with their VSC. I have to wait for like 2 minutes on first access to IntelliSense. So every time I open a file, I have to wait for like 2 to 3 minutes before I can

Is there a way to get git to work properly from within a dev container using VS Code?

懵懂的女人 提交于 2021-02-07 13:21:59
问题 I am working with VS Code and I installed the Remote Development extension. I created a devcontainer for my Angular application. So far, everything works fine. The Dockerfile and the devcontainer.json files are pretty simple: Dockerfile: FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-12 devcontainer.json : { "name": "Angular App", "dockerFile": "Dockerfile", "settings": { "git.path": "/usr/bin/git", "terminal.integrated.shell.linux": "/bin/bash" }, "extensions": [ "angular.ng

Is there any way for VS Code to indent to an open bracket?

╄→гoц情女王★ 提交于 2021-02-07 12:58:30
问题 I'm looking to modify VS Code's indentation behavior so that if I press enter after typing a line like this: variable = function(param1, It'll indent to the level of the open parenthesis so that I can easily format code like this: variable = function(param1, param2) I'd like it to work for open square brackets and curly brackets as well: variable = function([1, 2, 3, 4 5, 6, 7, 8], param2, {'a': 1, 'b': 2, 'c': 3, 'd': 4}, param4) I'd prefer it to have this behavior for pretty much every

In Visual Studio Code, how to pass arguments in launch.json

China☆狼群 提交于 2021-02-07 12:53:20
问题 In Visual Studio Code, in the launch.json file that launches the app I'm writing, how do I add command line arguments? 回答1: As described in the documentation, you need to use the args attribute. E.g. { "type": "node", "request": "launch", "name": "Debug App", "program": "${workspaceFolder}/main.js", "args": ["arg1", "arg2", "arg3"] } 来源: https://stackoverflow.com/questions/57889703/in-visual-studio-code-how-to-pass-arguments-in-launch-json

Tab autocomplete in Visual Studio Code doesn't work

戏子无情 提交于 2021-02-07 12:02:03
问题 I am trying to enable tab auto-completion with pressing "Tab" button but it doesn't work for me and it always works as Tab character when it is supposed to work as autocomplete. Which setting or shortcut should I enable or disable to have this feature? With pressing "Tab", I will get this; PS: Pressing "Enter" works fine and accepts the suggestion and I can disable it by setting the following setting to off. 回答1: Try changing tab completion setting to On: Editor › tab Completion "editor