source: postlfs/editors/vim.xml@ eb7de89

10.0 10.1 11.0 11.1 11.2 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since eb7de89 was eb7de89, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to lua-5.4.0
VIM: Adapt Lua interface to Lua-5.4
Apache/httpd: Adapt Lua module to Lua-5.4
Brotli: Remove invalid dependency on lua, there is a separate package that provides one, and it's not bundled with our download of Brotli
Dovecot: Add a command explanation describing how to build Lua support
Lua-5.2: Minor adjustment to installed files
Hexchat: Promote libcanberra to recommended

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

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