This repository contains the dotfiles that I use to set up a development environment on Windows using the following:
- Visual Studio Code (VSC), as the main editor
- Vim, as the secondary editor
- Git Bash, as the terminal
- Fira Code, as the main font
- Git, for version control
I manage these files using Git bare repositories. I got the idea from Flavio Antelo's blog post who got it from StreakyCobra on Hacker News.
-
Install VSC and make
codeavailable in your PATH. -
Install Git for Windows and make
gitavailable in your PATH. -
Install Fira Code. (Instructions)
-
Use Noto Emoji to support emojis on Git Bash.
You can follow these instructions, but long story short, use this link from DownGit to download the contents of
noto-emoji/png/128and put them in any of the following directories:%USERPROFILE%\.mintty\emojis\noto%USERPROFILE%\.config\mintty\emojis\noto%APPDATA%\mintty\emojis\noto%PROGRAMFILES%\Git\usr\share\mintty\emojis\noto
-
Using Git Bash, clone this repository into a
.dotfilesdirectory in your home directory:git clone --bare https://github.com/mcecode/windows-dotfiles.git "$HOME/.dotfiles" -
Checkout the dotfiles from the bare repository:
git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" checkout -
Reload Git Bash to allow the settings to take into effect.
-
%USERPROFILE%\.config\bash\.bashrcadds thedotfilesalias to easily work with the dotfiles bare repository. Using this command, setdotfiles statusto hide untracked files:dotfiles config --local status.showUntrackedFiles no -
%USERPROFILE%\.config\bash\.bashrcalso adds theuxtalias to easily update VSC extensions. Using this command, sync all VSC extensions in the new system:uxt sync -
Put any additional Bash settings like machine-specific variables and Git settings like user credentials in
%USERPROFILE%\.config\local\.bashrcand%USERPROFILE%\.config\local\.gitconfig, respectively.
- On the machine with the changes, run
dotfiles add <changed_file>anddotfiles commit -m "<meaningful_message>". - On other machines, run
dotfiles pull.
- On the machine with the newly installed or uninstalled extensions, run
uxt listto update%USERPROFILE%\.vscode\extensions.txtwith the new set of extensions. - Commit and push
extensions.txtusing thedotfilescommand. - Pull updates on other machines using the
dotfilescommand. - On other machines, run
uxt syncto sync the VSC extensions.
Suggestions are welcome, either in improving the dotfiles themselves or on how to store, update, and sync them better.
Copyright 2021-present Matthew Espino
This project is licensed under the MIT license.