These are the command-line setup and configuration files I use for all my computers, stored on Github for easier sharing between computers and with other people.
- Inspired by dotfiles from Ryan Bates and thoughtbot.
Mostly stolenTweaked from Matt’s dotfiles.- vim, tmux and zsh setup informed heavily by Trae’s dotfiles
- Other utilities repurposed, tweaked or outright stolen from around the internet.
These dotfiles assume a Mac with the Xcode command line tools, rvm, rbenv, or asdf, and Homebrew. See Shell support for details. In addition, the highline
gem is required to run the installation script.
These dotfiles support both bash and oh my zsh.
Some features of the bashrc
may work only with bash version 4.2 and greater with bash-completion, which may not be installed by default on the Mac, depending on the version of your OS. Consider using these steps to get it:
brew install bash bash-completion
- Add
$HOMEBREW_PREFIX/bin/bash
to/etc/shells
- Change your shell to
$HOMEBREW_PREFIX/bin/bash
by runningchsh
For oh my zsh setup, do the following:
- Install oh my zsh
-
Shell configuration includes a supercharged prompt for both bash and zsh with ruby and git information, with help from the zsh-git-prompt and bash-git-prompt plugins. To tweak, change the configuration in
git-prompt-colors.sh
for bash andoh-my-zsh-custom/themes/richa.zsh-theme
for zsh. -
vi command mode is enabled by default in both bash and zsh. To switch back to the default emacs mode, remove the
set -o vi
line inbashrc
and thevi-mode
plugin fromzshrc
.
-
Vim configuration with support for selected plugins, with plugin management by vim-plug. To use:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- If desired, tweak the font and color scheme settings. The default color scheme is PaperColor. The default font is Espresso Mono, a variant of DejaVu Sans Mono.
- Start vim
- Run
PlugInstall
in command mode.
-
An
edit
shim will launchcode
(Visual Studio Code) if you are on your local Mac, and fall back tovi
if you are logged in via ssh. This shim is used as the git editor and svn editor.
An r
command serves as a shortcut for running bundle exec rake
or bundle exec rails
. It's pretty smart, so r s
will expand to bundle exec rails server
, and r db
will expand to bundle exec rake db:console
. No more fat-finger mistakes of rails
vs rake
!
-
This repo also comes with tmux configuration, for you terminal purists. To use:
brew install tmux
brew install reattach-to-user-namespace
-
Multi-monitor window management setup files are available for Hammerspoon:
- Download and install the latest release
- Tweak the configuration in
hammerspoon/init.lua
as you like
-
Install the
highline
gem:gem install highline
-
Choose a place to store the dotfiles, like
~/Library/dotfiles
.git clone git://github.com/ravasthi/dotfiles ~/Library/dotfiles cd ~/Library/dotfiles git submodule init git submodule update rake install