Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将编辑一些 .less 文件。现在,我希望文件类型为“less”,但我希望 vim 在打开 .less 文件时包含所有 css 和 css3 插件。
有时我也希望能够做到这一点,这可能也不那么明显,但如果我们能找出适合这种特殊情况的最佳方法,我可以根据我的需要修改该技术。
想法?
谢谢!
要从另一个文件类型“继承”文件类型设置,请以此为起点;您可以在它之后添加自定义。把它放在~/.vim/ftplugin/less.vim:
~/.vim/ftplugin/less.vim
if exists('b:did_ftplugin') | finish | endif runtime! ftplugin/css.vim runtime! ftplugin/css_*.vim ftplugin/css/*.vim