proj/en/devrel/handbook/handbook.xml?part=2&chap=1 says: Code Listing 3: Configuring vimrc for ebuild-editing if (getcwd() =~ 'gentoo-x86\|gentoo-src\|portage') set tabstop=4 shiftwidth=4 noexpandtab endif This is pretty nasty. It only works if you do "vim foo.ebuild", not if you start vim and then :e foo.ebuild. It also breaks editing multiple files. The better way to do it is: au BufRead,BufNewFile *.e{build,class} let is_bash=1|setfiletype sh au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab which we already have in the default global vimrc anyway. For even better results, emerge app-vim/gentoo-syntax and you'll get proper syntax highlighting (including error highlighting for some common mistakes), filetype settings and detection for ebuild and eclass files.
Doc devs can't fix anything in there. Passing it on to devrel.
*prod* anyone alive?
Hrm, did not see this bug before. Ciaran, I assume all that is needed is for the "if(get...endif" stuff to be replaced by the new two lines and that's it?
Well... I'd suggest removing the code listing and stating something like: --- start --- The default Gentoo vimrc file (/etc/vim/vimrc) ensures that correct indentation and filetype settings are used for ebuild and eclass files. For better results, including special syntax highlighting for ebuild keywords, emerge app-vim/gentoo-syntax. On non-Gentoo systems, you can obtain similar results by using the following lines in your vimrc: au BufRead,BufNewFile *.e{build,class} let is_bash=1|setfiletype sh au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab Or, better yet, by manually installing the gentoo-syntax package (https://developer.berlios.de/projects/gentoo-syntax/). Note that vim 6.3 or later is probably required. --- end --- Please rephrase to compensate for my low caffeine levels :)
Added in to CVS (should reach the webnodes in an hour or two, hopefully), slightly edited in a place or two. I left the "probably required" bit out, if you definitely know that it breaks on earlier Vim versions then just please reopen this bug and I'll add that in. Thanks!