vim: Add :options, :map (#27798)

Add:
- [:options](https://neovim.io/doc/user/options.html#%3Aoptions) to open
default settings
- :map to open default vim keymap

These aren't exactly the same as vim but i think it's a good equivalent

For map:
I can't find the docs for :map with no arguments, since the map docs
only shows the command bindings, but it opens the key mapping in vim.

https://neovim.io/doc/user/vimindex.html

![image](https://github.com/user-attachments/assets/83aeebc4-e2e9-4818-890d-d307d5cee9b1)

Release Notes:

- vim: Added `:options` and `:map`
This commit is contained in:
5brian 2025-03-31 15:19:55 -04:00 committed by GitHub
parent ddc102c7e0
commit 27cafe5567
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -882,6 +882,8 @@ fn generate_commands(_: &App) -> Vec<VimCommand> {
.bang(editor::actions::ReloadFile), .bang(editor::actions::ReloadFile),
VimCommand::new(("ex", ""), editor::actions::ReloadFile).bang(editor::actions::ReloadFile), VimCommand::new(("ex", ""), editor::actions::ReloadFile).bang(editor::actions::ReloadFile),
VimCommand::new(("cpp", "link"), editor::actions::CopyPermalinkToLine).range(act_on_range), VimCommand::new(("cpp", "link"), editor::actions::CopyPermalinkToLine).range(act_on_range),
VimCommand::str(("opt", "ions"), "zed::OpenDefaultSettings"),
VimCommand::str(("map", ""), "vim::OpenDefaultKeymap"),
] ]
} }