From 53b36b328e0262a13b76d7efd8666ece3ab7a285 Mon Sep 17 00:00:00 2001 From: alexfertel Date: Mon, 28 Apr 2025 18:53:01 +0200 Subject: [PATCH] Update docs around vim's substitute command (#29404) With the introduction of https://github.com/zed-industries/zed/pull/28138, the current vim docs became stale. This PR makes a small update to the docs to reflect this. --- docs/src/vim.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/vim.md b/docs/src/vim.md index 706693824c13161ca3d0f7602b0322fb4a4f9cdf..827c9c537dd246f9981f852d583069c85197154e 100644 --- a/docs/src/vim.md +++ b/docs/src/vim.md @@ -252,11 +252,11 @@ These commands jump to specific positions in the file. ### Replacement -This command replaces text. It emulates the substitute command in vim. The substitute command uses regular expressions, and Zed uses a slightly different syntax than vim. You can learn more about Zed's syntax below, [in the regex differences section](#regex-differences). Also, by default, Zed always replaces all occurrences of the search pattern in the current line. +This command replaces text. It emulates the substitute command in vim. The substitute command uses regular expressions, and Zed uses a slightly different syntax than vim. You can learn more about Zed's syntax below, [in the regex differences section](#regex-differences). Zed will replace only the first occurrence of the search pattern in the current line. To replace all matches append the `g` flag. -| Command | Description | -| -------------------- | --------------------------------- | -| `:[range]s/foo/bar/` | Replace instances of foo with bar | +| Command | Description | +| ----------------------- | --------------------------------- | +| `:[range]s/foo/bar/[g]` | Replace instances of foo with bar | ### Editing