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

Distinguish between Latin characters and CJK characters in vim::NextWordStart etc. #21203

Open
1 task done
peng1999 opened this issue Nov 26, 2024 · 0 comments
Open
1 task done
Labels
enhancement [core label] internationalization Feedback for human language support, translations, etc vim

Comments

@peng1999
Copy link

Check for existing issues

  • Completed

Describe the feature

If I have a buffer:
ˇ试一试abc试一试 a
and press w in vim mode, the whole string "试一试abc试一试" is recognized as a single word and the buffer will become
试一试abc试一试 ˇa.
This is not expected. In Vim/Neovim it will know the CJK characters is different from Latin characters and become
试一试ˇabc试一试 a

The related code in Neovim is
https://github.com/neovim/neovim/blob/66bb1e577c96d8eb63c04dcc737394b4ce2b0f5d/src/nvim/mbyte.c#L1290-L1308. I think in zed we can just use Unicode Script property to distinguish the characters.

Environment

Zed: v0.162.5 (Zed)
OS: macOS 15.1.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@peng1999 peng1999 added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Nov 26, 2024
@notpeter notpeter added vim internationalization Feedback for human language support, translations, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] internationalization Feedback for human language support, translations, etc vim
Projects
None yet
Development

No branches or pull requests

2 participants