Вопрос

I'll be editing some .less files. Now, I want the filetype to be "less", but I want vim to do all inclusions of css and css3 plugins when opening a .less file.

There are times I'd like to be able to do this that may be less obvious as well, but if we can figure out the best method for this particular case, I can modify the technique for what I need.

Thoughts?

Thanks!

Это было полезно?

Решение

To "inherit" filetype settings from another filetype, use this as a starting point; you can add customizations after it. Place it at ~/.vim/ftplugin/less.vim:

if exists('b:did_ftplugin') | finish | endif

runtime! ftplugin/css.vim
runtime! ftplugin/css_*.vim ftplugin/css/*.vim
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top