sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply rammusxu
雖然也可以用 brew install chezmoi 安裝,但是有可能是新的機器,或是 Linux 機器,為了一致性,所以都用 curl 安裝。
chezmoi updatepath: .local/share/chezmoi
chezmoi update 會將你的 dotfiles 更新到最新狀態。如果你想將本地的變更應用到實際檔案,可以使用 chezmoi apply。
不要開啟 .oh-my-zsh 的自動更新,不然 git commit 會很亂。
make不要用 .oh-my-zsh/custom 當作預設,因為更新 .oh-my-zsh 的時候會被覆蓋掉。
dot_zshrc.tmpl
ZSH_CUSTOM="{{ .chezmoi.homeDir }}/.omz-custom"
https://www.chezmoi.io/docs/how-to/#use-chezmoi-on-macos
編輯 ./Brewfile
chezmoi add ~/.zsh_alias.zsh
chezmoi add --autotemplate ~/.zsh_alias.zsh
NEW_PLUGIN=chezmoi
NEW_PLUGIN_PATH=$(chezmoi source-path)/dot_omz-custom/plugins/$NEW_PLUGIN
mkdir -p $NEW_PLUGIN_PATH
chezmoi completion zsh > $NEW_PLUGIN_PATH/_$NEW_PLUGIN
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM}/themes/powerlevel10k
chezmoi add -r ${ZSH_CUSTOM}
chezmoi cd
git add dot_omz-custom
在 ~/.zshrc 中設定 ZSH_THEME="powerlevel10k/powerlevel10k"。
# GitLab.com
Host gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab_com
# Github.com
Host github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github_com
Credit: https://apple.stackexchange.com/questions/136928/using-alt-cmd-right-left-arrow-in-iterm/136931
Preferences -> Profiles -> Keys -> Key Mappings -> Presets: Natural Text Editing
Visual Studio Code: Open File → Preferences → Settings, enter terminal.integrated.fontFamily in the search box and set the value to MesloLGS NF.

