Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输入中文符号时给出英文联想 #541

Closed
sunsonliu opened this issue Aug 21, 2023 · 1 comment
Closed

输入中文符号时给出英文联想 #541

sunsonliu opened this issue Aug 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@sunsonliu
Copy link
Collaborator

sunsonliu commented Aug 21, 2023

背景

用户使用中文输入法写md时,经常会需要切换全角/半角的场景,比如用中文输入法手写超链接语法时就会比较痛苦,比如[标题](url),实际书写时,如果不切换全角半角,就会变成【标题】(url)

功能1:在输入时给出联想

  • 输入·或者···时,联想出`
  • 输入时,联想出$
  • 输入时,联想出\/
  • 输入(中文冒号)时,联想出:(英文冒号)
  • 输入,联想出"
  • 输入时,联想出[]
  • 输入时,联想出()
  • 输入时,联想出<>

说白了就是当用户输入全角符号时给出对应半角的联想

进阶功能1+:更多联想

  • 用户输入时,猜测用户可能要插入超链接,不仅联想出[,还要联想出[][alt](url),并将光标定位在括号中间,或者处于选中"alt"的状态
  • 用户输入时,猜测用户不仅要输入(,还要输入),因此不仅联想出(,还要联想出()(),并将光标定位在括号中间
  • 输入《、”的场景同理

功能2:全角符号特殊染色

在左侧编辑区,当用户输入全角符号时,给出特殊染色,让用户意识到自己输入的是全角。

进阶功能2+:在编辑区域快速将全角切换成半角

  1. 用户鼠标hover到特殊染色的全角符号时,给出提示”该符号为全角符号,点击后切换为半角“
  2. 用户点击特殊染色的全角符号时,自动将全角符号时切换成对应的半角符号

在有功能1的前提下,仍然还需要功能2,因为功能2可以覆盖复制粘贴的场景

@sunsonliu sunsonliu added the enhancement New feature or request label Aug 21, 2023
@sunsonliu
Copy link
Collaborator Author

image

对了,目前输入/是可以给出一些功能建议的(这也是业界大部分编辑器支持的快捷键),但/在中文输入法(全角)情况下是无法直接输入的,需要切换成半角才行,这明显对中文输入法用户不友好。
所以希望增加配置能力,在保留/唤出功能建议的同时,也支持其他符号唤出功能建议,默认打开配置,默认符号为#

Kaed3mi added a commit to Kaed3mi/cherry-markdown that referenced this issue Sep 13, 2023
sunsonliu added a commit that referenced this issue Sep 14, 2023
* Update bug-report.yml,remove required

* Update client-report.yml,remove required

* Update docs-report.yml, remove required

* Update feature-report.yml, remove required

* Update vscodePlugin-report.yml, remove required

* Update other.md

* 输入中文符号时给出英文联想 #541

* 优化部分代码,修正checks问题。

* 将TextMarker匹配方式修改为单个字符,修改checks错误。

* 修改checks错误。

* 修改checks错误。

---------

Co-authored-by: sunsonliu <sunsonliu@tencent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant