vim-inst.xml 2.0 KB

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