✨ Column selection

Aperta
#46 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
macos, swift
Ambito
desktop

Direzione di ricerca

Nell’issue non sono indicati file né test. Inizia tracciando i punti di ingresso esistenti di CodeEditTextView per la selezione, il cursore, la tastiera, il mouse e gli appunti; il lavoro è completo quando la selezione a colonne funziona per i metodi di input e le operazioni di modifica elencati, con un cursore a mirino, supporto per gli appunti, copertura della compatibilità e documentazione nella guida utente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Description

We need to implement column selection (also known as block selection or rectangular selection) in CodeEdit, allowing users to select text in a columnar fashion. This feature is particularly useful for editing structured text, such as code, where the same changes need to be applied to multiple lines simultaneously.

Triggering Column Selection:

  • Users should be able to initiate column selection by either
    • holding down the ⌥ Option key and dragging the mouse or
    • using the keyboard with ⇧ Shift + ⌃ Control + ▲ up/▼ down arrow keys

Visual Indication:

  • There should be a clear visual indication that column selection mode is active by changing the cursor to crosshairs

Editing Behavior:

  • When text is typed while in column selection mode, it should replace the selected text in all lines within the selection.
  • Deleting should remove the selected block of text across all lines.
  • Navigating and selection with the arrow keys should apply to each cursor as expected, including with modifier keys held

Clipboard Support:

  • Copying should retain the multi-line selection.
Additional Context

This feature is common in many text editors and IDEs, such as Visual Studio Code, Sublime Text, and JetBrains IDEs, and can significantly enhance productivity, especially when working with large codebases.

Possible Challenges
  • Ensuring that column selection works seamlessly with all supported languages and file types.
  • Managing edge cases, such as selections that start or end in the middle of a tab character or mixed tab/space indentations.
References
Tasks
  1. Implement the core column selection functionality.
  2. Change cursor when ⌥ is held and over editor to indicate column selection mode.
  3. Ensure clipboard operations work with column selections.
  4. Test for compatibility with other editor features and languages.
  5. Document the feature in the CodeEdit user guide.
Screenshots

https://github.com/user-attachments/assets/55c15e53-d341-417e-81d6-9aaccbe1fc9f

Lingua principale
Swift
Stelle
182
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CodeEditApp/CodeEditTextView

Tutte le issue di CodeEditApp/CodeEditTextView

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.