Skip to content

vim: Respect search settings in buffer search#48127

Merged
SomeoneToIgnore merged 4 commits intozed-industries:mainfrom
cppcoffee:vim_search
Feb 1, 2026
Merged

vim: Respect search settings in buffer search#48127
SomeoneToIgnore merged 4 commits intozed-industries:mainfrom
cppcoffee:vim_search

Conversation

@cppcoffee
Copy link
Contributor

@cppcoffee cppcoffee commented Feb 1, 2026

Closes #48007

Release Notes:

  • Fixed Vim search not respecting "search" default settings

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 1, 2026
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As usual: the test is very much needed.

@SomeoneToIgnore SomeoneToIgnore self-assigned this Feb 1, 2026
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
@cppcoffee
Copy link
Contributor Author

As usual: the test is very much needed.

The unit test added.

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, that's quite an improvement over #40963 as this time the test actually works right and does fail on main.

I would appreciate if next time you think a bit more and actually write tests when you're changing the logic.

Ideally, you can also clear slop like

Image

but one clever thing at a time, I guess...

@SomeoneToIgnore SomeoneToIgnore merged commit aafecf0 into zed-industries:main Feb 1, 2026
29 checks passed
@cppcoffee cppcoffee deleted the vim_search branch February 2, 2026 00:56
@cppcoffee
Copy link
Contributor Author

Refactor unit test #48165

ConradIrwin added a commit that referenced this pull request Feb 3, 2026
@ConradIrwin
Copy link
Member

I'm reverting this for now (in #48234).

The / operator should default to regex search when vim_mode: true without any further configuration.

It would be nice to allow a users' configuration to override the defaults, but the challenge is that the default for vim mode differs from the default for non-vim mode.

One possible option would be to default the regex search setting to null in default.json; and when reading it herE:

regex: search.regex.unwrap(),
default it to content.vim_mode instead of calling unwrap). We'd need to update the docs for that setting to match

ConradIrwin added a commit that referenced this pull request Feb 3, 2026
Release Notes:

- (nightly only) Fixed vim search to be regex by default
adb-sh pushed a commit to adb-sh/zed that referenced this pull request Feb 5, 2026
…48234)

Release Notes:

- (nightly only) Fixed vim search to be regex by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search setting doesn't work for buffer search

3 participants