Updating vscode doesn't show user code snippets - visual-studio-code

Updating vscode doesn't show user code snippets.
If I move the cursor after entering the prefix, it appear only then.

This issue can be resolved by following these steps:
Close Visual Studio Code.
Go to your user snippets folder, usually located at ~/.config/Code/User/snippets (for Linux), %APPDATA%\Code\User\snippets (for Windows) or ~/Library/Application Support/Code/User/snippets (for Mac).
Backup your user snippets folder by renaming it to something like snippets_backup.
Reopen Visual Studio Code.
Check if your user snippets are appearing now.
If the above steps don't solve the problem, you can try clearing the Visual Studio Code's cache:
Go to the Command Palette (Ctrl + Shift + P on Windows, or Cmd + Shift + P on Mac).
Type in "Developer: Delete Settings File".
Select the option "Developer: Delete Settings File" from the dropdown.
Confirm the deletion of the settings file by clicking on the "Yes" button.
Reopen Visual Studio Code.
These steps should resolve the issue with your user code snippets not appearing after updating Visual Studio Code.

Related

Ritwick Dey's Live Server extension in Visual Studio Code not opening website in new tab automatically

Summarize the problem
Include details about your goal
I want the Live Server extension in Visual Studio Code to automatically run and open my HTML, CSS and JS files in a website
Describe expected and actual results
Expected: After clicking on "Go Live", a browser tab automatically pops up and runs my website.
Actual: After clicking on "Go Live", a port is created but the tab doesn't open.
Include any error messages
No error messages occurred.
Describe what you’ve tried
Installing his Chrome extension,
Watching these YouTube videos
1
2
Setting liveServer.settings.useBrowserPreview to false.
Reinstalling his Visual Studio Code extension.
Solution
Uninstall the Visual Studio Code (VSC) extension first.
Reinstall it.
Once you open a JavaScript file, press F5.
Copy the four-digit number in "url".
Press Ctrl + Shift + P and go to Preferences: Open Settings (JSON)
Copy and paste this within the curly brackets:
"liveServer.settings.multiRootWorkspaceName": "",
"liveServer.settings.port": xxxx
Replace xxxx with the four-digit number copied in step 4.
Press the "Go Live" button at the bottom right corner of VSC.
Press F5 and it should work.
Thanks to Swapnil G Thaware for the tutorial at https://stackoverflow.com/a/55459597/13510906

Issue with VSC build (CMD-Shift-B) command on mac

I am working through the instructions on building VSC for developers (https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run) currently. Right under "Build" it instructs me to go "Go into vscode and start the build task with CMD+Shift+B) since I have a mac. I have gone into the folder in my finder and have pressed this combination of buttons but nothing happens at all. Am I supposed to do this in the terminal or am I missing anything?
It looks like the vscode directory must be opened in Visual Studio Code and a build is performed with ⌘ Command+Shift+B.
Here is an older version of the instructions where it is clearer:
https://github.com/microsoft/vscode-wiki/blob/2e2d6b0/How-to-Contribute.md#build
It appears that the directory vscode got mixed up with the full application name in a subsequent edit.

How do I factory reset Visual Studio Code or Delete Folders

I started to learn one language and moved to a different one. I want to start with that language with a fresh code editor. But I don't know how to reset visual studio code and delete all my data. Can someone help me? I'm quite new to vs code. (Sorry if this is a stupid question)
You can delete VSCode related data comletely by deleting both of these or if you just want to reset your editor just delete the .vscode folder in your user profile.
To Delete user data directory Code:
Windows %APPDATA%\Code
macOS $HOME/Library/Application Support/Code
Linux $HOME/.config/Code
To Delete the extensions and other related data, delete the folder named .vscode:
Windows %USERPROFILE%\.vscode
macOS ~/.vscode/
Linux ~/.vscode/
Press CTRL + SHIFT + P
Type "settings json"
Click "Preferences: Open Settings (JSON)"
Edit file and leave only braces { }

Missing link to keybindings.json in the Keyboard Shortcuts editor

The VS Code documentation refers to a link to keybindings.json. This link is not present in my editor (see image). How can it be restored?
Where is keybindings.json located in Windows 10?
VS Code version: 1.29.0-insider (user setup)
I've tested this both on 1.28.0 and 1.29.0-insider. It seems that the link in question doesn't exist on the insider version. On my 1.28.0 installation, I can click the link and it will go to keybindings.json, which is found in C:\Users\<username>\AppData\Roaming\Code\User\keybindings.json. This link exists even if the file itself is deleted, and will create a new file at that location if you click it.
In the insider's version however, the link is gone, and the insider keybindings.json is installed for me by default in C:\Users\<username>\AppData\Roaming\Code - Insiders\User\keybindings.json.
If you want to open it up, you can open up the control palette with CTRL +SHIFT + P and select Preferences: Open Keyboard Shortcuts File. This does the same thing as clicking on that link in the non-insiders version, including creating the file if it doesn't exist.

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.