title: Change to most recently used tab when closing a tab in IntelliJ IDEA?
body: <p>When I close an editor tab in IntelliJ, the tab that appears directly to the right of it gets opened next. Instead, I would rather have the most recently used tab open instead.</p>
  
  <p>For example, if I have these tabs open:</p>
  
  <pre><code>Foo.java (currently viewed)
  Bar.java
  </code></pre>
  
  <p>And then I use CMD+SHIFT+N to open <code>Baz.java</code>, it now looks like this:</p>
  
  <pre><code>Foo.java
  Baz.java (currently viewed)
  Bar.java
  </code></pre>
  
  <p>If I then close <code>Baz.java</code>, rather than returning to <code>Foo.java</code>, it goes to <code>Bar.java</code>.</p>
  
  <pre><code>Foo.java
  Bar.java (currently viewed)
  </code></pre>
  
  <p>How can I configure the editor to go back to the most recently used tab?</p>