title: How can I edit crontabs in VS Code?
body: <p>If I try to use Visual Studio Code (on macOS 10.15) to edit my crontab, it opens an empty file without the contents of my crontab.</p>
  <pre><code>$ VISUAL='code' crontab -e
  crontab: no changes made to crontab
  </code></pre>
  <p>I didn't actually expect this to work (without <code>-w</code>) but include it for completeness.  But when I add the <code>-w</code> it still fails.</p>
  <pre><code>$ VISUAL=&quot;code -w&quot; crontab -e
  crontab: code -w: No such file or directory
  crontab: &quot;code -w&quot; exited with status 1
  </code></pre>
  <p>It occurred to me that there may be some weirdness with quoting, but neither single quotes nor the following fixed anything:</p>
  <pre><code>$ function codew() {
  function&gt; code -w &quot;$1&quot;
  function&gt; }
  $ export VISUAL='codew'
  $ crontab -e
  </code></pre>
  <p>The problem seems to be that the crontab's tempfile is not actually present.  But how do I solve this?  How can I use VS Code to edit crontabs?</p>