✨ Language-Aware Automatic Indentation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Esamina il comportamento attuale dell'indentazione dell'editor descritto nell'issue, quindi confronta la gestione delle grammatiche dei linguaggi di TextMate con il comportamento citato di VSCode. Il lavoro è completato quando l'indentazione e la deindentazione automatiche seguono la grammatica del linguaggio attivo, sono configurabili per ogni linguaggio, possono essere disabilitate e mantengono i controlli manuali dell'indentazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
It would be great if CodeEdit, given instructions from the language grammar in use for the open file, were able to automatically indent and outdent lines as you type based on accepted style standards. For example, an "if" statement, "for" loop, etc. in most languages would cause the following lines to be indented once, then the closing bracket or statement would be outdented to line up with the original "if" or "for" statement. This functionality should be adjustable by editing settings for the language and able to be disabled entirely for those that prefer manual indentation.
TextMate is a good example to look at for reasonable behavior. The language grammars it uses to handle this functionality are also plist files and very easy to read to see how it's being done. Some plugins also enable this behavior in VSCode, though it's implemented inconsistently there.
Alternatives Considered
Most editors use manual indentation, which I assume CodeEdit will eventually support. Right now it only supports tabbing in (and does at least maintain that indent), but you cannot shift+tab out or use command+[ or command+] to outdent/indent (respectively) lines or selected blocks. Manual indentation works, and should be an option for those who wish to indent in ways inconsistent with language standards, but is far slower than automatic indentation.
Additional Context
No response
Screenshots
Here's an example of TextMate auto-indenting and outdenting a for loop in a shell script (bash). The second line is automatically indented to my configured tab stop, then once I finish typing "done" it outdents it to match for. This also works correctly if "do" is placed on its own line.
https://github.com/user-attachments/assets/76d5a013-7428-4764-8357-e5bdb6b179c8
- Lingua principale
- Swift
- Stelle
- 23k
- Fork
- 1.2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeEditApp/CodeEdit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeEditApp/CodeEdit#2190 ·
-
Is this project dead? Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
CodeEditApp/CodeEdit#2195 · 5 reazioni ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
CodeEditApp/CodeEdit#2185 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on starting Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
CodeEditApp/CodeEdit#2180 ·
Tutte le issue di CodeEditApp/CodeEdit
Issue simili
-
The correction-threshold rationale says 17 restraint cases collide; the current corpus has 16 Apertaarea:dictation documentation P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
uttrflow/uttrflow-swift#1180 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
OneBusAway/onebusaway-ios#1451 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
type: docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
googleapis/google-cloud-swift#971 ·