Extend Source Code Editor and use it more effectively 7 Tips for Visual Studio Code
With Visual Studio Code, Microsoft provides its source code editor completely free of charge. Many vendors provide extensions that add even more functionality to Visual Studio Code.
Thanks to the extensions, Visual Studio code is very powerful and allows, among other things, to write smart contracts.
(Picture: Joos / Microsoft)
Microsoft Visual Studio (VS) code is available for free as an open source project. The source code editor supports almost all current and relevant programming languages. These include, for example, JavaScript, C#, C++, PHP, Java, HTML, R, CSS, SQL, Markdown, TypeScript, LESS, SASS, JSON, XML, Python and many others. The Apple programming language Swift can also be easily integrated.
Meanwhile, the code editor is one of the most popular tools for the development of various programs. This is not least due to the extensibility: In the Visual Studio Marketplace there are additional functions that make the editor much more powerful. VS Code can also be extended with other programming languages.
Microsoft shows in a video on Channel 9 the possibilities that Visual Studio Code offers.
1. Visual Studio Code and Smart Contracts
Smart contracts in the blockchain can also be developed with Visual Studio code.
(Picture: Joos / Microsoft)
With the extension for Solidity, smart contracts for the best-known programming language in this area can also be installed in Visual Studio Code. In parallel, Microsoft also provides the Blockchain Development Kit for Ethereum. After installing the extensions, Visual Studio Code can also establish connections with the various blockchain testnets to develop solidity smart contracts directly in Visual Studio Code.
Visual Studio Code can also be used with IBM Blockchain Platform.
(Picture: Joos / Microsoft)
IBM also provides a way for its cloud platform to use Visual Studio Code to develop its own programs for the blockchain. The extension includes tutorials that give developers an introduction to smart contracts with Hyperledger Fabric based on the IBM Cloud platform.
2. Open terminals in Visual Studio in different environments
Install extensions in Visual Studio code, even for different terminals.
(Picture: Joos / Microsoft)
On the Terminal tab, Visual Studio displays various shells that are available directly in the source code editor. Here it is also possible to open PowerShell sessions. With the key combination “CTRL+P “or” CMD+P ” (macOS) it is also possible to include a search bar. These can then be used to install extensions, for example with “ext install powershell” a current version of the PowerShell.
3. Quantum Computing with Visual Studio Code
Visual Studio Code also allows the development of programs for quantum computers. For this purpose, the source code editor works together with Microsoft Azure Quantum, for example. Here, Microsoft provides functions in the Azure cloud with which the programming of quantum computing programs is possible.
Visual Studio Code can also develop quantum computer programs.
(Picture: Joos / Microsoft)
Part of Azure Quantum are the Quantum Development Kit (QDK) and the programming language Q#. This is provided by Microsoft open source and free of charge. To use Q# in Visual Studio code, the QDK extension can be included. Microsoft also provides guidance for the QDK.
4. Control settings with JSON file
Customize Visual Studio code with the json configuration file.
(Picture: Joos / Microsoft)
Many settings of Visual Studio Code can be adjusted with configuration file settings. The file ” settings.json ” is responsible for the default setting of Visual Studio Code. To control the keymappings, the file “keybindings.json ” in directory “C:Users%username%AppDataRoamingCodeUser” available. Also the file ” settings.json ” is housed here.
To improve the suggestions that the editor makes during programming with its IntelliSense function, or to make better use of the function, the following options are available:
"editor.suggest.showStatusBar": "true",
"editor.suggest.insertMode": "insert",
After activation, Visual Studio Code adds a status bar at the bottom of the suggestion list. The status bar displays commands to insert the text of a selected proposal or replace an existing proposal. It is also possible to display further options. With the keyboard shortcut [Strg]+[Leertaste] more information can be found in the status bar.
5. GitHub: Cloning and more
If a GitHub account is logged into VS Code, the source code can be transferred directly to GitHub. It is also possible to use other functions of GitHub. If you are working locally on an app that is not currently stored, it can be stored directly in a GitHub repository.
In the Version Control view, it is possible to initialize the repository and also publish it on GitHub. Cloning a repository from a GitHub project can also be done in Visual Studio Code after login.
6. Synchronize settings
Synchronize settings between different installations of Visual Studio Code.
(Picture: Joos / Microsoft)
Developers working on multiple PCs can also enable and control the synchronization of settings between different VS code installations via the “FilePreferences” menu item. Synchronization can be done either through a Microsoft account or an account on GitHub. When setting up on another PC, Visual Studio Code then takes over all settings.
7. Visual Studio Code and the Windows Subsystem for Linux
With Visual Studio Code, it is also possible to program Linux applications that work with the Windows subsystem for Linux. For the connection, the VS code extension “Remote Development” is installed in Visual Studio Code. After that, in Visual Studio code can be developed comprehensively with the Windows subsystem for Linux.
Strictly speaking, this is an extension pack that installs different extensions in Visual Studio Code. Remote SSH can also be used to set up remote sessions via SSH to WSL but also to other Linux systems.
(ID: 47486605)