source: postlfs/editors/vim.xml@ eede1a3

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 eede1a3 was 82731495, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Package updates,
Update to libcap-2.50. Sync with LFS.
Update to vim-8.2.2890. Sync with LFS.

  • 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 "ec8a8ec5f67b0ad0edba82cad2354d33">
12 <!ENTITY vim-size "15 MB">
13 <!ENTITY vim-buildsize "111 MB (add 72 MB for tests)">
14 <!ENTITY vim-time "0.3 SBU (with parallelism=4; add 2.0 SBU for tests)">
15]>
16
17<sect1 id="vim" xreflabel="Vim-&vim-version;">
18 <?dbhtml filename="vim.html"?>
19
20 <sect1info>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Vim-&vim-version;</title>
25
26 <indexterm zone="vim">
27 <primary sortas="a-Vim">Vim</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Vim</title>
32
33 <para>
34 The <application>Vim</application> package, which is an
35 abbreviation for VI IMproved, contains a <command>vi</command>
36 clone with extra features as compared to the original
37 <command>vi</command>.
38 </para>
39
40 <para>
41 The default LFS instructions install <application>vim</application>
42 as a part of the base system. If you would prefer to link
43 <application>vim</application> against <application>X</application>,
44 you should recompile <application>vim</application> to enable GUI mode.
45 There is no need for special instructions since
46 <application>X</application> support is automatically detected.
47 </para>
48
49 <note>
50 <para>
51 The version of vim changes daily. The get the latest
52 version, go to <ulink url="https://github.com/vim/vim/releases">
53 https://github.com/vim/vim/releases</ulink>.
54 </para>
55 </note>
56
57 &lfs101_checked;
58
59 <bridgehead renderas="sect3">Package Information</bridgehead>
60 <itemizedlist spacing="compact">
61 <listitem>
62 <para>
63 Download (HTTP): <ulink url="&vim-download-http;"/>
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Download (FTP): <ulink url="&vim-download-ftp;"/>
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Download MD5 sum: &vim-md5sum;
74 </para>
75 </listitem>
76 <listitem>
77 <para>
78 Download size: &vim-size;
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Estimated disk space required: &vim-buildsize;
84 </para>
85 </listitem>
86 <listitem>
87 <para>
88 Estimated build time: &vim-time;
89 </para>
90 </listitem>
91 </itemizedlist>
92
93 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
94
95 <bridgehead renderas="sect4">Recommended</bridgehead>
96 <para role="recommended">
97 <xref linkend="x-window-system"/> and
98 <xref linkend="gtk3"/>
99 </para>
100
101 <bridgehead renderas="sect4">Optional</bridgehead>
102 <para role="optional">
103 <xref linkend="gpm"/>,
104 <xref linkend="lua"/>,
105<!-- can use python3: don't advertise python2
106 <xref linkend="python2"/>,
107--> <xref linkend="rsync"/>, and
108 <xref linkend="ruby"/>
109 </para>
110
111 <para condition="html" role="usernotes">User Notes:
112 <ulink url="&blfs-wiki;/vim"/></para>
113
114 </sect2>
115
116 <sect2 role="installation">
117 <title>Installation of Vim</title>
118
119 <note>
120 <para>
121 If you recompile <application>Vim</application> to link against
122 <application>X</application> and your <application>X</application>
123 libraries are not on the root partition, you will no longer have an
124 editor for use in emergencies. You may choose to install an additional
125 editor, not link <application>Vim</application> against
126 <application>X</application>, or move the current <command>vim</command>
127 executable to the <filename class="directory">/bin</filename> directory
128 under a different name such as <filename>vi</filename>.
129 </para>
130 </note>
131<!--
132 <para>
133 First, if you are building the Lua interpreter for VIM, adapt it to an
134 API change in lua-5.4.0:
135 </para>
136
137<screen><userinput remap="pre">sed -i '461 s/static int/int/' src/if_lua.c</userinput></screen>
138-->
139 <para>
140 Install <application>Vim</application> by running the following
141 commands:
142 </para>
143
144 <note>
145 <para>
146 If you intend to run the tests and have not installed Xorg in /usr,
147 append LDFLAGS='-L$XORG_PREFIX/lib' to the configure line below.
148 </para>
149 </note>
150
151<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
152echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
153
154./configure --prefix=/usr \
155 --with-features=huge \
156 --enable-gui=gtk3 \
157 --with-tlib=ncursesw &amp;&amp;
158make</userinput></screen>
159
160 <note>
161 <para>
162 If the global configuration file <filename>/etc/vimrc</filename>
163 references the <envar>VIMRUNTIME</envar> environment variable, some
164 tests may complain about being unable to find the corresponding
165 directory and wait for user input. If this is the case, this file
166 should be saved and removed before running the tests.
167 </para>
168 </note>
169
170 <para>
171 To test the results, issue: <command>make -j1 test</command>.
172 Even if one of the tests fails to produce the file
173 <filename>test.out</filename> in <filename
174 class="directory">src/testdir</filename>, the remaining tests will
175 still be executed. If all goes well, the log will report
176 <literal>ALL DONE</literal>. Some tests labelled as
177 <quote>flaky</quote> may fail occasionally and can be ignored.
178 The tests are known to fail if the output is redirected to a file.
179 </para>
180
181 <note>
182 <para>
183 Some color tests expect to be executed under the
184 <command>xterm</command> terminal emulator.
185 </para>
186 </note>
187
188 <para>
189 Now, as the <systemitem class="username">root</systemitem> user:
190 </para>
191
192<screen role="root"><userinput>make install</userinput></screen>
193
194 <para>
195 By default, Vim's documentation is installed in <filename
196 class="directory">/usr/share/vim</filename>. The following symlink allows
197 the documentation to be accessed via <filename
198 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
199 consistent with the location of documentation for other packages:
200 </para>
201
202<!-- When updating, be sure to change the vim-majmin entity for the
203 proper 'vimxx' unpacked directory -->
204
205<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
206
207 <para>
208 If you wish to update the runtime files, issue the
209 following command (requires <xref linkend="rsync"/>):
210 </para>
211
212<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
213 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
214
215 <para>
216 To install the runtime files and regenerate the
217 <filename>tags</filename> file, as the
218 <systemitem class="username">root</systemitem> user issue:
219 </para>
220
221<screen role="root"><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='http://vim.wikia.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.