Hi guys. I came across this problem after emerging app-vim/gtk-syntax yesterday. Confused to see that apparently the new syntax wasn't being picked up by vim, I started to track the problem, and found the cause in vim-plugin.eclass. The file /usr/share/vim/vimfiles/after/syntax/c.vim which was being auto-generated in update_vim_afterscripts() was being removed right away. The problem is what I presume is a bad typo in a grep call. This simple patch fixes this: Index: vim-plugin.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/vim-plugin.eclass,v retrieving revision 1.18 diff -u -d -r1.18 vim-plugin.eclass --- vim-plugin.eclass 10 Oct 2006 15:47:34 -0000 1.18 +++ vim-plugin.eclass 25 Nov 2006 17:37:36 -0000 @@ -92,7 +92,7 @@ # This is a generated file, but might be abandoned. Check # if there's no corresponding .d directory, or if the # file's effectively empty - if [[ ! -d "${f}.d" || -z "$(grep -v '^"')" ]]; then + if [[ ! -d "${f}.d" || -z "$(grep -v '^"' ${f})" ]]; then rm -f "${f}" fi done This bug has the following effect at the moment: * If only one auto-generated file is found under /usr/share/vim/vimfiles/after, it is always deleted. I happened to see this because gtk-syntax was the first ebuild I emerged that installs stuff under ../vimfiles/after. * If two or more auto-generated files are found, then the while loop stops at the first match and nothing gets ever removed. The reason for this has to do with the grep call consuming the rest of stdin that's supposed to be for 'read' in line 89. Thanks.
Fixed in CVS. Thanks for the reporty!