Tab stops in code templates and inserted fragments in Author Mode?
Posted: Fri Jun 10, 2022 9:23 am
Hi. I was wondering if you would consider introducing tab stops in code templates (unless I've missed them in the documentation).
Tab stops are the mechanism that other text editors (such as Atom, VS Code etc.) use to help the user move the cursor to the next specific place in the template by pressing the TAB key.
Why are tabstops useful?
When you have a code template or an insertFragment action with nested elements, such as this:
you want the user in the Author Mode to move the caret easily from ${1} to ${2} etc. with the tab. At the moment, to get from orth to gram above, it takes three tabs, because in oXygen tabs only move you to the next node. Some frameworks, like TEI, can get quite verbose with nested nodes, and not all nodes should take content, so ideally you would want to be able to help the user to navigate the structure as simply and as efficiently as possible.
Some implementations get additional cool features such as tab stops combined with placeholders, choices etc. (see for instance https://github.com/jonschlinkert/tabstops) ...
What do you think?
All best,
Toma
Tab stops are the mechanism that other text editors (such as Atom, VS Code etc.) use to help the user move the cursor to the next specific place in the template by pressing the TAB key.
Why are tabstops useful?
When you have a code template or an insertFragment action with nested elements, such as this:
Code: Select all
<entry xmlns="http://www.tei-c.org/ns/1.0">
<form type="lemma">
<orth>${1}</orth>
</form>
<gramGrp>
<gram type="pos">${2}</gram>
</gramGrp>
<sense>
<def>${3}</def>
<cit type="example">
<quote>${4}</quote>
<bibl>${5}</bibl>
</cit>
</sense>
</entry>
you want the user in the Author Mode to move the caret easily from ${1} to ${2} etc. with the tab. At the moment, to get from orth to gram above, it takes three tabs, because in oXygen tabs only move you to the next node. Some frameworks, like TEI, can get quite verbose with nested nodes, and not all nodes should take content, so ideally you would want to be able to help the user to navigate the structure as simply and as efficiently as possible.
Some implementations get additional cool features such as tab stops combined with placeholders, choices etc. (see for instance https://github.com/jonschlinkert/tabstops) ...
What do you think?
All best,
Toma