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

前端 未结 7 1047
灰色年华
灰色年华 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:19

    With the original snipMate plugin, create a file ~/.vim/ftplugin/erb_snippets.vim and put the following into it:

    silent call ExtractSnipsFile(g:snippets_dir . 'html.snippets', &l:filetype)
    silent call ExtractSnipsFile(g:snippets_dir . 'ruby.snippets', &l:filetype)
    

提交回复
热议问题