title: Open file in $EDITOR by default in zsh
body: <p>In zsh, if you can open directories without specifying cd command, like this</p>
  
  <pre><code>% pwd
  /home/user/test
  % ls
  integration shared unit
  % unit
  % pwd
  /home/user/test/unit
  </code></pre>
  
  <p>This effectively saves writing 'cd' everytime you try to open a directory. However it's smart enough not to 'cd' into files. Would it be possible to open a file without specifying $EDITOR command?</p>
  
  <p>For example,</p>
  
  <pre><code>% ls
  test
  % test
  % pwd
  /users/home/test
  % ls 
  test.rb
  % test.rb
  ... opens in an editor ...
  </code></pre>