Vim html.erb snippets?? snipMate Need a vim tip

前端 未结 7 1143
灰色年华
灰色年华 2021-02-04 08:47

When I\'m in an html.erb file, I get no snipMate snippets.

I would like both HTML and Ruby, or just HTML would be fine, How would I do this?

Would I need to writ

7条回答
  •  暖寄归人
    2021-02-04 09:21

    I am currently on a promoting tour for UltiSnips on StackOverflow. UltiSnips supports extending other file types, your erb.snippets would look like this:

    extends html, ruby, rails
    
    snippet temp "A snippet only in Erb"
    erb rules ${1}
    endsnippet
    

    A conversion script for snipMate snippets is shipped with UltiSnips, so switching is easy.

提交回复
热议问题