Created
February 18, 2026 12:07
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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