Skip to content

Instantly share code, notes, and snippets.

@jfear
Created January 17, 2018 16:26
Show Gist options
  • Select an option

  • Save jfear/12ec750e07fd4519756f2f3237361867 to your computer and use it in GitHub Desktop.

Select an option

Save jfear/12ec750e07fd4519756f2f3237361867 to your computer and use it in GitHub Desktop.
Example of .tmux
#!/bin/sh
set -e
SESSION_NAME=$(basename "$(pwd)")
if tmux has-session -t $SESSION_NAME 2> /dev/null; then
tmux attach -t $SESSION_NAME
fi
tmux new-session -d -s $SESSION_NAME -n vim -x $(tput cols) -y $(tput lines)
tmux send-keys -t $SESSION_NAME:vim "sleep .25; nvim -c 'Denite file_rec'" Enter
tmux split-window -t $SESSION_NAME:vim -h
tmux send-keys -t $SESSION_NAME:vim.right "git status" Enter
tmux attach -t $SESSION_NAME:vim.left
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment