[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
|
---|
[0dbaee7] | 7 | available at <ulink url="&hint-root;">&hint-root;</ulink>. The hints
|
---|
| 8 | which are currently available are for Emacs, Joe and nano.</para>
|
---|
[6370fa6] | 9 |
|
---|
[b822811] | 10 | <para>Both the vim-rt and vim-src packages need to be unpacked to install Vim.
|
---|
[4758c7d] | 11 | Both packages will unpack their files into the vim-&vim-version; directory. This
|
---|
[4d994af4] | 12 | won't overwrite any files from the other package. So it doesn't matter
|
---|
[b822811] | 13 | in which order it is done. Install Vim by running the following commands:</para>
|
---|
[6370fa6] | 14 |
|
---|
[0dbaee7] | 15 | <para><screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> \
|
---|
| 16 | src/feature.h</userinput>
|
---|
| 17 | <userinput>./configure --prefix=/usr &&</userinput>
|
---|
[3229c6b] | 18 | <userinput>make &&</userinput>
|
---|
| 19 | <userinput>make install &&</userinput>
|
---|
| 20 | <userinput>cd /usr/bin &&</userinput>
|
---|
[45714a7] | 21 | <userinput>ln -sf vim vi</userinput></screen></para>
|
---|
[6370fa6] | 22 |
|
---|
[b822811] | 23 | <para>If you plan on installing the X Window system on your LFS
|
---|
[9e4e34c] | 24 | system, you might want to re-compile Vim after you have installed X. Vim
|
---|
[6370fa6] | 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
|
---|
[b822811] | 27 | documentation.</para>
|
---|
[6370fa6] | 28 |
|
---|
| 29 | </sect2>
|
---|
| 30 |
|
---|
[a8e5938e] | 31 | <sect2>
|
---|
| 32 | <title>FHS compliance notes</title>
|
---|
| 33 |
|
---|
[b822811] | 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>
|
---|
[a8e5938e] | 38 |
|
---|
[0dbaee7] | 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>
|
---|
[3229c6b] | 42 | <userinput>make &&</userinput>
|
---|
| 43 | <userinput>make install &&</userinput>
|
---|
| 44 | <userinput>cd /usr/bin &&</userinput>
|
---|
[45714a7] | 45 | <userinput>ln -sf vim vi &&</userinput>
|
---|
[b822811] | 46 | <userinput>mkdir /var/lib/vim</userinput></screen></para>
|
---|
[a8e5938e] | 47 |
|
---|
| 48 | </sect2>
|
---|
| 49 |
|
---|