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="&hints-root;">&hints-root;</ulink>. The hints
|
---|
8 | which are currently available are for Emacs, Joe and nano.</para>
|
---|
9 |
|
---|
10 | <para>Install Vim by running the following commands:</para>
|
---|
11 |
|
---|
12 | <para><screen><userinput>sed '/shUntil\|link shRepeat/{</userinput>
|
---|
13 | <userinput> /shUntil/N</userinput>
|
---|
14 | <userinput> /^/i\</userinput>
|
---|
15 | <userinput> if exists("b:is_kornshell") || exists("b:is_bash")</userinput>
|
---|
16 | <userinput> p</userinput>
|
---|
17 | <userinput> /$/i\</userinput>
|
---|
18 | <userinput> endif</userinput>
|
---|
19 | <userinput> d</userinput>
|
---|
20 | <userinput> }' runtime/syntax/sh.vim > sh.vim.fixed &&</userinput>
|
---|
21 | <userinput>mv sh.vim.fixed runtime/syntax/sh.vim &&</userinput>
|
---|
22 | <userinput>./configure --prefix=/usr &&</userinput>
|
---|
23 | <userinput>make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &&</userinput>
|
---|
24 | <userinput>make install &&</userinput>
|
---|
25 | <userinput>cd /usr/bin &&</userinput>
|
---|
26 | <userinput>ln -sf vim vi</userinput></screen></para>
|
---|
27 |
|
---|
28 | <para>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.</para>
|
---|
33 |
|
---|
34 | </sect2>
|
---|
35 |
|
---|
36 | <sect2>
|
---|
37 | <title>FHS compliance notes</title>
|
---|
38 |
|
---|
39 | <para>The FHS says that editors like vim should use /var/lib/<editor>
|
---|
40 | for their temporary state files, like temporary save files for example.
|
---|
41 | If you wish vim to conform to the FHS, you should use this command set
|
---|
42 | instead of the one presented above:</para>
|
---|
43 |
|
---|
44 | <para><screen><userinput>sed '/shUntil\|link shRepeat/{</userinput>
|
---|
45 | <userinput> /shUntil/N</userinput>
|
---|
46 | <userinput> /^/i\</userinput>
|
---|
47 | <userinput> if exists("b:is_kornshell") ||
|
---|
48 | exists("b:is_bash")</userinput>
|
---|
49 | <userinput> p</userinput>
|
---|
50 | <userinput> /$/i\</userinput>
|
---|
51 | <userinput> endif</userinput>
|
---|
52 | <userinput> d</userinput>
|
---|
53 | <userinput> }' runtime/syntax/sh.vim > sh.vim.fixed
|
---|
54 | &&</userinput>
|
---|
55 | <userinput>mv sh.vim.fixed runtime/syntax/sh.vim &&</userinput>
|
---|
56 | <userinput>./configure --prefix=/usr --localstatedir=/var/lib/vim &&</userinput>
|
---|
57 | <userinput>make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\"
|
---|
58 | &&</userinput>
|
---|
59 | <userinput>make install &&</userinput>
|
---|
60 | <userinput>cd /usr/bin &&</userinput>
|
---|
61 | <userinput>ln -sf vim vi</userinput></screen></para>
|
---|
62 |
|
---|
63 | </sect2>
|
---|
64 |
|
---|