(+84) 463.28.7979

Vim Essential Plugin: SnipMate


Once installed, you only need to type the desired snippet trigger, and then press Tab. Keep in mind, though, that the available snippets are limited to the extension of the file you’re working on. For example, JavaScript snippets will not work within an HTML file, and vice versa.

Try visiting your ~.vim/snippets directory for an overview of all the available shortcut keys. You can even create your own!

  1. snippet mysnippet
  2. <bla attr=”${1:default}”>
  3. </bla>

If the above snippet is placed within the HTML.snippets file, you’ll then be able to create a bla element by typing the shortcut, mysnippet.

“Note: When creating new snippets, you’ll need to either restart Vim, or open a new window before testing/”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>