source: postlfs/editors/vim.xml@ 96041b5

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 96041b5 was 96041b5, checked in by Bruce Dubbs <bdubbs@…>, 16 months ago

Update to vim-9.0.1060.

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