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