✨ Column selection
還沒有人認領這個 Issue。
評估
研究方向
Issue 中沒有指定檔案或測試。首先追蹤 CodeEditTextView 現有的選取、游標、鍵盤、滑鼠和剪貼簿入口;完成的標準是:欄選取能夠用於所列的輸入方式和編輯操作,並具備十字游標、剪貼簿支援、相容性涵蓋以及使用者指南文件。
由索引模型根據 Issue 內容生成。
描述
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
⌥ Optionkey and dragging the mouse or - using the keyboard with
⇧ Shift+⌃ Control+▲ up/▼ downarrow keys
- holding down the
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
- Implement the core column selection functionality.
- Change cursor when ⌥ is held and over editor to indicate column selection mode.
- Ensure clipboard operations work with column selections.
- Test for compatibility with other editor features and languages.
- Document the feature in the CodeEdit user guide.
Screenshots
https://github.com/user-attachments/assets/55c15e53-d341-417e-81d6-9aaccbe1fc9f
- 主要語言
- Swift
- 星號
- 182
- 分支
- 57
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodeEditApp/CodeEditTextView 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 48/100
CodeEditApp/CodeEditTextView#124 ·
-
bug
難度 3/5 1-2 天 新手友好度 48/100
CodeEditApp/CodeEditTextView#121 ·
-
enhancement
難度 5/5 一週以上 新手友好度 28/100
CodeEditApp/CodeEditTextView#119 ·
-
enhancement
難度 5/5 一週以上 新手友好度 35/100
CodeEditApp/CodeEditTextView#106 ·
-
難度 4/5 3-5 天 新手友好度 35/100
查看 CodeEditApp/CodeEditTextView 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
-
area:general bug P1 security
難度 2/5 1-3 小時 新手友好度 75/100
uttrflow/uttrflow-swift#1333 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
maxgoedjen/secretive#840 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
manaflow-ai/cmux#13763 ·