title: How do I launch an editor from a shell script?
body: <p>I would like my tcsh script to launch an editor (e.g., vi, emacs):</p>
  
  <pre><code>#!/bin/tcsh
  vi my_file
  </code></pre>
  
  <p>This starts up vi with my_file but first displays a warning "Vim: Warning: Output is not to a terminal" and my keystrokes don't appear on the screen.  After I kill vi, my terminal window is messed up (no newlines), requiring a "reset".  I tried "emacs -nw", "xemacs -nw", and pico with similar results.  "xemacs" works but launches a separate window.  I want to reuse the same terminal window.</p>
  
  <p>Is there a way to launch an editor from a script so that it reuses the same terminal window?</p>