visual-studio-code

Shortcut with multiple command in VSCode

家住魔仙堡 提交于 2021-01-24 07:44:19
问题 I have an existing shortcut which maximize the terminal window, { "key": "ctrl+`", "command": "workbench.action.toggleMaximizedPanel" } I would like to add an additional command to the shortcut to shift the focus to the terminal window when it is maximized and back to editor window when it is minimized. is this possible in vscode? 回答1: I think you will have to use a macro extension like multi-command to run multiple commands with one keybinding. Once you have installed multi-command, in your

Visual Studio Code java format document braces new line

一个人想着一个人 提交于 2021-01-22 10:31:17
问题 How can I get Visual Studio Code to format Java documents with braces in a new like? i.e: This public static void main(String args[]) { } To this public static void main(String args[]) { } Edit: Yikes!! Just remember .vscode/extensions folder. I went in there then /ryannaddy.vscode-format-0.0.6/package.json and changed format.newLine to true. Thanks for the help. So happy!! 回答1: To solve this using "Language Support for Java(TM) by Red Hat" you can use an Eclipse formatter file. This allows

Git push: Missing or invalid credentials. fatal: Authentication failed for 'https://github.com/username/repo.git'

和自甴很熟 提交于 2021-01-22 09:44:47
问题 I was trying to do my first push on a new MacBook and got this error after git push (everything worked well on my old MacBook): Missing or invalid credentials. Error: connect ECONNREFUSED /var/folders/tx/53fffl0j51qb47mhnlf8zsdc0000gn/T/vscode-git-1d38026c7f.sock at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '/var/folders/tx/53fffl0j51qb47mhnlf8zsdc0000gn/T/vscode-git-1d38026c7f.sock' } Missing or

How to Auto-Complete both HTML and Django-HTML simultaneously in VSCode?

被刻印的时光 ゝ 提交于 2021-01-22 06:31:06
问题 I've installed Django support in VSCode ,and associate */templates/*.html with django-html as the extension demands. However, it can't auto-compete HTML Tags as I've done so. And if I just associate HTML with itself, then it can't intellisense Django Template code. So anyone can help me about auto-completing both ?? 回答1: I managed to do so by: install django support add following configuration to my workspace settings.json: "emmet.includeLanguages": { "django-html": "html", } 回答2: As

jsdoc @ character inside code block

喜夏-厌秋 提交于 2021-01-22 04:53:52
问题 I'm trying to write documentation for a Module function like this: /** * Usage: * * ``` * @NgModule({ * imports: [ * BrowserModule, * ..., * ThisModule.forRoot({ * name: 'Name', * version: '1.0', * ], * }), * ``` * * @param config Service configuration parameters */ public static forRoot(config: SVConfig) { The problem is with @NgModule . I've tried with: * ``` * @NgModule Seems that html entitites works well outside code (```), but not inside code block (it does something weird like making

jsdoc @ character inside code block

北战南征 提交于 2021-01-22 04:53:38
问题 I'm trying to write documentation for a Module function like this: /** * Usage: * * ``` * @NgModule({ * imports: [ * BrowserModule, * ..., * ThisModule.forRoot({ * name: 'Name', * version: '1.0', * ], * }), * ``` * * @param config Service configuration parameters */ public static forRoot(config: SVConfig) { The problem is with @NgModule . I've tried with: * ``` * @NgModule Seems that html entitites works well outside code (```), but not inside code block (it does something weird like making

jsdoc @ character inside code block

那年仲夏 提交于 2021-01-22 04:53:31
问题 I'm trying to write documentation for a Module function like this: /** * Usage: * * ``` * @NgModule({ * imports: [ * BrowserModule, * ..., * ThisModule.forRoot({ * name: 'Name', * version: '1.0', * ], * }), * ``` * * @param config Service configuration parameters */ public static forRoot(config: SVConfig) { The problem is with @NgModule . I've tried with: * ``` * @NgModule Seems that html entitites works well outside code (```), but not inside code block (it does something weird like making

Formatting on save moves import statment in VS-Code

帅比萌擦擦* 提交于 2021-01-21 14:38:42
问题 I am learning flask and building a app based on Corey Schafer's Youtube tutorials. I'm using VS-Code as my editor of choice. In tutorial 5 he splits his app into a package structure and when I do it I run into a problem. In my settings I enabled the "editor.formatOnSave": true and the formatter I use is autopep8. Now when I move one of my import statements from the top to the bottom of my file and save, the formatter moves it back to the top. I'm guessing its because of 'E402 - Fix module

Formatting on save moves import statment in VS-Code

喜你入骨 提交于 2021-01-21 14:37:43
问题 I am learning flask and building a app based on Corey Schafer's Youtube tutorials. I'm using VS-Code as my editor of choice. In tutorial 5 he splits his app into a package structure and when I do it I run into a problem. In my settings I enabled the "editor.formatOnSave": true and the formatter I use is autopep8. Now when I move one of my import statements from the top to the bottom of my file and save, the formatter moves it back to the top. I'm guessing its because of 'E402 - Fix module

Angular language service not working in vscode

六月ゝ 毕业季﹏ 提交于 2021-01-21 09:37:09
问题 The Angular language service does not work in VSCode. In HTML there is no intellisense when using F12 to go to component. The tsconfig.json gives no errors when opened in VSCode. 回答1: The problem was a trailing comma in the tsconfig.json. Which is allowed in vscode. but can't parsed as json. With Help - Toggle Developer Tools it shows the message in a browser console. The problem was solved after removing the trailing comma and restart vsCode / project 回答2: For all other google'ers that end