vim: Load keymap after base keymap (#24161)

Closes #22562

Release Notes:

- vim: Load vim keymap after a user-configured keymap
This commit is contained in:
Conrad Irwin 2025-02-03 20:25:20 -07:00 committed by GitHub
parent 3d3ac2c470
commit e17f307189
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1239,13 +1239,14 @@ pub fn load_default_keymap(cx: &mut App) {
}
cx.bind_keys(KeymapFile::load_asset(DEFAULT_KEYMAP_PATH, cx).unwrap());
if VimModeSetting::get_global(cx).0 {
cx.bind_keys(KeymapFile::load_asset(VIM_KEYMAP_PATH, cx).unwrap());
}
if let Some(asset_path) = base_keymap.asset_path() {
cx.bind_keys(KeymapFile::load_asset(asset_path, cx).unwrap());
}
if VimModeSetting::get_global(cx).0 {
cx.bind_keys(KeymapFile::load_asset(VIM_KEYMAP_PATH, cx).unwrap());
}
}
pub fn handle_settings_changed(error: Option<anyhow::Error>, cx: &mut App) {