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