✨ Column selection

Abierto
#46 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
macos, swift
Área
desktop

Línea de trabajo

En el issue no se nombran archivos ni pruebas. Empieza rastreando los puntos de entrada existentes de CodeEditTextView para la selección, el cursor, el teclado, el ratón y el portapapeles; se considerará terminado cuando la selección por columnas funcione para los métodos de entrada y las operaciones de edición indicados, con un cursor en forma de cruz, compatibilidad con el portapapeles, cobertura de compatibilidad y documentación en la guía del usuario.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Swift
Estrellas
182
Forks
57
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CodeEditApp/CodeEditTextView

Todos los issues de CodeEditApp/CodeEditTextView

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.