A textmate alike snippet

A textmate alike snippet system should not be too hard to build. From hwat I see, there are three main points that make textbundles such a great feature:

  • shortcut expansion: One types fun[tab] and gets function func_name($foo, $bar){\n\t|}
  • tabstops function {$funcname}({$foo}, {$bar}) will prompt the user to add type a function name (replacing all occurences of {$funcname} into what she just typed). A tab will bring the user to the next replaceable var etc.
  • bundles: the way of storing the snippets is a) really simple and b) plaintext and c) easily distributable. Besides that, there are many TMbundles, about every significant development project has its own. re-use of that enormous base would be very usefull.

Hope this helps some developers get ideas :)

Reply

  • You can use Markdown syntax to format and style the text.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.