/dotfiles-old

A collection of configuration files and scripts for vim, bash, and zsh.

Primary LanguageVim Script

jclem/dotfiles

A collection of my dotfiles, including configuration for bash, zsh (via oh-my-zsh), and vim.


Features

Useful aliases

  • Directory traversal: .. = cd .. and ... = cd ../..
  • show/hide hidden Finder files with show and hide
  • git aliased to hub
  • git aliases: gi = git init
  • Rails aliases: rs = rails server
  • Rake aliases: rdbm = rake db:migrate
  • Quick python server: serve = python -m SimpleHTTPServer

Directory completion

  • c do<tab> = cd ~/code/dotfiles
  • h Doc<tab> = cd ~/Documents
  • c = cd ~/code
  • h = cd ~/

Functions

  • gac <commit-message>: Combines git add -A and git commit -m
  • gacp <commit-message>: Combines gac and git push <remote:origin> <remote-branch:master>
  • bak <file>: Copy file to file.bak
  • pview <file> <lexer>: Uses pygmentize and bcat to open syntax-highlighted file in web browser.

Vim Configuration

Vim bundles


Requirements

* Optional. Remove alias git=hub from bash/aliases and zsh-custom/aliases.zsh if you don't want to use it.


Installation

jclem/dotfiles assumes that it will be kept in the ~/code/dotfiles directory. This location is important, as it symlinks configuration files in the home directory to files in this location.

  1. Back up your own dotfiles, if needed.*
  2. git clone git@github.com:jclem/dotfiles.git ~/code/dotfiles
  3. $ cd ~/code/dotfiles
  4. git submodule update --init
  5. $ rake install

Any files that the installer overwrites will be moved to ~/jclem_dotfiles_backup where they can easily be recovered.

* jclem/dotfiles creates its own backup, but more than one use of rake install overwrites the original backup.


Customization

Bash

Most configuration is modularized. bashrc just sources files in the bash/ directory, including bash/aliases, bash/completions, bash/config, and bash/functions. Edit these files to customize.

Zsh

Zsh configuration is a little tricky, as I'm using oh-my-zsh, which is included as a git submodule. oh-my-zsh's custom directory is mostly ignored by git, so jclem/dotfiles keeps custom zsh files in its own zsh-custom directory.

Whenever rake install is run, the contents of this directory are copied to oh-my-zsh's custom directory. If you would like the bash and zsh configuration files to be the same, there is a rake task called copy_bash_to_zsh which copies bash/aliases and bash/functions to zsh-custom/aliases.zsh and zsh-custom/functions.zsh, respectively. Note that after doing this, one must again run rake install.