This project uses Dotbot to manage dotfiles. This repo is configured for my personal preferences, but also serves as a starting point for others.
After cloning locally, edit files as desired and then run
$ ./install
This will set up symlinks for the dotfiles configured by this project. Those currently include:
.vimrc
.vim/bundle
.tmux.conf
.gitignore_global
The main thing these dotfiles do is configure vim and tmux to use very similar movement keys. The core of this scheme is based on the following configuration:
- Map tmux prefix key to
ctrl-a
- Map vim command key to
ctrl-w
- Remap ctrl key on your keyboard to the caps lock key
This puts the tmux prefix and vim command keys right next to each other. Mapping the ctrl key to caps lock makes hitting those keys a bit easier on the hands.
With these basic settings, the rest of the dot files configure tmux to behave a bit like vim when it comes to moving and splitting panes.
For example, after starting tmux, with these dot files in place, to create a
vertical split, from the shell, use ctrl-a v
. Note that is similar to the vim
keybinding to create a vertical split within vim, which is ctrl-w v
.
Same with movement keys. To move around tmux panes within a window, use the
vim movement keys but with the ctrl-a
prefix.
Directories within the vim/bundle
directory are subtrees.
Each subtree's repo is added as a remote with the same name as the repo. For example:
git remote add -f vim-colors-solarized https://github.com/altercation/vim-colors-solarized.git
The command to update the subtree is:
git subtree pull --prefix vim/bundle/vim-colors-solarized vim-colors-solarized master --squash
It's important that when merging branches, don't squash the commits specific to adding the subtree. The subtree code uses those commits in the log to find out what subtree commit is in the project.
The following notes are how I set up a new Mac. These instructions also work to set up a new linux home dir with just a few tweaks.
Install iterm2
Download Solarized
I organize code I download using the following organization schemes. For third party code that I download, like solarized above, it would be cloned from the following location:
~/src/third-party/altercation.github.com
For code that I've authored or related to teams I collaborate with, I use the following scheme to organize projects:
~/src/neilsone.github.com
~/src/yo-yodyne.gitlab.com
Add the iterm color profile from the Solarized project and set iterm to use it. This is important when it comes to getting vim to look good.
I like the Mono font from Jet Brains
Install homebrew
This may include downloading some xcode command line tools.
Use Homebrew to install the following utilities:
brew install zsh
brew install gnupg
brew install tmux
Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Edit the ~/.zshrc
file to set the oh-my-zsh theme to ZSH_THEME="eastwood",
or whatever your preferred theme is.
Generate gpg key and install into github.com
You might need to comment out no-tty
in ~/.gnupg/gpg.conf
to get gpg to
work with these instructions.
Generate ssh key and install into sshagent, and then add this to your github.com account.