Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Global snippets in vim

I use snipMate in Vim, and try to use certain snippets in any type of file. But I could only find ways of relating snippets to specific filetypes. Is there a way to set 'global' snippets?

like image 318
user852091 Avatar asked Sep 02 '11 19:09

user852091


People also ask

What is snippet in vim?

A snippet is a piece of often-typed text that you can insert into your document using a trigger word followed by a <tab>. For instance, in a C file using the default installation of snipMate.vim, if you type "for<tab>" in insert mode, it will expand a typical for loop in C: for (i = 0; i < count; i++) {


1 Answers

Define a _.snippets file in your snippets directory and puts there your global snippets

like image 155
lucapette Avatar answered Sep 22 '22 16:09

lucapette