Try turning on capable settings in Visual Studio Code
Hello.
I'm Mandai, in charge of Wild on the development team.
It's been about a year since I started using Visual Studio Code (VSCode) as my main editor.
The development speed is too fast, and even though great features are being added all the time, I feel like I'm being left behind...
We have compiled a list of recommended settings to periodically review your settings and take inventory of your knowledge.
Settings around the editor
First, let's take a look at the settings around the heart of the editor.
A recent hot topic is that the minimap can now be displayed on the left side of the editor.
I remember the moment when I realized the new idea of ``grasping the flow of the chord in form'' and was able to feel the moment ``My brain is stimulated right now!''
editor.minimap.renderCharacters
If you look closely at the minimap, you can see that the characters displayed are not hard to read, and the actual code is displayed in a very small font.
By replacing this with a color block, I felt that the operation became a little faster (in my experience).
This is useful when writing extremely long code.
editor.minimap.showSlider
Another thing related to the minimap.
When you place the mouse cursor on the minimap, an effect will be applied to highlight the currently displayed area, and this setting will always highlight it.
It's nice because it makes it hard to get lost in where you are right now.
editor.autoIndent
When you copy and paste code or move it using "Alt + arrow keys", you may find it difficult to match the indentation.
Moving multiple lines is just like that, and you shouldn't be too confident about it, but it's a useful feature that adjusts the indentation of the moved line to the appropriate indentation based on the context.
I'm glad that I don't have to repeatedly press the arrow → Home key → Tab set.
It is now enabled by default starting from version 1.15! Viva!
editor.fontLigatures
The setting to use ligatures has no meaning unless a font that supports ligatures is specified in the font family.
, I have been using a
font that supports ligatures that is famous in the programming world, Fira Code I think it's because it takes time and effort to create, but Fira Code is open source.
It will look like this.
It looks more intuitive, with arrow operators appearing as single characters and Markdown header symbols sticking together, but please be careful when using it as it is not intended for beginners.
Especially when trying to learn a new language, this can lead to misunderstanding.
Personally, I find Consolas easier to read, but I like it.
I'm glad that fonts that support ligatures make programming even a little more fun.
Around the terminal
There are very few situations in development when you don't need a terminal, so I think you will often press "Ctrl + Shift + @" in VSCode.
I will introduce the settings around the terminal.
terminal.integrated.shell.windows
I think there are many people who say that the terminal they often use is not the command prompt, so I will introduce settings to change the terminal.
A restart is required for the terminal changes to take effect, but if you give this option the path to the terminal executable file, that terminal will be used.
As far as I tried
- command prompt
- PowerShell
- Git Bash
- Bash on Ubuntu (on Windows)
It seems that Bash on Ubuntu can be used, and I'm glad that engineers who are close to infrastructure will find it useful.
terminal.integrated.scrollback
This option allows you to set the maximum line buffer for the terminal.
The default is 1000 lines, but if the log flows quickly or a large amount is output, it is helpful to increase this value so that fewer things are missed.
Around the file
Here we will introduce settings related to saving files.
files.eol
Specify the newline code for the file. Specify it using something like "\n" or "\r\n".
The line break code may change depending on the development environment or project, so it is useful to switch from "User Settings" to "Workspace Settings" and set it.
It's a small thing, but it's important, so I'm grateful.
files.encoding
Along with the line feed code, the character code changes depending on the environment.
Recently, UTF-8 has become the default, so I don't really pay attention to it anymore, but in older systems, Shift-JIS is often used.
I only use it occasionally, but I appreciate it.
Global settings (workbench)
Finally, we will take a look at the overall VSCode settings, called the workbench.
workbench.editor.enablePreview
It depends on the time and situation, but the VSCode editor has a state called preview mode, and when you open it from Explorer, it is in preview mode.
As long as you don't change anything, it will be treated as a preview, but if you open another file, it will reuse the preview editor.
In other words, the newly selected file will be opened in the place of the file that was opened as a preview.
I want to see the source code side by side! ! ! If you remember being irritated by this, you can enjoy stress-free coding by setting this option to "false."
You can also display files in a new group by holding down the Ctrl key while selecting them, but unfortunately you can only display a maximum of 3 groups.
You can open files as you wish by dragging the mouse, so if you don't mind using the mouse, there's no need to force it off. Thank you very much.
summary
I was trying to collect settings with a few tricks, but how many did you know?
As I wrote at the beginning, the speed of evolution of VSCode is so fast that the day may come when this article will no longer be useful.
While I would feel sad if that happened, I would also like to use VSCode, which has become more convenient.
That's it.