title: Unable to change the default editor in the terminal
body: <p>My default editor is <a href="https://en.wikipedia.org/wiki/Pico_(text_editor)" rel="nofollow noreferrer">Pico</a> at my server. I use Bash and Linux.</p>
  <p>I tried to change Vim to be my default editor unsuccessfully by:</p>
  <pre><code>echo vim &gt; $EDITOR
  </code></pre>
  <p>How can I change Vim to be my default editor?</p>
  <p>The following code does not work in file <em><a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)#Legacy-compatible_Bash_startup_example" rel="nofollow noreferrer">.bashrc</a></em>:</p>
  <pre><code>export EDITOR='vim'
  </code></pre>