1 | <sect2>
|
---|
2 | <title>Installation of Vim</title>
|
---|
3 |
|
---|
4 | <para>
|
---|
5 | If you don't like vim to be installed as an editor on the LFS system,
|
---|
6 | you may want to download an alternative and install an editor you
|
---|
7 | prefer. There are a few hints how to install different editors
|
---|
8 | available at <ulink
|
---|
9 | url="http://archive.linuxfromscratch.org/lfs-hints/editors/">http://archive.linuxfromscratch.org/lfs-hints/editors/</ulink>
|
---|
10 | </para>
|
---|
11 |
|
---|
12 | <para>
|
---|
13 | Both the vim-rt and vim-src packages need to be unpacked to install Vim.
|
---|
14 | Both packages will unpack their files into the vim-&vim-version; directory. This
|
---|
15 | won't overwrite any files from the other package. So it doesn't matter
|
---|
16 | in which order it is done. Install Vim by running the following commands:
|
---|
17 | </para>
|
---|
18 |
|
---|
19 | <blockquote><literallayout>
|
---|
20 | <userinput>./configure --prefix=/usr &&</userinput>
|
---|
21 | <userinput>make &&</userinput>
|
---|
22 | <userinput>make install &&</userinput>
|
---|
23 | <userinput>cd /usr/bin &&</userinput>
|
---|
24 | <userinput>ln -s vim vi</userinput>
|
---|
25 | </literallayout></blockquote>
|
---|
26 |
|
---|
27 | <para>
|
---|
28 | If you plan on installing the X Window system on your LFS
|
---|
29 | system, you might want to re-compile Vim after you have installed X. Vim
|
---|
30 | comes with a nice GUI version of the editor which requires X and a few
|
---|
31 | other libraries to be installed. For more information read the Vim
|
---|
32 | documentation.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | </sect2>
|
---|
36 |
|
---|
37 | <sect2>
|
---|
38 | <title>FHS compliance notes</title>
|
---|
39 |
|
---|
40 | <para>
|
---|
41 | The FHS says that editors like vim should use /var/lib/<editor> for their
|
---|
42 | temporary state files, like temporary save files for example. If you wish vim to
|
---|
43 | conform to the FHS, you should use this command set instead of the one presented
|
---|
44 | above:
|
---|
45 | </para>
|
---|
46 |
|
---|
47 | <blockquote><literallayout>
|
---|
48 | <userinput>./configure --prefix=/usr --localstatedir=/var/lib/vim &&</userinput>
|
---|
49 | <userinput>make &&</userinput>
|
---|
50 | <userinput>make install &&</userinput>
|
---|
51 | <userinput>cd /usr/bin &&</userinput>
|
---|
52 | <userinput>ln -s vim vi &&</userinput>
|
---|
53 | <userinput>mkdir /var/lib/vim</userinput>
|
---|
54 | </literallayout></blockquote>
|
---|
55 |
|
---|
56 | </sect2>
|
---|
57 |
|
---|