Skip to content

Instantly share code, notes, and snippets.

@giljr
Created October 31, 2025 12:44
Show Gist options
  • Save giljr/d25341dbe464292d553416424a853c4d to your computer and use it in GitHub Desktop.
Save giljr/d25341dbe464292d553416424a853c4d to your computer and use it in GitHub Desktop.

Rails + Tmux + Vim Quick Commands

Sym Command Description
🆕 tmux new -t rails Create and attach a new tmux session named rails
⬆️ vim Gemfile Open the Gemfile using Vim
⬇️ :tabe spec/rails_helper.rb Open Rails configuration file in a new Vim tab
⬇️ :tabe spec/rspec_helper.rb Open RSpec configuration file in a new Vim tab
⌨️ gt Switch between open Vim tabs
⌨️ Ctrl + b, then Ctrl + Shift + % Split tmux window into right panel (side-by-side)
⌨️ Ctrl + b Move focus to the right panel
⬆️ bin/rspec Run all tests
⬆️ bin/rspec spec spec/test_spec.rb -fd Run tests from a specific directory with formatted output
Instructions Symbols: 

⬆️ up → means commands you’ll type in the upper (main) tmux pane — typically for running or editing code.

⬇️ down → means commands you’ll type in the lower (or right) pane — usually for tests or configuration files.

⌨️ key press → indicates keyboard shortcuts for navigation or window management inside Vim or tmux.

🆕 init → means starting or initializing a new session or workspace.

use :tabc to close tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment