title: VIM : Toggle between two executions for the same remap
body: <p>I'd like to have to same remap to open and close my terminal. <br/>
  Here is my remap to open it : <code>nnoremap &lt;C-s&gt; :bel vert term&lt;CR&gt;</code><br/>
  What I want is that when my terminal is already open, if I type <code>&lt;C-s&gt;</code> again, it execute <code>exit&lt;CR&gt;</code><br/>
  I already tried a function that I found here : <a href="https://stackoverflow.com/questions/20579142/toggle-function-in-vim">Toggle function in vim</a><br/></p>
  <pre><code>let s:enable = 0
  function! ToggleEasyMode()
      if s:enable
          nnoremap &lt;C-s&gt; exit&lt;CR&gt;
          let s:enable = 0
      else
          nnoremap &lt;C-s&gt; :bel vert term&lt;CR&gt;
          let s:enable = 0
      endif
  endfunction
  </code></pre>