source: postlfs/editors/vim.xml@ fc7aa029

12.2 lazarus trunk xry111/for-12.3
Last change on this file since fc7aa029 was fc7aa029, checked in by Bruce Dubbs <bdubbs@…>, 5 weeks ago

Update to vim-9.1.0660 (sync with LFS).

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