✨ Highlight Matching Tags
还没有人认领这个 Issue。
评估
调研方向
该 issue 未列出任何文件、测试或入口点。首先定位编辑器中负责标签解析、光标匹配、高亮显示和编辑同步的组件;当对于所描述的光标位置,相匹配的开始标签和结束标签都被高亮显示,并且在编辑名称时仍保持同步,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Description
We want to enhance tag-matching behavior in markup languages such as HTML, XML, and JSX by highlighting matching tags based on cursor position. This feature is inspired by bracket matching in Xcode, where matching brackets are highlighted based on cursor placement.
When the cursor is placed within a tag, the corresponding opening or closing tag should be highlighted. Additionally, if any tag name is modified in either the beginning or end tag, the matching tag should update to reflect the change.
Behavior Examples
In the following examples, | represents the cursor position, and underlined text represents the highlighted matching tags:
- <|div class="wrapper">Hello world!</div>
- <div| class="wrapper">Hello world!</div>
- <div class="wrapper">|Hello world!</div>
- <div class="wrapper">Hello world!<|/div>
- <div class="wrapper">Hello world!</div|>
- <div class="wrapper">Hello world!</div>|
Requirements
-
Cursor-Based Tag Matching:
- When the cursor is within a tag name, either at the opening or closing tag, the corresponding tag should be highlighted.
-
Tag Synchronization:
- When a tag name is edited, the matching tag should update to reflect the change in real-time, ensuring that both tags are always in sync.
-
Highlight Behavior:
- Highlighting should clearly indicate the matching tag, using a distinct visual style (e.g., underline or color change) for both the opening and closing tags to enhance visibility.
This feature will improve the editing experience by making it easier to identify matching tags, reducing errors in nested or complex structures.
Original Issue Description
Is it possible to highlight the opening and closing tags? Example: <div> </div>
- 主要语言
- Swift
- 星标
- 720
- 派生
- 162
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CodeEditApp/CodeEditSourceEditor 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
CodeEditApp/CodeEditSourceEditor#377 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
CodeEditApp/CodeEditSourceEditor#376 · 1 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 68/100
CodeEditApp/CodeEditSourceEditor#378 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 32/100
查看 CodeEditApp/CodeEditSourceEditor 的全部 Issue
相似的 Issue
-
area:dictation documentation P2
难度 2/5 1-3 小时 新手友好度 78/100
uttrflow/uttrflow-swift#1180 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
type: docs
难度 1/5 1 小时以内 新手友好度 95/100
googleapis/google-cloud-swift#971 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
mozilla-mobile/firefox-ios#35743 ·