vim-inst.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <sect2>
  2. <title>Installation of Vim</title>
  3. <para>
  4. 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 he
  6. prefers. There are a few hints how to install different editors
  7. available at <ulink
  8. url="http://archive.linuxfromscratch.org/lfs-hints/editors/">http://archive.linuxfromscratch.org/lfs-hints/editors/</ulink>
  9. </para>
  10. <para>
  11. Both the vim-rt and vim-src packages need to be unpacked to install Vim.
  12. Both packages will unpack their files into the vim-5.7 directory. This
  13. won't overwrite any files from the other package. So it doesn't matter
  14. in which order it is done. Install Vim by running the following commands:
  15. </para>
  16. <blockquote><literallayout>
  17. <userinput>./configure --prefix=/usr &amp;&amp;</userinput>
  18. <userinput>make &amp;&amp;</userinput>
  19. <userinput>make install &amp;&amp;</userinput>
  20. <userinput>cd /usr/bin &amp;&amp;</userinput>
  21. <userinput>ln -s vim vi</userinput>
  22. </literallayout></blockquote>
  23. <para>
  24. If you plan on installing the X Window system on his LFS
  25. system, you might want to re-compile Vim after he has installed X. Vim
  26. comes with a nice GUI version of the editor which requires X and a few
  27. other libraries to be installed. For more information read the Vim
  28. documentation.
  29. </para>
  30. </sect2>
  31. <sect2>
  32. <title>FHS compliance notes</title>
  33. <para>
  34. The FHS says that editors like vim should use /var/lib/&lt;editor&gt; for their
  35. temporary state files, like temporary save files for example. If you wish vim to
  36. conform to the FHS, you should use this command set instead of the one presented
  37. above:
  38. </para>
  39. <blockquote><literallayout>
  40. <userinput>./configure --prefix=/usr --localstatedir=/var/lib/vim &amp;&amp;</userinput>
  41. <userinput>make &amp;&amp;</userinput>
  42. <userinput>make install &amp;&amp;</userinput>
  43. <userinput>cd /usr/bin &amp;&amp;</userinput>
  44. <userinput>ln -s vim vi &amp;&amp;</userinput>
  45. <userinput>mkdir /var/lib/vim</userinput>
  46. </literallayout></blockquote>
  47. </sect2>