source: chapter06/vim.xml@ 2791a8e

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 2791a8e was 2791a8e, checked in by Matthew Burgess <matthew@…>, 17 years ago

Update the list of installed programs and libraries for several packages

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8125 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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