開發環境設定,跨 os 快速移植
dotfiles/
├── bash/
│ ├── bashrc.common # 共用 shell 設定
│ └── bashrc.local.template # 機器專用 template
├── vim/
│ └── vimrc # vim 設定,含 vim-plug 自動安裝
├── tmux/
│ └── tmux.conf # tmux 設定
├── wezterm/
│ ├── wezterm.lua # WezTerm 設定
│ └── colors/
│ └── vscode.toml
├── install.sh # Linux bootstrap
└── README.md
# 1. clone repo
git clone https://github.com/<你的帳號>/dotfiles ~/dotfiles
# 2. 安裝 WezTerm
curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor \
-o /usr/share/keyrings/wezterm-fury.gpg
echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' \
| sudo tee /etc/apt/sources.list.d/wezterm.list
sudo apt update && sudo apt install wezterm
# 3. 安裝字體(不需要 sudo)
mkdir -p ~/.local/share/fonts && cd ~/.local/share/fonts
curl -fLo JetBrainsMono.zip \
https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
unzip JetBrainsMono.zip && rm JetBrainsMono.zip
fc-cache -fv
# 4. 執行 bootstrap
bash ~/dotfiles/install.shWezTerm 在 server 端不需要裝(你是從本機 SSH 連進去的)。 字體也不需要裝在 server 上,字體是本機 WezTerm 在渲染的。
# 1. clone repo(如果 server 可以連 GitHub)
git clone https://github.com/<你的帳號>/dotfiles ~/dotfiles
# 無法連 GitHub 的話,用 scp 從本機複製
# scp -r ~/dotfiles user@server:~/dotfiles
# 2. 執行 bootstrap(完全不需要 root)
bash ~/dotfiles/install.sh
# 3. 第一次開 vim 時,vim-plug 會自動安裝 codedark 配色
# 前提:server 要能連 raw.githubusercontent.com
# 不能連的話,手動執行:
# mkdir -p ~/.vim/autoload
# curl -fLo ~/.vim/autoload/plug.vim \
# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# 然後進 vim 執行 :PlugInstall# 1. 安裝 WezTerm(winget, scoop, choco)
winget install wez.wezterm
# 2. 安裝字體
# 下載 JetBrainsMono.zip:
# https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
# 解壓縮後,全選 .ttf 檔案 → 右鍵 → 為所有使用者安裝
# 3. clone repo
git clone https://github.com/<你的帳號>/dotfiles $HOME\dotfiles
# 4. 複製 WezTerm 設定
mkdir -p $HOME\.config\wezterm
cp $HOME\dotfiles\wezterm\wezterm.lua $HOME\.config\wezterm\wezterm.lua
# 5. WSL 或 Git Bash 使用
# bash ~/dotfiles/install.shWindows 開發說明 tmux 在 Windows 原生不支援,不需要安裝。 多視窗需求直接用 WezTerm 的多 tab / pane 處理。 vim 跟 tmux 只需要裝在 Linux server 端(透過 install.sh)。
Windows vim 設定檔路徑(注意是底線不是點):
# 複製 vimrc 到 Windows vim 的設定位置
cp $HOME\dotfiles\vim\vimrc $HOME\_vimrc或手動建立 symlink(需要以系統管理員身分執行 PowerShell):
New-Item -ItemType SymbolicLink -Path "$HOME\_vimrc" -Target "$HOME\dotfiles\vim\vimrc"# 1. 安裝 WezTerm portable(不需要 admin)
# 下載 nightly zip:https://wezterm.org/install/windows.html
# 解壓縮到任意目錄,直接執行 wezterm.exe
# 2. 安裝字體(不需要 admin,裝在目前使用者)
# 下載 JetBrainsMono.zip:
# https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.zip
# 解壓縮後,全選 .ttf 檔案 → 右鍵 → 安裝(注意:不要選「為所有使用者安裝」)
# 3. 複製 WezTerm 設定
mkdir -p $HOME\.config\wezterm
# 把 wezterm.lua 複製到上面的目錄使用 igorkulman/wezterm-vscode-theme 的 VS Code Dark+ 配色。
theme 備份在 wezterm/colors/vscode.toml,install.sh 會自動 symlink,不需要額外下載。
如果想更新 theme 到最新版:
curl https://raw.githubusercontent.com/igorkulman/wezterm-vscode-theme/refs/heads/main/vscode.toml \
--output ~/dotfiles/wezterm/colors/vscode.tomlgit clone https://github.com/<你的帳號>/dotfiles ~/dotfiles
bash ~/dotfiles/install.sh
source ~/.bashrccd ~/dotfiles && git pull
source ~/.bashrc # 套用 bashrc 更新
# tmux 設定:prefix + r
# vim 設定:自動套用
# wezterm 設定:存檔自動 reloadvim ~/.bashrc.local # proxy、python 版本、PATH 等
vim ~/.tmux.conf.local # 公司內部 host、私有設定me # shell aliases 速查
me -vim # vim 快捷鍵
me -tmux # tmux 快捷鍵
me -wezterm # wezterm 快捷鍵
me -all # 全部- vim-plug 需要能連到
raw.githubusercontent.com - WezTerm 字體設定在本機,SSH 進 server 後字體依然由本機渲染