Skip to content

Instantly share code, notes, and snippets.

@kickbase
Created July 14, 2026 01:09
Show Gist options
  • Select an option

  • Save kickbase/c05301e0cebad4f39af4a4250f62f211 to your computer and use it in GitHub Desktop.

Select an option

Save kickbase/c05301e0cebad4f39af4a4250f62f211 to your computer and use it in GitHub Desktop.
[ Zed ] ~\AppData\Roaming\Zed\keymap.json
[
// ============================================================
// Vim Normal / Visual(VimControl)
// ============================================================
{
"context": "VimControl && !menu",
"bindings": {
// set whichwrap(h/l/space/backspace のみ Zed 公式対応)
"h": "vim::WrappingLeft",
"left": "vim::WrappingLeft",
"backspace": "vim::WrappingLeft",
"l": "vim::WrappingRight",
"right": "vim::WrappingRight",
"space": "vim::WrappingRight",
// nnoremap j gj / nnoremap k gk
"j": ["vim::Down", { "display_lines": true }],
"k": ["vim::Up", { "display_lines": true }],
// nnoremap gj j / nnoremap gk k
"g j": "vim::Down",
"g k": "vim::Up",
// nnoremap Y y$
"shift-y": "vim::YankToEndOfLine",
// nnoremap + <C-a> / nnoremap - <C-x>
"+": "vim::Increment",
"-": "vim::Decrement",
// noremap ; : / noremap : ;
";": "command_palette::Toggle",
":": "vim::RepeatFind",
// nnoremap <Leader>/ /\v ※ \v(very magic)は Zed 非対応
"space /": "vim::Search",
"space ?": ["vim::Search", { "backwards": true }],
// nnoremap & :&&<CR> ※ Zed の :&& 対応は要確認
"&": ["workspace::SendKeystrokes", ": && enter"],
// nnoremap <C-l> :nohlsearch<CR><C-l>
// ※ 検索ハイライト消去は完全には再現できない
"ctrl-l": "editor::ScrollCursorCenter",
},
},
// ============================================================
// Visual モード
// ============================================================
{
"context": "vim_mode == visual && !menu",
"bindings": {
"&": ["workspace::SendKeystrokes", ": && enter"],
// xnoremap * / #(VSetSearch 相当)は Zed 標準の * # と挙動が異なる
// リテラル検索が必要なら要カスタム(現状は省略)
},
},
// ============================================================
// Insert モード
// ============================================================
{
"context": "vim_mode == insert && !menu",
"bindings": {
// inoremap <C-c> <ESC>
"ctrl-c": "vim::NormalBefore",
// set pastetoggle=<f5> → Zed に paste toggle 相当は無し
// "f5": null // 必要なら無効化のみ
},
},
// ============================================================
// Normal モード(二重 Ctrl-c)
// ============================================================
{
"context": "vim_mode == normal && !menu",
"bindings": {
// noremap <C-c><C-c> :nohlsearch<Cr><Esc>
"ctrl-c ctrl-c": "buffer_search::Dismiss",
},
},
// ============================================================
// Windows: Vim モードで上書きされる OS ショートカットの復元(任意)
// clipboard=unnamed 運用なら ctrl-c/v は Vim 側に任せる選択も可
// ============================================================
{
"context": "Editor && !menu",
"bindings": {
"ctrl-f": "buffer_search::Deploy",
"ctrl-v": "editor::Paste",
"ctrl-s": "workspace::Save",
"ctrl-o": "workspace::Open",
},
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment