Add VIM_KEYMAP_PATH
constant (#23228)
Deduplicates 2 occurrences Release Notes: - N/A
This commit is contained in:
parent
972176a574
commit
f51db18b3c
@ -82,8 +82,10 @@ pub fn default_keymap() -> Cow<'static, str> {
|
||||
asset_str::<SettingsAssets>(DEFAULT_KEYMAP_PATH)
|
||||
}
|
||||
|
||||
pub const VIM_KEYMAP_PATH: &str = "keymaps/vim.json";
|
||||
|
||||
pub fn vim_keymap() -> Cow<'static, str> {
|
||||
asset_str::<SettingsAssets>("keymaps/vim.json")
|
||||
asset_str::<SettingsAssets>(VIM_KEYMAP_PATH)
|
||||
}
|
||||
|
||||
pub fn initial_user_settings_content() -> Cow<'static, str> {
|
||||
|
@ -39,7 +39,7 @@ use rope::Rope;
|
||||
use search::project_search::ProjectSearchBar;
|
||||
use settings::{
|
||||
initial_project_settings_content, initial_tasks_content, KeymapFile, Settings, SettingsStore,
|
||||
DEFAULT_KEYMAP_PATH,
|
||||
DEFAULT_KEYMAP_PATH, VIM_KEYMAP_PATH,
|
||||
};
|
||||
use std::any::TypeId;
|
||||
use std::path::PathBuf;
|
||||
@ -1022,7 +1022,7 @@ pub fn load_default_keymap(cx: &mut AppContext) {
|
||||
|
||||
KeymapFile::load_asset(DEFAULT_KEYMAP_PATH, cx).unwrap();
|
||||
if VimModeSetting::get_global(cx).0 {
|
||||
KeymapFile::load_asset("keymaps/vim.json", cx).unwrap();
|
||||
KeymapFile::load_asset(VIM_KEYMAP_PATH, cx).unwrap();
|
||||
}
|
||||
|
||||
if let Some(asset_path) = base_keymap.asset_path() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user