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