title: How do I automatically load a tag file from a directory when changing to that directory?
body: <p>For each of my C++ projects I keep a tag file in the root of the source tree. How can I have Vim automatically load the tag file for that directory when I change to it?</p>
  
  <p>e.g. My directory layout looks like this:</p>
  
  <pre><code>~/dev/project1/tags
  ~/dev/project2/tags
  </code></pre>
  
  <p>I start Vim (from GUI) and the present working directory defaults to $HOME. I type <code>:cd ~/dev/project/</code> and Vim should load <code>~/dev/project/tags</code>. Tomorrow I might want to work on project2, so I expect Vim to load the tags for that project when I <code>cd</code> to it.</p>
  
  <p>How can this be done?</p>