[SVN] Proposal for common snippet trigger naming

Mads Hartmann Jensen mads379 at gmail.com
Fri Feb 4 09:36:53 UTC 2011


Hey guys, 

I would like to propose a standard for snippet trigger naming. 

I would like if the keyword related triggers (class, for, if, switch, enumeration, etc.) all had a full keyword trigger. This makes it a LOT easier for polygot programmers to be efficient users of snippets. This of course has the downside that you don't safe as many characters. This can easily be solved by introduction short-cut snippets. I do this in my Scala bundle[1]. The short-cut snippets expand to the full keyword and as such you get the same result as before by pressing tab twice. 

An example from my bundle: 

snippet: 
	name: class 
	trigger: class
	output: ...code...
snippet: 
	name: shortcut - class 
	trigger: c
	output: class

How do people feel about changing their bundles to conform to this standard? 

Thanks,
Mads Hartmann Jensen

[1] https://github.com/mads379/scala.tmbundle


More information about the textmate-dev mailing list