basic mappings improved

This commit is contained in:
2024-11-28 11:12:46 +01:00
parent d146fca2a2
commit a1943833d1
2 changed files with 29 additions and 9 deletions

View File

@@ -4,11 +4,11 @@
// documentation: https://zed.dev/docs/key-bindings // documentation: https://zed.dev/docs/key-bindings
// To see the default key bindings run `zed: Open Default Keymap` // To see the default key bindings run `zed: Open Default Keymap`
// from the command palette. // from the command palette.
// NOTE: defaults on: https://github.com/zed-industries/zed/blob/main/assets/keymaps/default-macos.json
[ [
{ {
"context": "Workspace", "context": "Workspace",
"bindings": { "bindings": {
// "shift shift": "file_finder::Toggle"
"ctrl-h": [ "ctrl-h": [
"workspace::ActivatePaneInDirection", "workspace::ActivatePaneInDirection",
"Left" "Left"
@@ -25,7 +25,8 @@
"workspace::ActivatePaneInDirection", "workspace::ActivatePaneInDirection",
"Down" "Down"
] ]
} },
"ctrl-x": "workspace::ToggleBottomDock"
}, },
{ {
"context": "Editor", "context": "Editor",
@@ -33,16 +34,31 @@
// "j k": ["workspace::SendKeystrokes", "escape"] // "j k": ["workspace::SendKeystrokes", "escape"]
"ctrl-t": "workspace::NewFile", "ctrl-t": "workspace::NewFile",
"ctrl-w": "pane::CloseActiveItem", "ctrl-w": "pane::CloseActiveItem",
"ctrl-W": "pane::CloseAllItems" "ctrl-W": "pane::CloseAllItems",
"ctrl-n": "workspace::ToggleLeftDock",
"ctrl-m": "workspace::ToggleBottomDock"
} }
}, },
{ {
"context": "Editor && vim_mode == insert", "context": "Editor && vim_mode == insert",
"bindings": { "bindings": {
"j k": [ // "j k": [
"workspace::SendKeystrokes", // "workspace::SendKeystrokes",
"escape" // "escape"
] // ]
}
},
{
"context": "Editor && (showing_code_actions || showing_completions)",
"bindings": {
"up": "editor::ContextMenuPrev",
"ctrl-p": "editor::ContextMenuPrev",
"down": "editor::ContextMenuNext",
"ctrl-n": "editor::ContextMenuNext",
"pageup": "editor::ContextMenuFirst",
"pagedown": "editor::ContextMenuLast",
"tab": "editor::ContextMenuNext",
"shift-tab": "editor::ContextMenuPrev"
} }
}, },
{ {
@@ -51,6 +67,8 @@
"space x": "pane::CloseActiveItem", "space x": "pane::CloseActiveItem",
"space X": "pane::CloseAllItems", "space X": "pane::CloseAllItems",
"space b": "workspace::NewFile", "space b": "workspace::NewFile",
"space f f": "file_finder::Toggle",
"space space": "file_finder::Toggle",
"shift-tab": "pane::ActivatePrevItem", "shift-tab": "pane::ActivatePrevItem",
"tab": "pane::ActivateNextItem", "tab": "pane::ActivateNextItem",
"ctrl-h": [ "ctrl-h": [
@@ -74,8 +92,10 @@
{ {
"context": "Terminal", "context": "Terminal",
"bindings": { "bindings": {
"ctrl-n": "workspace::ToggleLeftDock",
"ctrl-t": "workspace::NewTerminal", "ctrl-t": "workspace::NewTerminal",
"ctrl-w": "pane::CloseActiveItem" "ctrl-w": "pane::CloseActiveItem",
"ctrl-m": "workspace::ToggleBottomDock"
} }
}, },
{ {

View File

@@ -141,7 +141,7 @@
"preview_tabs": { "preview_tabs": {
"enabled": false, "enabled": false,
"enable_preview_from_file_finder": false, "enable_preview_from_file_finder": false,
"enable_preview_from_code_navigation": false, "enable_preview_from_code_navigation": false
}, },
"project_panel": { "project_panel": {
"button": true, "button": true,