title: How can I set environment variables in fish?
body: <p>I'm new to the fish shell, and just trying to set my $EDITOR variable so that's it's persistent across sessions and reboots. Here's what I've tried so far: </p>
  
  <ol>
  <li>Running <code>set -gx EDITOR vim</code> from the command line. </li>
  <li>Running <code>set -Ux EDITOR vim</code> from the command line. </li>
  <li>Running those commands, prefixed by <code>set -e EDITOR</code> to unset any previous value. </li>
  <li>Adding the above commands to my <code>~/.config/fish/config.fish</code> file (it complains <code>set: Warning: universal scope selected, but a global variable “EDITOR” exists.</code>)</li>
  <li>Uninstalling <code>oh-my-fish</code> and removing all fish configs to start from scratch. </li>
  </ol>
  
  <p>No matter what I do, the EDITOR variable always ends up being <code>/usr/bin/nano</code> whenever I open a new terminal, start a new session, or reboot. What's even more strange is that in <code>~/.config/fish/fishd.my-hostname</code>, I see <code>SET_EXPORT EDITOR vim</code>, and nothing about nano. Is this some kind of fish default? If so, how can I set this correctly? </p>
  
  <p>Edit: I'm running Fish 2.6.0 on Antergos Linux. </p>