How visualize .dot file with "Graphviz (dot) Stephanvs" extension in VSCode, Windows 10? - visual-studio-code

Operating System: Windows 10, 64 bit
Editor: VSCode 1.55.2 (with Graphviz (dot) Stephanvs extension installed)
I'm watching a course and he said install "Graphviz (dot) Stephanvs" extension.
I installed that extension and then reload VSCode.
I have a .dot file and when I click on ... icon I didn't see "Open Preview to the Side" option.
I also tried ctrl+k - ctrl+k,v - ctrl+shift+v but they didn't work.
Thanks in advance for your helps.

Finally, I installed "Graphviz (dot) language support for Visual Studio Code, João Pinto" extension instead.

Related

How to run a Visual Studio Code extension?

I just installed the Visual Studio Code (v1.52.1) extension "Spelling Checker."
Now how do I use the thing?
I searched all the menus for a command to run this extension, or any extension. I asked Google "how to run a VSC extension" and only got matches that tell me how to install an extension. Apparently extensions are just supposed to run themselves.
There's a whole class of extensions for which that makes sense, such as extensions that add enhancements to editor windows. But there's another whole class of extensions, like this one, for which it makes no sense at all.
How do you run an extension?
This is confusing as the answer is spelled out in five-minute videos or is skirted around.
On your keyboard: Cmd+Shift+P (macOS) Ctrl+Shift+P (Windows, Linux, etc.) or under "View" and "Command Palette" opens the Command Palette so you can execute an extension's command such as "Browse Lite" for say https://github.com/antfu/vscode-browse-lite - hopefully, the developers say what the command is.
Note: Cmd+P (macOS) or Ctrl+P will search files by name. The shift is what's needed to launch the extension magic.
Open Visual studio code.
Go to extension option.
Then click on any extension.
After that disconnect your internet.
Then it will prompt for install extension manually.
Then it will ask to locate that .vsc file.
Select that and file and install it.

What is the problem with my Love2D Support extension for VS Code?

I am trying to run Lua directly from VS Code. I installed the Love2D Support extension for this. But the program does not run with Ctrl+L.
Here is where Love is installed on my computer:
These are my settings for the Love2D Support extension:
I don't understand why Love is not working from VS Code with Ctrl+L.
I'm not sure what's happening in VSCode, but you can drag the folder your main.lua file is in and drop it onto LÖVE2D to run it.
The command to run Lua directly from VS Code using the LOVE2D extension is alt + L and
Not ctrl + L which selects the full line.
If the problem proceeds, make sure that LOVE is installed in Program Files because this is where the LOVE2D extension is going to look for LOVE by default.
Alternatively, you can specify LOVE's file path in the LOVE2D extension's settings.

VScode autocomplete doesn't work for CSS files

Autocomplete for CSS is not working in VSCode.
Usually, if I start writing an statement inside a CSS file, VSCode has an intenseness, which suggested all possible options.
But as you can see, it doesn't work inside my css file.
Any help?
I had the same issue after I installed the VSCode extension PostCSS Language Support,
I fixed it by disabling the extension.
If you have PostCSS Language Support installed add the following config in your settings.
{
"emmet.includeLanguages": {
"postcss": "css"
}
}
If you are using the PostCSS Language Support plugin, you may want to additionally install the PostCSS Intellisense and Highlighting plugin. Follow the plugin instructions to enable emmet support.
I realized that at the bottom right of the screen, my language mode was set to postCSS. So simply clicking there and changing it to CSS solved this. Images are for illustration
you might have installed some extensions which prevent css form doing autocomplete, uninstalling the latest extensions (from the time it started happening) will resolve your problem
You have to download visual studio code system rather than visual studio code use.... go to official site of visual studio code.... and select an option visual studio code system 64 or 32 bit..... Now you have to run the setup as "Run as administrator"

Visual Studio code shortcut to find classes and methods?

Is there a shortcut in Visual studio Code (Or an extension for it)?.
I use to use PHPstorm, there was a function that you can find the classes directly, by clicking on it. When I use visual studio code you need to search all files.
shortcut: ctrl + p
This will behave just like the 'double-spacebar' of JetBrains products.
This should work with the PHP IntelliSense extension:
PHP 7 installation is required.
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense

How can I export settings?

How is it possible to export all Visual Studio Code settings and plugins and import them to another machine?
With the current version of Visual Studio Code as of this writing (1.22.1), you can find your settings in:
~/.config/Code/User on Linux
%APPDATA%\Code\User (C:\Users\username\AppData\Roaming\Code\User) on Windows
~/Library/Application Support/Code/User/ on Mac OS X
The files are settings.json and keybindings.json. Simply copy them to the target machine.
Your extensions are in:
~/.vscode/extensions on Linux and Mac OS X
%USERPROFILE%\.vscode\extensions (C:\Users\username\.vscode\extensions) on Windows (i.e., essentially the same place as on Linux and Mac OS X)
Alternately, just go to the Extensions, show installed extensions, and install those on your target installation. For me, copying the extensions worked just fine, but it may be extension-specific, particularly if moving between platforms, depending on what the extension does.
There is an extension for Visual Studio Code, called Settings Sync.
It synchronises your settings by gist (Gist by GitHub). It works the same as the Atom.io extension called settings-sync.
UPDATE:
This feature is now build in VS Code, it is worth to switch to official feature.
(https://stackoverflow.com/a/64035356/2029818)
You can now sync all your settings across devices with VSCode's built-in Settings Sync. It's found under Code > Preferences > Turn on Settings Sync...
Similar to the answer given by Big Rich you can do the following:
$ code --list-extensions | xargs -L 1 echo code --install-extension
This will list out your extensions with the command to install them so you can just copy and paste the entire output into your other machine:
Example:
code --install-extension EditorConfig.EditorConfig
code --install-extension aaron-bond.better-comments
code --install-extension christian-kohler.npm-intellisense
code --install-extension christian-kohler.path-intellisense
code --install-extension CoenraadS.bracket-pair-colorizer
It is taken from the answer given here.
Note: Make sure you have added VS Code to your path beforehand. On mac you can do the following:
Launch Visual Studio Code
Open the Command Palette (⇧ + ⌘ + P) and type 'shell command' to find the
Shell Command: Install 'code' command in PATH command.
For posterity, this post mentions,
in the latest release of Visual Studio Code (May 2016) it is now possible to list
the installed extension in the command line
code --list-extensions
On Mac, execute something like:
"/Applications/Visual Studio Code.app//Contents/Resources/app/bin/code" --list-extensions
To install, use:
--install-extension <ext> //see 'code --help'
You can now synchronise all your settings across devices with Visual Studio Code's built-in Settings Sync. It's found under menu File → Preferences → Turn on Settings Sync...
Read more about it in the official documentation here.
Your user settings are in ~/Library/Application\ Support/Code/User.
If you're not concerned about synchronising and it's a one-time thing, you can just copy the files keybindings.json and settings.json to the corresponding folder on your new machine.
Your extensions are in the ~/.vscode folder. Most extensions aren't using any native bindings and they should be working properly when copied over.
You can manually reinstall those who do not.
I'm preferred my own way to synchronize all Visual Studio Code extensions between laptops, using .dotfiles and small script to perform updates automatically. This way helps me every time when I want to install all extensions I have without any single mouse activity in Visual Studio Code after installing (via Homebrew).
So I just write each new added extension to .txt file stored at my .dotfiles folder. After that I pull master branch on another laptop to get up-to-date file with all extensions.
Using the script, which Big Rich had written before, with one more change, I can totally synchronise all extensions almost automatically.
Script
cat dart-extensions.txt | xargs -L 1 code --install-extension
And also there is one more way to automate that process. Here you can add a script which looks up a Visual Studio Code extension in realtime and each time when you take a diff between the code --list-extensions command and your .txt file in .dotfiles, you can easily update your file and push it to your remote repository.
I've made a Python script for exporting Visual Studio Code settings into a single ZIP file:
https://gist.github.com/wonderbeyond/661c686b64cb0cabb77a43b49b16b26e
You can upload the ZIP file to external storage.
$ vsc-settings.py export
Exporting vsc settings:
created a temporary dump dir /tmp/tmpf88wo142
generating extensions list
copying /home/wonder/.config/Code/User/settings.json
copying /home/wonder/.config/Code/User/keybindings.json
copying /home/wonder/.config/Code/User/projects.json
copying /home/wonder/.config/Code/User/snippets
adding: snippets/ (stored 0%)
adding: snippets/go.json (deflated 56%)
adding: projects.json (deflated 67%)
adding: extensions.txt (deflated 40%)
adding: keybindings.json (deflated 81%)
adding: settings.json (deflated 59%)
VSC settings exported into /home/wonder/vsc-settings-2019-02-25-171337.zip
$ unzip -l /home/wonder/vsc-settings-2019-02-25-171337.zip
Archive: /home/wonder/vsc-settings-2019-02-25-171337.zip
Length Date Time Name
--------- ---------- ----- ----
0 2019-02-25 17:13 snippets/
942 2019-02-25 17:13 snippets/go.json
519 2019-02-25 17:13 projects.json
471 2019-02-25 17:13 extensions.txt
2429 2019-02-25 17:13 keybindings.json
2224 2019-02-25 17:13 settings.json
--------- -------
6585 6 files
PS: You may implement the vsc-settings.py import subcommand for me.
This is my syncing configuration repo for VSCodium (for Linux only). If you use VSCode, just replace the codium with code and the syncing will be fine.
https://github.com/vanvuvuong/codium_configuration
Enable Portable Mode
Portable Mode instructs Visual Studio Code to store all its configuration and plugins in a specific directory (called data/ in Windows and Linux and code-portable-data in macOS).
At any time you could copy the data directory and copy it on another installation.
VS Code provides 2 options to take care your settings. One is import/Export and other is Sync settings with github profile.
Follow below steps to Export VS code settings
Search for 'Profiles: Export' in the Command Palette (Ctrl+Shift+P).
Select 'what to export' and confirm by clicking on 'OK'
Name you export -
Select Local file which will download file
To import, choose 'Profiles: Import' from Command Palette
Often there are questions about the Java settings in Visual Studio Code. This is a big question and can involve advanced user knowledge to accomplish. But there is simple way to get the existing Java settings from Visual Studio Code and copy these setting for use on another PC. This post is using recent versions of Visual Studio Code and JDK in mid-December 2020.
There are several screen shots (below) that accompany this post which should provide enough information for the visual learners.
First things first, open Visual Studio Code and either open an existing Java folder-file or create a new Java file in Visual Studio Code. Then look at the lower right corner of Visual Studio Code (on the blue command bar). The Visual Studio Code should be displaying an icon showing the version of the Java Standard Edition (Java SE) being used. The version being on this PC today is JavaSE-15. (link 1)
Click on that icon (JAVASE-15) which then opens a new window named "java.configuration.runtimes". There should be two tabs below this name: User and Workspace. Below these tabs is a link named, "Edit in settings.json". Click on that link. (Link 2)
Two json files should then open: Default settings and settings.json. This post only focuses on the "settings.json" file.
The settings.json file shows various settings used for coding different programming languages (Python, R, and Java). Near the bottom of the settings.json file shows the settings this User uses in Visual Studio Code for programming Java.
These Java settings are the settings that can be "backed up" - meaning these settings get copied and pasted to another PC for creating a Java programming environment similar to the Java programming environment on this PC. (Link 3)
Link 1
Link 2
Link 3
For those looking for an export option for Visual Studio (not Code), use Tools menu, select "Export selected environment settings"