title: Unindenting code snippets
body: <p>There are times that I have a code snippet that I want to post on a defect tracker, wiki, forum, etc.   but it's deeply indented in the code.  I usually have to highlight the code snippet, hit &lt;shift>-&lt;tab> until the indents aren't so bad, then copy/paste and then revert the code.  It gets somewhat painful.</p>
  
  <p>Is there a tool that can remove the tabs in front of the each line?  Note that I don't want to remove all tabs from all lines, just same preceding number of tabs from each line.  I'm thinking some function of Emacs could do this.</p>
  
  <p>Here's an extreme example:</p>
  
  <p>Before:</p>
  
  <pre>
                              //This is usually some method in an anonymous inner class' anonymous inner class.
                              @Override
                              public void method(){
                                  doSomething();
                              }
  </pre>
  
  <p>After:</p>
  
  <pre>
  //This is usually some method in an anonymous inner class' anonymous inner class.
  @Override
  public void method(){
      doSomething();
  }
  </pre>
  
  <p>Notice how doSomething() still has a single tab in front of it.</p>