source: postlfs/editors/vim.xml@ f4002c5

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since f4002c5 was f4002c5, checked in by Bruce Dubbs <bdubbs@…>, 16 months ago

Archive expect, dejagnu, and tcl which are now included in LFS.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23319 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 14.4 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 <!-- only for initial releases of a new version
8 <!ENTITY vim-download-http "http://ftp.vim.org/vim/unix/vim-&vim-version;.tar.bz2">-->
9 <!ENTITY vim-download-http "&sources-anduin-http;/vim/vim-&vim-version;.tar.gz">
10 <!ENTITY vim-download-ftp " ">
11 <!ENTITY vim-md5sum "02b8b91bd2a9a97879fc60616f4eb767">
12 <!ENTITY vim-size "14 MB">
13 <!ENTITY vim-buildsize "142 MB (add 67 MB for tests)">
14 <!ENTITY vim-time "0.3 SBU (with parallelism=4; add 1.9 SBU for tests)">
15]>
16
17<sect1 id="vim" xreflabel="Vim-&vim-version;">
18 <?dbhtml filename="vim.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Vim-&vim-version;</title>
26
27 <indexterm zone="vim">
28 <primary sortas="a-Vim">Vim</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to Vim</title>
33
34 <para>
35 The <application>Vim</application> package, which is an
36 abbreviation for VI IMproved, contains a <command>vi</command>
37 clone with extra features as compared to the original
38 <command>vi</command>.
39 </para>
40
41 <para>
42 The default LFS instructions install <application>vim</application>
43 as a part of the base system. If you would prefer to link
44 <application>vim</application> against <application>X</application>,
45 you should recompile <application>vim</application> to enable GUI mode.
46 There is no need for special instructions since
47 <application>X</application> support is automatically detected.
48 </para>
49
50 <note>
51 <para>
52 The version of vim changes daily. The get the latest
53 version, go to <ulink url="https://github.com/vim/vim/releases">
54 https://github.com/vim/vim/releases</ulink>.
55 </para>
56 </note>
57
58 &lfs91_checked;
59
60 <bridgehead renderas="sect3">Package Information</bridgehead>
61 <itemizedlist spacing="compact">
62 <listitem>
63 <para>
64 Download (HTTP): <ulink url="&vim-download-http;"/>
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Download (FTP): <ulink url="&vim-download-ftp;"/>
70 </para>
71 </listitem>
72 <listitem>
73 <para>
74 Download MD5 sum: &vim-md5sum;
75 </para>
76 </listitem>
77 <listitem>
78 <para>
79 Download size: &vim-size;
80 </para>
81 </listitem>
82 <listitem>
83 <para>
84 Estimated disk space required: &vim-buildsize;
85 </para>
86 </listitem>
87 <listitem>
88 <para>
89 Estimated build time: &vim-time;
90 </para>
91 </listitem>
92 </itemizedlist>
93
94 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
95
96 <bridgehead renderas="sect4">Recommended</bridgehead>
97 <para role="recommended">
98 <xref linkend="x-window-system"/> and
99 <xref linkend="gtk3"/>
100 </para>
101
102 <bridgehead renderas="sect4">Optional</bridgehead>
103 <para role="optional">
104 <xref linkend="gpm"/>,
105 <xref linkend="lua"/>,
106 <xref linkend="python2"/>,
107 <xref linkend="rsync"/> and
108 <xref linkend="ruby"/><!-- , and
109 <xref linkend="tcl"/> -->
110 </para>
111
112 <para condition="html" role="usernotes">User Notes:
113 <ulink url="&blfs-wiki;/vim"/></para>
114
115 </sect2>
116
117 <sect2 role="installation">
118 <title>Installation of Vim</title>
119
120 <note>
121 <para>
122 If you recompile <application>Vim</application> to link against
123 <application>X</application> and your <application>X</application>
124 libraries are not on the root partition, you will no longer have an
125 editor for use in emergencies. You may choose to install an additional
126 editor, not link <application>Vim</application> against
127 <application>X</application>, or move the current <command>vim</command>
128 executable to the <filename class="directory">/bin</filename> directory
129 under a different name such as <filename>vi</filename>.
130 </para>
131 </note>
132
133 <para>
134 Install <application>Vim</application> by running the following
135 commands:
136 </para>
137
138<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
139echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
140
141./configure --prefix=/usr \
142 --with-features=huge \
143 --enable-gui=gtk3 \
144 --with-tlib=ncursesw &amp;&amp;
145make</userinput></screen>
146
147 <note>
148 <para>
149 If the global configuration file <filename>/etc/vimrc</filename>
150 references the <envar>VIMRUNTIME</envar> environment variable, some
151 tests may complain about being unable to find the corresponding
152 directory and wait for user input. If this is the case, this file
153 should be saved and removed before running the tests.
154 </para>
155 </note>
156
157 <para>
158 To test the results, issue: <command>make -j1 test</command>.
159 Even if one of the tests fails to produce the file
160 <filename>test.out</filename> in <filename
161 class="directory">src/testdir</filename>, the remaining tests will
162 still be executed. If all goes well, the log will report
163 <literal>ALL DONE</literal>. Some tests labelled as
164 <quote>flaky</quote> may fail occasionally and can be ignored.
165 </para>
166
167 <note>
168 <para>
169 Some color tests expect to be executed under the
170 <command>xterm</command> terminal emulator.
171 </para>
172 </note>
173
174 <para>
175 Now, as the <systemitem class="username">root</systemitem> user:
176 </para>
177
178<screen role="root"><userinput>make install</userinput></screen>
179
180 <para>
181 By default, Vim's documentation is installed in <filename
182 class="directory">/usr/share/vim</filename>. The following symlink allows
183 the documentation to be accessed via <filename
184 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
185 consistent with the location of documentation for other packages:
186 </para>
187
188<!-- When updating, be sure to change the vim-majmin entity for the
189 proper 'vimxx' unpacked directory -->
190
191<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
192
193 <para>
194 If you wish to update the runtime files, issue the
195 following command (requires <xref linkend="rsync"/>):
196 </para>
197
198<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
199 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
200
201 <para>
202 To install the runtime files and regenerate the
203 <filename>tags</filename> file, as the
204 <systemitem class="username">root</systemitem> user issue:
205 </para>
206
207<screen role="root"><userinput>make -C src installruntime &amp;&amp;
208vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
209
210 </sect2>
211
212 <sect2 role="commands">
213 <title>Command Explanations</title>
214
215 <para>
216 <parameter>--with-features=huge</parameter>: This switch enables all
217 the additional features available in <application>Vim</application>,
218 including support for multibyte characters.
219 </para>
220
221 <para>
222 <parameter>--with-tlib=ncursesw</parameter>: This switch forces Vim to
223 link against the <filename class="libraryfile">libncursesw</filename>
224 library.
225 </para>
226
227 <para>
228 <option>--enable-gui=no</option>: This will prevent compilation of the
229 GUI. <application>Vim</application> will still link against
230 <application>X</application>, so that some features such as the
231 client-server model or the x11-selection (clipboard) are still available.
232 </para>
233
234 <para>
235 <option>--without-x</option>: If you prefer not to link
236 <application>Vim</application> against <application>X</application>, use
237 this switch.
238 </para>
239
240 <para>
241 <option>--enable-perlinterp</option>,
242 <option>--enable-pythoninterp</option>,
243 <option>--enable-tclinterp</option>,
244 <option>--enable-rubyinterp</option>:
245 These options include the Perl, Python, Tcl, or Ruby interpreters that
246 allow using other application code in <application>vim</application>
247 scripts.
248 </para>
249
250 </sect2>
251
252 <sect2 role="configuration">
253 <title>Configuring Vim</title>
254
255 <sect3 id='vim-config'>
256 <title>Config Files</title>
257
258 <para>
259 <filename>/etc/vimrc</filename> and
260 <filename>~/.vimrc</filename>
261 </para>
262
263 <indexterm zone="vim vim-config">
264 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
265 </indexterm>
266
267 <indexterm zone="vim vim-config">
268 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
269 </indexterm>
270
271 </sect3>
272<!-- there are now desktop files shipped with the package
273 <sect3 id='vim-desktop'>
274 <title>Desktop File</title>
275
276 <para>
277 If desired, create a menu entry for graphical vim,
278 <filename>gvim.desktop</filename>, as the <systemitem
279 class="username">root</systemitem> user
280 </para>
281
282<screen role="root"><userinput>cat &gt; /usr/share/applications/gvim.desktop &lt;&lt; "EOF"
283<literal>[Desktop Entry]
284Name=GVim Text Editor
285Comment=Edit text files
286Comment[pt_BR]=Edite arquivos de texto
287TryExec=gvim
288Exec=gvim -f %F
289Terminal=false
290Type=Application
291Icon=gvim.png
292Categories=Utility;TextEditor;
293StartupNotify=true
294MimeType=text/plain;</literal>
295EOF</userinput></screen>
296
297 </sect3>
298-->
299 <sect3 id='vim-init'>
300 <title>Configuration Information</title>
301
302 <para>
303 <application>Vim</application> has an integrated spell checker
304 which you can enable by issuing the following in a vim window:
305 </para>
306
307<screen><literal>:setlocal spell spelllang=ru</literal></screen>
308
309 <para>
310 This setting will enable spell checking for the Russian
311 language for the current session.
312 </para>
313
314 <para>
315 By default, <application>Vim</application> only installs spell
316 files for the English language. If a spell file is not available for
317 a language, then <application>Vim</application> will call the
318 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will
319 try to obtain the *.spl and optionally *.sug from the vim ftp server,
320 by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
321 plugin.
322 </para>
323
324<!-- When updating, be sure to change the line below for the proper 'vimxx'
325 unpacked directory -->
326 <para>
327 Alternatively you can manually download the *.spl and *.sug files
328 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
329 them to <filename class="directory"> ~/.vim/spell </filename> or in
330 <filename
331 class="directory">/usr/share/vim/vim&vim-majmin;/spell/</filename>.
332 </para>
333
334 <para>
335 To find out what's new in <application>Vim-&vim-version;</application>
336 issue the following command:
337 </para>
338
339<screen><literal>:help version-&vim-version;</literal></screen>
340
341 <para>
342 For additional information on setting up
343 <application>Vim</application> configuration files, see <xref
344 linkend="postlfs-config-vimrc"/> and <ulink
345 url='http://vim.wikia.com/wiki/Example_vimrc'/>.
346 </para>
347
348 </sect3>
349
350 </sect2>
351
352 <sect2 role="content">
353 <title>Contents</title>
354
355 <para>
356 A list of the reinstalled files, along with their short
357 descriptions can be found in the <ulink
358 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
359 Instructions</ulink>
360 </para>
361
362 <segmentedlist>
363 <segtitle>Installed Programs</segtitle>
364 <segtitle>Installed Libraries</segtitle>
365 <segtitle>Installed Directory</segtitle>
366
367 <seglistitem>
368 <seg>gview, gvim, gvimdiff, gvimtutor, rgview, and rgvim</seg>
369 <seg>None</seg>
370 <seg>/usr/share/vim</seg>
371 </seglistitem>
372 </segmentedlist>
373
374 <variablelist>
375 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
376 <?dbfo list-presentation="list"?>
377 <?dbhtml list-presentation="table"?>
378
379 <varlistentry id="gview">
380 <term><command>gview</command></term>
381 <listitem>
382 <para>
383 starts <command>gvim</command> in read-only mode.
384 </para>
385 <indexterm zone="vim gview">
386 <primary sortas="b-gview">gview</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="gvim">
392 <term><command>gvim</command></term>
393 <listitem>
394 <para>
395 is the editor that runs under <application>X</application>
396 and includes a GUI.
397 </para>
398 <indexterm zone="vim gvim">
399 <primary sortas="b-gvim">gvim</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="gvimdiff">
405 <term><command>gvimdiff</command></term>
406 <listitem>
407 <para>
408 edits two or three versions of a file with
409 <command>gvim</command> and shows the differences.
410 </para>
411 <indexterm zone="vim gvimdiff">
412 <primary sortas="b-gvimdiff">gvimdiff</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 <varlistentry id="gvimtutor">
418 <term><command>gvimtutor</command></term>
419 <listitem>
420 <para>
421 teaches the basic keys and commands of
422 <command>gvim</command>.
423 </para>
424 <indexterm zone="vim gvimtutor">
425 <primary sortas="b-gvimtutor">gvimtutor</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="rgview">
431 <term><command>rgview</command></term>
432 <listitem>
433 <para>
434 is a restricted version of <command>gview</command>.
435 </para>
436 <indexterm zone="vim rgview">
437 <primary sortas="b-rgview">rgview</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="rgvim">
443 <term><command>rgvim</command></term>
444 <listitem>
445 <para>
446 is a restricted version of <command>gvim</command>.
447 </para>
448 <indexterm zone="vim gvim">
449 <primary sortas="b-gvim">gvim</primary>
450 </indexterm>
451 </listitem>
452 </varlistentry>
453
454 </variablelist>
455
456 </sect2>
457
458</sect1>
Note: See TracBrowser for help on using the repository browser.