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>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &&
|
---|
13 | sed '/shUntil\|link shRepeat/{
|
---|
14 | /shUntil/N
|
---|
15 | /^/i\
|
---|
16 | if exists("b:is_kornshell") || exists("b:is_bash")
|
---|
17 | p
|
---|
18 | /$/i\
|
---|
19 | endif
|
---|
20 | d
|
---|
21 | }' runtime/syntax/sh.vim.backup > runtime/syntax/sh.vim &&
|
---|
22 | ./configure --prefix=/usr &&
|
---|
23 | make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &&
|
---|
24 | make install &&
|
---|
25 | cd /usr/bin &&
|
---|
26 | 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>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &&
|
---|
45 | sed '/shUntil\|link shRepeat/{
|
---|
46 | /shUntil/N
|
---|
47 | /^/i\
|
---|
48 | if exists("b:is_kornshell") || exists("b:is_bash")
|
---|
49 | p
|
---|
50 | /$/i\
|
---|
51 | endif
|
---|
52 | d
|
---|
53 | }' runtime/syntax/sh.vim.backup > runtime/syntax/sh.vim &&
|
---|
54 | ./configure --prefix=/usr --localstatedir=/var/lib/vim &&
|
---|
55 | make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" &&
|
---|
56 | make install &&
|
---|
57 | cd /usr/bin &&
|
---|
58 | ln -sf vim vi</userinput></screen></para>
|
---|
59 |
|
---|
60 | </sect2>
|
---|
61 |
|
---|