Given (0/q), tsf results in \frac{(0}{q)}. I would expect the result to be (\frac{0}{q}). I don't know if this agrees with the specification.
Using visual mode to first select the inner parts of the () works as expected.
Thanks, I'll look into it. I agree this seems unexpected and should be fixed.
Btw: Could you keep the entire issue in the post? That is, to fully read your issue I need to read the title and the post. The content should contain everything, even if it means duplication. I've taken the liberty of updating to give an example of what I think is better.
Should work now. One side effect: Earlier, tsf in normal mode on g(x)f(x)/h(x) would give \frac{g(x)f(x)}{h(x)}, but now it yields g(x)\frac{f(x)}{h(x)}. Personally, I think this is OK. The heuristic is to follow at most one set of parantheses on each side.
The visual mode version can be used to get the previous version, i.e. for $g(x)f(x)/h(x)$, one could do vi$tsf to get $\frac{g(x)f(x)}{h(x)}$.
I think that's a perfectly good heuristic.
Would it make sense adding other types of brackets too, like [] and maybe \lceil\rceil and {}?
Would it make sense adding other types of brackets too, like [] and maybe \lceil\rceil and {}?
Perhaps. Could you provide some examples?