LoginSignup
4
2

More than 3 years have passed since last update.

複数マシンでVSCodeの設定を共有したかった。私がたどり着いたのはdotfilesでした

Posted at

TL;DR

keybindings.jsonsettings.json のリンクを $HOME/Library/Application\ Support/Code/User(macOSの場合)に作成します。

背景

開発マシンを問わずVSCodeを愛用しています。

業務用mac、私用mac、私用ラズパイでVSCodeを利用しているのですが、キーバインディグを統一するためにdotfilesでの管理に切り替えました。

dotfiles

🌟🌟🌟スターください🌟🌟🌟
https://github.com/hiroga-cc/dotfiles

解説

私はdotfilesの設定をスクリプトで展開するようにしているので、VSCodeの設定ファイルもスクリプト内でコピーしています。

VSCODE_USER_SETTING=$HOME/Library/Application\ Support/Code/User
mkdir -p "${VSCODE_USER_SETTING}"
ln -f "${DOTFILES}/bin/vscode/User/keybindings.json" "${VSCODE_USER_SETTING}/keybindings.json"
ln -f "${DOTFILES}/bin/vscode/User/settings.json" "${VSCODE_USER_SETTING}/settings.json"

ファイルをコピーしてもいいのですが、その場合VSCodeから設定を変更してもdotfilesに反映されません。リンクの運用がオススメです。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2