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

Do not insert spaces between CJK characters when joining lines #21232

Open
1 task done
peng1999 opened this issue Nov 27, 2024 · 3 comments
Open
1 task done

Do not insert spaces between CJK characters when joining lines #21232

peng1999 opened this issue Nov 27, 2024 · 3 comments
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim

Comments

@peng1999
Copy link

Check for existing issues

  • Completed

Describe the feature

In (Neo)vim there are two format options:

							*fo-M*
M	When joining lines, don't insert a space before or after a multibyte
	character.  Overrules the 'B' flag.
							*fo-B*
B	When joining lines, don't insert a space between two multibyte
	characters.  Overruled by the 'M' flag.

The B option is very convenient for CJK users because the language do not use spaces at all.

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 27, 2024
@notpeter notpeter added vim editor Feedback for code editing, formatting, editor iterations, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 27, 2024
@ConradIrwin
Copy link
Member

@peng1999 we recently shipped gJ which lets you join with no space.

I am happy for Zed to pick a better default than we do today. Is M or B the better behavior for most people?

cc @0x2CA

@0x2CA
Copy link
Contributor

0x2CA commented Jan 16, 2025

@peng1999 we recently shipped gJ which lets you join with no space.

I am happy for Zed to pick a better default than we do today. Is M or B the better behavior for most people?

cc @0x2CA

I rarely use the join line, but in my experience there are a number of needs for joins, with space or - or _ or | or no space
But usually for complex connections I opt for macro batch processing

@peng1999
Copy link
Author

I am happy for Zed to pick a better default than we do today. Is M or B the better behavior for most people?

In CJK context I believe B behavior is better. Because we do insert a space between ideograph and latin character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Feedback for code editing, formatting, editor iterations, etc enhancement [core label] vim
Projects
None yet
Development

No branches or pull requests

4 participants