source: final-system/common/vim.xml@ 91b682b

Last change on this file since 91b682b was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 14.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
10<sect1 id="ch-system-vim" role="wrap">
11 <?dbhtml filename="vim.html"?>
12
13 <title>Vim-&vim-version;</title>
14
15 <indexterm zone="ch-system-vim">
16 <primary sortas="a-Vim">Vim</primary>
17 </indexterm>
18
19 <sect2 role="package">
20 <title/>
21
22 <para>The Vim package contains a powerful text editor.</para>
23
24 <segmentedlist>
25 <segtitle>&buildtime;</segtitle>
26 <segtitle>&diskspace;</segtitle>
27
28 <seglistitem>
29 <seg>Not checked yet</seg>
30 <seg>Not checked yet</seg>
31 </seglistitem>
32 </segmentedlist>
33
34 <segmentedlist>
35 <segtitle>&dependencies;</segtitle>
36
37 <seglistitem>
38 <seg>Bash, Binutils, Coreutils, Diffutils,
39 GCC, Glibc, Grep, Make, Ncurses, and Sed</seg>
40 </seglistitem>
41 </segmentedlist>
42
43 <tip>
44 <title>Alternatives to Vim</title>
45
46 <para>If you prefer another editor&mdash;such as Emacs, Joe, or
47 Nano&mdash;please refer to <ulink
48 url="&blfs-root;view/svn/postlfs/editors.html"/>
49 for suggested installation instructions.</para>
50 </tip>
51
52 </sect2>
53
54 <sect2 role="installation">
55 <title>Installation of Vim</title>
56
57 <para os="a">First, unpack both <filename>vim-&vim-version;.tar.bz2</filename>
58 and (optionally) <filename>vim-&vim-version;-lang.tar.gz</filename>
59 archives into the same directory. Then, change the default location of
60 the <filename>vimrc</filename> configuration file to <filename
61 class="directory">/etc</filename>:</para>
62
63<screen os="b"><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h</userinput></screen>
64
65 <para os="e">Prepare Vim for compilation:</para>
66
67<screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen>
68
69 <variablelist os="f">
70 <title>The meaning of the configure options:</title>
71
72 <varlistentry>
73 <term><parameter>--enable-multibyte</parameter></term>
74 <listitem>
75 <para>This optional but highly recommended switch enables support
76 for editing files in multibyte character encodings. This is needed
77 if using a locale with a multibyte character set. This switch is
78 also helpful to be able to edit text files initially created in
79 Linux distributions like Fedora Core that use UTF-8 as a default
80 character set.</para>
81 </listitem>
82 </varlistentry>
83
84 </variablelist>
85
86 <para os="g">Compile the package:</para>
87
88<screen os="h"><userinput>make</userinput></screen>
89
90 <para os="i">To test the results, issue: <userinput>make test</userinput>.
91 However, this test suite outputs a lot of binary data to the
92 screen, which can cause issues with the settings of the current terminal.
93 This can be resolved by redirecting the output to a log file.</para>
94
95 <para os="j">Install the package:</para>
96
97<screen os="k"><userinput>make install</userinput></screen>
98
99 <para os="l">Many users are used to using <command>vi</command> instead of
100 <command>vim</command>. To allow execution of <command>vim</command>
101 when users habitually enter <command>vi</command>, create a
102 symlink:</para>
103
104<screen os="m"><userinput>ln -s vim /usr/bin/vi</userinput></screen>
105
106 <para os="n">If an X Window System is going to be installed on the LFS
107 system, it may be necessary to recompile Vim after installing X. Vim
108 comes with a GUI version of the editor that requires X and some
109 additional libraries to be installed. For more information on this
110 process, refer to the Vim documentation and the Vim installation page
111 in the BLFS book at <ulink
112 url="&blfs-root;view/svn/postlfs/editors.html#postlfs-editors-vim"/>.</para>
113
114 </sect2>
115
116 <sect2 id="conf-vim" role="configuration">
117 <title>Configuring Vim</title>
118
119 <indexterm zone="conf-vim">
120 <primary sortas="e-/etc/vim">/etc/vim</primary>
121 </indexterm>
122
123 <para>By default, <command>vim</command> runs in vi-incompatible mode.
124 This may be new to users who have used other editors in the past. The
125 <quote>nocompatible</quote> setting is included below to highlight the
126 fact that a new behavior is being used. It also reminds those who would
127 change to <quote>compatible</quote> mode that it should be the first
128 setting in the configuration file. This is necessary because it changes
129 other settings, and overrides must come after this setting. Create a
130 default <command>vim</command> configuration file by running the
131 following:</para>
132
133<screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"
134<literal>" Begin /etc/vimrc
135
136set nocompatible
137set backspace=2
138syntax on
139if (&amp;term == "iterm") || (&amp;term == "putty")
140 set background=dark
141endif
142
143" End /etc/vimrc</literal>
144EOF</userinput></screen>
145
146
147 <para>The <parameter>set nocompatible</parameter> makes
148 <command>vim</command> behave in a more useful way (the default) than
149 the vi-compatible manner. Remove the <quote>no</quote> to keep the
150 old <command>vi</command> behavior. The <parameter>set
151 backspace=2</parameter> allows backspacing over line breaks,
152 autoindents, and the start of insert. The <parameter>syntax
153 on</parameter> enables vim's syntax highlighting. Finally, the
154 <emphasis>if</emphasis> statement with the <parameter>set
155 background=dark</parameter> corrects <command>vim</command>'s guess
156 about the background color of some terminal emulators. This gives the
157 highlighting a better color scheme for use on the black background of
158 these programs.</para>
159
160 <para>Documentation for other available options can be obtained by
161 running the following command:</para>
162
163<screen><userinput>vim -c ':options'</userinput></screen>
164
165 </sect2>
166
167 <sect2 id="contents-vim" role="content">
168 <title>Contents of Vim</title>
169
170 <segmentedlist>
171 <segtitle>Installed programs</segtitle>
172
173 <seglistitem>
174 <seg>efm_filter.pl, efm_perl.pl, ex (link to vim), less.sh, mve.awk,
175 pltags.pl, ref, rview (link to vim), rvim (link to vim), shtags.pl,
176 tcltags, vi (link to vim), view (link to vim), vim, vim132, vim2html.pl,
177 vimdiff (link to vim), vimm, vimspell.sh, vimtutor, and xxd</seg>
178 </seglistitem>
179 </segmentedlist>
180
181 <variablelist>
182 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
183 <?dbfo list-presentation="list"?>
184 <?dbhtml list-presentation="table"?>
185
186 <varlistentry id="efm_filter.pl">
187 <term><command>efm_filter.pl</command></term>
188 <listitem>
189 <para>A filter for creating an error file that can be read
190 by <command>vim</command></para>
191 <indexterm zone="ch-system-vim efm_filter.pl">
192 <primary sortas="b-efm_filter.pl">efm_filter.pl</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="efm_perl.pl">
198 <term><command>efm_perl.pl</command></term>
199 <listitem>
200 <para>Reformats the error messages of the Perl interpreter for use
201 with the <quote>quickfix</quote> mode of <command>vim</command></para>
202 <indexterm zone="ch-system-vim efm_perl.pl">
203 <primary sortas="b-efm_perl.pl">efm_perl.pl</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="ex">
209 <term><command>ex</command></term>
210 <listitem>
211 <para>Starts <command>vim</command> in ex mode</para>
212 <indexterm zone="ch-system-vim ex">
213 <primary sortas="b-ex">ex</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="less.sh">
219 <term><command>less.sh</command></term>
220 <listitem>
221 <para>A script that starts <command>vim</command> with less.vim</para>
222 <indexterm zone="ch-system-vim less.sh">
223 <primary sortas="b-less.sh">less.sh</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="mve.awk">
229 <term><command>mve.awk</command></term>
230 <listitem>
231 <para>Processes <command>vim</command> errors</para>
232 <indexterm zone="ch-system-vim mve.awk">
233 <primary sortas="b-mve.awk">mve.awk</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="pltags.pl">
239 <term><command>pltags.pl</command></term>
240 <listitem>
241 <para>Creates a tags file for Perl code for use by
242 <command>vim</command></para>
243 <indexterm zone="ch-system-vim pltags.pl">
244 <primary sortas="b-pltags.pl">pltags.pl</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="ref">
250 <term><command>ref</command></term>
251 <listitem>
252 <para>Checks the spelling of arguments</para>
253 <indexterm zone="ch-system-vim ref">
254 <primary sortas="b-ref">ref</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="rview">
260 <term><command>rview</command></term>
261 <listitem>
262 <para>Is a restricted version of <command>view</command>; no shell
263 commands can be started and <command>view</command> cannot be
264 suspended</para>
265 <indexterm zone="ch-system-vim rview">
266 <primary sortas="b-rview">rview</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="rvim">
272 <term><command>rvim</command></term>
273 <listitem>
274 <para>Is a restricted version of <command>vim</command>; no shell
275 commands can be started and <command>vim</command> cannot be
276 suspended</para>
277 <indexterm zone="ch-system-vim rvim">
278 <primary sortas="b-rvim">rvim</primary>
279 </indexterm>
280 </listitem>
281 </varlistentry>
282
283 <varlistentry id="shtags.pl">
284 <term><command>shtags.pl</command></term>
285 <listitem>
286 <para>Generates a tags file for Perl scripts</para>
287 <indexterm zone="ch-system-vim shtags.pl">
288 <primary sortas="b-shtags.pl">shtags.pl</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="tcltags">
294 <term><command>tcltags</command></term>
295 <listitem>
296 <para>Generates a tags file for TCL code</para>
297 <indexterm zone="ch-system-vim tcltags">
298 <primary sortas="b-tcltags">tcltags</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="view">
304 <term><command>view</command></term>
305 <listitem>
306 <para>Starts <command>vim</command> in read-only mode</para>
307 <indexterm zone="ch-system-vim view">
308 <primary sortas="b-view">view</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry id="vi">
314 <term><command>vi</command></term>
315 <listitem>
316 <para>Link to <command>vim</command></para>
317 <indexterm zone="ch-system-vim vi">
318 <primary sortas="b-vi">vi</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="vim">
324 <term><command>vim</command></term>
325 <listitem>
326 <para>Is the editor</para>
327 <indexterm zone="ch-system-vim vim">
328 <primary sortas="b-vim">vim</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="vim132">
334 <term><command>vim132</command></term>
335 <listitem>
336 <para>Starts <command>vim</command> with the terminal in 132-column
337 mode</para>
338 <indexterm zone="ch-system-vim vim132">
339 <primary sortas="b-vim132">vim132</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="vim2html.pl">
345 <term><command>vim2html.pl</command></term>
346 <listitem>
347 <para>Converts Vim documentation to HypterText Markup Language
348 (HTML)</para>
349 <indexterm zone="ch-system-vim vim2html.pl">
350 <primary sortas="b-vim2html.pl">vim2html.pl</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="vimdiff">
356 <term><command>vimdiff</command></term>
357 <listitem>
358 <para>Edits two or three versions of a file with <command>vim</command>
359 and show differences</para>
360 <indexterm zone="ch-system-vim vimdiff">
361 <primary sortas="b-vimdiff">vimdiff</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
366 <varlistentry id="vimm">
367 <term><command>vimm</command></term>
368 <listitem>
369 <para>Enables the DEC locator input model on a remote terminal</para>
370 <indexterm zone="ch-system-vim vimm">
371 <primary sortas="b-vimm">vimm</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
376 <varlistentry id="vimspell.sh">
377 <term><command>vimspell.sh</command></term>
378 <listitem>
379 <para>Spell checks a file and generates the syntax statements
380 necessary to highlight in <command>vim</command>. This script
381 requires the old Unix <command>spell</command> command, which
382 is provided neither in LFS nor in BLFS</para>
383 <indexterm zone="ch-system-vim vimspell.sh">
384 <primary sortas="b-vimspell.sh">vimspell.sh</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
389 <varlistentry id="vimtutor">
390 <term><command>vimtutor</command></term>
391 <listitem>
392 <para>Teaches the basic keys and commands of
393 <command>vim</command></para>
394 <indexterm zone="ch-system-vim vimtutor">
395 <primary sortas="b-vimtutor">vimtutor</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
400 <varlistentry id="xxd">
401 <term><command>xxd</command></term>
402 <listitem>
403 <para>Creates a hex dump of the given file; it can
404 also do the reverse, so it can be used for binary patching</para>
405 <indexterm zone="ch-system-vim xxd">
406 <primary sortas="b-xxd">xxd</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 </variablelist>
412
413 </sect2>
414
415</sect1>
Note: See TracBrowser for help on using the repository browser.