Skip to content

Vim :s Command Ignores Case Sensitivity Settings #36260

@werdna521

Description

@werdna521

Summary

The :s command in Zed's Vim mode remains case-insensitive despite setting "use_smartcase_find": false and "search": { "case_sensitive": true } in settings.json.

Description

In Zed 0.199.6 on Ubuntu, the :s (substitute) command in Vim mode does not respect case sensitivity settings. Despite configuring "use_smartcase_find": false in the "vim" section and "search": { "case_sensitive": true } in settings.json, running :s/foo/bar replaces not only "foo" but also "Foo" and "FOO", indicating case-insensitive behavior. According to Zed’s documentation, these settings should make all :s commands case-sensitive by default. It's totally possible to toggle the case-insensitivity using the editor UI, but it would be great if we can do it without using the mouse.

Steps to reproduce:

  1. Install Zed 0.199.6 on Ubuntu
  2. Configure settings.json at ~/.config/zed/settings.json with:
    {
      "vim_mode": true,
      "vim": {
        "use_smartcase_find": false
      },
      "search": {
        "case_sensitive": true
      }
    }
  3. Open a new file in Zed with the following content:
foo
Foo
FOO
  1. In Vim normal mode, run :s/foo/bar

Expected Behavior:
Only "foo" should be replaced with "bar", leaving "Foo" and "FOO" unchanged, as "use_smartcase_find": false and "search": { "case_sensitive": true } should enforce case-sensitive substitutions.

Actual Behavior:
The command :s/foo/bar replaces "foo", "Foo", and "FOO" with "bar", indicating case-insensitive behavior.

Zed Version and System Specs

Zed: v0.199.6 (Zed)
OS: Linux Wayland ubuntu 24.04
Memory: 23.3 GiB
Architecture: x86_64
GPU: Intel(R) Iris(R) Xe Graphics (TGL GT2) || Intel open-source Mesa driver || Mesa 25.0.7-0ubuntu0.24.04.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    settingFeedback for preferences, configuration, etcvim

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions