$ show thoughtbot/dotfiles
The thoughtbot dotfiles repository provides a comprehensive set of configuration files and scripts to set up a developer's environment, primarily targeting Zsh, Vim, Tmux, and Git. It uses the rcm tool to manage symlinking of dotfiles into the user's home directory, allowing for easy updates and local overrides. The repository includes shell aliases, functions, and key bindings for Zsh; Vim configuration with plugins for enhanced functionality (including fzf, vim-rails, and ALE linting); Tmux configuration for improved status bar and navigation; and Git configuration with useful aliases and hooks. Additionally, it provides a collection of helper scripts in the `bin/` directory for common tasks such as branch management, port clearing, and file replacement. The architecture is modular, with separate directories for Zsh, Vim, Git templates, and bin scripts. The Zsh configuration is split into configs, functions, and completions, which are loaded in a specific order. The Vim configuration uses vim-plug for plugin management and includes settings for syntax highlighting, linting, and navigation. The Tmux configuration improves color resolution, removes administrative debris from the status bar, sets the prefix to Ctrl+s, and softens the status bar color. The Git configuration adds aliases for creating, deleting, merging, and renaming branches, fetching and rebasing onto the default branch, and trusting project bin directories. It also includes hooks to regenerate ctags after certain Git operations. Key reusable components include the `git-up` script for rebasing onto the default branch and the `tat` script for tmux session management. These scripts are isolated, self-contained, and demonstrate practical solutions to common developer workflows. The configuration adapts to available tools (e.g., using ripgrep if present, falling back to the Silver Searcher) and incorporates modern practices such as using asdf for version management and setting up a safe bin path for trusted repositories.
The LLM identified 2 files worth highlighting for reuse:
A shell script that updates the current branch by rebasing it onto the default branch of the origin remote. It checks for the primary branch reference using git symbolic-ref and provides a helpful error message if it's missing, guiding the user to set it. This encapsulates a common git workflow in a reusable, isolated script.
A shell script that attaches to a tmux session named after the current directory or creates a new one if it doesn't exist. It checks if the user is already in tmux and handles the session creation and attachment appropriately. This simplifies tmux session management and is isolated to only depend on tmux and shell.