1

I'm trying to create a Textmate snippet, but have run into some difficulties. Basically, I want to type in a Name and split it into its parts.

Example,

Bill Gates: (Bill), (bill), (Gates), (gates), (Bill Gates), (Bill gates), (bill Gates), (bill gates)

EDIT**

So I most certainly can produce these results quite simply if I was using a programming language. For example, I could split the words and then call the uppercase or lowercase functions to produce this output.

But in my situation I am using Textmate and it regular expression capabilities to create a tab snippet. I want to type some trigger key, ie doit, press tab and then type in a username. Then the ouput above will be created. This won't save me that much time, but I feel like I come across this sort of stuff in Textmate quite frequently and want to figure it out.

I have been using this as a reference, but still don't know how use regexps to be selective with the words and upper and lowercase the values (\u \U \l \L)

http://manual.macromates.com/en/snippets

davidcondrey
  • 34,416
  • 17
  • 114
  • 136
esiegel
  • 1,773
  • 2
  • 19
  • 31
  • Indeed, I am confused as well... I don't see the relation between "split it" and your example. – PhiLho Nov 24 '08 at 23:06

1 Answers1

2

You can use Ruby for textmate snippets. That should make it simpler.

dylanfm
  • 6,292
  • 5
  • 28
  • 29