Skip to content

Instantly share code, notes, and snippets.

@cr0t
Created February 18, 2026 12:07
Show Gist options
  • Select an option

  • Save cr0t/e8b907fc41356dacc4616d397606db0a to your computer and use it in GitHub Desktop.

Select an option

Save cr0t/e8b907fc41356dacc4616d397606db0a to your computer and use it in GitHub Desktop.
A simple command that creates a dev-like layout in the current directory inside a tmux session
function tin
if not set -q TMUX
echo "Error: not in a tmux session. Please run tmux first."
return 1
end
set current_dir (pwd)
# Split vertically first (creates bottom pane)
tmux split-window -v -c "$current_dir"
# Go back to top pane and split it horizontally (creates right pane in top row)
tmux select-pane -U
tmux split-window -h -c "$current_dir"
# Resize the bottom pane to be larger (for server)
tmux select-pane -D
tmux resize-pane -D 30
# Select the top-left pane (Editor)
tmux select-pane -U
tmux select-pane -L
tmux resize-pane -R 50
tmux send-keys "vim" C-m
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment