How to add another file extension (e.g. 'style.less') to Vim's snipMate plugin?

StackOverflow https://stackoverflow.com/questions/8382986

  •  28-10-2019
  •  | 
  •  

I would like to write snippets for Less (.less) and Stylus (.styl) and use then in Vim's snipMate plugin. How can I accomplish that?

EDIT: I know that the first step is to create a file inside the snippets folder with a name like this: less.snippets or stylus.snippets but after that I'm not sure what to do.

有帮助吗?

解决方案

Yes right that is the first step. And after that you have to set the filetype of the files you want to edit with multiple snippets to:

set filetype=less.styl

or

set filetype=styl.less

I've just tested it with the snipmate "official" fork and it works fine but I'm sure enough it should work with the original plugin too.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top