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.
On 24 Sep 2013, at 21:17, Craig Hess wrote:
[…] 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.
What you’re seeing is a bug.
A simple fix though is to give the second $1 a default value, e.g. make it:
label = "${1:foo}"
And then it will correctly place the caret at the label, i.e. the issue is with placeholders without any default text.
Thanks for your help.
I'll check the issue queue on github next time.
What you’re seeing is a bug.
A simple fix though is to give the second $1 a default value, e.g. make it:
label = "${1:foo}"
And then it will correctly place the caret at the label, i.e. the issue is with placeholders without any default text.
______________________________**_________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/**listinfo/textmatehttp://lists.macromates.com/listinfo/textmate