How to add new snippets to snipMate in VIM

后端 未结 6 567
遥遥无期
遥遥无期 2021-02-08 07:03

Ive just started using the sniptMate plugin for VIM and love it, however, since my collection of snippets isn\'t huge, I\'d like to be able to add new snippets dynamically rathe

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-08 07:20

    Just place your own snippets (given you want to use them in all files you edit) here:

    ~/.vim/after/snippets/_.snippets
    

    For example:

    snippet test
      {"foo": "${1}", "bar": "${2}"}
    

提交回复
热议问题