Skip to content

peterbraden/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

My personal config files and shell scripts for a development machine.

I live in a terminal (usually iTerm on a mac), so my full development experience is defined in these files.

My philosophy is that it's far better to invest in open source tools that have survived a while because the Lindy effect means that they are likely to continue to exist for a long time. This has served me well - some of these configs are almost two decades old, and the muscle memories I developed when learning them as a junior developer are now so ingrained that my conscious brain has forgotten a lot of the shortcuts.

It also means I'm more likely to use old, stolid, vintage software where possible, even if there are some warts. Makefiles, sed, and bash scripts are more than capable of getting most of the places we need to go.

Vim

I use vim with a fair amount of plugins and customizations.

The most important are ,ee to fuzzy open a file. ,et and ,ev to open files in tabs and vertical splits respectively.

tmux

tmux is a critical part of my workflow - I use a session per project, so I can switch between projects and have everything setup how I left it.

C-a s Switches projects.

I combine it with a variety of shell scripts to keep everything setup comfortably.

tmo PROJECT_NAME # Opens the 'current' session for a project, or creates one
                 # with the windows setup how I like. It even attempts to clone
                 # the project from github if it can't find it.

tml # Lists currently open sessions.

For many years, I managed my dotfiles by manually curl or git cloneing them onto a new machine, and moving them into place with a hand written makefile. This worked fine, but Tom, who created chezmoi, would hassle me at the pub about my suboptimal approach, until eventually I caved and tried it. He was right - using a tool for this makes everything a lot simpler.

One line machine setups are pretty nice.


Playbooks

Setup a vanilla machine.

Setup a new desktop machine (dedicated SSH key)
1. Setup new SSH key and use for github:
ssh-keygen -t rsa -C "[email protected]"
cat ~/.ssh/id_rsa.pub | pbcopy

Paste into: https://github.com/settings/ssh

2. Setup
chezmoi init peterbraden --apply

Or without chezmoi previously installed:

sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply peterbraden

Setup OSX

Install apps from Safari

Install apps from App Store

Install Apps from Firefox

Setup a new ephemeral dev machine in the cloud (SSH agent forwarded)
# Setup / Ubuntu / from scratch
# - Requires github authed ssh key
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply peterbraden

Development in this module

Dependencies

I use git submodules because it means I have all tools vendored on each machine, which means I am unlikely to have a rug pulled. Dependabot should keep them all up to date.

Add vim plugin as submodule for pathogen
git submodule add https://github.com/pathto/repo.git home/dot_vim/external_bundle/repo.vim

Credit

The config and tools in this repository represent a patchwork of learnings that have been borrowed or stolen over a long career. While I don't think that things like this can or should be licensed, (although I may have included whole tools or repositories, which obviously retain their licenses) I nonetheless want to credit some of the progenitors of this information. Sadly most of this has been lost to the sands of time, but in an effort to improve going forward, here is a list of credits: