These are my personal dotfiles.
These dotfiles contain the following software dependencies:
- Linux or MacOS
- Vim 8.0+ (or Neovim)
There currently is no Windows support. However, MacOS and most flavors of Linux should work fine. These dotfiles use Vim's new native package manager in order to distribute modules in an organized fashion, so versions of Vim before 8 will not function properly.
Setting up your Local Machine
Go to the next section if you have already configured these dotfiles on your machine once, or if you are SSHing into another machine. These setup instructions only need to be done once on a local machine.
New machines require two tasks to be done which are not part of the setup script:
- installing (and using) Powerline/Font Awesome-compatible fonts, and
- using the Solarized colorscheme.
Installing Fonts with Custom Glyph Support
We will be using Nerd Fonts to patch in all of our symbols. This font aggregator is nice in the sense that it collects many different glyphs from various sources. (We'll be using a lot of different symbols!)
You'll first want to install a pre-patched font.
There are multiple ways to do this.
If you prefer to use the browser, download
Droid Sans Mono Nerd Font Complete.otf from the Nerd Fonts prepatched fonts folder.
Clicking on the file from Finder after downloading it should be sufficient.
Alternatively, if you have Homebrew, you can install it from the command line.
brew tap homebrew/cask-fonts brew cask install font-droidsansmono-nerd-font
Next, you'll want to configure iTerm to use the new font.
- Go to the
Texttab in your current iTerm profile and select the option to
Use a different font for non-ASCII text.
- In the same tab, select
Droid Sans Mono Nerd Fontas the font for non-ASCII text.
The Powerline symbols included in the font might not align well.
As a remedy, iTerm has a
Use built-in Powerline glyphs option to substitute
the characters with its own built-in alternative characters.
I'd recommend checking that option.
The Text section of my iTerm settings looks like the picture below.
For ASCII text, I use
Menlo Regular (which is a native font) and use
for all font types.
Solarized on iTerm
The Solarized colors for iTerm can be found in its
Solarized Dark.itermcolors as a colorscheme for iTerm.
Colors section of your iTerm profile, use the
Solarized Dark preset.
Enable Copy/Paste in Tmux
pbpaste don't natively work in tmux.
Luckly there's a Homebrew formula to fix that.
brew install reattach-to-user-namespace
The tmux configuration will do the rest for you. Note that this only applies to machines running MacOS.
Enable Mouse Wheel Scrolling in Vim on iTerm
If using iTerm, setting
Scroll wheel sends arrow keys when in alternate screen mode. to
Yes will allow trackpad scrolling while in Vim.
The setting can be found in the advanced preferences.
Downloading Fonts for Linux
Similarly to that of MacOS, you'll need to fetch modified fonts. We'll install the same font that we use for MacOS, although setting it up is rather different.
mkdir -p ~/.local/share/fonts cd ~/.local/share/fonts # Download the Droid Sans Mono from the latest Nerd Font release. # We don't download from master due to lack of stability guarantees. curl -fLo "Droid Sans Mono Nerd Font Complete.otf" \ https://github.com/ryanoasis/nerd-fonts/raw/2.0.0/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf
After downloading the font, set it to be the font that your terminal apps uses.
Solarized on Ubuntu Terminal
To get Solarized on the Ubuntu Terminal, you will want to create a new profile. Then you will follow the instructions in gnome-terminal-colors-solarized to set the color scheme.
Start by creating a new profile on the terminal emulator.
Set that profile to be the default profile upon terminal open.
Finally clone the gnome-terminal-colors-solarized repo and follow its installation instructions.
git clone https://github.com/Anthony25/gnome-terminal-colors-solarized.git cd gnome-terminal-colors-solarized ./set_dark.sh
Other optional tools
There are a few recommended (but optional) tools you can install to improve your shell experience in general.
diff-so-fancy: Diff-so-fancy is a diffing tool that gives a nicer diff than the git default.
rg: Ripgrep is a faster alternative over
grep. It has the exact same usage as
agand is likely more preferable in all use cases.
fzf: Fzf is a general purpose fuzzy funder.
fdis a faster alternative to the
findcommand. It works very well when paired with
tree: This will display the directory structure as a tree. We use it to improve the output of
bat: An improved version of
cat. We use it for the file previews when running
ctags: Universal ctags help you jump around function definitions in a code base.
You should install all of these independently of this dotfile repo. (This also includes figuring out how to install them.) Most of these are Homebrew packages on MacOS (or a target in most Linux package managers).
Installation is as simple as downloading and running the install script. The install script will run the configuration script, which fetches oh-my-zsh and symlinks the dotfiles to your home directory.
curl https://andrew.cloud/dotfiles.sh | sh # or wget -qO- https://andrew.cloud/dotfiles.sh | sh
Alternatively, you can manually clone the repository and run the
git clone --depth=1 firstname.lastname@example.org:MrPickles/dotfiles.git ~/.dotfiles cd ~/.dotfiles ./configure.sh -t build
You will also likely need to manually change your shell to
zsh if you are
currently using a different shell.
chsh -s $(which zsh)
You can customize zsh, vim, tmux, and git for each specific machine.
Just put any additional configurations in
Sample local configs are included in this repo.
Custom git configurations can be placed in
The normal git config file is not put under version control, so it's safe to put
machine-specific tokens in it.
To clean up the dotfiles, run the configuration script with the
It will remove all symlinks, but zsh and oh-my-zsh will be untouched.
If you wish to remove those, you will have to manually delete them.
cd ~/.dotfiles ./configure.sh -t clean rm -rf ~/.oh-my-zsh # optionally remove oh-my-zsh chsh -s $(which bash) # optionally change shell back to bash