NeoVim with Tmux is our default development environment. This configuration is optimized for Elixir, Ruby, and JavaScript development.
The following tools are required to set up the development environment:
- 1Password - Password management tool.
- Dash - Quickly access documentation for various languages and frameworks.
- Postgres App - Easy PostgreSQL database management for macOS.
- iTerm - Enhanced terminal emulator for a better command-line experience.
Follow these steps to configure your development environment:
-
Install the tools listed in the Installations section above.
-
Clone this repository and run the setup script:
git clone https://github.com/or-equals/dotfiles.git cd dotfiles ./setup.shThe setup script will:
- Install necessary tools (e.g., NeoVim, Tmux, asdf, plugins).
- Symlink configuration files to your home directory.
- Set up the environment for development.
-
Create a localized Git configuration:
Create a file at
~/.gitconfig.localwith the following content:[github] user = YourGitHubUsername [user] email = your@email.com name = FirstName LastName
You can add additional Git configurations to this file as needed.
-
Install Vim plugins:
Open NeoVim by typing
nvimin your terminal, then run the following command to install plugins defined in.vimrc::PlugInstall -
Update remote NeoVim plugins:
Ensure all remote plugins are installed by running the following command in NeoVim:
:UpdateRemotePlugins
This configuration provides a rich set of features to enhance your development workflow. Below is a summary of the key features, with links to configuration files for more details:
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.
Rails & Ruby
ss– Runs the Rails server (bundle exec rails server).sc– Rails console (bundle exec rails console).be– Shortcut forbundle exec.fr– Shortcut forforego run.rdb– Drops, creates, migrates, and seeds the database (bin/rails db:drop db:create db:migrate && bin/rails db:seed).zdb– Same asrdbbut also runsafter_party:runif your app uses that.groutes your_route– Searches for a route by name withinrails routes | grep.twiki– Callsdb:migrate, followed bydb:migrate:redoanddb:test:preparein 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– Clearsdeps,_build,assets/node_modules, then runsmix 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– A helper that adds all changes in “intent to add” mode, does partial interactive add, and then agref(not in the snippet, but presumably a custom reference to commit or stash).glg– Graphical log (git log --graph --oneline --decorate --color --all).prunemerged– Removes branches that have been merged into your current branch.
(Additional aliases for “duet” merges and commits, if your team uses git duet, are also present.)
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 and Vim config by sourcing~/.zshrcand~/.vimrc.cat– Actually callsbat, for a colorizedcatreplacement.cd..– Same as.., moves up one directory.fd– fd installed as an alternative tofind.- The environment sets a few paths for asdf, yarn, cargo (Rust), etc.
And much more—just check out the .zshrc for details!
-
fzf.vim – Fuzzy finder integration.
:Files– Opens an fzf-based file finder.:Rg/:Rgg– Searches withripgrep, displayed in an fzf preview window.:Find– Searches for the word under cursor in the project usingripgrep.
-
vim-plug – Plugin manager. Install by running
:PlugInstallfrom within Neovim. -
tpope/vim-rails, vim-bundler, vim-rake** – Powerful Ruby & Rails enhancements.
-
vim-elixir – Elixir syntax & indentation.
-
slim-template/vim-slim – Syntax highlight for Slim templates.
-
maxbrunsfeld/vim-yankstack – Keeps a stack of past yanks, so you can cycle them.
- Use
⌥+P(option+P) orshift+option+Pto cycle.
- Use
-
Tagbar – Provides an outline view of source code.
- Press
<End>to toggle the tagbar.
- Press
-
rainbow_csv – Nice CSV highlighting.
-
vim-rubocop – RuboCop integration for Ruby code.
-
Leader key is mapped to Space in many places.
-
<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.vimrcon the fly (:so ~/.vimrc). -
gev– Edits the.vimrcin 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 (likeCorD). -
FZF:
<leader>p–:Files(fuzzy file search).RG something– search entire project for "something."
-
Pressing
CRin 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).
- 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.
- Up Arrow – Temporarily zoom a pane (
- Window management:
<prefix> + |– Split window vertically.<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.
- asdf is installed and configured for multiple languages (Elixir, Erlang, Flutter, Node.js, Python, Ruby, Rust, Postgres).
- starship prompt is enabled in
.zshrc, giving a minimal, fast, configurable prompt. brew bundleinsetup.shautomatically installs all the formulae from theBrewfile.nvimis the main editor;vimandviare aliased tonvim.- Ripgrep (
rg) is used by default for searching within projects; integrated into Vim withfzf. - Bat (
bat) is used for colorfulcatreplacements. - Zsh Syntax Highlighting, Zsh Autosuggestions are both loaded for a more user-friendly shell.
-
Install Vim Plugins:
- Launch
nvim, run:PlugInstallto install all the plugins from.vimrc.
- Launch
-
setup.shdoes 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.
-
Local Overrides:
- If you have local changes or environment-specific settings, place them in
~/.zshrc.local(loaded at the bottom of.zshrc).
- If you have local changes or environment-specific settings, place them in
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.