Allow Tab to enumerate scopes in `syntax_test` files
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by locating the existing syntax_test Tab auto-assertion behavior and the handling of repeated Tab and Shift+Tab; the issue provides the expected scope sequence and caret movement. Done means generated assertions enumerate available non-space scopes forward and backward after initial generation, while empty-line Shift+Tab still inserts alignment spaces.
Written by the indexing model from the issue text.
Description
This is a proposal to change Tab to enumerate the available scopes in syntax_test files. It would work like repeatedly pressing ^ does for meta scopes, but instead of selecting successively larger scopes, it would move the auto-generated assertion to the next available substring.
Consider this example, with the cursor at |:
a = myfunc("str", var) + "aa"
# ^^^^^^^^^^^^ meta.function-call.arguments.python
#| @ % $$$$
With Tab working as it does today, pressing Tab in this circumstance would create a single-character assertion at %. The scopes are selected. If you press Tab again, the scopes are replaced with some number of spaces, which is useless. You'd never want spaces after the set of carets.
In this proposal, pressing Tab in this situation would move the assertion to $$$$. The carets would be moved and resized, and the scopes would be rewritten. Also, pressing Shift+Tab would move the assertion BACK to the close paren (@).
This behavior would only happen AFTER Tab was first used to auto-generate an assertion. That means that Shift+Tab would still be available to insert spaces on an empty line for manually aligning an assertion.
- Dominant language
- Python
- Stars
- 455
- Forks
- 86
- Avg merge
- 7d 10h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SublimeText/PackageDev
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
SublimeText/PackageDev#417 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
SublimeText/PackageDev#393 · 1 comment ·
-
enhancement
SublimeText/PackageDev#382 · 1 comment · 1 assignee ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SublimeText/PackageDev#379 ·
-
defect
SublimeText/PackageDev#371 · 1 comment · 1 reaction · 1 assignee ·
All issues in SublimeText/PackageDev
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100