vim-inst.xml 2.0 KB

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