Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
config files for zsh, bash, completions, gem, git, irb, rails
VimL Shell Ruby
branch: master

This branch is 187 commits ahead, 28 commits behind ryanb:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bash
bin
config/powerline
vim
zsh
.gitignore
.gitmodules
Brewfile
LICENSE
README.md
Rakefile
bash_profile
bashrc
ctags
gemrc
gitconfig.erb
gitignore
gvimrc
irbrc
rspec
tmux.conf
vimrc
zlogin
zshrc

README.md

Zaki's dotfiles

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

Installation

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).

Environment

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

Features

Aliases

Most aliases I use are for git or rails.

Git

  • 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

Rails

  • b # bundle
  • r # rails
  • rg # rails generate
  • rs # rails server
  • rc # rails console
  • rk # rake
  • s # rake spec

Other

  • .. # cd ..
  • c # clear
  • lg # less +G

Tab Completion

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.

Prompt

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.

Localrc

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.

Projectrc

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

Git configuration

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

Vim configuration

Plugins

  • 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

Settings

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)

Something went wrong with that request. Please try again.