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