Although Vim is very smooth to operate, for a Chinese developer, Vim's default configuration often appears garbled.
The second is the issue of indentation, how to make the code layout format seen by different system platforms have the same style.
When participating in open source projects, there are many common coding standards that are worth setting as default.
I usually set tabs to 4 spaces, and then use the Unix standard form of <LF> for line breaks. As for the garbled code problem, I used this code to solve it
The Chinese garbled problem can be solved by setting the current encoding method (enc) and file encoding (fenc)
The problem with indentation lies in everyone’s tab display settings...
The most reliable way is probably to set it to spaces instead of tabs
This will slightly increase the file size. Then use shift+backspace when deleting the indent. Pressing the bs key alone can only delete one space~
@yanyaoer’s encoding settings are already very applicable, just add some tabs and spaces
ts/sw/... is the abbreviation
Post another configuration, just make things better