<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 &quot; projtags.vim
 &quot; Brief: Set tags file for per project
-&quot; Version: 0.2
-&quot; Date: Apr.25, 2007
+&quot; Version: 0.3
+&quot; Date: Jul.31, 2009
 &quot; Author: Yuxuan 'fishy' Wang &lt;fishywang@gmail.com&gt;
 &quot;
 &quot; Installation: put this file under your ~/.vim/plugins/
@@ -21,13 +21,28 @@
 &quot; let g:ProjTags += [[ &quot;~/work/proj2&quot;, &quot;~/work/proj2/tags&quot;,
 &quot; &quot;~/work/common.tags&quot; ]]
 &quot; 
-&quot; In this case for all file match the pattern &quot;~/work/proj2/*&quot;, the tag files
-&quot; &quot;~/work/proj2.tags&quot; and &quot;~/work/common.tags&quot; will be used.
+&quot; In this case for all files match the pattern &quot;~/work/proj2/*&quot;, the tag files
+&quot; &quot;~/work/proj2/tags&quot; and &quot;~/work/common.tags&quot; will be used.
+&quot;
+&quot; If one of the items in the list begins with &quot;:&quot;, it will be treated as a
+&quot; command (other than tag file):
+&quot;
+&quot; let g:ProjTags += [[ &quot;~/work/proj3&quot;, &quot;~/work/proj3/tags&quot;,
+&quot; &quot;:set shiftwidth=4&quot; ]]
+&quot;
+&quot; In this case for all files match the pattern &quot;~/work/proj3/*&quot;, the tag file
+&quot; &quot;~/work/proj3/tags&quot; will be used, and &quot;shiftwidth=4&quot; will be set.
+&quot;
+&quot; Please note that if you use &quot;set&quot; in the command, we will actually use
+&quot; &quot;setlocal&quot; instead, to avoid polluting the whole vim environment.
 &quot;
 &quot; You can add the above codes into your vimrc file
 &quot;
 &quot; Revisions:
 &quot;
+&quot; 0.3, Jul.31, 2009:
+&quot;  + can add commands now
+&quot;
 &quot; 0.2, Apr.25, 2007:
 &quot;  + more tags file for one directory support (contributed by Joseph Barker)
 &quot;  + check for g:ProjTags before use it
@@ -47,7 +62,12 @@ function! SetProjTags()
 				let tagfiles = [item . &quot;/tags&quot;]
 			endtry
 			for tagfile in tagfiles
-				execute 'autocmd BufEnter ' . filepattern . ' :setlocal tags+=' . tagfile 
+				if matchstr(tagfile, &quot;^:&quot;)
+					let cmd = substitute(tagfile, &quot;^:set &quot;, &quot;:setlocal &quot;, &quot;&quot;)
+					execute 'autocmd BufEnter ' . filepattern . ' ' . cmd 
+				else
+					execute 'autocmd BufEnter ' . filepattern . ' :setlocal tags+=' . tagfile 
+				endif
 			endfor
 			unlet item
 		endfor</diff>
      <filename>projtags.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>08bd4d75fa8e086dc53af0a3cadcce2605706d7f</id>
    </parent>
  </parents>
  <author>
    <name>Yuxuan 'fishy' Wang</name>
    <email>wang@yuxuan.org</email>
  </author>
  <url>http://github.com/fishy/scripts/commit/2b86184edfad6baae7a0eb259aae8eaaa15d9482</url>
  <id>2b86184edfad6baae7a0eb259aae8eaaa15d9482</id>
  <committed-date>2009-07-31T02:36:48-07:00</committed-date>
  <authored-date>2009-07-31T02:36:48-07:00</authored-date>
  <message> * v0.3 of projtags, can add commands now</message>
  <tree>8fde714383daead4d44c83b7b0e24f20e327aa4b</tree>
  <committer>
    <name>Yuxuan 'fishy' Wang</name>
    <email>wang@yuxuan.org</email>
  </committer>
</commit>
