How to add new snippets to snipMate in VIM

后端 未结 6 571
遥遥无期
遥遥无期 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:37

    If you use vundle to manage your plugins on Windows and you have installed

    vim-snipMate & vim-snippets
    

    If you want to add your customization, say to 'html' filetype, you just go to this folder:

    $HOME/vimfiles/bundle/vim-snippets/snippets/ 
    

    create a new file and name it in this format:

    html_bsmith.snippets  
    

    (it must be underscore after html, see :help snipmate)

    Then vim will load your file automatically.

    If you customization can be used anywhere, just put it in the existing file:

        _.snippets
    

提交回复
热议问题