[673b0d8] | 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 | ]>
|
---|
[a001133] | 6 | <sect1 id="ch-system-vim" xreflabel="Vim" role="wrap">
|
---|
[673b0d8] | 7 | <title>Vim-&vim-version;</title>
|
---|
| 8 | <?dbhtml filename="vim.html"?>
|
---|
| 9 |
|
---|
| 10 | <indexterm zone="ch-system-vim"><primary sortas="a-Vim">Vim</primary></indexterm>
|
---|
[6370fa6] | 11 |
|
---|
[a001133] | 12 | <sect2 role="package"><title/>
|
---|
[5888299] | 13 |
|
---|
[a001133] | 14 | <segmentedlist>
|
---|
| 15 | <segtitle>&buildtime;</segtitle>
|
---|
| 16 | <segtitle>&diskspace;</segtitle>
|
---|
| 17 | <seglistitem><seg>0.4 SBU</seg><seg>34 MB</seg></seglistitem>
|
---|
| 18 | </segmentedlist>
|
---|
| 19 |
|
---|
[35c2fa60] | 20 | </sect2>
|
---|
| 21 |
|
---|
[a001133] | 22 | <sect2 role="installation">
|
---|
[73aedd1d] | 23 | <title>Installation of Vim</title>
|
---|
| 24 |
|
---|
[3f0c882] | 25 | <para>Change the default locations of the configuration files:</para>
|
---|
[73aedd1d] | 26 |
|
---|
| 27 | <screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
|
---|
| 28 | echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h</userinput></screen>
|
---|
[008a51d] | 29 |
|
---|
| 30 | <para>Vim has a security vulnerability already addressed upstream. The
|
---|
| 31 | following patch fixes the problem:</para>
|
---|
| 32 |
|
---|
| 33 | <screen><userinput>patch -Np1 -i ../vim-&vim-version;-security_fix-1.patch</userinput></screen>
|
---|
[73aedd1d] | 34 |
|
---|
| 35 | <para>Now prepare Vim for compilation:</para>
|
---|
| 36 |
|
---|
[c3d6ceb] | 37 | <screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen>
|
---|
[73aedd1d] | 38 |
|
---|
| 39 | <para>Compile the package:</para>
|
---|
| 40 |
|
---|
| 41 | <screen><userinput>make</userinput></screen>
|
---|
| 42 |
|
---|
[3f0c882] | 43 | <para>To test the results, issue:
|
---|
| 44 | <userinput>make test</userinput></para>
|
---|
[1a73ed4] | 45 |
|
---|
[673b0d8] | 46 | <para>Now install the package:</para>
|
---|
[73aedd1d] | 47 |
|
---|
| 48 | <screen><userinput>make install</userinput></screen>
|
---|
| 49 |
|
---|
[3f0c882] | 50 | <para>Create a symlink:</para>
|
---|
[73aedd1d] | 51 |
|
---|
| 52 | <screen><userinput>ln -s vim /usr/bin/vi</userinput></screen>
|
---|
| 53 |
|
---|
| 54 | </sect2>
|
---|
[0ba2766b] | 55 |
|
---|
[342b176] | 56 |
|
---|
[df8334f] | 57 | <sect2 id="conf-vim" role="configuration"><title>Configuring Vim</title>
|
---|
[3f0c882] | 58 |
|
---|
| 59 | <para>Create a default vim configuration file by running
|
---|
[342b176] | 60 | the following:</para>
|
---|
| 61 |
|
---|
[8ad7980] | 62 | <screen><userinput>cat > /etc/vimrc << "EOF"
|
---|
[342b176] | 63 | " Begin /etc/vimrc
|
---|
| 64 |
|
---|
| 65 | set nocompatible
|
---|
| 66 | set backspace=2
|
---|
| 67 | syntax on
|
---|
[8ad7980] | 68 | <!-- set fileencodings=ucs-bom,utf-8,<replaceable>[your-8-bit-charset]</replaceable> -->
|
---|
[3e05705] | 69 | if (&term == "iterm") || (&term == "putty")
|
---|
| 70 | set background=dark
|
---|
| 71 | endif
|
---|
[342b176] | 72 |
|
---|
| 73 | " End /etc/vimrc
|
---|
[8ad7980] | 74 | EOF</userinput></screen>
|
---|
[342b176] | 75 |
|
---|
[56f967e] | 76 | <!-- XXX: the ascii-only files are considered to be in utf-8 - that's not what
|
---|
| 77 | one expects . That's why fileencodings stuff is commented out for now
|
---|
| 78 |
|
---|
[8ad7980] | 79 | The <parameter>set fileencodings=...</parameter> makes
|
---|
[3546862] | 80 | <command>vim</command> capable of automatically detecting the character
|
---|
| 81 | set of the file being edited (replace
|
---|
[8ad7980] | 82 | "<replaceable>[your-8-bit-charset]</replaceable>"
|
---|
[3546862] | 83 | with the value appropriate for your country, e.g. iso-8859-15 in Italy).
|
---|
| 84 | This line is useful because bleeding-edge distributions
|
---|
[b5b61fd] | 85 | like Fedora Core use UTF-8, and conservative ones like Debian
|
---|
| 86 | use traditional 8-bit encodings for text files. If you have not
|
---|
[8ad7980] | 87 | passed the <parameter>- -enable-multibyte</parameter> switch to the
|
---|
[56f967e] | 88 | <command>./configure</command> command above, this line will not work. -->
|
---|
[342b176] | 89 |
|
---|
[dc32fef] | 90 | <para>Documentation for other available options can be obtained by running
|
---|
| 91 | the following command:</para>
|
---|
| 92 |
|
---|
| 93 | <screen><userinput>vim -c ':options'</userinput></screen>
|
---|
| 94 |
|
---|
[342b176] | 95 | </sect2>
|
---|
[0ba2766b] | 96 |
|
---|
[5888299] | 97 |
|
---|
[c6cb3aa] | 98 | <sect2 id="contents-vim" role="content"><title>Contents of Vim</title>
|
---|
[673b0d8] | 99 |
|
---|
[3f0c882] | 100 | <para>See testing</para>
|
---|
[673b0d8] | 101 |
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | </sect1>
|
---|