title: How to write a tmux script so that it automatically split windows and opens a set of files?
body: <p>I am new to Tmux. I know that you can write script to automate Tmux, in case your computer shuts down.  I can write the following:</p>
  
  <pre><code>#!/bin/bash
  
  tmux new-session -d -s MY_SESSION_NAME
  tmux split-window -h
  vim &lt;path to file1&gt;
  </code></pre>
  
  <p>This only opens up a 1 single vim editor page for file1, not in tmux, and not in any tmux split.  Is it possible automate the file opening like this?</p>