Updates to Zed config and keymappings

This commit is contained in:
Max Bucknell 2024-08-08 10:34:52 +10:00
parent 22e0452408
commit ab5427904d
No known key found for this signature in database
2 changed files with 123 additions and 82 deletions

View file

@ -1,45 +1,65 @@
[ [
{ {
"bindings": { "bindings": {
"cmd-o": "file_finder::Toggle" "cmd-o": "file_finder::Toggle"
}
},
{
"context": "Pane",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Down"]
}
},
{
"context": "Editor",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
";": "command_palette::Toggle",
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
"j k": "vim::NormalBefore",
"left": null,
"down": null,
"up": null,
"right": null
}
} }
},
{
"context": "ProjectPanel",
"bindings": {
"shift-cmd-n": "project_panel::NewDirectory",
"cmd-n": "project_panel::NewFile",
"enter": "project_panel::Rename"
"cmd-o": "project_panel::OpenPermanent"
}
},
{
"context": "Pane",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Down"],
"cmd-shift-g": "pane::RevealInProjectPanel"
}
},
{
"context": "Editor",
"bindings": {
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "vim_mode == normal",
"bindings": {
"shift-y": "vim::YankLine",
"shift-d": ["workspace::SendKeystrokes", "d d"],
"-": ["workspace::SendKeystrokes", "d d p"],
"_": ["workspace::SendKeystrokes", "d d 2 k p"],
"= =": "editor::Format"
}
},
{
"context": "VimControl && !menu",
"bindings": {
";": "command_palette::Toggle",
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"]
}
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
"j k": "vim::NormalBefore",
"left": null,
"down": null,
"up": null,
"right": null
}
}
] ]

View file

@ -7,45 +7,66 @@
// custom settings, run the `open default settings` command // custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu. // from the command palette or from `Zed` application menu.
{ {
"theme": { "theme": {
"dark": "Github Dark", "dark": "Github Dark",
"light": "Github Light" "light": "Github Light"
}, },
"git": { "git": {
"inline_blame": { "inline_blame": {
"enabled": true "enabled": true
}
},
"vim_mode": true,
"relative_line_numbers": true,
"buffer_font_size": 12,
"buffer_font_family": "Input Mono",
"ui_font_family": "SF Pro",
"ui_font_size": 15,
"project_panel": {
"dock": "right"
},
"file_types": {
"Python": ["bazel", "WORKSPACE"]
},
"languages": {
"TypeScript": {
"tab_size": 4
},
"JavaScript": {
"tab_size": 4
},
"TSX": {
"tab_size": 4
},
"Markdown": {
"tab_size": 4
},
"JSON": {
"tab_size": 4
},
"Make": {
"tab_size": 8
}
} }
},
"vim_mode": true,
"vim": {
"use_system_clipboard": "never"
},
"relative_line_numbers": true,
"buffer_font_size": 12,
"buffer_font_family": "Input Mono",
"buffer_font_weight": 400,
"buffer_font_features": {
"calt": false,
"liga": false
},
"ui_font_family": "SF Pro",
"ui_font_size": 15,
"project_panel": {
"dock": "right"
},
"collaboration_panel": {
"button": false
},
"chat_panel": {
"button": false
},
"assistant": {
"version": "2",
"button": false
},
"notification_panel": {
"button": false
},
"languages": {
"TypeScript": {
"tab_size": 4
},
"JavaScript": {
"tab_size": 4
},
"TSX": {
"tab_size": 4
},
"Markdown": {
"tab_size": 4
},
"JSON": {
"tab_size": 4
},
"Make": {
"tab_size": 8
}
},
"features": {
"copilot": false
}
} }