Gentoo Archives: gentoo-dev

From: Aron Griffis <agriffis@g.o>
To: gentoo-dev@××××××××××.org
Subject: Re: [gentoo-dev] The official answer on tabs and spaces
Date: Fri, 19 Oct 2001 12:23:54
Message-Id: 20011019124655.B3155@yde.flatmonk.org
In Reply to: [gentoo-dev] The official answer on tabs and spaces by Daniel Robbins
1 Daniel Robbins wrote: [Fri Oct 19 2001, 12:26:30PM EST]
2 > The correct, official way is to use a single tab per indent. Tabs
3 > should not be converted to spaces, and multiple spaces should not be
4 > used in place of tabs. This way, people can use any tabstop they like
5 > and everything still is correctly indented.
6
7 Thanks Daniel. Sorry I wasn't aware that you had an official policy.
8
9 In support of this, here's something Vim users can put in their .vimrc
10 to make sure it's done correctly for ebuilds. Of course, you can use
11 whatever value you like in place of 4.
12
13 augroup gentoo
14 au!
15 au BufRead *.ebuild set tabstop=4 shiftwidth=4 noexpandtab
16 augroup END
17
18 Alternatively, you could do the following, which would affect not only
19 ebuilds but anything you would edit that pertains to Gentoo.
20
21 if (getcwd() =~ 'gentoo-x86\|gentoo-src\|portage')
22 set tabstop=4 shiftwidth=4 noexpandtab
23 endif
24
25 Aron