ZIm/crates/vim/src
Gaku Kanematsu c15382c4d8
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)
2025-04-21 18:42:04 -06:00
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal vim: Change line up and change line down respect indentation (#28934) 2025-04-17 20:51:24 -06:00
test vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
change_list.rs Add a way to navigate between changes (#28891) 2025-04-16 14:09:17 -06:00
command.rs debugger: More tidy up for SSH (#28993) 2025-04-21 16:00:03 +00:00
digraph.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
helix.rs Temporarily disable helix tests (#28279) 2025-04-07 21:50:35 +00:00
indent.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
insert.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
mode_indicator.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
motion.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
normal.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
object.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
replace.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
rewrap.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
state.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
surrounds.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00
test.rs editor: Refactor EditorMode::Full (#28546) 2025-04-10 23:22:27 +00:00
vim.rs vim: Add cursor shape settings for each vim mode (#28636) 2025-04-21 18:42:04 -06:00
visual.rs vim: Add some forced motion support (#27991) 2025-04-11 11:12:30 -06:00