Skip to content

Dev Terminal Setup with Ghostty + Tmux + Neovim

If you're a developer who lives in the terminal, having a fast, clean, and efficient setup can make a world of difference. In this post, I’ll walk you through my current terminal stack: Ghostty as the terminal emulator, Tmux for session and window management, and Neovim as the code editor. This trio creates a powerful, minimal, and highly customizable development environment.

Why this stack?

  • Ghostty: A modern GPU-accelerated terminal emulator with a clean aesthetic and blazing performance.
  • Tmux: Terminal multiplexer that lets you split windows, manage sessions, and persist your work.
  • Neovim: A modern, extensible Vim-based text editor with built-in Lua scripting and native LSP support.

Looking for Neovim?

Neovim is a core part of my workflow, but I've separated it into its own post to keep things focused. (Coming soon!)


Step-by-Step Setup

Here's how to set up the stack, step by step. I’ll explain not just how everything is configured, but also why I use it this way.

macOS Setup

This guide assumes you’re using macOS (for things like Homebrew, pbcopy, and Ghostty’s macOS-specific options). If you're on Linux, some configs or keybinds may differ slightly.

Setting up Ghostty

Ghostty is a newer terminal emulator, designed for speed and simplicity.

brew install ghostty

My Ghostty Config

Ghostty works great out of the box, but I tweak a few things for aesthetics and comfort. Below is the configuration I use.

~/.config/ghostty/config
# Use zsh as the default shell
shell-integration = "zsh"

# Font setup for icons and readability
font-family = "MesloLGS NF"

# Best theme ever
theme = "catppuccin-macchiato"

# For transparency
background-opacity = 0.88

# Cursor preferences
cursor-style = "block"
cursor-style-blink = true
shell-integration-features = "no-cursor" # (1)

# Window size and padding
window-width = 115
window-height = 45
window-padding-y = 25,1
window-padding-x = 1,1

# Minimal macOS titlebar for cleaner appearance
macos-titlebar-style = "hidden"
macos-titlebar-proxy-icon = "hidden"
  1. ❓ Hide cursor during shell integration animations

MesloLGS Font

The font must be installed via Nerd Fonts. It's patched to include icons and symbols used by many terminal tools (like lsd, starship, and fzf). I use MesloLGS NF because it's clean, readable, and works well with powerline-style prompts.

You can install it using Homebrew:

brew tap homebrew/cask-fonts
brew install --cask font-meslo-lg-nerd-font

This is what it should look like

ghostty-catppuccin

Note

Your prompt might look different than mine. I’m using Oh My Zsh with a custom theme and plugin setup. If you're curious, I’ll be sharing a separate post soon on how I configure my Zsh environment from scratch.


Setting up Tmux

I rely on tmux daily to manage terminal sessions, windows, and panes efficiently. In this section, I’ll walk through my .tmux.conf, explaining each key setting and plugin I use to streamline my workflow. You can install tmux via Homebrew:

brew install tmux

Enable True Color and Focus Events

~/.tmux.conf
set -g default-terminal "screen-256color"
set-option -g focus-events on

True color support makes themes like Catppuccin shine with accurate colors. Focus events help tmux detect when a pane gains or loses focus — useful for plugins or scripts reacting to activity.

Custom Prefix Key: Ctrl+Space

~/.tmux.conf
set-option -g prefix C-Space
unbind-key C-b
bind-key C-Space send-prefix

I swapped the default prefix Ctrl+B to Ctrl+Space — it’s easier on my fingers and less likely to conflict with other tools.

What's a Prefix Key?

The prefix key is a special key or key combination that acts as a trigger before executing a command. Instead of executing immediately, commands are grouped behind this prefix to avoid conflicts and keep key mappings organized.

For example, in tmux, the default prefix is Ctrl+B, so you'd press Ctrl+B followed by another key (like C to create a new window). Similarly, in Neovim, plugins often use a leader key (commonly Space) as a prefix to access custom mappings, like Space+F+F to find files or Space+G+S to open Git status.

Reload Config with <prefix> + r

Quickly reload your tmux config without restarting your sessions.

~/.tmux.conf
unbind r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"

super handy when tweaking your configs.

Mouse Support

In tmux, mouse support allow us to be able to click to switch panes or windows, scroll thourgh buffer history or select and copy with the mouse.

~/.tmux.conf
set -g mouse on

Start Indexing at 1 (Not 0)

By default, tmux starts counting windows and panes from 0. You can change this to start from 1, which feels more intuitive and makes navigation simpler.

~/.tmux.conf
set -g base-index 1
setw -g pane-base-index 1

This small tweak matches how we naturally count (1, 2, 3…) and keeps things consistent across tools—especially when scripting or referencing windows and panes in status lines or keybinds.

Vi-style Key Bindings

Enables Vim-like movements inside copy mode - use H, J, K, L instead of arrow keys.

~/.tmux.conf
setw -g mode-keys vi

Pane Resizing with hjkl

This allows me to quickly resize panes using prefix + Vim keys (h, j, k, l).

~/.tmux.conf
bind-key -r h resize-pane -L 5
bind-key -r j resize-pane -D 5
bind-key -r k resize-pane -U 5
bind-key -r l resize-pane -R 5

The -r flag makes the key repeatable, so I can hold down the key to continuously resize in that direction.

Vim-like Copy-Yank

Visual mode (v), yank (y) and (p) to paste just like Vim. Using pbcopy ensures it goes to the system clipboard (macOS)

~/.tmux.conf
# previous window rebind to prefix + b (we'll use prefix + p for pasting later)
unbind-key b
bind-key b previous-window

# vim copy yank
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"

# vim paste
unbind-key p
bind-key p run-shell "pbpaste | tmux load-buffer - && tmux paste-buffer"

Window Management (prefix + w + ?)

Custom keybinds to help manage windows and panes more efficiently.

~/.tmux.conf
bind-key w switch-client -T prefix-w

This binds prefix + w to switch to a custom key table named prefix-w, which acts like a submenu of keybindings (a container for sub-keys).

~/.tmux.conf
bind-key -T prefix-w x confirm kill-window
bind-key -T prefix-w c new-window -c "#{pane_current_path}"
bind-key -T prefix-w v split-window -h -c "#{pane_current_path}"
bind-key -T prefix-w s split-window -v -c "#{pane_current_path}"
bind-key -T prefix-w m resize-pane -Z
bind-key -T prefix-w w choose-tree -w
bind-key -T prefix-w Escape switch-client -T root

From here, you can press other keys to run window-related commands, such as:

  • x to close a window (with confirmation)
  • c to create a new window in the current pane’s directory
  • v and s to split panes vertically or horizontally
  • m to toggle maximizing the current pane
  • w to list windows across all sessions

You can also press Escape to exit this mode without triggering any command. For example, pressing <prefix> + w + c creates a new window.

Rebind Show Session

I’m not a fan of the default prefix + s binding for showing sessions, so I remap it to prefix + Space.

~/.tmux.conf
bind-key Space choose-tree -s

This feels more natural and aligns with my Neovim setup, where prefix + Space shows open buffers.

Since I’ve reassigned prefix + s, I rebind the old session list key to switch to the previous session instead:

~/.tmux.conf
unbind s
bind-key -T prefix s switch-client -l

Tmux Default Keybinds

Default Key Bindings to Remember

  • <prefix> + $: Rename session
  • <prefix> + ,: Rename window
  • ctrl + h/j/k/l: Move between panes

Run tmux list-keys to see all active key bindings in your current tmux environment.


Tmux Plugin Setup

To use plugins in Tmux, you first need to install TPM (Tmux Plugin Manager). It makes managing plugins easier — installation, updates, and removal can all be done from within Tmux.

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Then add the following to your ~/.tmux.conf

~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'

After reloading (ctrl + r) your Tmux config

Check Plugin Status

  • Run <prefix> + I to install plugins.
  • Run <prefix> + U to check for plugin updates.

Theme

Use the Catppuccin Tmux theme for a visually cohesive and modern look that matches other Catppuccin-themed tools (like Neovim or your terminal).

~/.tmux.conf
set -g @plugin 'catppuccin/tmux#v1.0.0'
set -g @catppuccin_flavor 'macchiato'

I follow the recommended default configuration and tweak it to my liking. You can find my full setup at the end of this post.

Session Management

I use the tmux-sessionist plugin to manage tmux sessions more efficiently.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-sessionist'

This plugin adds several helpful shortcuts. Here are the ones I use most:

  • prefix + g - prompts for session name and switches to it. Performs 'kind-of' name completion.
    Faster than the built-in prefix + s prompt for long session lists.
  • prefix + C (shift + c) - prompt for creating a new session by name.
  • prefix + X (shift + x) - kill current session without detaching tmux.
  • prefix + S (shift + s) - switches to the last session.
    The same as built-in prefix + L that everyone seems to override with some other binding.
  • prefix + @ - promote current pane into a new session.
    Analogous to how prefix + ! breaks current pane to a new window.
  • prefix + ctrl-@ - promote current window into a new session.

Session Persistence

Keep your Tmux sessions alive across reboots or accidental closures.

~/.tmux.conf
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
  • tmux-resurrect: Saves and restores your Tmux environment (windows, panes, working directories, even some program states).
  • tmux-continuum: Automatically saves your Tmux state at regular intervals and can restore it when you restart Tmux.

Vim-Tmux Navigation

Seamlessly navigate between Tmux panes and Neovim splits using the same keys (<Ctrl-h/j/k/l>).

~/.tmux.conf
set -g @plugin 'christoomey/vim-tmux-navigator'

TPM Initialization

Finally, make sure to include this line at the end of your ~/.tmux.conf to activate TPM and load the plugins:

~/.tmux.conf
run '~/.tmux/plugins/tpm/tpm'

Reminder + Full Config

  • Install plugins: <prefix> + I
  • Update plugins: <prefix> + U

TPM fetches plugins via Git. Run these commands whenever you add, remove, or want to update plugins.

Full Config

As promised, you can find my full configuration here.


Tmux Usage

Once you have tmux installed and configured, here are basic the basics or how I use it to get you going.

Start a new session

In your terminal run

tmux new -s session_name

Detaching from a session

press <prefix> + d

Reattaching to a Session

First I list all sessions

tmux ls

Then attach by runnning

tmux attach -t session_name

Cheatsheet

While inside tmux the possiblity are endless. here's a list of my most commonly used keybinds.

Defaults and Custom Keybindings

Keybinding Description
Ctrl + Space Set as the new tmux prefix key (replaces Ctrl + b)
prefix + r Reload ~/.tmux.conf and show a "Config reloaded!" msg
prefix + b Go to the previous window
prefix + p Paste from system clipboard (pbpaste)
prefix + Space Show all sessions (custom choose-tree -s)
prefix + s Switch to the last session (overrides default session list)
prefix + h Resize pane left by 5 cells
prefix + j Resize pane down by 5 cells
prefix + k Resize pane up by 5 cells
prefix + l Resize pane right by 5 cells
prefix + $ Rename current session
prefix + , Rename current window
Ctrl + h/j/k/l Navigate between panes

Window Management (via <prefix> + w)

Keybinding Description
prefix + w Enter custom window management key table
prefix + w + x Kill the current window
prefix + w + c Create a new window (in current path)
prefix + w + v Split pane vertically (in current path)
prefix + w + s Split pane horizontally (in current path)
prefix + w + m Toggle zoom (maximize/minimize current pane)
prefix + w + w Show all windows across all sessions
prefix + w + q Exit custom key table
prefix + w + Escape Also exits custom key table

tmux-sessionist Keybindings

Keybinding Description
prefix + g Jump to a session by name (fuzzy match).
prefix + C Create a new session by name.
prefix + X Kill current session without detaching.
prefix + S Switch to the last session (like prefix + L).
prefix + @ Move current pane to a new session.
prefix + Ctrl + @ Move current window to a new session.

Thanks for dropping by - hope you found this helpful!