title: Pipe a vim command after a shell command
body: <p>I'm trying to make a key mapping in vim that (a) saves current file (b) performs a git action, using shell (c) quits current vim editor.</p>
  
  <p>I've tried the following methods but still can't figure it out.</p>
  
  <p><strong>Method 1</strong> - in Vim command line</p>
  
  <p><code>:w | !git commit -am "auto" | q</code></p>
  
  <p><strong>Method 2</strong> - in .vimrc</p>
  
  <p><code>map :W :w \| !git commit -am "auto"</code></p>
  
  <p><code>map :L :Wq</code></p>
  
  <p><strong>Problem</strong></p>
  
  <p>The problem is that the pipe <code>|</code> can only be used to append shell commands. How do I do <code>'a Vim command' + 'a shell command' + 'a Vim command'</code>? How to pipe a vim command after a shell command?</p>