VSCodeの設定をVSCode-Insidersに引き継ぐ方法

VSCodeとVS-Insidersで別々にSettingを管理したかったので、その方法のメモ。

追記

一度Settings SyncでStableと同期したあとにInsidersに切り替えると、Insidersの設定がStableに引き継がれるのでそっちのほうが楽。 Settings Syncを使わないで引き継いだ方法は備忘のために残しておく。

環境

  • MacOS: Ventura 13.3.1
  • VSCode: 1.78.2
  • VSCode-Insiders: 1.79.0-insider

Settingsの引き継ぎ

MacOSの場合、VSCodeの設定は~/Library/Application Support/Code/Userに保存されている。 これをVSCode-Insidersの設定ディレクトリ~/Library/Application\ Support/Code\ -\ Insiders/Userにコピーする。 今回は、

  • settings.json
  • keybindings.json
  • snippets をコピーした。

Extensionsの引き継ぎ

前準備として、VSCode-Insidersでcode-insidersコマンドが使えるようにしておく。 VSCode-Insidersのコマンドパレットをcmd+shift+pで開き、Shell Command: Install 'code-insiders' command in PATHを検索してONにする。

VSCodeのExtensionsはcode --list-extensionsで一覧を取得できるので、これをcode-insidersでインストールする。

for i in `code --list-extensions`; do code-insiders --install-extension $i; done