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
code
available in your PATH. -
Install Git for Windows and make
git
available 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/128
and 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
.dotfiles
directory 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\.bashrc
adds thedotfiles
alias to easily work with the dotfiles bare repository. Using this command, setdotfiles status
to hide untracked files:dotfiles config --local status.showUntrackedFiles no
-
%USERPROFILE%\.config\bash\.bashrc
also adds theuxt
alias 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\.bashrc
and%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 list
to update%USERPROFILE%\.vscode\extensions.txt
with the new set of extensions. - Commit and push
extensions.txt
using thedotfiles
command. - Pull updates on other machines using the
dotfiles
command. - On other machines, run
uxt sync
to 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.