Based on thoughtbot dotfiles with personal customizations.
For a new Mac:
git clone https://github.com/TonyCTHsu/dotfiles ~/dotfiles && ~/dotfiles/install.shThe install script will:
- Install Homebrew (if needed)
- Install all dependencies from Brewfile
- Set up dotfiles with rcm
- Configure zsh as default shell
If you prefer manual control, see SETUP.md for detailed instructions.
- macOS
- Git (automatically prompts to install Command Line Tools if needed)
After making changes to your dotfiles:
# Re-apply dotfiles
rcup
# Install new packages (if Brewfile changed)
brew bundle
# Update vim plugins (if needed)
vim -u ~/.vimrc.bundles +PlugUpdate +PlugClean! +qaFor machine-specific settings, you can create local override files that won't be committed:
~/.gitconfig.local- Git settings specific to this machine~/.zshrc.local- Shell customizations for this machine~/.aliases.local- Machine-specific aliases~/.vimrc.local- Vim settings for this machine
vim configuration:
- fzf for fuzzy file/buffer/tag finding.
- Rails.vim for enhanced navigation of
Rails file structure via
gfand:A(alternate),:Rextractpartials,:Rinvertmigrations, etc. - Run many kinds of tests from vim
- Set
<leader>to a single space. - Switch between the last two files with space-space.
- Syntax highlighting for Markdown, HTML, JavaScript, Ruby, Go, Elixir, more.
- Use Ag instead of Grep when available.
- Map
<leader>ctto re-index ctags. - Use vim-mkdir for automatically creating non-existing directories before writing the buffer.
- Use vim-plug to manage plugins.
tmux configuration:
- Improve color resolution.
- Remove administrative debris (session name, hostname, time) in status bar.
- Set prefix to
Ctrl+s - Soften status bar color from harsh green to light gray.
git configuration:
- Adds a
co-upstream-pr $PR_NUMBER $LOCAL_BRANCH_NAMEsubcommand to checkout remote upstream branch into a local branch. - Adds a
create-branchalias to create feature branches. - Adds a
delete-branchalias to delete feature branches. - Adds a
merge-branchalias to merge feature branches into master. - Adds an
upalias to fetch and rebaseorigin/masterinto the feature branch. Usegit up -ifor interactive rebases. - Adds
post-{checkout,commit,merge}hooks to re-index your ctags. - Adds
pre-commitandprepare-commit-msgstubs that delegate to your local config. - Adds
trust-binalias to append a project'sbin/directory to$PATH.
Ruby configuration:
- Add trusted binstubs to the
PATH. - Load the ASDF version manager.
- Adds railsrc with the following options to integrate with Suspenders.
--database=postgresql
--skip-test
-m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
If you want to skip this file altogether, run rails new my_app --no_rc.
Shell aliases and scripts:
...for quicker navigation to the parent's parent directory.bforbundle.gwith no arguments isgit statusand with arguments acts likegit.migrateforbin/rails db:migrate db:rollback && bin/rails db:migrate db:test:prepare.mcdto make a directory and change into it.replace foo bar **/*.rbto find and replace within a given list of files.tatto attach to tmux session named the same as the current directory.vfor$VISUAL.
Originally based on thoughtbot dotfiles with personal customizations and automation added.