# vim: Add cursor shape settings for each vim mode \(\#28636\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c15382c4d816a4d9c8aacb240c50aa3c8848d750)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c15382c4d816a4d9c8aacb240c50aa3c8848d750

Requested commit: c15382c4d816a4d9c8aacb240c50aa3c8848d750

Commit: c15382c4d816a4d9c8aacb240c50aa3c8848d750

Tree: 9255154087a29c138381251d5a938352c63494dd

Author: Gaku Kanematsu

Committer: GitHub

## Message

````
vim: Add cursor shape settings for each vim mode (#28636)

Closes #4495

Release Notes:

- vim: add cursor shape settings for each vim mode

---

Add cursor shape settings for each vim mode to enable users to specify
them.

Example of `settings.json`:

```json
{
  "vim_mode": true,
  "vim": {
    "cursor_shape": {
      "normal": "hollow",
      "insert": "bar",
      "replace": "block",
      "visual": "underline"
    }
  }
}
```

After this change is applied,

- The cursor shape specified by the user for each mode is used.
- In insert mode, the `vim > cursor_shape > insert` setting takes
precedence over the primary `cursor_shape` setting.
- If `vim > cursor_shape > insert` is not set, the primary
`cursor_shape` will be used in insert mode.
- The cursor shape will remain unchanged before and after this update
when the user does not set the `vim > cursor_shape` setting.

Video:


[screen-record.webm](https://github.com/user-attachments/assets/b87461a1-6b3a-4a77-a607-a340f106def5)
````

## Parents

- [70c51b513b0af8d0f36f016b1ebeaa3a5535b0ca](https://git.cafe/gitcafe/zed/commit/70c51b513b0af8d0f36f016b1ebeaa3a5535b0ca?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c15382c4d816a4d9c8aacb240c50aa3c8848d750?format=markdown)
