This repository contains my opinionated collection of dotfiles. It mainly consists of zsh and Vim configuration. Feel free to use it or take any ideas from it.
Disclaimer: My main work environment is Mac OS X. I use iTerm2 as terminal with 256 colors. Generally I work with a very small font. I use these dotfile on Ubuntu servers too, but not on a daily basis. I will not gurantee that it will work on other environments and not even on this all the time ;-) Be sure to check any changes before just getting the latest version.
As already mentioned my shell is zsh. Be sure to change yours before using my config. If you don't like zsh you could just use the Vim stuff. Changing the shell on OS X can be done via the Account Preference Pane. Alternatively you can switch it via this command:
chsh -s /bin/zsh
To make Vim work as expected you need Vim compiled with Ruby support and
the --with-features=HUGE
flag. After that, clone the repository and
run the included install script:
git clone git://github.com/railsbros-dirk/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install
After that everything should be setup correctly and you can start to use zsh and Vim.
If you just want to install the Vim setup or Zsh configs you can run the install script with a additional parameter. For instance the following will only install the Vim configuration.
./install vim
For a complete list of available options run:
./install help
NOTE: The script will not overwrite existing configuration. If you want to use the script move your "old" files out of the way first ;-)
I understand that some information is not very well stored in the repository and should be configurable on each machine. Due to this you have some points where you can provide your own config:
~/.vimrc.local
-> Provide custom Vim configuration. Will be loaded after~/.vimrc
.zsh_config_for_USERNAME
-> Provide custom zsh configuration.gitconfig
-> The install script will just generate it. You have/can provide additional information any time.
Pointing the variable projects_dir
to something useful for you will
enable you to use the shortcut p PROJECT_NAME
. This will bring you
directly to the given directory under the configured projects_dir
path:
projects_dir="$HOME/Documents/projects"
$ p my_project
This will change into the directory $HOME/Documents/projects/my_project
.
I used to manage my Vim plugins with Tim Popes great pathogen plugin. Recently I discovered Vundle by gmarik and it is just awesome. You only have to manage the vundle via git submodule by yourself and all other plugins are managed by Vundle.
My color scheme for Vim is a slightly modified version of Chris Kempsons Tomorrow Night Bright. I suggest to use the same for your terminal to get the best color experience in Vim and zsh.
Currently the fuzzy finder plugin of choice is ctrlp. You can fire
it up by hitting Ctrl-p
(what a suprise). Take a look in the docs to
find out more about it.
There is a bunch of other stuff I use. Describing it all would take too much time. Just look through the single config files to get an idea what is possible. I don't use something like oh-my-zsh or Janus to keep it more obvious what is going on.
Feel free to use whatever you want for your own dotfiles. If you use mine I hope they taking you somewhere.
For my keyboard configuration I use KeyRemap4MacBook and PCKeyboardHack. Both
tools are really great and help me to make some fancy stuff like using the
Caps-Lock key as both Control AND Escape 😜 Besides
that I use it to emulate some missing keys on my mini keyboard which misses the
F-layer. If you want to use the KeyRemap4MacBook config make sure to add the
following to the private.xml
:
<?xml version="1.0"?>
<root>
<include path="{{ ENV_HOME }}/.dotfiles/key_remap_config.xml" />
</root>
I didn't came up will all that configuration by myself. Here is a list of people I took inspiration from or just copied some code ;-)
- Todd Werth - My dotfiles were originally a fork of his
- Gary Bernhardt - Inspired by both the Peepcode Play by Play episode and his own screencasts 'Destroy all Software'
- Both Vim screencasts by Peepcode
- tisba, Marc Kalmes and Michael Contento