Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Rename settings and keymap actions (#39970)
Danilo Leal18405dece877
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.jsonindex 9ede1f5d63b..ae15492b804 100644--- a/assets/keymaps/default-linux.json+++ b/assets/keymaps/default-linux.json@@ -30,8 +30,8 @@"ctrl-+": ["zed::IncreaseBufferFontSize", { "persist": false }],"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],- "ctrl-,": "zed::OpenSettingsEditor",- "ctrl-alt-,": "zed::OpenSettings",+ "ctrl-,": "zed::OpenSettings",+ "ctrl-alt-,": "zed::OpenSettingsFile","ctrl-q": "zed::Quit","f4": "debugger::Start","shift-f5": "debugger::Stop",@@ -621,7 +621,7 @@"ctrl-shift-f": "pane::DeploySearch","ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],"ctrl-shift-t": "pane::ReopenClosedItem",- "ctrl-k ctrl-s": "zed::OpenKeymapEditor",+ "ctrl-k ctrl-s": "zed::OpenKeymap","ctrl-k ctrl-t": "theme_selector::Toggle","ctrl-alt-super-p": "settings_profile_selector::Toggle","ctrl-t": "project_symbols::Toggle",diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.jsonindex 31424e7b2f4..50528dca6f9 100644--- a/assets/keymaps/default-macos.json+++ b/assets/keymaps/default-macos.json@@ -39,8 +39,8 @@"cmd-+": ["zed::IncreaseBufferFontSize", { "persist": false }],"cmd--": ["zed::DecreaseBufferFontSize", { "persist": false }],"cmd-0": ["zed::ResetBufferFontSize", { "persist": false }],- "cmd-,": "zed::OpenSettingsEditor",- "cmd-alt-,": "zed::OpenSettings",+ "cmd-,": "zed::OpenSettings",+ "cmd-alt-,": "zed::OpenSettingsFile","cmd-q": "zed::Quit","cmd-h": "zed::Hide","alt-cmd-h": "zed::HideOthers",@@ -690,7 +690,7 @@"cmd-shift-f": "pane::DeploySearch","cmd-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],"cmd-shift-t": "pane::ReopenClosedItem",- "cmd-k cmd-s": "zed::OpenKeymapEditor",+ "cmd-k cmd-s": "zed::OpenKeymap","cmd-k cmd-t": "theme_selector::Toggle","ctrl-alt-cmd-p": "settings_profile_selector::Toggle","cmd-t": "project_symbols::Toggle",diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.jsonindex c0412152d70..570766e92ce 100644--- a/assets/keymaps/default-windows.json+++ b/assets/keymaps/default-windows.json@@ -29,8 +29,8 @@"ctrl-shift-=": ["zed::IncreaseBufferFontSize", { "persist": false }],"ctrl--": ["zed::DecreaseBufferFontSize", { "persist": false }],"ctrl-0": ["zed::ResetBufferFontSize", { "persist": false }],- "ctrl-,": "zed::OpenSettingsEditor",- "ctrl-alt-,": "zed::OpenSettings",+ "ctrl-,": "zed::OpenSettings",+ "ctrl-alt-,": "zed::OpenSettingsFile","ctrl-q": "zed::Quit","f4": "debugger::Start","shift-f5": "debugger::Stop",@@ -623,7 +623,7 @@"ctrl-shift-f": "pane::DeploySearch","ctrl-shift-h": ["pane::DeploySearch", { "replace_enabled": true }],"ctrl-shift-t": "pane::ReopenClosedItem",- "ctrl-k ctrl-s": "zed::OpenKeymapEditor",+ "ctrl-k ctrl-s": "zed::OpenKeymap","ctrl-k ctrl-t": "theme_selector::Toggle","ctrl-alt-super-p": "settings_profile_selector::Toggle","ctrl-t": "project_symbols::Toggle",diff --git a/assets/keymaps/linux/jetbrains.json b/assets/keymaps/linux/jetbrains.jsonindex 59a182a968a..a5e387c014e 100644--- a/assets/keymaps/linux/jetbrains.json+++ b/assets/keymaps/linux/jetbrains.json@@ -1,7 +1,7 @@[{"bindings": {- "ctrl-alt-s": "zed::OpenSettings",+ "ctrl-alt-s": "zed::OpenSettingsFile","ctrl-{": "pane::ActivatePreviousItem","ctrl-}": "pane::ActivateNextItem","shift-escape": null, // Unmap workspace::zoomdiff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex ae9bf372172..06256c35971 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -24645,7 +24645,7 @@ impl Render for MissingEditPredictionKeybindingTooltip {.items_end().w_full().child(Button::new("open-keymap", "Assign Keybinding").size(ButtonSize::Compact).on_click(|_ev, window, cx| {- window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx)+ window.dispatch_action(zed_actions::OpenKeymapFile.boxed_clone(), cx)})).child(Button::new("see-docs", "See Docs").size(ButtonSize::Compact).on_click(|_ev, _window, cx| {cx.open_url("https://zed.dev/docs/completions#edit-predictions-missing-keybinding");diff --git a/crates/keymap_editor/src/keymap_editor.rs b/crates/keymap_editor/src/keymap_editor.rsindex 327d0962f23..76c14ccfe48 100644--- a/crates/keymap_editor/src/keymap_editor.rs+++ b/crates/keymap_editor/src/keymap_editor.rs@@ -38,7 +38,7 @@ use workspace::{};pub use ui_components::*;-use zed_actions::OpenKeymapEditor;+use zed_actions::OpenKeymap;use crate::{persistence::KEYBINDING_EDITORS,@@ -77,7 +77,7 @@ pub fn init(cx: &mut App) {let keymap_event_channel = KeymapEventChannel::new();cx.set_global(keymap_event_channel);- cx.on_action(|_: &OpenKeymapEditor, cx| {+ cx.on_action(|_: &OpenKeymap, cx| {workspace::with_active_or_new_workspace(cx, move |workspace, window, cx| {workspace.with_local_workspace(window, cx, |workspace, window, cx| {@@ -1700,7 +1700,7 @@ impl Render for KeymapEditor {move |window, cx| {Tooltip::for_action_in("View Default...",- &zed_actions::OpenKeymap,+ &zed_actions::OpenKeymapFile,&focus_handle,window,cx,@@ -1714,7 +1714,7 @@ impl Render for KeymapEditor {.style(ButtonStyle::Outlined).on_click(|_, window, cx| {window.dispatch_action(- zed_actions::OpenKeymap.boxed_clone(),+ zed_actions::OpenKeymapFile.boxed_clone(),cx,);})diff --git a/crates/language_tools/src/key_context_view.rs b/crates/language_tools/src/key_context_view.rsindex 4140713544e..1d3cd451f19 100644--- a/crates/language_tools/src/key_context_view.rs+++ b/crates/language_tools/src/key_context_view.rs@@ -207,7 +207,7 @@ impl Render for KeyContextView {.on_click(|_, _, cx| cx.open_url("https://zed.dev/docs/key-bindings")),).child(- Button::new("view_default_keymap", "View default keymap")+ Button::new("view_default_keymap", "View Default Keymap").style(ButtonStyle::Filled).key_binding(ui::KeyBinding::for_action(&zed_actions::OpenDefaultKeymap,@@ -219,11 +219,11 @@ impl Render for KeyContextView {}),).child(- Button::new("edit_your_keymap", "Edit your keymap")+ Button::new("edit_your_keymap", "Edit Keymap File").style(ButtonStyle::Filled)- .key_binding(ui::KeyBinding::for_action(&zed_actions::OpenKeymap, window, cx))+ .key_binding(ui::KeyBinding::for_action(&zed_actions::OpenKeymapFile, window, cx)).on_click(|_, window, cx| {- window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx);+ window.dispatch_action(zed_actions::OpenKeymapFile.boxed_clone(), cx);}),),)diff --git a/crates/onboarding/src/welcome.rs b/crates/onboarding/src/welcome.rsindex b5daef15684..50f0d83698a 100644--- a/crates/onboarding/src/welcome.rs+++ b/crates/onboarding/src/welcome.rs@@ -9,7 +9,7 @@ use workspace::{item::{Item, ItemEvent},with_active_or_new_workspace,};-use zed_actions::{Extensions, OpenSettingsEditor, agent, command_palette};+use zed_actions::{Extensions, OpenSettings, agent, command_palette};use crate::{Onboarding, OpenOnboarding};@@ -53,7 +53,7 @@ const CONTENT: (Section<4>, Section<3>) = (SectionEntry {icon: IconName::Settings,title: "Open Settings",- action: &OpenSettingsEditor,+ action: &OpenSettings,},SectionEntry {icon: IconName::ZedAssistant,diff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rsindex 46bef9365b2..93bbd0dfc08 100644--- a/crates/settings_ui/src/settings_ui.rs+++ b/crates/settings_ui/src/settings_ui.rs@@ -38,7 +38,7 @@ use ui::{use ui_input::{NumberField, NumberFieldType};use util::{ResultExt as _, paths::PathStyle, rel_path::RelPath};use workspace::{OpenOptions, OpenVisible, Workspace, client_side_decorations};-use zed_actions::OpenSettingsEditor;+use zed_actions::OpenSettings;use crate::components::SettingsEditor;@@ -286,7 +286,7 @@ pub fn init(cx: &mut App) {init_renderers(cx);cx.observe_new(|workspace: &mut workspace::Workspace, _, _| {- workspace.register_action(|workspace, _: &OpenSettingsEditor, window, cx| {+ workspace.register_action(|workspace, _: &OpenSettings, window, cx| {let window_handle = window.window_handle().downcast::<Workspace>()diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rsindex 85890f017f4..be3ee9c4415 100644--- a/crates/title_bar/src/title_bar.rs+++ b/crates/title_bar/src/title_bar.rs@@ -664,49 +664,55 @@ impl TitleBar {pub fn render_app_menu_button(&mut self, cx: &mut Context<Self>) -> impl Element {let user_store = self.user_store.read(cx);- if let Some(user) = user_store.current_user() {- let has_subscription_period = user_store.subscription_period().is_some();- let plan = user_store.plan().filter(|_| {- // Since the user might be on the legacy free plan we filter based on whether we have a subscription period.- has_subscription_period- });+ let user = user_store.current_user();- let user_avatar = user.avatar_uri.clone();- let free_chip_bg = cx- .theme()- .colors()- .editor_background- .opacity(0.5)- .blend(cx.theme().colors().text_accent.opacity(0.05));-- let pro_chip_bg = cx- .theme()- .colors()- .editor_background- .opacity(0.5)- .blend(cx.theme().colors().text_accent.opacity(0.2));-- PopoverMenu::new("user-menu")- .anchor(Corner::TopRight)- .menu(move |window, cx| {- ContextMenu::build(window, cx, |menu, _, _cx| {- let user_login = user.github_login.clone();-- let (plan_name, label_color, bg_color) = match plan {- None | Some(Plan::V1(PlanV1::ZedFree) | Plan::V2(PlanV2::ZedFree)) => {- ("Free", Color::Default, free_chip_bg)- }- Some(Plan::V1(PlanV1::ZedProTrial) | Plan::V2(PlanV2::ZedProTrial)) => {- ("Pro Trial", Color::Accent, pro_chip_bg)- }- Some(Plan::V1(PlanV1::ZedPro) | Plan::V2(PlanV2::ZedPro)) => {- ("Pro", Color::Accent, pro_chip_bg)- }- };+ let user_avatar = user.as_ref().map(|u| u.avatar_uri.clone());+ let user_login = user.as_ref().map(|u| u.github_login.clone());++ let is_signed_in = user.is_some();++ let has_subscription_period = user_store.subscription_period().is_some();+ let plan = user_store.plan().filter(|_| {+ // Since the user might be on the legacy free plan we filter based on whether we have a subscription period.+ has_subscription_period+ });++ let free_chip_bg = cx+ .theme()+ .colors()+ .editor_background+ .opacity(0.5)+ .blend(cx.theme().colors().text_accent.opacity(0.05));++ let pro_chip_bg = cx+ .theme()+ .colors()+ .editor_background+ .opacity(0.5)+ .blend(cx.theme().colors().text_accent.opacity(0.2));++ PopoverMenu::new("user-menu")+ .anchor(Corner::TopRight)+ .menu(move |window, cx| {+ ContextMenu::build(window, cx, |menu, _, _cx| {+ let user_login = user_login.clone();++ let (plan_name, label_color, bg_color) = match plan {+ None | Some(Plan::V1(PlanV1::ZedFree) | Plan::V2(PlanV2::ZedFree)) => {+ ("Free", Color::Default, free_chip_bg)+ }+ Some(Plan::V1(PlanV1::ZedProTrial) | Plan::V2(PlanV2::ZedProTrial)) => {+ ("Pro Trial", Color::Accent, pro_chip_bg)+ }+ Some(Plan::V1(PlanV1::ZedPro) | Plan::V2(PlanV2::ZedPro)) => {+ ("Pro", Color::Accent, pro_chip_bg)+ }+ };- menu.custom_entry(+ menu.when(is_signed_in, |this| {+ this.custom_entry(move |_window, _cx| {- let user_login = user_login.clone();+ let user_login = user_login.clone().unwrap_or_default();h_flex().w_full()@@ -724,75 +730,59 @@ impl TitleBar {},).separator()- .action("Settings", zed_actions::OpenSettingsEditor.boxed_clone())- .action("Keymap Editor", Box::new(zed_actions::OpenKeymapEditor))- .action(- "Themes…",- zed_actions::theme_selector::Toggle::default().boxed_clone(),- )- .action(- "Icon Themes…",- zed_actions::icon_theme_selector::Toggle::default().boxed_clone(),- )- .action(- "Extensions",- zed_actions::Extensions::default().boxed_clone(),- )- .separator()- .action("Sign Out", client::SignOut.boxed_clone())})- .into()- })- .trigger_with_tooltip(- ButtonLike::new("user-menu")- .child(- h_flex()- .gap_0p5()- .children(- TitleBarSettings::get_global(cx)- .show_user_picture- .then(|| Avatar::new(user_avatar)),- )- .child(- Icon::new(IconName::ChevronDown)- .size(IconSize::Small)- .color(Color::Muted),- ),- )- .style(ButtonStyle::Subtle),- Tooltip::text("Toggle User Menu"),- )- .anchor(gpui::Corner::TopRight)- } else {- PopoverMenu::new("user-menu")- .anchor(Corner::TopRight)- .menu(|window, cx| {- ContextMenu::build(window, cx, |menu, _, _| {- menu.action("Settings", zed_actions::OpenSettings.boxed_clone())- .action(- "Settings Profiles",- zed_actions::settings_profile_selector::Toggle.boxed_clone(),- )- .action("Key Bindings", Box::new(zed_actions::OpenKeymapEditor))- .action(- "Themes…",- zed_actions::theme_selector::Toggle::default().boxed_clone(),- )- .action(- "Icon Themes…",- zed_actions::icon_theme_selector::Toggle::default().boxed_clone(),- )- .action(- "Extensions",- zed_actions::Extensions::default().boxed_clone(),- )+ .action("Settings", zed_actions::OpenSettings.boxed_clone())+ .action("Keymap", Box::new(zed_actions::OpenKeymap))+ .action(+ "Themes…",+ zed_actions::theme_selector::Toggle::default().boxed_clone(),+ )+ .action(+ "Icon Themes…",+ zed_actions::icon_theme_selector::Toggle::default().boxed_clone(),+ )+ .action(+ "Extensions",+ zed_actions::Extensions::default().boxed_clone(),+ )+ .when(is_signed_in, |this| {+ this.separator()+ .action("Sign Out", client::SignOut.boxed_clone())})- .into()})- .trigger_with_tooltip(- IconButton::new("user-menu", IconName::ChevronDown).icon_size(IconSize::Small),- Tooltip::text("Toggle User Menu"),- )- }+ .into()+ })+ .map(|this| {+ if is_signed_in {+ this.trigger_with_tooltip(+ ButtonLike::new("user-menu")+ .child(+ h_flex()+ .gap_0p5()+ .children(+ TitleBarSettings::get_global(cx)+ .show_user_picture+ .then(|| user_avatar.clone())+ .flatten()+ .map(|avatar| Avatar::new(avatar)),+ )+ .child(+ Icon::new(IconName::ChevronDown)+ .size(IconSize::Small)+ .color(Color::Muted),+ ),+ )+ .style(ButtonStyle::Subtle),+ Tooltip::text("Toggle User Menu"),+ )+ } else {+ this.trigger_with_tooltip(+ IconButton::new("user-menu", IconName::ChevronDown)+ .icon_size(IconSize::Small),+ Tooltip::text("Toggle User Menu"),+ )+ }+ })+ .anchor(gpui::Corner::TopRight)}}diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rsindex daaf963d269..58fb18ebd2b 100644--- a/crates/zed/src/zed.rs+++ b/crates/zed/src/zed.rs@@ -93,7 +93,8 @@ use workspace::{};use workspace::{Pane, notifications::DetachAndPromptErr};use zed_actions::{- OpenAccountSettings, OpenBrowser, OpenDocs, OpenServerSettings, OpenSettings, OpenZedUrl, Quit,+ OpenAccountSettings, OpenBrowser, OpenDocs, OpenServerSettings, OpenSettingsFile, OpenZedUrl,+ Quit,};actions!(@@ -196,7 +197,7 @@ pub fn init(cx: &mut App) {open_telemetry_log_file(workspace, window, cx);});});- cx.on_action(|&zed_actions::OpenKeymap, cx| {+ cx.on_action(|&zed_actions::OpenKeymapFile, cx| {with_active_or_new_workspace(cx, |_, window, cx| {open_settings_file(paths::keymap_file(),@@ -206,7 +207,7 @@ pub fn init(cx: &mut App) {);});});- cx.on_action(|_: &OpenSettings, cx| {+ cx.on_action(|_: &OpenSettingsFile, cx| {with_active_or_new_workspace(cx, |_, window, cx| {open_settings_file(paths::settings_file(),@@ -1270,57 +1271,60 @@ pub fn handle_settings_file_changes(MigrationNotification::set_global(cx.new(|_| MigrationNotification), cx);// Helper function to process settings content- let process_settings =- move |content: String, is_user: bool, store: &mut SettingsStore, cx: &mut App| -> bool {- let id = NotificationId::Named("failed-to-migrate-settings".into());- // Apply migrations to both user and global settings- let (processed_content, content_migrated) = match migrate_settings(&content) {- Ok(result) => {- dismiss_app_notification(&id, cx);- if let Some(migrated_content) = result {- (migrated_content, true)- } else {- (content, false)- }+ let process_settings = move |content: String,+ is_user: bool,+ store: &mut SettingsStore,+ cx: &mut App|+ -> bool {+ let id = NotificationId::Named("failed-to-migrate-settings".into());+ // Apply migrations to both user and global settings+ let (processed_content, content_migrated) = match migrate_settings(&content) {+ Ok(result) => {+ dismiss_app_notification(&id, cx);+ if let Some(migrated_content) = result {+ (migrated_content, true)+ } else {+ (content, false)}- Err(err) => {- show_app_notification(id, cx, move |cx| {- cx.new(|cx| {- MessageNotification::new(- format!(- "Failed to migrate settings\n\+ }+ Err(err) => {+ show_app_notification(id, cx, move |cx| {+ cx.new(|cx| {+ MessageNotification::new(+ format!(+ "Failed to migrate settings\n\{err}"- ),- cx,- )- .primary_message("Open Settings File")- .primary_icon(IconName::Settings)- .primary_on_click(|window, cx| {- window.dispatch_action(zed_actions::OpenSettings.boxed_clone(), cx);- cx.emit(DismissEvent);- })+ ),+ cx,+ )+ .primary_message("Open Settings File")+ .primary_icon(IconName::Settings)+ .primary_on_click(|window, cx| {+ window.dispatch_action(zed_actions::OpenSettingsFile.boxed_clone(), cx);+ cx.emit(DismissEvent);})- });- // notify user here- (content, false)- }- };+ })+ });+ // notify user here+ (content, false)+ }+ };- let result = if is_user {- store.set_user_settings(&processed_content, cx)- } else {- store.set_global_settings(&processed_content, cx)- };+ let result = if is_user {+ store.set_user_settings(&processed_content, cx)+ } else {+ store.set_global_settings(&processed_content, cx)+ };- if let Err(err) = &result {- let settings_type = if is_user { "user" } else { "global" };- log::error!("Failed to load {} settings: {err}", settings_type);- }+ if let Err(err) = &result {+ let settings_type = if is_user { "user" } else { "global" };+ log::error!("Failed to load {} settings: {err}", settings_type);+ }- settings_changed(result.err(), cx);+ settings_changed(result.err(), cx);- content_migrated- };+ content_migrated+ };// Initial load of both settings fileslet global_content = cx@@ -1499,7 +1503,7 @@ fn show_keymap_file_json_error(MessageNotification::new(message.clone(), cx).primary_message("Open Keymap File").primary_on_click(|window, cx| {- window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx);+ window.dispatch_action(zed_actions::OpenKeymapFile.boxed_clone(), cx);cx.emit(DismissEvent);})})@@ -1516,7 +1520,7 @@ fn show_keymap_file_load_error(error_message,"Open Keymap File".into(),|window, cx| {- window.dispatch_action(zed_actions::OpenKeymap.boxed_clone(), cx);+ window.dispatch_action(zed_actions::OpenKeymapFile.boxed_clone(), cx);cx.emit(DismissEvent);},cx,@@ -1635,7 +1639,7 @@ pub fn handle_settings_changed(error: Option<anyhow::Error>, cx: &mut App) {.primary_message("Open Settings File").primary_icon(IconName::Settings).primary_on_click(|window, cx| {- window.dispatch_action(zed_actions::OpenSettings.boxed_clone(), cx);+ window.dispatch_action(zed_actions::OpenSettingsFile.boxed_clone(), cx);cx.emit(DismissEvent);})})@@ -4653,6 +4657,7 @@ mod tests {"window","workspace","zed",+ "zed_actions","zed_predict_onboarding","zeta",];diff --git a/crates/zed/src/zed/app_menus.rs b/crates/zed/src/zed/app_menus.rsindex 6e58714cb82..cd18503f61b 100644--- a/crates/zed/src/zed/app_menus.rs+++ b/crates/zed/src/zed/app_menus.rs@@ -63,13 +63,13 @@ pub fn app_menus(cx: &mut App) -> Vec<Menu> {MenuItem::submenu(Menu {name: "Settings".into(),items: vec![- MenuItem::action("Open Settings", zed_actions::OpenSettingsEditor),- MenuItem::action("Open Settings JSON", super::OpenSettings),+ MenuItem::action("Open Settings", zed_actions::OpenSettings),+ MenuItem::action("Open Settings File", super::OpenSettingsFile),MenuItem::action("Open Project Settings", super::OpenProjectSettings),MenuItem::action("Open Default Settings", super::OpenDefaultSettings),MenuItem::separator(),- MenuItem::action("Open Keymap Editor", zed_actions::OpenKeymapEditor),- MenuItem::action("Open Keymap JSON", zed_actions::OpenKeymap),+ MenuItem::action("Open Keymap", zed_actions::OpenKeymap),+ MenuItem::action("Open Keymap File", zed_actions::OpenKeymapFile),MenuItem::action("Open Default Key Bindings",zed_actions::OpenDefaultKeymap,diff --git a/crates/zed_actions/src/lib.rs b/crates/zed_actions/src/lib.rsindex eaa81b1e104..d62de329c9a 100644--- a/crates/zed_actions/src/lib.rs+++ b/crates/zed_actions/src/lib.rs@@ -30,22 +30,26 @@ pub struct OpenZedUrl {actions!(zed,[- /// Opens the settings JSON file.+ #[action(deprecated_aliases = ["zed_actions::OpenSettingsEditor"])]OpenSettings,+ /// Opens the settings JSON file.+ #[action(deprecated_aliases = ["zed_actions::OpenSettings"])]+ OpenSettingsFile,/// Opens the settings editor.- OpenSettingsEditor,/// Opens the default keymap file.OpenDefaultKeymap,+ /// Opens the user keymap file.+ #[action(deprecated_aliases = ["zed_actions::OpenKeymap"])]+ OpenKeymapFile,+ /// Opens the keymap editor.+ #[action(deprecated_aliases = ["zed_actions::OpenKeymapEditor"])]+ OpenKeymap,/// Opens account settings.OpenAccountSettings,- /// Opens the keymap editor.- OpenKeymapEditor,/// Opens server settings.OpenServerSettings,/// Quits the application.Quit,- /// Opens the user keymap file.- OpenKeymap,/// Shows information about Zed.About,/// Opens the documentation website.diff --git a/docs/src/getting-started.md b/docs/src/getting-started.mdindex 22af3b36d73..2dd04c70a94 100644--- a/docs/src/getting-started.md+++ b/docs/src/getting-started.md@@ -83,6 +83,6 @@ Visit [the AI overview page](./ai/overview.md) to learn how to quickly get start## Set up your key bindings-To edit your custom keymap and add or remap bindings, you can either use {#kb zed::OpenKeymapEditor} to spawn the Zed Keymap Editor ({#action zed::OpenKeymapEditor}) or you can directly open your Zed Keymap json (`~/.config/zed/keymap.json`) with {#action zed::OpenKeymap}.+To edit your custom keymap and add or remap bindings, you can either use {#kb zed::OpenKeymap} to spawn the Zed Keymap Editor ({#action zed::OpenKeymap}) or you can directly open your Zed Keymap json (`~/.config/zed/keymap.json`) with {#action zed::OpenKeymap}.To access the default key binding set, open the Command Palette with {#kb command_palette::Toggle} and search for "zed: open default keymap". See [Key Bindings](./key-bindings.md) for more info.diff --git a/docs/src/key-bindings.md b/docs/src/key-bindings.mdindex e8ddbc46b29..306396c73cf 100644--- a/docs/src/key-bindings.md+++ b/docs/src/key-bindings.md@@ -24,7 +24,7 @@ For more information, see the documentation for [Vim mode](./vim.md) and [Helix## User keymapsZed reads your keymap from `~/.config/zed/keymap.json`, which you can open with the {#action zed::OpenKeymap} action from the command palette.-You can also edit your keymap through the Zed Keymap Editor, accessible via the {#action zed::OpenKeymapEditor} action or the {#kb zed::OpenKeymapEditor} keybinding.+You can also edit your keymap through the Zed Keymap Editor, accessible via the {#action zed::OpenKeymap} action or the {#kb zed::OpenKeymap} keybinding.The `keymap.json` file contains a JSON array of objects with `"bindings"`. If no `"context"` is set, the bindings are always active. If it is set, the binding is only active when the [context matches](#contexts).