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 it, I have tried many configurations and plugins. Now I have a fixed configuration method and plugin list. Besides being used for recording, this article can also be considered as 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 used in the editing area of vscode. Compared to purely programming fonts, its uniqueness lies in the use of Source Han Sans to complete the CJK character library, making the overall font more harmonious. (The pure English version of this font is called Iosevka)

image

  1. JetBrains Mono

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

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

image

  1. Fira Code

It is the first font I used for a long time and seems to be the font recommended by vscode official. The font style and ligatures are distinctive.

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 will only list some practical small plugins.

  1. Error Lens

By default, vscode's syntax detection displays code prompts 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 for easy viewing.

image

  1. GitLens

This extension is used to expand vscode's Git support, and its functions are very comprehensive. 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 the content of comments and highlighting 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 and, when used in conjunction with the WakaTime API, can achieve some interesting effects. For example, by using github readme stats, you can synchronize WakaTime programming time to your Github Profile.

image

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