ZIm/crates/vim/src
Kirill Bulatov e11e7df724
Restore editor state on reopen (#27672)
Closes https://github.com/zed-industries/zed/issues/11626
Part of https://github.com/zed-industries/zed/issues/12853

`"restore_on_file_reopen": true` in workspace settings can now be used
to enable and disable editor data between file reopens in the same pane:


https://github.com/user-attachments/assets/8d938ee1-d854-42a8-bbc3-2a4e4d7d5933

The settings are generic and panes' data store can be extended for
further entities, beyond editors.

---------------
Impl details: 

Currently, the project entry IDs seem to be stable across file reopens,
unlike BufferIds, so those were used.
Originally, the DB data was considered over in-memory one as editors
serialize their state anyway, but managing and exposing PaneIds out of
the DB is quite tedious and joining the DB data otherwise is not
possible.


Release Notes:

- Started to restore editor state on reopen
2025-03-28 22:04:16 +00:00
..
digraph Add Vim digraphs (#14887) 2024-07-28 22:44:32 -06:00
normal Rename LSP function and simplify tests (#27313) 2025-03-22 19:23:11 +00:00
test Restore editor state on reopen (#27672) 2025-03-28 22:04:16 +00:00
change_list.rs vim: Add global marks (#25702) 2025-03-15 05:58:34 +00:00
command.rs vim: View Marks (#26885) 2025-03-22 04:46:04 +00:00
digraph.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
helix.rs vim: Add global marks (#25702) 2025-03-15 05:58:34 +00:00
indent.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
insert.rs vim: Add global marks (#25702) 2025-03-15 05:58:34 +00:00
mode_indicator.rs Display case-sensitive keybindings for vim commands (#24322) 2025-02-14 22:03:59 -07:00
motion.rs vim: Fix space not handling non-ascii characters (#27053) 2025-03-19 07:28:50 -06:00
normal.rs vim: Add global marks (#25702) 2025-03-15 05:58:34 +00:00
object.rs vim: Fix back quotes not recognized as object (#24999) 2025-02-26 14:21:12 -05:00
replace.rs vim: Rename wrapping keybindings + document cursor wrapping (#25694) 2025-03-05 08:54:30 -07:00
rewrap.rs Improvements to interactive hard wrap behavior (#26953) 2025-03-18 17:05:08 +00:00
state.rs vim: View Marks (#26885) 2025-03-22 04:46:04 +00:00
surrounds.rs Migrate keymap and settings + edit predictions rename (#23834) 2025-02-07 21:17:07 +05:30
test.rs keymap: Detect and report errors for uppercase keybindings (#27558) 2025-03-27 21:17:43 +00:00
vim.rs vim: Single quote mark (#27231) 2025-03-22 05:45:57 +00:00
visual.rs Correct other end visual block functionality (#27678) 2025-03-28 20:52:38 +00:00