craigemery/dotFiles — pull request #10 by cuzelac (2013-05-11 18:15:12+00:00)
Title: add support for tags files made with --tag-relative=yes

## Bug Description

* Plugin does not strip tags on write when `TagsFile` contains a directory

### Reproduction steps

1. set your `TagsFile` to contain a directory in `.vimrc`:

let g:autotagTagsFile = ".git/tags"

1. set your `~/.ctags` file to contain `--tag-relative=yes` and `-f SAME_PATH`:

--tag-relative=yes
-f .git/tags

1. build tags with `ctags`
1. add a function to a source file and write it to disk
1. Notice that the tags file has the new tag
1. remove that function from the source file and write it to disk
1. Notice the tags file still contains that tag

## Fix Description

In `stripTags()`:

1. find out if `os.getcwd()` is different from `os.path.dirname(tagsFile)`
1. If so, prepend the relpath between the two to each element of `sources`