Is it possible to change the case of variable values within Snipmate snippets?
For example:
snippet dc
  def create
    @${1} = $1.new
  end
Should output:
def create
  @product = Product.new
end
I tried to use backticks to call a custom function:
snippet dc
  def create
    @${1} = `ToUpperCase('$1')`.new
  end
And defined this function in Vim:
function! ToUpperCase(str)
    let result = substitute(a:str, '\(\w\)', '\u\1', '')
    return result
endfunction
This doesn't work as it seems that Snipmate expands its $n variables after it has executed the backticks.