These are config files to set up a system the way I like it. I stole^H^H^H^H^H forked these settings from Ryan Bates. Please do check out his amazing railscasts series at http://railscasts.com
Before installation, please review the sources and make sure you understand what these dotfiles are doing. Better yet, you should probably cherry-pick the parts that you find useful.
But in case you decide to install wholesale (which is how I started)
git clone git://github.com/zaki/dotfiles ~/.dotfiles
cd ~/.dotfiles
git submodule init
git submodule update
rake install
Submodules are only used for vim configuration (pathogen).
I am running on Mac OS X, but it will likely work on Linux as well with minor fiddling. I primarily use zsh, but this includes some older bash files as well. If you would like to switch to zsh, you can do so with the following command.
chsh -s /bin/zsh
Most aliases I use are for git or rails.
- g # git
- gb # git branch -a
- gru # git remote update
- gp # git pull
- gpr # git pull --rebase
- gk # gitk, or gitx on OSX
- gg # git gui, or gitx on OSX
- b # bundle
- r # rails
- rg # rails generate
- rs # rails server
- rc # rails console
- rk # rake
- s # rake spec
- .. # cd ..
- c # clear
- lg # less +G
Tab completion for zsh is used through Oh-My-Zsh. For bash, completion for git, rake and capistrano are set up. Rake and git completion also work with the aliased versions (rk and g).
To speed things up, the results are cached in local .rake_tasks~ and .cap_tasks~. It is smart enough to expire the cache automatically in most cases, but you can simply remove the files to flush the cache.
The checked out git branch name and git status indicators are added to both bash and zsh prompts. Status indicators are like below:
- Nothing : pristine
- White : untracked files found
- Red : unstaged changes to tracked files
- Green : staged, but uncommitted changes
- Red Arrow : local - unpushed - commits
The time is also displayed in both bash and zsh prompts.
If there are some shell configuration settings which you want secure or specific to one system, place it into a ~/.localrc file. This will be loaded automatically if it exists.
You can specify a list of project aliases that you want to be able to access in ~/.projectrc - this is different from .localrc in that it is encouraged that you share .projectrc between computers, while keeping per-machine settings in .localrc
Your gitconfig will be set up automatically on install, asking for your name, email and github credentials. Beyond that a common gitignore file will be set up for you at ~/.gitignore
- a number of plugins by tpope (fugitive, repeat, surround, dispatch, etc)
- ack (you can install the ack binary using brew install ack on OSX)
- NERDTree
- syntastic
- ctrl-p
- powerline
- git-gutter
- rails-vim
- scratch
- tabular
- OmniSharp
By default my own colorscheme (zazen) is used.
Some mappings include
- ii : mapped to escape in insert mode
- 0 and 00 : are mapped to ^ and 0 respectively
- C-j,k,h,l : mapped to move 5 times faster than jkhl
- ,n : Toggle NERDTree
- ,f : search with ack
- Space : mapped to C-f
- :W and :Q : are mapped to :w and :q
The statusline includes the git branch, the file type and encoding and possible formatting warnings (mixed tabs and spaces, full-width spaces)