Skip to content
or-equalsPublic

About

Or Equals programming configuration

Resources

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

Or Equals Development Environment

NeoVim with Tmux is our default development environment. This configuration is optimized for Elixir, Ruby, and JavaScript development.


Installations

setup.sh installs everything in the Brewfile, including these apps: 1Password, Android Studio, Docker Desktop, Google Chrome, iTerm, Postgres.app, and Slack.

Install these yourself:

  • Xcode from the App Store, for iOS builds.
  • Dash (optional), for quick access to documentation.

Setup

Follow these steps to configure your development environment:

  1. Install Xcode from the App Store (see Installations above).

  2. Clone this repository and run the setup script:

    git clone https://github.com/or-equals/dotfiles.git
    cd dotfiles
    ./setup.sh

    On a brand-new Mac, git clone first asks to install Apple's Command Line Tools. Accept, wait for it to finish, then run the clone again.

    The setup script will:

    • Install necessary tools (e.g., NeoVim, Tmux, asdf, plugins).
    • Symlink configuration files to your home directory.
    • Install Claude Code and grok, and clone the factory plugin into ~/projects/factory.
    • Keep going if a step fails, then list every failed step at the end.

    It's safe to re-run: steps that are already done are skipped. Apps you installed yourself before running it are left alone, since macOS won't let Homebrew take them over without extra permission.

  3. Create a localized Git configuration:

    Create a file at ~/.gitconfig.local with the following content:

    [github]
      user = YourGitHubUsername
    [user]
      email = your@email.com
      name = FirstName LastName

    This step is required: the shared .gitconfig has no name or email, so git won't commit until this file exists. Setup reminds you if it's missing. You can add other Git settings here too.

  4. Follow the list at the end of setup.

    Setup installs your Vim plugins itself, then lists only what's left for you: creating ~/.gitconfig.local if git doesn't know who you are yet, copying your SSH keys, and signing in to GitHub, Heroku, Claude Code, and grok.


Features

Below is an overview of many of the aliases, custom functions, and helpful features that come from these dotfiles. Think of this as a quick reference for the “goodies” provided, grouped by context.


Shell & Zsh

Aliases

Rails & Ruby
  • ss – Runs the Rails server (bundle exec rails server).
  • sc – Rails console (bundle exec rails console).
  • be – Shortcut for bundle exec.
  • rdb – Drops, creates, migrates, and seeds the database (bin/rails db:drop db:create db:migrate && bin/rails db:seed).
  • zdb – Same as rdb but also runs after_party:run if your app uses that.
  • groutes your_route – Searches for a route by name within rails routes | grep.
  • twiki – Calls db:migrate, followed by db:migrate:redo and db:test:prepare in Rails (handy for quick DB resets).
Phoenix & Elixir
  • im – Starts an IEx session with mix (iex -S mix).
  • pss – Starts the Phoenix server (mix phx.server).
  • ho – Lists outdated dependencies for your Elixir project (mix hex.outdated).
  • proutes your_route – Searches for a route by name (mix phx.routes | grep).
Filesystem / Navigation
  • .. / cd.. – Go up a directory.
  • l – ls -F -G -lah (detailed list with colors).
  • la – ls -a (show hidden files).
  • ll – ls -l (long list).
  • md – mkdir -p (create intermediate directories automatically).
  • cdep – Remove Elixir + Node build artifacts (rm -rf deps _build assets/node_modules).
  • rdep – Clears deps, _build, assets/node_modules, then runs mix deps.get, and re-installs Node dependencies.
Git
  • gap – git add -p (interactive add).
  • gb – git branch.
  • gc – git commit -v.
  • gco – git checkout.
  • gd – git diff.
  • gdc – git diff --cached.
  • gdh – git diff HEAD.
  • gl – git pull.
  • gp – git push.
  • gpr – git pull --rebase.
  • gr – git rebase.
  • gra – git rebase --abort.
  • grc – git rebase --continue.
  • gst – git status.
  • gnap – Marks new files as “intent to add”, then runs git add -p, so you can stage new files hunk by hunk too.
  • glg – Graphical log (git log --graph --oneline --decorate --color --all).
  • prunemerged – Deletes local branches already merged into your current branch (keeps master and dev).
Docker
  • dcu – docker compose up.
  • dcud – docker compose up -d (detached).
  • dcd – docker compose down.
  • dcs – docker compose stop.
  • dcp – docker compose ps.
  • dcl – docker compose logs -f.
  • dcr – docker compose run.
  • dce – docker compose exec.
Zsh Other Goodies
  • rl – Reloads Zsh config by sourcing ~/.zshrc.
  • cat – Actually calls bat, for a colorized cat replacement.
  • fd – fd installed as an alternative to find.
  • cf – Starts Claude Code with the factory plugin from ~/projects/factory.
  • The environment sets a few paths for asdf, cargo (Rust), etc.

And much more—just check out the .zshrc for details!


Vim/Neovim

Key Plugin Highlights

  • fzf.vim – Fuzzy finder integration.

    • :Files – Opens an fzf-based file finder.
    • :Rg – Searches with ripgrep, displayed in an fzf preview window.
    • :Find – Searches for the word under cursor in the project using ripgrep.
  • vim-plug – Plugin manager. setup.sh installs plugins; run :PlugInstall after adding new ones.

  • vim-rails, vim-bundler, vim-rake – Powerful Ruby & Rails enhancements.

  • vim-elixir – Elixir syntax & indentation.

  • maxbrunsfeld/vim-yankstack – Keeps a stack of past yanks, so you can cycle them.

    • Use ⌥+P (option+P) or shift+option+P to cycle.
  • rainbow_csv – Nice CSV highlighting.

  • vim-rubocop – RuboCop integration for Ruby code.

Key Mappings / Features

  • Leader key is the default \ (backslash). Space is disabled in normal and visual mode.

  • <leader>t= – Align on =.

  • <leader>w – Writes the file (:w).

  • <leader>q – Quits and closes everything (:wqa).

  • <leader>u – Toggles Gundo (undo tree visual).

  • // – Clears search highlights.

  • gsv – Reloads .vimrc on the fly (:so ~/.vimrc).

  • gev – Edits the .vimrc in a new buffer (:e ~/.vimrc).

  • <Tab> / <S-Tab> – Indentation-based shifts in normal/visual modes.

  • Y – Now copies from cursor to the end of line (like C or D).

  • FZF:

    • <leader>p – :Files (fuzzy file search).
    • RG something – search entire project for "something."
  • Pressing CR in normal mode – Toggles highlight search off (:noh).

  • Auto-close pairs for do/end vs. curly braces, etc. (via vim-endwise).

And many more convenience or alignment commands (see .vimrc comments for specific details).


Tmux

  • Prefix Key – Changed to Ctrl+z (instead of the default Ctrl+b).
  • Copy/Paste – Integrates with macOS clipboard.
    • <prefix> + C-c – Copies tmux selection to macOS clipboard.
    • <prefix> + C-v – Pastes from macOS clipboard into tmux.
  • Resize / Zoom:
    • Up Arrow – Temporarily zoom a pane (resize-pane -Z).
    • Down Arrow – Same as above.
  • Window management:
    • <prefix> + | – Split window side by side.
    • <prefix> + h/j/k/l – Move around panes.
  • Scrolling
    • Mouse mode is on. Scroll with mouse wheel to go into copy-mode automatically.
  • History – The scrollback buffer is extended to 100000 lines.

Other Tools & Extras

  • asdf is installed and configured for multiple languages (Elixir, Erlang, Flutter, Node.js, Python, Ruby, Rust, Postgres).
  • Postgres.app is installed from the Brewfile and runs the local database server; its psql, pg_dump, and friends are on your PATH.
  • starship prompt is enabled in .zshrc, giving a minimal, fast, configurable prompt.
  • brew bundle in setup.sh automatically installs all the formulae from the Brewfile.
  • nvim is the main editor; vim and vi are aliased to nvim.
  • Ripgrep (rg) is used by default for searching within projects; integrated into Vim with fzf.
  • Bat (bat) is used for colorful cat replacements.
  • Zsh Syntax Highlighting, Zsh Autosuggestions are both loaded for a more user-friendly shell.

Scripts in bin/

Setup links these into ~/bin, which is on your PATH.

  • mux [project] – Creates or reattaches to a tmux session named after the project, with code, server, and agent windows. With no argument it uses the current directory; with a name it uses ~/projects/<name>.
  • restore-db-backup [backup_id | file.dump] – Restores a Postgres dump into the current Rails project's database, reading connection details from config/database.yml.
  • qunit-test-hash – Prints the QUnit test ID hash for a module and test name, for running a single Ember test.

Final Tips

  1. Install Vim Plugins:

    • setup.sh installs all the plugins from .vimrc. Run :PlugInstall in nvim after adding new ones.
  2. setup.sh does a lot:

    • Installs Homebrew (if not installed).
    • Installs all brew formulae & casks from the Brewfile.
    • Symlinks these dotfiles into ~/. and ensures asdf is installed and updated.
    • Installs Claude Code, grok, and the factory plugin.
  3. Local Overrides:

    • If you have local changes or environment-specific settings, place them in ~/.zshrc.local (loaded at the bottom of .zshrc).

That’s it! Enjoy your streamlined environment for Ruby, Elixir, JavaScript, and more. If you get stuck, comb through .zshrc or .vimrc to see additional details and function definitions.

About

Or Equals programming configuration

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages