vim 设置文件类型
Vim can detects the file types from quite well. But under certain situations, such as creating a new file, Vim does not automatically set the file type. How to manually set it?
Vim可以很好地检测文件类型。 但是在某些情况下,例如创建新文件,Vim不会自动设置文件类型。 如何手动设置?
In side Vim, to set a filetype, set value to the filetype
variable. For example, to set the filetype to php:
在Vim端,要设置文件类型,请将value设置为filetype
变量。 例如,要将文件类型设置为php:
:set filetype=php
Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。
翻译自: https://www.systutorials.com/how-to-manually-set-vims-filetype/
vim 设置文件类型