vim.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-vim" xreflabel="Vim" role="wrap">
  7. <title>Vim-&vim-version;</title>
  8. <?dbhtml filename="vim.html"?>
  9. <indexterm zone="ch-system-vim"><primary sortas="a-Vim">Vim</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <segmentedlist>
  12. <segtitle>&buildtime;</segtitle>
  13. <segtitle>&diskspace;</segtitle>
  14. <seglistitem><seg>0.4 SBU</seg><seg>34 MB</seg></seglistitem>
  15. </segmentedlist>
  16. </sect2>
  17. <sect2 role="installation">
  18. <title>Installation of Vim</title>
  19. <para>Change the default locations of the configuration files:</para>
  20. <screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h
  21. echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h</userinput></screen>
  22. <para>Vim has a security vulnerability already addressed upstream. The
  23. following patch fixes the problem:</para>
  24. <screen><userinput>patch -Np1 -i ../vim-&vim-version;-security_fix-1.patch</userinput></screen>
  25. <para>Now prepare Vim for compilation:</para>
  26. <screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen>
  27. <para>Compile the package:</para>
  28. <screen><userinput>make</userinput></screen>
  29. <para>To test the results, issue:
  30. <userinput>make test</userinput></para>
  31. <para>Now install the package:</para>
  32. <screen><userinput>make install</userinput></screen>
  33. <para>Create a symlink:</para>
  34. <screen><userinput>ln -s vim /usr/bin/vi</userinput></screen>
  35. </sect2>
  36. <sect2 id="conf-vim" role="configuration"><title>Configuring Vim</title>
  37. <para>Create a default vim configuration file by running
  38. the following:</para>
  39. <screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"
  40. <literal>" Begin /etc/vimrc
  41. set nocompatible
  42. set backspace=2
  43. syntax on
  44. <!-- set fileencodings=ucs-bom,utf-8,<replaceable>[your-8-bit-charset]</replaceable> -->
  45. if (&amp;term == "iterm") || (&amp;term == "putty")
  46. set background=dark
  47. endif
  48. " End /etc/vimrc</literal>
  49. EOF</userinput></screen>
  50. <!-- XXX: the ascii-only files are considered to be in utf-8 - that's not what
  51. one expects . That's why fileencodings stuff is commented out for now
  52. The <parameter>set fileencodings=...</parameter> makes
  53. <command>vim</command> capable of automatically detecting the character
  54. set of the file being edited (replace
  55. "<replaceable>[your-8-bit-charset]</replaceable>"
  56. with the value appropriate for your country, e.g. iso-8859-15 in Italy).
  57. This line is useful because bleeding-edge distributions
  58. like Fedora Core use UTF-8, and conservative ones like Debian
  59. use traditional 8-bit encodings for text files. If you have not
  60. passed the <parameter>- -enable-multibyte</parameter> switch to the
  61. <command>./configure</command> command above, this line will not work. -->
  62. <para>Documentation for other available options can be obtained by running
  63. the following command:</para>
  64. <screen><userinput>vim -c ':options'</userinput></screen>
  65. </sect2>
  66. <sect2 id="contents-vim" role="content"><title>Contents of Vim</title>
  67. <para>See testing</para>
  68. </sect2>
  69. </sect1>