Home Download Buy Blog Forum Support

Multiple snippets in a single file

Multiple snippets in a single file

Postby kakubei on Sun Sep 25, 2011 9:22 am

Hello, very new to Sublime Text 2 (on OS X), downloaded it yesterday, really like it so far, looks like my replacement for Textmate.

First question, is it possible to have multiple snippets in one file? I tried it but ST2 doesn't seem to like it, it just reads the first one. If not possible, is this something that could be built? I just find it hard to manage (and a waste) to have one file per snippet.

thanks.
kakubei
 
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am

Re: Multiple snippets in a single file

Postby guillermooo on Sun Sep 25, 2011 9:49 am

Consider using .sublime-completions files:

http://www.sublimetext.com/docs/2/tab_completion.html
http://sublimetext.info/docs/en/extensi ... tions.html

They work well as collections of short snippets. Longer ones will still require separate .sublime-snippet files for clarity.

EDIT: I meant .sublime-completions files. .sublime-commands files add items to the Command Palette.
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 21 guests