DevTools Cheat Sheet

Terminal-centric development environment — Zsh + Tmux + Neovim
by John Molina

No matching commands found.

Shell & Navigation (Zsh)

Prompt: Starship shows user@host, shortened path, active .venv, direnv state, git branch/status, failed exit status, background jobs, and command duration for commands slower than 50ms.

Python/Django Projects: direnv does not activate a virtualenv just because a .venv folder exists. Add an .envrc in the project root, then approve it once with direnv allow.

printf '%s\n' 'source .venv/bin/activate' > .envrc
direnv allow

If the project also needs Django-specific environment variables, extend .envrc with exports such as DJANGO_SETTINGS_MODULE.

Command Description
z <dir> Smart Jump: Uses zoxide to jump to your most frequent/recent directories using partial names.
ls / ll Enhanced Listing: Uses eza to list files with color-coding, icons, and Git integration.
la List All: Show all files, including hidden dotfiles, in a detailed grid format.
tree Visual Hierarchy: Display a recursive directory tree (defaulting to 2 levels deep).
cat <file> Smart View: Uses bat to display file contents with syntax highlighting and line numbers.
cls Clear Screen: Quickly wipe the current terminal display (alias for clear).
Ctrl + r Fuzzy History: Interactively search through your entire command history using fzf.
Ctrl + t Fuzzy File: Find a file anywhere in the current project and paste its path into the command line.
Alt + c Fuzzy CD: Find a subdirectory and immediately change into it using a fuzzy interface.
→ Auto-Complete: Accept the gray suggestion from zsh-autosuggestions.
Tab Interactive Complete: Open fzf-tab for fuzzy-searchable tab completion of commands, paths, and arguments.
Shift + Tab Reverse Complete: Cycle backwards through the completion menu options.
rm / cp / mv Safe Mode: Aliased to always prompt for confirmation (-i) before destructive operations.
venv <name> Python Setup: Quickly initialize a new Python virtual environment in the current folder.
venvact Python Activate: Find and activate the .venv or venv folder in your current directory.
direnv allow Project Env: Approve the current project's .envrc so entering the directory auto-loads its environment.
direnv status Env Debug: Inspect whether direnv has loaded the current project's .envrc.
explain <question> AI Assistant: Send a natural language query directly to the Gemini API for terminal help.

Tmux (Multiplexer)

Prefix: Ctrl + a (Replaces standard Ctrl + b)
Key Action
ta Smart Alias: Attaches to the last session or creates a new one.
tls List Sessions: Show all active Tmux sessions and their number of windows.
tk <name> Kill Session: Terminate a specific Tmux session by its name.
tka Kill All: Wipe out all running Tmux sessions and processes.
Ctrl + h/j/k/l Seamless Navigation: Move focus between Tmux panes and Neovim splits without extra prefixes.
Prefix + | Vertical Split: Divide the current pane into two side-by-side.
Prefix + - Horizontal Split: Divide the current pane into two stacked on top of each other.
Prefix + H/J/K/L Resize Pane: Use arrow-style keys to expand or shrink the focused pane.
Prefix + c New Window: Create a completely new window within the current session.
Prefix + n Next Window: Cycle to the next window in the sequence.
Prefix + p Previous Window: Cycle to the previous window in the sequence.
Prefix + , Rename Window: Open a prompt to change the name of the active window.
Prefix + & Kill Window: Close the current window and all its contained panes.
Prefix + z / m Toggle Zoom: Expand the current pane to fill the entire window (and back).
Prefix + b Break Pane: Move the current pane out into its own dedicated window.
Prefix + x Kill Pane: Prompt to terminate the currently focused pane.
Prefix + Space Last Window: Instantly jump back to the most recently active window.
Prefix + $ Rename Session: Assign a new name to the current Tmux session.
Prefix + s Choose Session: Open an interactive list to switch between sessions.
Ctrl + j Fuzzy Switcher: Quickly jump between sessions using a fuzzy search menu.
Prefix + I Install Plugins: Download and initialize new plugins via TPM.
Prefix + U Update Plugins: Check for and install updates for all Tmux plugins.
Prefix + Ctrl + s Save Session: Manually save the current Tmux layout and history.
Prefix + Ctrl + r Restore Session: Recover the last saved Tmux environment.
Prefix + r Reload Config: Instantly apply changes made to .tmux.conf.
Prefix + [ Copy Mode: Enter scrollback buffer (v: select, y: copy).
Prefix + d Detach: Exit the session while keeping it running in the background.
Prefix + : Command Mode: Open the Tmux command prompt for direct commands.
Prefix + ? List Keybinds: Show all current Tmux key bindings.
Prefix + ] Paste: Paste text from the Tmux copy buffer.

Neovim (Editor)

Leader Key: Space

General & Files

Key Action
Space w Save: Persist the current buffer to disk.
Space q Close: Close the focused window (split).
Space Q Exit: Force-close all windows and quit Neovim.
Space R Restart: Restart Neovim and restore the current session.
Space Space Clear: Wipe the current search highlight.
Space uw Toggle Wrap: Toggle line wrapping in the current buffer.
Space e Explore: Toggle the sidebar file tree (NvimTree).
Space ff File Search: Interactively search for files by name using fff.nvim.
Space fg Project Search: Live-grep through all files in the current workspace with fff.nvim.
Space fo Recent: Quickly reopen recently accessed files.
Space fb Buffers: List and switch between currently open buffers.
Space fh Help: Search through Neovim’s internal help documentation.
Space fd Workspace Diagnostics: List all errors/warnings in the project.
Space ft Todo Search: Find all TODO, FIXME, or HACK comments in the codebase.
Space mp Markdown Preview: Start a live-reloading preview in your browser.
Space ms Stop Preview: Halt the running Markdown preview server.
C-\ Terminal: Toggle the integrated floating terminal overlay.
Space u Undo Tree: Visualize and navigate your edit history graphically.
Space o Symbol Outline: Show a navigable list of functions/classes in the file.

FFF (Fuzzy Finder)

Key Action
Space ff FFFind Files: High-performance fuzzy file search across the project.
Space fg LiFFFe Grep: Fast live grep through all files using the FFF engine.
Space fz Fuzzy Grep: Run live grep with switchable fuzzy and plain search modes.
Space fc Current Word: Search the current word across the project.

Completion

Key Action
C-k Previous Item: Select the previous suggestion in the completion menu.
C-j Next Item: Select the next suggestion in the completion menu.
Enter Confirm: Accept the currently highlighted completion.
Ctrl-g c Trigger: Manually invoke the completion menu.
Ctrl-g d Docs Link: Open the selected completion item’s documentation link in the browser.
Tab Next/Jump: Select next item or jump to next snippet placeholder.
S-Tab Previous: Select previous item or jump to previous snippet placeholder.

Code & LSP

Key Action
gd Definition: Jump to where the symbol under the cursor is defined.
gD Declaration: Jump to the original symbol declaration when it differs from the definition.
gi Implementation: Jump to concrete implementations of the current interface or method.
gr References: Find every location where the current symbol is used.
K Documentation: Show the hover-doc or type signature for the symbol.
Space K Current File Docs: Open the DevDocs sets mapped to the current filetype.
Space cf Format: Automatically tidy the current file using configured formatters.
Space rn Refactor Rename: Rename the symbol globally with a live preview of changes.
Space ca Code Action: Open quick-fix or refactoring suggestions (LSP).
Space ci Callers: View a tree of functions that call the current one.
Space co Callees: View a tree of functions called by the current one.
Space dd Diagnostic Info: Show full error/warning message in a floating window.
[d / ]d Jump Diagnostic: Navigate to the previous or next code issue.
[q / ]q Jump Quickfix: Navigate to the previous or next item in the quickfix list.
[Q / ]Q Start/End Quickfix: Jump to the first or last item in the quickfix list.
Space xx Issues Panel: Toggle the main diagnostics viewer (Trouble).
Space xw Warnings Panel: Focus specifically on warning-level issues.
Space xd Buffer Diagnostics: Show issues only for the current file.
Space xL Location View: Show items from the location list in Trouble.
Space xQ Quickfix View: Show items from the quickfix list in Trouble.
:LspStatus Buffer Status: Print the current file path, filetype, project root, and attached LSP clients.

Ghostty (Terminal)

Window & Tabs

Key Action
Cmd + N Open a completely new Ghostty window.
Cmd + T Create a new tab in the current window.
Cmd + W Close the active split or the current tab if no splits exist.
Cmd + Alt + W Close the entire current tab and all its splits.
Cmd + Shift + W Close the entire Ghostty window.
Cmd + 1-8 Switch directly to a specific tab by its index.
Cmd + 9 Quickly jump to the last tab in the window.
Cmd + Shift + [ / ] Cycle through tabs to the left or right.
Ctrl + Tab Move to the next tab in the sequence.
Ctrl + Shift + Tab Move to the previous tab in the sequence.
Cmd + Enter Toggle between windowed and fullscreen mode.

Splits

Key Action
Cmd + D Split the current view vertically (side-by-side).
Cmd + Shift + D Split the current view horizontally (stacked).
Cmd + [ / ] Cycle focus through existing splits.
Cmd + Alt + H/J/K/L Navigate between splits using Vim-style keys (Left, Down, Up, Right).
Cmd + Alt + Arrows Navigate between splits using directional arrow keys.
Cmd + Ctrl + Arrows Adjust the size of the focused split.
Cmd + Ctrl + = Automatically resize all splits to equal proportions.
Cmd + Shift + Enter Zoom the active split to fill the tab (toggle).

Navigation & Search

Key Action
Cmd + F Open the find bar to search through scrollback buffer.
Cmd + G Jump to the next occurrence of the search term.
Cmd + Shift + G Jump to the previous occurrence of the search term.
Cmd + Shift + F Close the search interface.
Cmd + Shift + Up Jump the view back to the previous shell prompt.
Cmd + Shift + Down Jump the view forward to the next shell prompt.
Cmd + Home Instantly scroll to the very top of the buffer.
Cmd + End Instantly scroll to the very bottom (live output).

Clipboard & Text

Key Action
Cmd + C Copy the selected text to the system clipboard.
Cmd + V Paste text from the clipboard into the terminal.
Cmd + A Select all text in the current scrollback buffer.
Cmd + K Hard reset: clear the screen and wipe the scrollback history.
Cmd + + / - Zoom the font size in or out globally.
Cmd + 0 Restore the font size to the default configured value.

Utilities

Key Action
Cmd + ` Toggle the Global Quick Terminal (overlay window).
Cmd + Shift + P Open the Command Palette for quick access to Ghostty features.
Cmd + , Open the Ghostty configuration file in your default editor.
Cmd + Shift + , Instantly reload the configuration without restarting.
Cmd + Alt + I Toggle the internal inspector/debug tool.
Cmd + Z Undo the last text action (where supported).
Cmd + Shift + Z Redo the last undone text action.

Line Editing (Terminal)

Note: These shortcuts use Ghostty key mappings to simulate standard Emacs/Readline behavior.
Key Action
Cmd + Left Move the cursor to the very beginning of the current line.
Cmd + Right Move the cursor to the very end of the current line.
Cmd + Backspace Delete everything from the cursor back to the start of the line.
Alt + Left / Right Jump the cursor backward or forward by one full word.

Git Workflow

Command Description
lg Launch Lazygit, a comprehensive TUI for managing commits, branches, and stashes.
gs Show the current repository status in a concise, short-format summary.
gaa Stage all changes in the current directory, including new and deleted files.
gc "msg" Commit staged changes with the specified descriptive message.
gp Push local commits to the upstream remote repository.
gpf Safely force push changes, ensuring you don't overwrite others' work blindly.
gpl Fetch and integrate remote changes using rebase while auto-stashing local work.
gl Display a clean, one-line graphical representation of the commit history.

Testing, Debugging & Tasks

Testing (Neotest)

Key Action
Space nt Nearest: Execute the single test case closest to the current cursor position.
Space nf File: Run all test cases within the currently active buffer.
Space ns Summary: Toggle the Neotest summary panel to view a hierarchy of test results.
Space no Output: Open a floating window showing the live output of the running tests.

Debugging (DAP)

Key Action
F5 Start/Continue: Launch the debugger or resume execution until the next breakpoint.
F6 Stop: Terminate the current debugging session and close the process.
F9 Breakpoint: Toggle a stop point on the current line of code.
F10 Step Over: Execute the current line and advance to the next without entering functions.
F11 Step Into: Step inside the function call on the current line for granular debugging.
F8 Step Out: Finish the current function and return focus to the caller.
Space du Debug UI: Toggle the graphical dashboard showing variables, stack, and watches.
Space b Breakpoint: Toggle a stop point on the current line (alternative mapping).
Space dr REPL: Open the interactive debugger shell for run-time evaluation.
Space de Evaluate: Show the value of the expression or variable under the cursor.

Tasks & Running (Overseer)

Key Action
Space tr Run Task: Launch auto-detected build scripts from Makefile, package.json, or Cargo.toml.
Space to Output: Toggle the task execution log to monitor progress and errors.
Space tc Custom: Manually enter a command to be managed and tracked by Overseer.

Git (in Neovim)

Key Action
Space gg LazyGit: Open the Lazygit terminal interface in a floating overlay.
Space gd Diff: Launch a side-by-side comparison of changes in the repository.
Space gh History: Open the commit history for the current file using Diffview.

Navigation (Flash)

Key Action
s Flash Jump: Interactively jump to any character or label visible on the screen.
S Flash Treesitter: Select logical code blocks (functions, classes) using fuzzy search.
r Remote: Perform an operation (delete, yank) on a target located elsewhere.
R Treesitter Search: Search and select code blocks within visual or operator-pending modes.
Ctrl + s Search Toggle: Enable or disable Flash-enhanced search while in command-line mode.
[t / ]t TODO Jump: Quickly navigate to the previous or next comment tag in the file.

System & Config Management

Command Description
update Global Update: Orchestrate updates for macOS, Homebrew packages, and Oh My Zsh plugins.
bbu Brew Bundle: Synchronize your installed Homebrew packages to the Brewfile for version control.
zshconfig Edit Config: Open the .zshrc configuration file in Neovim for quick customization.
reload Source Config: Apply changes from .zshrc to the current session without restarting the terminal.
mkcd <dir> Create & Jump: Create a new directory and immediately change into it in a single step.
icloud / ic Jump to iCloud: Quickly navigate to your personal iCloud Drive folder in the terminal.

Runtimes & Languages

Tool Usage
Node.js Version Manager: Managed by nvm. Run nvm install 20 to install the latest LTS version.
Python Interpreter + Project Env: Base versions are managed by pyenv. Project-local .venv activation is handled by direnv when an .envrc is present.
Ruby Version Manager: Managed by rbenv. Run rbenv install 3.3.0 to switch between different Ruby environments.
Lua Editor Config: Uses lua_ls with Neovim-aware diagnostics and completion, plus DevDocs mapping for python, frontend, and systems languages where useful.
Shell Shell Scripts: Uses bashls for LSP, shellcheck for linting, and shfmt for formatting.
JSON / YAML Config Files: Uses jsonls and yamlls for schema-aware completion and validation.
HTML / CSS / Tailwind Frontend Markup: Uses html, cssls, and tailwindcss LSPs with prettier handling formatting.
Django Templates Template Support: Uses djlsp on htmldjango files, with project-aware completions when Neovim is launched from a shell using the correct project environment.
SQL Database Queries: Uses sqlls for language-server support, sql_formatter for formatting, and PostgreSQL docs in DevDocs.
C/C++ Clang Toolchain: Uses llvm/clangd for LSP and clang-format for code style. Debugging is handled by codelldb.
TypeScript / JavaScript Web Development: Uses ts_ls plus eslint for diagnostics and code actions, with prettier handling formatting.

DevDocs Setup (First Time)

After installing plugins, run these commands in Neovim to download offline docs:

:DevdocsFetch
:DevdocsInstall python~3.12 javascript typescript html css tailwindcss django~5.2 c cpp postgresql~18

Space K opens DevDocs for the current filetype. For troubleshooting the current buffer, use :LspStatus.

The interactive :DevdocsInstall picker is currently unreliable upstream, so explicit install arguments are the safer workflow.