title: How do I add a vim command generating a class source and header files for C++?
body: <p>When I type <code>:Class Toto</code> from <strong>VIM command line</strong>, I want to get the header and the source file with their templates like what any editor do when we create a new class. So if</p>
  
  <p><strong>Input</strong> 
  <code>:Class Toto</code></p>
  
  <p>then  </p>
  
  <p><strong>Output</strong>: </p>
  
  <blockquote>
    <p>toto.h</p>
  </blockquote>
  
  <pre><code>#ifndef TOTO_H
  #define TOTO_H
  
  class toto
  {
      public:
          toto();
          virtual ~toto();
      protected:
      private:
  };
  
  #endif // TOTO_H
  </code></pre>
  
  <blockquote>
    <p>toto.cpp</p>
  </blockquote>
  
  <pre><code>#include "toto.h"
  
  toto::toto()
  {
      //ctor
  }
  
  
  toto::~toto()
  {
      //dtor
  }
  </code></pre>
  
  <p>I get:</p>
  
  <p><code>./src/toto.c</code></p>
  
  <p><code>./include/toto.h</code></p>
  
  <p>generated automatically (with <code>src</code> and <code>include</code> folders  will be perfect)</p>