You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is no way to have snippets expand to have more than 10 unique tabstops, because the code to parse tabstops only parses a single digit after the dollar sign indicating the start of a tabstop. While this might not normally be very useful to many, with the introduction of function snippets, it is now easier than ever to create dynamically sized snippet outputs that can use many more than 10 tabstops, such as a large matrix.
Description of the Solution
While I do not believe changing the default implementation of $ followed by a single digit for tabstops (because this would significantly break existing snippets), I propose to only modify the placeholder tabstop functionality to allow for tabstop numbers that are as long as necessary. Existing placeholder tabstops are parsed using the format ${X:YYY} where X is a single digit and YYY is the replacement string. The current code for parsing these stops detects the prefix ${ and then looks for exactly one digit followed by a colon, and then parses the rest of the replacement string after. The only change that would need to be included is modifying the parser code to split the tabstop by the colon, and parse all text on the left as a multi-character number and all text on the right as the replacement string.
Additional Comments
While there do already exist ways to create matrices with the matrix-shortcut feature, there exists some difficulty when using tab to add ampersands inside of a matrix and using tab to tabout of the current expression. That is, every time I try to add ampersands to my matrices using tab, I have to click tab several times to get rid of the backlog of tabstops that I skipped in order to actually produce the ampersand. I've already submitting another ticket for this issue, and while they are both important issues, this modified tabstop numbering feels easier to address more quickly and would be a useful feature for all.
I plan on submitting a pull request with suggested changes to the placeholder tabstop code soon!
The text was updated successfully, but these errors were encountered:
Description of the Problem
Currently, there is no way to have snippets expand to have more than 10 unique tabstops, because the code to parse tabstops only parses a single digit after the dollar sign indicating the start of a tabstop. While this might not normally be very useful to many, with the introduction of function snippets, it is now easier than ever to create dynamically sized snippet outputs that can use many more than 10 tabstops, such as a large matrix.
Description of the Solution
While I do not believe changing the default implementation of $ followed by a single digit for tabstops (because this would significantly break existing snippets), I propose to only modify the placeholder tabstop functionality to allow for tabstop numbers that are as long as necessary. Existing placeholder tabstops are parsed using the format
${X:YYY}
where X is a single digit and YYY is the replacement string. The current code for parsing these stops detects the prefix${
and then looks for exactly one digit followed by a colon, and then parses the rest of the replacement string after. The only change that would need to be included is modifying the parser code to split the tabstop by the colon, and parse all text on the left as a multi-character number and all text on the right as the replacement string.Additional Comments
While there do already exist ways to create matrices with the matrix-shortcut feature, there exists some difficulty when using tab to add ampersands inside of a matrix and using tab to tabout of the current expression. That is, every time I try to add ampersands to my matrices using tab, I have to click tab several times to get rid of the backlog of tabstops that I skipped in order to actually produce the ampersand. I've already submitting another ticket for this issue, and while they are both important issues, this modified tabstop numbering feels easier to address more quickly and would be a useful feature for all.
I plan on submitting a pull request with suggested changes to the placeholder tabstop code soon!
The text was updated successfully, but these errors were encountered: