Install Visual Studio Code 1.31 on Ubuntu Linux. Visual Studio Code is Microsoft’s code editor with support for development operations like debugging, task running and version control. It aims to provide just the tools a developer needs for a quick code-build-debug cycle and leaves more complex workflows to fuller featured IDEs.
Visual Studio Code 1.31
The release – Visual Studio Code 1.31 – no longer requires restart to reload VS Code when you install or enable an extension and added keyboard navigation in Linux with custom menus. It also brings an improved keyboard navigation and a new tree widget.
The January 2019 release of Visual Studio Code brings a number of significant updates:
- No reload on extension install – No interruptions when you install new extensions.
- Tree UI improvements – Improved Explorer navigation and filtering, horizontal scrolling.
- Main menu updates – Redesigned Go actions menu, Edit menu Cut command.
- Multiline Problems output – See full multiline issue details in the Problems panel.
- Find All References history – Quickly rerun previous reference searches.
- Semantic selection for HTML, CSS, and JSON – Expand/shrink selection based on language semantics.
- Integrated Terminal reflow support – Terminal text automatically reflows as panel width changes.
- Command-based user input variables – Custom user input for task and debug configuration.
- Updated Extension API documentation – Completely rewritten with extension guides.
Install Visual Studio Code 1.31
Run the following commands in terminal to install Visual Studio Code 1.31 on Ubuntu Linux Systems:
sudo apt-get update
sudo apt-get upgrade
sudo dpkg -i ~/Downloads/code_*.deb; sudo apt -f install
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
sudo apt-get update
Make a note that if you’re on an older Linux distribution, you will need to run this instead:
# sudo dpkg -i .deb
# sudo apt-get install -f # Install dependencies
Installing the .deb package will automatically install the apt repository and signing key to enable auto-updating using the system’s package manager. Note that 32-bit and .tar.gz binaries are also available on the download page. https://code.visualstudio.com/Download
Setting VS Code as the default text editor
xdg-open
You can set the default text editor for text files (text/plain) that is used by xdg-open with the following command:
xdg-mime default code.desktop text/plain
Debian alternatives system
Debian-based distributions allow setting a default editor using the alternatives system, without concern for the MIME type. You can set this by running the following and selecting code:
sudo update-alternatives --set editor /usr/bin/code