From c5b2cfa0a731fefd7de0ba5294168339a3d1553d Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Fri, 19 Oct 2001 19:03:36 +0000 Subject: Added snippet for setting up Vim. --- app-doc/gentoo-web/files/xml/gentoo-howto.xml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'app-doc') diff --git a/app-doc/gentoo-web/files/xml/gentoo-howto.xml b/app-doc/gentoo-web/files/xml/gentoo-howto.xml index 0760b3b74163..861212ed7140 100755 --- a/app-doc/gentoo-web/files/xml/gentoo-howto.xml +++ b/app-doc/gentoo-web/files/xml/gentoo-howto.xml @@ -307,10 +307,19 @@ variable settings. The variables you can set are:

Rules for writing an ebuild File -

Since ebuild files are really just shell scripts, you should use your editor's -shell-script mode for editing them. You should use proper indentation, using only tab characters -- -no spaces. Make sure you set up your editor to put tabstops at 4 spaces. Always make sure you use braces around your environment variables; e.g. ${P} instead of just $P.

-

TODO: add stuff about emacs & vi.

+

Since ebuild files are really just shell scripts, you should +use your editor's shell-script mode for editing them. You should use +proper indentation, using only tab characters -- no spaces. Make sure +you set up your editor to put tabstops at 4 spaces. Always make sure +you use braces around your environment variables; e.g. ${P} +instead of just $P.

+

If you're using Vim, you can put the following snippet at the bottom of your .vimrc to make sure you're using the right settings when editing anything Gentoo-related.

+
+if (getcwd() =~ 'gentoo-x86\|gentoo-src\|portage')
+	set tabstop=4 shiftwidth=4 noexpandtab
+endif
+
+

TODO: add stuff about emacs.

@@ -318,7 +327,7 @@ no spaces. Make sure you set up your editor to put tabstops at 4 spaces. Always -

The purpose of USE variables is to allow you to configure Portage to gobally +

The purpose of USE variables is to allow you to configure Portage to globally and automatically enable or disable certain optional build-time features. Here's an example. Let's say you're a GNOME fan, and you'd like any ebuild that has the option of compiling-in optional GNOME support to do -- cgit v1.2.3-65-gdbad