Add `syntax_test` shortcut for first character of previous line
@FichteFoll ya está trabajando en esto.
Desde el 9/9/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
If you press Tab in a syntax_test_* file on a line that has the test prefix (# in my case), it jumps to the next column, adds carets and the appropriate scopes. I've also found that when you use ^, you can step through the meta scopes, and once the meta scopes are added to a line's tests, subsequent auto-generated tests exclude it, thus making them much more readable. This is great, and dramatically speeds up writing tests when you have a syntax file that's working correctly.
But Tab finds the last column n with a test of any sort from the previous line and starts the next test in column n+1. That means that you can easily insert a meta test with something like #^^^, but then you have to manually line up the next test using Shift+Tab to get Tab working again to easily insert more tests.
So in this situation, with the cursor at |, I want a new, single-character test added at % for the open paren:
a = myfunc("param1", var2) + 3
# ^^^^^^^^^^^^^^^^ meta.function-call.arguments.python
#| %
Possible ways to address this:
- Add a shortcut that would work like
Tabwhen adding a new assertion, but would still add a test to the first un-asserted substring of the meta scope region if the previous line only contains meta scopes. - Simpler, just add a shortcut which works like
Tabbut instead of thinking about whether the previous region is meta or not, just start looking for the next range at the beginning of the previous line's assertion region.
I guess a good default binding for this shortcut on Mac would be Opt+Tab, although I don't know what would work best on Windows.
But another possibility is to just have Tab always work like proposal 1 above. That way it would be easy to find, and would encourage comprehensive testing. In this case, maybe we'd want to change the present behavior to another function/binding so that it was still available if needed.
- Lenguaje dominante
- Python
- Estrellas
- 455
- Forks
- 86
- Merge medio
- 7 d 10 h
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SublimeText/PackageDev
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
SublimeText/PackageDev#417 ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
SublimeText/PackageDev#393 · 1 comentario ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
SublimeText/PackageDev#383 ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
SublimeText/PackageDev#379 ·
-
defect
SublimeText/PackageDev#371 · 1 comentario · 1 reacción · 1 asignado ·
Todos los issues de SublimeText/PackageDev
Issues similares
-
documentation help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
simonw/sqlite-utils#872 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100