Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional ordered tabs #117

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Add optional ordered tabs #117

merged 1 commit into from
Jan 7, 2024

Conversation

pokir
Copy link
Contributor

@pokir pokir commented Jan 2, 2024

I found that it was impossible to create custom shorthands that can tab in any order, so I added a way to define the order to go through the #tabs.

For example: \left#cursor #tab \right#tab would always tab to the middle instead of the second tab, which is annoying and does not make sense for this custom shorthand.

To fix this, I added a way to optionally define the order of the tabs like this:
\left#cursor #tab2 \right#tab1
This will first tab to #tab1 and then to #tab2.

Other example: \binom{#tab45}{#cursor}#tab12#tab999 would go to #cursor, then to #tab12, then to #tab45, and finally to #tab999 (the numbers are chosen in increasing order).

The normal #tabs still work for backwards compatibility, the only difference being that they are now searched from the start of the current line instead of after the cursor's position (which shouldn't be a problem since all previous custom shorthands had to have the #tabs after the #cursor.

The description for the custom shorthand parameters in the settings was also updated to explain this addition.

@joeyuping joeyuping merged commit cd8eeca into joeyuping:master Jan 7, 2024
@joeyuping
Copy link
Owner

@pokir Thank you so much!!! That's a really great addition! Will publish this merge in the immediate version update.

joeyuping added a commit that referenced this pull request Jan 7, 2024
@pokir pokir deleted the add-ordered-tabs branch January 12, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants