[TxMt] Snippet placeholder cursor location and text transformations

Craig Hess craig at dazium.com
Tue Sep 24 19:17:31 UTC 2013


I created a snippet for graphviz for subgraphs as follows:

subgraph cluster_${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g} {
  style = filled;
  bgcolor = lightgrey;
  $0
  label = "$1"
}

With it in TM1, I can quickly create snippets such as:
subgraph cluster_subgraph_label {
  style = filled;
  bgcolor = lightgrey;

  label = "Subgraph Label"
}

In TM1, after expanding the snippet, the cursor moves to the 'label = "$1"'
location of the $1 placeholder. However, in TM2, the cursor jumps up to the
subgraph_cluster_ line, where I'm unable to take advantage of the text
transformation there. I guess this would work if reworked the
transformation to be on second $1, but wanted to know what the consistent
behavior is or will be.

Thank you for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20130924/7668e658/attachment.html>


More information about the textmate mailing list