amtoaer

晓风残月

叹息似的渺茫,你仍要保存着那真!
github
x
telegram
steam
nintendo switch
email

How to configure Vscode

I have been programming for more than two years since 2018. During this time, I have changed systems several times (Windows -> Ubuntu -> Manjaro -> Arch Linux) and written several languages (C/C++/VHDL/JavaScript/Java/Golang), but I have never changed my editor, which is the protagonist of this article - Visual Studio Code.

There are three main reasons why it attracts me:

  1. Cross-platform
  2. Low resource usage
  3. Plugin-based design

The second and third points are particularly impressive to me.

As a program developed using Electron, it eliminates the drawbacks of "web wrapping" and achieves almost the same effect as native programs while using fewer resources.

In addition, the excellent plugin-based design provides users with more customization options. By installing plugins, we can expand its themes, icons, additional features, and programming language support.

No matter what you write, vscode has got you covered!

Below are two screenshots of my vscode:
image

20210116142414

Configuration#

During my use of vscode, I have tried many configurations and used many plugins. Now I have a fixed configuration method and plugin list. Besides being used for recording, writing this article is also a recommendation for readers.

Fonts#

Fonts are the soul of an editor, and visually pleasing fonts can greatly enhance the enthusiasm for coding. I personally recommend three fonts:

  1. Sarasa Gothic

Also known as "Sarasa Mono", it is my personal favorite font and the font I use in the vscode editing area. Compared to purely programming fonts, its uniqueness lies in the use of Source Han Sans to complete the CJK character library, making the font overall more coordinated. (The pure English version of this font is called Iosevka)

image

  1. JetBrains Mono

Produced by JetBrains, it is definitely a high-quality product! (Confused)

As the default font for all JetBrains IDEs, its excellence is beyond doubt. I use it as the font for the built-in terminal in vscode.

image

  1. Fira Code

It was the first font I used for a long time and seems to be the font recommended by vscode official. It has distinctive character shapes and ligatures.

This font accompanied me for about half a year. After using it for a long time, you may find it a bit fancy, but it is still an excellent programming font.

image

Themes#

In terms of themes, subjectively, I only recommend two color schemes from Atom:

  1. Atom One Light

image

  1. Atom One Dark

image

Plugins#

There is nothing special to say about language support plugins. Here, I only record some practical small plugins.

  1. Error Lens

The default syntax checking of vscode displays code suggestions in the "Problems" section of the bottom bar, which is not clear enough. This plugin can display detailed problem information after the corresponding line in the editing area, making it easy to view.

image

  1. GitLens

This extension is used to expand vscode's Git support. It has a wide range of functions. The functions I personally use mainly include:

  • Code comparison between commits

image

  • Prompt for which commit a line of code comes from

image

  1. SQLTools

A database extension that allows you to connect to databases within vscode using the corresponding drivers. It supports viewing databases, tables, and executing SQL statements.

  1. Todo Tree

It can highlight specific comments and provide a global comment index. It supports customizing comment content and highlight colors.

image

  1. WakaTime

Used to track information such as file types and time spent editing files in vscode, and synchronize it with WakaTime's cloud. The time will be displayed in the bottom bar of vscode, as shown in the figure:

image

This extension can track the user's programming time. When used in conjunction with the WakaTime API, it can achieve some interesting effects, such as synchronizing WakaTime programming time to the Github Profile through github readme stats.

image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.