[6370fa6] | 1 | <sect2>
|
---|
| 2 | <title>Installation of Vim</title>
|
---|
| 3 |
|
---|
[b822811] | 4 | <para>If you don't like vim to be installed as an editor on the LFS system,
|
---|
[0c4eb2c] | 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
|
---|
[4c2adfa2] | 7 | available at <ulink url="&hints-root;">&hints-root;</ulink>. The hints
|
---|
[0dbaee7] | 8 | which are currently available are for Emacs, Joe and nano.</para>
|
---|
[6370fa6] | 9 |
|
---|
[93c0fbf] | 10 | <para>Install Vim by running the following commands:</para>
|
---|
[6370fa6] | 11 |
|
---|
[8c5e7152] | 12 | <para><screen><userinput>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &&
|
---|
| 13 | sed '/shUntil\|link shRepeat/{
|
---|
[4d6fc2da] | 14 | /shUntil/N
|
---|
| 15 | /^/i\
|
---|
| 16 | if exists("b:is_kornshell") || exists("b:is_bash")
|
---|
| 17 | p
|
---|
| 18 | /$/i\
|
---|
| 19 | endif
|
---|
| 20 | d
|
---|
[8c5e7152] | 21 | }' runtime/syntax/sh.vim.backup > runtime/syntax/sh.vim &&
|
---|
[4d6fc2da] | 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>
|
---|
[6370fa6] | 27 |
|
---|
[b822811] | 28 | <para>If you plan on installing the X Window system on your LFS
|
---|
[9e4e34c] | 29 | system, you might want to re-compile Vim after you have installed X. Vim
|
---|
[6370fa6] | 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
|
---|
[b822811] | 32 | documentation.</para>
|
---|
[6370fa6] | 33 |
|
---|
| 34 | </sect2>
|
---|
| 35 |
|
---|
[a8e5938e] | 36 | <sect2>
|
---|
| 37 | <title>FHS compliance notes</title>
|
---|
| 38 |
|
---|
[b822811] | 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>
|
---|
[a8e5938e] | 43 |
|
---|
[8c5e7152] | 44 | <para><screen><userinput>cp runtime/syntax/sh.vim runtime/syntax/sh.vim.backup &&
|
---|
| 45 | sed '/shUntil\|link shRepeat/{
|
---|
[4d6fc2da] | 46 | /shUntil/N
|
---|
| 47 | /^/i\
|
---|
| 48 | if exists("b:is_kornshell") || exists("b:is_bash")
|
---|
| 49 | p
|
---|
| 50 | /$/i\
|
---|
| 51 | endif
|
---|
| 52 | d
|
---|
[8c5e7152] | 53 | }' runtime/syntax/sh.vim.backup > runtime/syntax/sh.vim &&
|
---|
[4d6fc2da] | 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>
|
---|
[a8e5938e] | 59 |
|
---|
| 60 | </sect2>
|
---|
| 61 |
|
---|