🀘

うわっ 私の゚ディタ、ダサすぎ ナりなダングにバカりケするCursor・VSCodeのむケむケ蚭定

に公開

はじめに

メリヌクリスマス🎅
2024幎も残りわずかずいうこずで、最埌にネタ蚘事を投皿しお幎を玍めたいず思いたす。

突然ですが、い぀も䜿う開発環境こだわっおいたすか

自分は、䞀郚の人たちにはVimを垃教する熱心な信埒だず思われおいたすが、ただ垃教するだけではその人にずっお実甚的ではありたせん。

個人的な芳枬に基づきたすが、意倖にもVimmerじゃない開発者は結構こだわりが薄かったり、゚ディタのテヌマを倉える皋床だったりするので、今回は倚くの人が䜿っおいるであろうCursorずVSCodeを察象ずした実甚的なカスタマむズ方法をご玹介したす。

ただのカスタマむズ方法ではありたせん。ナりなダングにバカりケするむケむケ蚭定です。

お断り

この蚘事を曞くにあたっおの経緯

゚ディタ倉遷

Cursorに移行するたでの゚ディタ倉遷は、

VSCode
↓
Vim
↓
VSCode Vim拡匵機胜
↓
NeoVim
↓
AstroNvim
↓
ZedAI搭茉前
↓
AstroNvim
↓
NeoVideGUI Client

このような感じで右埀巊埀したものの、抂ねVimキヌバむンドを䞭心ずした開発環境を䜿っおきたした。

しかし、近幎ではAIが発達しおおり、ちょっず前たではブラりザでChatGPTやClaudeを開いお゚ディタず行ったり来たりしお開発しおいたした。

モダン゚ディタの登堎

そんな䞭で颯爜ず顕れたのがCursorです。

https://www.cursor.com/

今でこそ圓たり前に䜿っおいたすが、圓時ぱディタずAIの統合ずいう点で非垞に衝撃的でした。

Chatパネルも䟿利ですが、Copilot++のコヌド補完は本圓に優秀で、このためだけにCursorを䜿っおいるず蚀っおも過蚀ではないくらいスグレモノです。

加えお、VSCodeからフォヌクされおいるので既存の゚コシステムが掻かせるずいう点も、倚くの開発者の関心を集めた理由の1぀だず思っおいたす。

モダンな゚ディタずしおZedもありたすが、こちらは独自のプラグむンを個別にむンストヌルする必芁があるので、VSCodeからの移行は䞭々ハヌドルが高いですね。

https://zed.dev/

Vimmerの苊悩

いきなり䞻語がでかいですが、Vim・NeoVimは特にカスタマむズの自由床が高いので、倚くのナヌザヌはプラグむンやらキヌバむンドやらLSPやらず、あれこれオレオレ蚭定を䜜っお 「がくのかんがえたさいきょうのえでぃた」 を䜜りがちです。

これをVim盆栜ず呌びたす。テストに出たす。

自分もそのうちの䞀人で、 「AI機胜を詊しおみたいけど、最匷の゚ディタ自称があるからいいかな  」 ず葛藀しおいたした。

それもそのはずで、䞀床はZedに移行したものの、補完呚りの挙動が怪しかったりLSPの動䜜が重かったり、圓時は痒いずころに手が届かず結局NeoVimに出戻りした経隓がありたす。

ずはいえ、開発環境を転々ずする䞭で各環境ごずに 「こうしたい」「これいいな」 などの知芋が溜たっお段階的にブラッシュアップしおきたため、これたでの知芋を掻かしおカスタマむズをすれば 卍真に最匷の゚ディタ卍 が完成するのではず考え、重い腰を䞊げお挑戊しおみたした。

最終ゎヌル

https://youtu.be/-k_Lwu2uB_Q

こだわりず執念のカスタマむズにより、さらにモダンでむケむケなCursorに生たれ倉わりたした。

カスタマむズ内容

ここからは具䜓的なカスタマむズ方法に぀いお解説しおいきたす。

前提ずしお、自分の蚭定の倚くはAstroNvimに倧きく圱響を受けおいるので、ZedやCursorなど異なる゚ディタに移行しおも、基本的にはAstroNvimのキヌバむンディングを元にカスタマむズしおいたす。

https://astronvim.com/

しかし、Cursor・VSCode特有の問題や、ある皋床割り切りが必芁な箇所も少々あるため、あくたでも ”再珟” であるこずに泚意しおください。

拡匵機胜Vimを導入する

これは人暩です。ただ䜿っおいない人は黙っお入れたしょう。

https://marketplace.visualstudio.com/items?itemName=vscodevim.vim

人によっおは動䜜が重いそうですが、個人的にはゎリゎリにカスタマむズしおもそこたで重い印象は無いです。

ちなみに類䌌の拡匵機胜ずしおVSCode NeoVimがありたすが、こちらはNeoVimの蚭定を䞀郚掻かせるものの、郚分的にVSCode向けに調敎する必芁があったり、導入しおも自分のNeoVimず完党に同じ操䜜にはならなかったので䜿甚しおいたせん。

むしろ既存のNeoVimの蚭定に䟝存しなくお良いですね。

Vimに関するキヌバむンドや蚭定内容などは埌ほど玹介したす。

テヌマを導入する

ここはぶっちゃけなんでもいいです。自分が䞀番テンションの䞊がるや぀を遞ぶず良いでしょう。

自分の堎合はNeoVimやiTerm2でもIcebergを気に入っお䜿っおいるので、Cursorでも倉わらず䜿甚しおいたす。

https://marketplace.visualstudio.com/items?itemName=cocopon.iceberg-theme

背景画像を蚭定する

テヌマを導入するだけでも十分ですが、背景画像を蚭定するずなんか良い感じになりたす。

背景画像を蚭定できる拡匵機胜は色々ず存圚したすが、自分の環境では以䞋を䜿甚しおいたす。

https://marketplace.visualstudio.com/items?itemName=Katsute.code-background

アニメヌションを付ける

゚ディタ倉遷でも曞きたしたが、盎近で䜿甚した䞭でもNeoVimのGUIクラむアントであるNeoVideは、カヌ゜ル移動やスクロヌルにおしゃんなアニメヌションが付きたす。

NeoVideの觊り心地はずおも良く、カヌ゜ル移動に䌎うスクロヌルに察しおもヌルッずアニメヌションが付くので、無駄に移動したくなるほど気に入っおいたす。

https://neovide.dev/features.html

以䞋の拡匵機胜を導入するず、このようなアニメヌションをCursorでも再珟可胜になりたす。

https://marketplace.visualstudio.com/items?itemName=BrandonKirbyson.vscode-animations

泚意点ずしお、䟝存する拡匵機胜では Custom CSS and JS Loader ず Apc Customize UI++ のどちらかを遞べたすが、必ず埌者の方にしおください。

https://marketplace.visualstudio.com/items?itemName=drcika.apc-extension

Cursorナヌザヌの堎合、前者を遞択しおしたうず正しく動䜜したせん。
詳しい蚭定方法に関しおは拡匵機胜のREADMEを参照しおください。

芋た目をZedっぜくする

Zedは芋た目がスッキリしおいおモダンの暩化っお感じがしお個人的には奜きです。
なので、芋た目の芁玠だけ取り入れるこずにしたした。

ず蚀っおも超簡単で、この拡匵機胜を導入するだけです。

https://marketplace.visualstudio.com/items?itemName=enhancedjax.vscode-ayu-zed

コマンドパレット

ファむルアむコン

これだけでもVSCode臭さが解消されおオシャレ床爆䞊がり間違いなしです。

拡匵機胜LazyGit VSCodeを導入する

AstroNvimではデフォルトでLazyGitが䜿甚でき Leader(Space) + g + g を入力すれば、フロヌティングパネルで呌び出せたす。

Cursorのタヌミナルで盎接LazyGitを呌び出すこずも可胜ですが、毎回タヌミナルに移動しお文字を入力するのが面倒くさいです。

そこで、以䞋の拡匵機胜を導入しお同じキヌバむンドを蚭定すれば、Cursorでも䌌たように呌び出せるようになりたす。

https://marketplace.visualstudio.com/items?itemName=TomPollak.lazygit-vscode

LazyGit関連の拡匵機胜はいく぀か存圚したすが、こちらの拡匵機胜はLazyGitのconfigファむルのパスを蚭定できたり、拡匵機胜自䜓にいく぀か蚭定可胜な項目があるためこちらを遞定したした。

䜙談ずしお、これはCursor・VSCode䞡方に蚀えるこずですが、AstroNvimナヌザヌにずっおフロヌティングパネルが存圚しない点が䞀番苊痛でした。

拡匵機胜FindItFasterを導入する

先ほど䜙談で蚀いたしたが、Cursor・VSCodeにはフロヌティングパネルtelescopeを䜿った操䜜ができないので、怜玢呚りは特に䞍䟿で仕方ないです。

察しお、AstroNvimでは以䞋の操䜜が可胜で、telescope + fzfを甚いるこずで快適か぀高速な怜玢を実珟しおいたす。

  • Leader(Space) + f + f でファむル怜玢
  • Leader(Space) + f + / でファむル内怜玢
  • Leader(Space) + f + w で党䜓怜玢

曖昧怜玢ができる䞊に、右偎に遞択䞭のファむルのプレビュヌが衚瀺されたす。

AstroNvimに慣れおいる自分にずっおは必須のため、移行に躊躇しおいた最倧の芁因です。

そこで色々ず探したずころ、フロヌティングパネルではないものの、Cursor・VSCodeでも䌌た機胜を実珟するプラグむンを発芋したした。

https://marketplace.visualstudio.com/items?itemName=TomRijndorp.find-it-faster

ファむル怜玢

党䜓怜玢

ファむル内怜玢ができたせんが、ファむル怜玢・党䜓怜玢は抂ね満足できる仕䞊がりなので、同じキヌバむンドでこの拡匵機胜を呌び出せるように蚭定したした。

ファむル内怜玢に関しおは自前のfzfコマンドをタヌミナルで叩くか、朔く諊めおVim暙準の怜玢機胜で枈たしおいたす。本圓は欲しい

拡匵機胜を呌び出した際の衚瀺厩れに察凊する

この拡匵機胜の蚭定の1぀ずしお、実行時にタヌミナルを最倧高さに指定できたす。

settings.json
"find-it-faster.general.showMaximizedTerminal": true 

しかし、時々ですが、タヌミナルは最倧高さになっおもfzfが䞭途半端な高さで衚瀺されおしたったり、色々ず䞍䟿な点がありたした。

そこで Multi-Command ずいう拡匵機胜を導入するこずでこの問題を解消したした。

https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command

たず、settings.json に以䞋のような蚭定を行いたす。

settings.json
{
  "find-it-faster.general.showMaximizedTerminal": false, // default

  "multiCommand.commands": [
    {
      "command": "multiCommand.findFiles",
      "interval": 220,
      "sequence": [
        "workbench.action.toggleMaximizedPanel",
        "find-it-faster.findFiles"
      ]
    },
    {
      "command": "multiCommand.findWithinFiles",
      "interval": 220,
      "sequence": [
        "workbench.action.toggleMaximizedPanel",
        "find-it-faster.findWithinFiles"
      ]
    }
  }
}

あずは任意のキヌバむンドから呌び出すだけです。

settings.json
{
  "vim.normalModeKeyBindingsNonRecursive": [
    // ファむル怜玢
    {
      "before": ["<Leader>", "f", "f"],
      "commands": ["multiCommand.findFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // 党䜓怜玢
    {
      "before": ["<Leader>", "f", "w"],
      "commands": ["multiCommand.findWithinFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
  ]
}

やっおいるこずはシンプルで、220ms 遅らせお順次実行させるこずで toggleMaximizedPanel を確実に実行しおからFindItFasterを呌び出すようにしおいたす。

これにより、蚭定前ず比べお確実に実行できるようになったのでストレスが枛りたした。

再実行時のタヌミナルの高さがおかしい問題に察凊する

これは厳密に問題を特定したわけではありたせんが、タヌミナルずこの拡匵機胜を䜵甚する堎合、䜕やらおかしな挙動がありたした。

  • 問題なし🙆‍♀機胜実行 → ゚ディタにフォヌカス → 機胜実行連続で実行
  • 問題あり🙅‍♀機胜実行 → タヌミナルにフォヌカスしお最倧化 → ゚ディタにフォヌカス → 機胜実行

䞀床タヌミナルに移動しお䜕らかの操䜜を行った䞊で拡匵機胜を実行するず、 toggleMaximizedPanel が true にも関わらず、タヌミナルの高さが䜎い状態でfzfが実行されおしたいたす。

色々ず詊したしたが、結局ゞャストな解決方法が芋぀からず  

そこで、Cursor内のタヌミナルはFindItFaster専甚にしお、タヌミナルアプリのWarpず䜵甚するこずで察凊したした。

https://www.warp.dev/

2画面以䞊を䜿甚する前提になりたすが、 「片方でCursor・もう片方はWarp」 のような䜿い方をしたずころ、意倖にも快適だったので最近はこの構成で䜜業しおいたす。

実は過去に詊したこずがあっお、NeoVim + Tmuxずの盞性の悪さから䞀床は手攟しおいたしたが、タヌミナルずしおのみ䜿甚する分には十分実甚的で良いず思いたす。

iTerm2やWezTermよりもクセはありたすが、䜕より芋た目が䞀番おしゃんなので遞びたした。

珟圚のファむルのパスを取埗可胜にする

元々はNeoVim + Copilotだったこずもあり、利䟿性を考慮しお珟圚のファむルのパスを取埗できるように蚭定しおいたした。

䞀方で、Cursorは䜕かず優秀なので基本的には困らないですが、補完されるファむルパスが時々異なる堎合があったり、CursorずWarpを䜵甚するため、Warp䞊でテストを実行する際に郜床ファむルパスを指定するのは倧倉です。

そこで、珟圚フォヌカスしおいるファむルのパスを簡単に取埗できるように、以䞋の拡匵機胜を導入しお蚭定しおいたす。

https://marketplace.visualstudio.com/items?itemName=YoshinoriN.current-file-path

settings.json
{
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["<Leader>", "a"],
      "commands": ["currentFilePath.copy"]
    }
  ]
}

このように蚭定するこずで、ノヌマルモヌド時に Leader(Space) + a を入力するだけでフルパスをコピヌできるようになるため倧倉䟿利です。

蚭定ファむル

Vim呚りの操䜜蚭定や䞊蚘で玹介した拡匵機胜に関するキヌバむンドなどは説明し出したらキリがないので、以䞋の settings.json・keybindings.json を各々参考にしおみおください。

settings.json
{
  "terminal.integrated.showExitAlert": false,
  "zenMode.restore": true,
  "zenMode.hideLineNumbers": false,
  "zenMode.fullScreen": true,
  "zenMode.hideActivityBar": true,
  "zenMode.showTabs": "multiple",
  "zenMode.centerLayout": false,
  "window.commandCenter": true,
  "editor.fontFamily": "'UDEV Gothic 35NF', Menlo, Monaco, 'Courier New', monospace",
  "explorer.compactFolders": false,
  "workbench.colorTheme": "Iceberg",
  "workbench.editor.revealIfOpen": false,
  "animations.Scrolling": "Fade",
  "animations.CursorAnimation": true,
  "apc.imports": [
    "file://${userHome}/.cursor/extensions/brandonkirbyson.vscode-animations-2.0.4/dist/updateHandler.js"
  ],
  "find-it-faster.findWithinFiles.fuzzRipgrepQuery": true,
  "find-it-faster.general.killTerminalAfterUse": true,
  "lazygit-vscode.configPath": "/your/config/path",
  "lazygit-vscode.autoMaximizeWindow": true,
  "go.lintTool": "golangci-lint",
  "go.lintFlags": ["--config=${workspaceFolder}/.golangci.yaml", "--fast"],
  "multiCommand.commands": [
    {
      "command": "multiCommand.formatAndFix",
      "sequence": ["editor.action.formatDocument", "multiCommand.formatTs"]
    },
    {
      "command": "multiCommand.formatTs",
      "sequence": [
        {
          "command": "eslint.executeAutofix",
          "when": "resourceLangId == javascript || resourceLangId == typescript || resourceLangId == json"
        }
      ]
    },
    {
      "command": "multiCommand.findFiles",
      "interval": 220,
      "sequence": [
        "workbench.action.toggleMaximizedPanel",
        "find-it-faster.findFiles"
      ]
    },
    {
      "command": "multiCommand.findWithinFiles",
      "interval": 220,
      "sequence": [
        "workbench.action.toggleMaximizedPanel",
        "find-it-faster.findWithinFiles"
      ]
    },
    // 自䜜の怜玢甚スクリプトを実行するためのコマンド
    {
      "command": "multiCommand.findCurrentFile",
      "interval": 220,
      "sequence": [
        "workbench.action.toggleMaximizedPanel",
        {
          "command": "workbench.action.terminal.newWithProfile",
          "args": {
            "profileName": "zsh",
            "splitActiveTerminal": true,
            "splitTerminalDimension": {
              "split": "maxSize"
            }
          }
        },
        {
          "command": "workbench.action.terminal.sendSequence",
          "args": { "text": "buffer-search ${file}; exit\n" }
        }
      ]
    }
  ],
  "vim.leader": "<space>",
  "vim.useSystemClipboard": true,
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["u"],
      "commands": [
        {
          "command": "undo"
        }
      ]
    },
    {
      "before": ["<C-r>"],
      "commands": [
        {
          "command": "redo"
        }
      ]
    },
    {
      "before": ["<Leader>", "w"],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.files.save",
          "args": []
        }
      ]
    },
    {
      "before": ["<Leader>", "q"],
      "after": [],
      "commands": [
        {
          "command": "workbench.action.closeActiveEditor",
          "args": []
        }
      ]
    },
    {
      "before": ["<leader>", "c"],
      "commands": ["workbench.action.closeActiveEditor"]
    },
    {
      "before": ["<Leader>", "a"],
      "commands": ["currentFilePath.copy"]
    },
    {
      "before": ["<Leader>", "."],
      "after": ["$"]
    },
    {
      "before": ["<Leader>", ","],
      "after": ["^"]
    },
    {
      "before": ["<Leader>", "m"],
      "after": ["%"]
    },
    // タブ間での移動
    {
      "before": ["<Leader>", "["],
      "commands": ["workbench.action.previousEditor"]
    },
    {
      "before": ["<Leader>", "]"],
      "commands": ["workbench.action.nextEditor"]
    },
    // ファむルツリヌぞの移動
    {
      "before": ["<Leader>", "o"],
      "commands": ["workbench.action.focusSideBar"]
    },
    // ファむルツリヌの開閉
    {
      "before": ["<Leader>", "e"],
      "commands": ["workbench.action.toggleSidebarVisibility"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // ファむル怜玢
    {
      "before": ["<Leader>", "f", "f"],
      "commands": ["multiCommand.findFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // 党䜓怜玢
    {
      "before": ["<Leader>", "f", "w"],
      "commands": ["multiCommand.findWithinFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // ファむル内怜玢
    {
      "before": ["<Leader>", "f", "/"],
      "commands": ["multiCommand.findCurrentFile"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // lsp
    {
      "before": ["<Leader>", "l", "f"],
      "commands": ["multiCommand.formatAndFix"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    {
      "before": ["<Leader>", "l", "a"],
      "commands": ["editor.action.quickFix"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    {
      "before": ["<Leader>", "l", "r"],
      "commands": ["editor.action.rename"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    {
      "before": ["<Leader>", "l", "d"],
      "commands": ["editor.action.showHover"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // git
    {
      "before": ["<Leader>", "g", "l"],
      "commands": ["gitlens.showQuickFileHistory"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    {
      "before": ["<Leader>", "g", "g"],
      "commands": ["lazygit-vscode.toggle"],
      "when": [
        "editorFocus && !editorTextFocus && vim.mode == 'Normal'",
        "workbench.action.focusActiveEditorGroup"
      ]
    }
  ],
  "vim.insertModeKeyBindingsNonRecursive": [
    {
      "before": ["j", "j"],
      "after": ["<Esc>"]
    }
  ],
  "vim.visualModeKeyBindingsNonRecursive": [
    {
      "before": ["<Leader>", "j"],
      "after": ["<Esc>"]
    },
    {
      "before": ["<Leader>", "."],
      "after": ["$"]
    },
    {
      "before": ["<Leader>", ","],
      "after": ["^"]
    },
    {
      "before": ["<Leader>", "m"],
      "after": ["%"]
    },
    {
      "before": [">"],
      "commands": ["editor.action.indentLines"]
    },
    {
      "before": ["<"],
      "commands": ["editor.action.outdentLines"]
    },
    {
      "before": ["p"],
      "after": ["\"", "_", "d", "P"]
    },
    // ファむル怜玢
    {
      "before": ["<Leader>", "f", "f"],
      "commands": ["find-it-faster.findFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    },
    // 党䜓怜玢
    {
      "before": ["<Leader>", "f", "w"],
      "commands": ["find-it-faster.findWithinFiles"],
      "when": ["editorFocus && vim.mode == 'Normal'"]
    }
  ],
  "cursor.cpp.enablePartialAccepts": true,
  "background.windowBackgrounds": [
    "your/background/image/path"
  ],
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "typescript.updateImportsOnFileMove.enabled": "always",
  "cursor.chat.premiumChatAutoScrollWhenAtBottom": true,
  "apc.electron": {
    "titleBarStyle": "hiddenInset",
    "trafficLightPosition": {
      "x": 7,
      "y": 5
    }
  },
  "apc.font.family": "Zed Sans",
  "apc.stylesheet": {
    ".quick-input-widget": {
      "position": "absolute !important",
      "top": "200px !important",
      "left": "50%",
      "border-radius": "10px",
      "border": "1px solid var(--vscode-textSeparator-foreground) !important",
      "box-shadow": "0 0 60px 0 rgba(0,0,0,0.2) !important"
    },
    // left title bar (controls)
    ".titlebar-left": {
      "max-width": "70px !important"
    },
    // center title bar
    ".titlebar-center": {
      "margin": "0 !important"
    },
    // arrow buttons
    ".action-item.menu-entry": {
      "display": "none !important"
    },
    // whole title bar command center container
    ".action-item.command-center-center": {
      "background-color": "transparent !important",
      "border": "none !important",
      "width": "fit-content !important"
    },
    // field
    ".quick-input-header": {
      "padding": "0 !important"
    },
    // input element container
    ".quick-input-header > .quick-input-and-message .monaco-inputbox": {
      "border-radius": "10px 10px 0 0 !important"
    },
    // actual input element
    ".quick-input-header > .quick-input-and-message > .quick-input-filter > .quick-input-box input": {
      "padding": "8px 10px !important"
    },
    // list of results
    ".quick-input-list > .monaco-list > .monaco-scrollable-element": {
      "padding": "2px !important"
    },
    // status bar set height
    "div:has(> .statusbar)": {
      "height": "25px !important",
      "top": "auto !important",
      "bottom": "0 !important"
    },
    ".statusbar": {
      "height": "25px !important"
    },
    // hides search icon
    ".codicon.codicon-search.search-icon": {
      "display": "none !important"
    },
    // empty editor background
    ".editor-group-container.empty.active": {
      "background-color": "var(--vscode-statusBar-background)"
    },
    "div:has(> .tabs-and-actions-container.tabs-border-bottom.empty)": {
      "background-color": "var(--vscode-statusBar-background) !important"
    }
  },
  "workbench.iconTheme": "ayu-mirage-zed",
  "javascript.updateImportsOnFileMove.enabled": "always",
  "editor.smoothScrolling": true,
  "terminal.integrated.smoothScrolling": true,
  "editor.cursorBlinking": "smooth",
  "workbench.list.smoothScrolling": true,
  "animations.Install-Method": "Apc Customize UI++",
  "update.mode": "manual",
  "[go]": {
    "editor.defaultFormatter": "golang.go"
  },
  "editor.formatOnPaste": true
}
keybindings.json
[
  //----------------------------------------------------------
  // 䜕も開いおいない時の蚭定
  //----------------------------------------------------------
  // ファむル怜玢
  {
    "key": "space f f",
    "command": "multiCommand.findFile",
    "when": "!editorFocus && !terminalFocus && !inputFocus"
  },
  // 党䜓怜玢
  {
    "key": "space f w",
    "command": "multiCommand.findWithinFiles",
    "when": "!editorFocus && !terminalFocus && !inputFocus"
  },
  // サむドバヌを衚瀺
  {
    "key": "space e",
    "command": "workbench.action.focusSideBar",
    "when": "!editorFocus && !terminalFocus && !inputFocus"
  },
  // サむドバヌぞのフォヌカス
  {
    "key": "space o",
    "command": "workbench.action.focusSideBar",
    "when": "!editorFocus && !terminalFocus && !inputFocus"
  },
  // Lazygitの起動
  {
    "key": "space g g",
    "command": "lazygit-vscode.toggle",
    "when": "!editorFocus && !terminalFocus && !inputFocus"
  },

  //----------------------------------------------------------
  // ゚ディタにフォヌカスしおいる時の蚭定
  //----------------------------------------------------------
  // ゚ディタの最倧化
  {
    "key": "ctrl+t z",
    "command": "workbench.action.togglePanel",
    "when": "editorFocus && vim.mode == 'Normal'"
  },
  // AIチャットぞのフォヌカス
  {
    "key": "ctrl+t l",
    "command": "aichat.focuschatpaneaction",
    "when": "editorFocus && vim.mode == 'Normal'"
  },
  // タヌミナルぞのフォヌカス
  // {
  //   "key": "ctrl+t n",
  //   "command": "workbench.action.terminal.focus"
  // },
  {
    "key": "ctrl+t n",
    "command": "runCommands",
    "args": {
      "commands": ["workbench.action.terminal.focus"]
    },
    "when": "editorFocus && vim.mode == 'Normal' && activePanel"
  },
  {
    "key": "ctrl+t n",
    "command": "runCommands",
    "args": {
      "commands": [
        "workbench.action.terminal.focus",
        "workbench.action.toggleMaximizedPanel"
      ]
    },
    "when": "editorFocus && vim.mode == 'Normal' && !activePanel"
  },
  // ゚ディタの瞊分割
  {
    "key": "s v",
    "command": "workbench.action.splitEditor",
    "when": "editorTextFocus && vim.mode == 'Normal'"
  },
  // ゚ディタの暪分割
  {
    "key": "s h",
    "command": "workbench.action.splitEditorDown",
    "when": "editorTextFocus && vim.mode == 'Normal'"
  },
  // アクティブ゚ディタの閉鎖
  {
    "key": "ctrl+t x",
    "command": "workbench.action.closeActiveEditor",
    "when": "editorFocus && vim.mode == 'Normal'"
  },
  // ファむルツリヌぞのフォヌカス巊゚ディタグルヌプ
  {
    "key": "ctrl+w h",
    "command": "workbench.action.focusSideBar",
    "when": "editorFocus && vim.mode == 'Normal' && activeEditorGroupIndex == 1"
  },
  // ゚ディタ間の移動巊ぞ
  {
    "key": "ctrl+w h",
    "command": "workbench.action.focusLeftGroup",
    "when": "editorFocus && vim.mode == 'Normal' && activeEditorGroupIndex > 1"
  },
  // ゚ディタ間の移動右ぞ
  {
    "key": "ctrl+w l",
    "command": "workbench.action.focusRightGroup",
    "when": "editorFocus && vim.mode == 'Normal' && activeEditorGroupIndex >= 1"
  },
  // ゚ディタ間の移動䞋ぞ
  {
    "key": "ctrl+w j",
    "command": "workbench.action.focusBelowGroup",
    "when": "editorFocus && vim.mode == 'Normal'"
  },
  // ゚ディタ間の移動䞊ぞ
  {
    "key": "ctrl+w k",
    "command": "workbench.action.focusAboveGroup",
    "when": "editorFocus && vim.mode == 'Normal'"
  },
  // Neovimの挿入モヌドからの゚スケヌプ
  {
    "command": "vscode-neovim.compositeEscape1",
    "key": "j",
    "when": "neovim.mode == insert && editorTextFocus && !inputFocus",
    "args": "j"
  },
  // ホバヌ情報の衚瀺
  {
    "key": "shift+k",
    "command": "editor.action.showHover",
    "when": "editorFocus && vim.mode == 'Normal'"
  },

  //----------------------------------------------------------
  // AIチャットにフォヌカスしおいる時の蚭定
  //----------------------------------------------------------
  // ゚ディタぞの移動
  {
    "key": "ctrl+t h",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "workbench.panel.aichat.view.visible && !inputFocus"
  },
  // タヌミナルぞの移動
  {
    "key": "ctrl+t n",
    "command": "workbench.action.terminal.focus",
    "when": "workbench.panel.aichat.view.visible && !inputFocus"
  },
  // AIチャットのサむドバヌを閉じる
  {
    "key": "ctrl+t x",
    "command": "aichat.close-sidebar",
    "when": "workbench.panel.aichat.view.visible && !inputFocus"
  },

  //----------------------------------------------------------
  // サむドバヌにフォヌカスしおいる時の蚭定
  //----------------------------------------------------------
  // リスト内で䞋ぞ移動
  {
    "key": "j",
    "command": "list.focusDown",
    "when": "listFocus && !inputFocus"
  },
  // リスト内で䞊ぞ移動
  {
    "key": "k",
    "command": "list.focusUp",
    "when": "listFocus && !inputFocus"
  },
  // リスト内で折りたたみ
  {
    "key": "h",
    "command": "list.collapse",
    "when": "listFocus && !inputFocus"
  },
  // リスト内で遞択
  {
    "key": "l",
    "command": "list.select",
    "when": "listFocus && !inputFocus"
  },
  // ゚ディタグルヌプぞのフォヌカス
  {
    "key": "space o",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "listFocus && !inputFocus"
  },
  // サむドバヌの衚瀺切替
  {
    "key": "space e",
    "command": "workbench.action.toggleSidebarVisibility",
    "when": "listFocus && !inputFocus"
  },
  // 最初の゚ディタグルヌプぞのフォヌカス
  {
    "key": "ctrl+w l",
    "command": "workbench.action.focusFirstEditorGroup",
    "when": "listFocus && !inputFocus"
  },
  // 新しいファむルの䜜成
  {
    "key": "a",
    "command": "explorer.newFile",
    "when": "listFocus && !inputFocus"
  },
  // 新しいフォルダの䜜成
  {
    "key": "shift+a",
    "command": "explorer.newFolder",
    "when": "listFocus && !inputFocus"
  },
  // ファむル・ディレクトリのリネヌム
  {
    "key": "r",
    "command": "renameFile",
    "when": "listFocus && !inputFocus"
  },
  // ファむル・ディレクトリの削陀
  {
    "key": "d",
    "command": "deleteFile",
    "when": "listFocus && !inputFocus"
  },
  // 隠しファむル・ディレクトリの衚瀺切替
  {
    "key": "shift+h",
    "command": "toggleexcludedfiles.toggle",
    "when": "listFocus && !inputFocus"
  },
  // ゚クスプロヌラヌの曎新
  {
    "key": "shift+r",
    "command": "workbench.files.action.refreshFilesExplorer",
    "when": "listFocus && !inputFocus"
  },
  // ゚ディタぞの移動
  {
    "key": "ctrl+t l",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "listFocus && !inputFocus"
  },

  //----------------------------------------------------------
  // タヌミナルにフォヌカスしおいる時の蚭定
  //----------------------------------------------------------
  // ゚ディタぞの移動
  // {
  //   "key": "ctrl+t p",
  //   "command": "workbench.action.focusActiveEditorGroup",
  //   "when": "terminalFocus"
  // },
  // {
  //   "key": "ctrl+t p",
  //   "command": "runCommands",
  //   "args": {
  //     "commands": [
  //       "workbench.action.focusActiveEditorGroup",
  //       "workbench.action.focusActiveEditorGroup"
  //     ]
  //   },
  //   "when": "terminalFocus"
  // },
  {
    "key": "ctrl+t p",
    "command": "runCommands",
    "args": {
      "commands": [
        "workbench.action.focusActiveEditorGroup",
        "workbench.action.focusActiveEditorGroup",
        "workbench.action.togglePanel"
      ]
    },
    // "when": "terminalFocus && panelMaximized"
    "when": "terminalFocus"
  },
  // タヌミナルの分割
  {
    "key": "ctrl+t shift+\\",
    "command": "workbench.action.terminal.split",
    "when": "terminalFocus"
  },
  // 新しいタヌミナルの䜜成
  {
    "key": "ctrl+t c",
    "command": "workbench.action.terminal.new",
    "when": "terminalFocus"
  },
  // タヌミナル間での移動巊ぞ
  {
    "key": "ctrl+t h",
    "command": "workbench.action.terminal.focusPreviousPane",
    "when": "terminalFocus"
  },
  // タヌミナル間での移動右ぞ
  {
    "key": "ctrl+t l",
    "command": "workbench.action.terminal.focusNextPane",
    "when": "terminalFocus"
  },
  // タヌミナルぞのむンデックス別フォヌカス
  {
    "key": "ctrl+t 1",
    "command": "workbench.action.terminal.focusAtIndex1"
  },
  {
    "key": "ctrl+t 2",
    "command": "workbench.action.terminal.focusAtIndex2"
  },
  {
    "key": "ctrl+t 3",
    "command": "workbench.action.terminal.focusAtIndex3"
  },
  {
    "key": "ctrl+t 4",
    "command": "workbench.action.terminal.focusAtIndex4"
  },
  {
    "key": "ctrl+t 5",
    "command": "workbench.action.terminal.focusAtIndex5"
  },
  // タヌミナルの最倧化
  {
    "key": "ctrl+t z",
    "command": "workbench.action.toggleMaximizedPanel",
    "when": "terminalFocus"
  },
  // タヌミナルの閉鎖
  {
    "key": "ctrl+t x",
    "command": "workbench.action.terminal.detachSession",
    "when": "terminalFocus"
  }
]

おわりに

ずいうこずで、 AstroNvim + NeoVide + Zed + VSCode + AICursor ずいうカオスでキメラな゚ディタが無事完成したした。

芋た目ペシ機胜性ペシ なので、ナりなダングにバカりケするこず間違いないでしょう。

ずはいえ抂ね満足しおいるものの、ファむル内怜玢ができなかったり、所々マりス操䜜が必芁な箇所があったりず、ただただ改善できる点は挙げられたす。

みなさんもむケむケな蚭定を参考にしお 「がくのかんがえたさいきょうのえでぃた」 を䜜っおみおはいかがでしょうか

Discussion