edit - nov 2022 - I didn't need this anymore, I've switched to Linux & Docker, no more coding under Windows
Does someone knows how to refer to my APPDATA folder in my vscode settings.json file?
I'm trying to set the path to my php-cs-fixer like below so, on all my development computer, the path can be retrieved.
"php-cs-fixer.executablePathWindows": "$env:APPDATA/Composer/vendor/bin/php-cs-fixer.bat",
To be clear: $env:APPDATA seems to be unsupported.
I'm using the latest version of vscode.
Version: 1.52.1 (user setup)
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
I tried this on VSCode Insiders 1.53, was able to set using ~:
{
"php-cs-fixer.executablePathWindows": "~\\AppData\\Roaming\\Composer\\vendor\\bin\\php-cs-fixer.bat"
}
Seems that the ~ is transformed to match C:\Users\[you].
I know for sure that ${env:APPDATA} works because I use it in the setting : "emmet.extensionsPath": "${env:APPDATA}\\Code\\User\\Emmet Settings",
Check this documentation section. Unfortunately, this issue complains that it is not supported in every settings and extensions. I strongly suggest that every one upvote this issue so we have better chance MS takes care of it.
Related
I created a new project and launched an Ubuntu development container.
Without any special settings, the proxy of the started environment was set in /etc/environment as follows.
vscode ➜ /workspaces/etcenv $ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
HTTPS_PROXY="http://proxy.xxx.co.jp:8080"
https_proxy="http://proxy.xxx.co.jp:8080"
NO_PROXY="localhost,127.0.0.1,169.254.169.254,169.254.170.2,xxx.co.jp"
no_proxy="localhost,127.0.0.1,169.254.169.254,169.254.170.2,xxx.co.jp"
HTTP_PROXY="http://proxy.xxx.co.jp:8080"
http_proxy="http://proxy.xxx.co.jp:8080"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
I've noticed that the addition of capitalized Proxy settings has broken some existing projects.
Earlier versions of VSCode probably didn't do this.
Is this guess correct? Is it possible to disable the setting?
The version I'm using now is:
Version: 1.73.1 (system setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
ms-vscode-remote.remote-ssh v0.92.0
An existing project was working in VSCode a couple of months ago.
I don't know if the proxy was set in /etc/environment of the existing project, but I was doing the same operation many times every day with the devcontainer, so I guess the proxy was not set.
I expected the latest version of VSCode to behave the same.
but, Existing projects, which have not changed, are now not working as they used to due to the capitalized proxy set in /etc/environment.
The Visual Studio Code setting "files.autoSave": "onWindowChange" has stopped working for me. It has worked properly for me every day in the past year. (I'm wondering if it may possibly be related to either my most recent update to Catalina or the most recent update to VS Code.) I have the files.autoSave setting only in this file: ~/Library/Application Support/Code/User/settings.json.
Does anyone have suggestions on how I can get the autosave feature in vscode working again?
Visual Studio Code 1.49.0
Commit: e790b931385d72cf5669fcefc51cdf65990efa5d
Date: 2020-09-10T17:39:53.251Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 19.6.0 - macOS Catalina 10.15.6
i personally don't like to use autosave on window change. I use "files.autoSave": "afterDelay" and set the delay files.autoSaveDelay": 500 here. Why I used this over the autosave window change is because it's much faster and automatically done every 500ms!
I was using Witch by Many Tricks, https://manytricks.com/witch/. After updating MacOs to Catalina 10.15.6, I believe that Which may have been interfering with VS Code ability receive window focus callbacks (I'm guessing). When I disabled Which, all is fine now. Thank you.
Is there an extension or setting, which makes a file with a .diff extension, opened in VS Code, display added lines in green and deleted lines in red? Currently, when I open a diff file, it displays added and deleted lines in the same color. I'm using VS Code Version: 1.37.1.
P.S. I tried the diff extension, but it doesn't work for me.
P.P.S. I tried reloading VS Code with extensions disabled and the highlighting is still broken:
I observed that .diff files are highlighted by default(without requiring any extensions), it's just that certain themes do not work well.
VS Code currently have this feature, if you get the .diff extension the sintax highlight performs correctly like git bash.
My VS Code is:
Version: 1.47.2 (system setup)
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:22:06.216Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 6.3.9600
In VS Code I select my file in the Explorer tab:
After I press Delete button, instead of deleting VSCode starts file search:
If I press delete multiple times it just keeps doing its thing:
It looks like a bug but maybe there is a secret shortcut to turn file search mode on/off that I don't know. Is there?
I'm on Ubuntu x64 with VSCode:
Version: 1.36.0
Commit: 0f3794b38477eea13fb47fbe15a42798e6129338
Date: 2019-07-03T13:20:56.241Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 4.18.0-25-generic
EDIT: please ignore my terrible terrible praxis of deleting spec files
Update:
Microsoft fixed it in last update
Original answer:
This is a known issue from last patch, it's going to be fixed in the next update.
Check this:
https://github.com/microsoft/vscode/issues/76514
Workaround:
https://github.com/microsoft/vscode/issues/76514#issuecomment-508841597
Today in my colleague's vscode I saw that finding references opens in sidebar.
I searched the web and I understood that it's done by Reference Search View, an extension shipped by vscode but it's not working for me. How can I enable it?
Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:49:48.319Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.15.0-43-generic
This is a built-in extensions. It is included in VS Code 1.30+ and is enabled by default. Search #builtin references in the extension view to make sure you have not accidentally disabled it.
To show references, run the References: Find all references command. This should open the references sidebar with the reference results
Fixed!
The issue was that I was using
"command": editor.action.referenceSearch.trigger"
instead of
"command": "references-view.find"
in my keybindings.
I'm actually pleased! because I can still have the old behaviour by using the first command :)