✨ 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
-
area:dictation documentation P2
难度 2/5 1-3 小时 新手友好度 78/100
uttrflow/uttrflow-swift#1180 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 84/100
OneBusAway/onebusaway-ios#1451 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
type: docs
难度 1/5 1 小时以内 新手友好度 95/100
googleapis/google-cloud-swift#971 ·