source: postlfs/editors/vim.xml@ f3d413ca

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

Tags for editors and typesetting

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

  • Property mode set to 100644
File size: 14.9 KB
RevLine 
[b5951ec]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[b5951ec]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[6c3fd4d]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">-->
[14430302]9 <!ENTITY vim-download-http "&sources-anduin-http;/vim/vim-&vim-version;.tar.gz">
[83ec6939]10 <!ENTITY vim-download-ftp " ">
[008ae5ea]11 <!ENTITY vim-md5sum "a26555c8919cf40938d2428d834bf913">
[ac9d47a7]12 <!ENTITY vim-size "15 MB">
[3940f2f]13 <!ENTITY vim-buildsize "110 MB (add 71 MB for tests)">
[008ae5ea]14 <!ENTITY vim-time "0.4 SBU (with parallelism=4; add 1.4 SBU for tests)">
[b5951ec]15]>
16
[28badf4]17<sect1 id="vim" xreflabel="Vim-&vim-version;">
[0ec75653]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
[f716ef4]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>
[14430302]57
[f3d413ca]58 &lfs101_checked;
[1db225b]59
[0ec75653]60 <bridgehead renderas="sect3">Package Information</bridgehead>
61 <itemizedlist spacing="compact">
62 <listitem>
[f716ef4]63 <para>
64 Download (HTTP): <ulink url="&vim-download-http;"/>
65 </para>
[0ec75653]66 </listitem>
67 <listitem>
[f716ef4]68 <para>
69 Download (FTP): <ulink url="&vim-download-ftp;"/>
70 </para>
[0ec75653]71 </listitem>
72 <listitem>
[f716ef4]73 <para>
74 Download MD5 sum: &vim-md5sum;
75 </para>
[0ec75653]76 </listitem>
77 <listitem>
[f716ef4]78 <para>
79 Download size: &vim-size;
80 </para>
[0ec75653]81 </listitem>
82 <listitem>
[f716ef4]83 <para>
84 Estimated disk space required: &vim-buildsize;
85 </para>
[0ec75653]86 </listitem>
87 <listitem>
[f716ef4]88 <para>
89 Estimated build time: &vim-time;
90 </para>
[0ec75653]91 </listitem>
92 </itemizedlist>
93
[3493b1f]94 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
[0ec75653]95
96 <bridgehead renderas="sect4">Recommended</bridgehead>
[668844b]97 <para role="recommended">
98 <xref linkend="x-window-system"/> and
[0c25796]99 <xref linkend="gtk3"/>
[668844b]100 </para>
[0ec75653]101
102 <bridgehead renderas="sect4">Optional</bridgehead>
[3b10fa8]103 <para role="optional">
[646a42e]104 <xref linkend="gpm"/>,
105 <xref linkend="lua"/>,
[4716d52]106 <xref linkend="python2"/>,
[f4002c5]107 <xref linkend="rsync"/> and
108 <xref linkend="ruby"/><!-- , and
109 <xref linkend="tcl"/> -->
[3b10fa8]110 </para>
[0ec75653]111
[3597eb6]112 <para condition="html" role="usernotes">User Notes:
113 <ulink url="&blfs-wiki;/vim"/></para>
114
[0ec75653]115 </sect2>
116
117 <sect2 role="installation">
118 <title>Installation of Vim</title>
119
120 <note>
[f716ef4]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>
[0ec75653]131 </note>
[cdae315]132<!--
[eb7de89]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
[34a065c]138<screen><userinput remap="pre">sed -i '461 s/static int/int/' src/if_lua.c</userinput></screen>
[cdae315]139-->
[f716ef4]140 <para>
141 Install <application>Vim</application> by running the following
142 commands:
143 </para>
[b5951ec]144
[ac9d47a7]145 <note>
146 <para>
147 If you intend to run the tests and have not installed Xorg in /usr, append
148 LDFLAGS='-L$XORG_PROFIX/lib' to the configure line below.
149 </para>
150 </note>
151
[d659cbe]152<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
[b5951ec]153echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
[646a42e]154
[0c25796]155./configure --prefix=/usr \
[1eb874ce]156 --with-features=huge \
[0c25796]157 --enable-gui=gtk3 \
[1eb874ce]158 --with-tlib=ncursesw &amp;&amp;
[0ec75653]159make</userinput></screen>
160
[ae44cab]161 <note>
162 <para>
163 If the global configuration file <filename>/etc/vimrc</filename>
164 references the <envar>VIMRUNTIME</envar> environment variable, some
165 tests may complain about being unable to find the corresponding
166 directory and wait for user input. If this is the case, this file
167 should be saved and removed before running the tests.
168 </para>
169 </note>
170
[f716ef4]171 <para>
[ae44cab]172 To test the results, issue: <command>make -j1 test</command>.
[f716ef4]173 Even if one of the tests fails to produce the file
174 <filename>test.out</filename> in <filename
175 class="directory">src/testdir</filename>, the remaining tests will
[ae44cab]176 still be executed. If all goes well, the log will report
177 <literal>ALL DONE</literal>. Some tests labelled as
178 <quote>flaky</quote> may fail occasionally and can be ignored.
[ac9d47a7]179 The tests are known to fail if the output is redirected to a file.
[f716ef4]180 </para>
[83d6546]181
[ae44cab]182 <note>
183 <para>
184 Some color tests expect to be executed under the
185 <command>xterm</command> terminal emulator.
186 </para>
187 </note>
188
[f716ef4]189 <para>
190 Now, as the <systemitem class="username">root</systemitem> user:
191 </para>
[0ec75653]192
193<screen role="root"><userinput>make install</userinput></screen>
194
[f716ef4]195 <para>
196 By default, Vim's documentation is installed in <filename
197 class="directory">/usr/share/vim</filename>. The following symlink allows
198 the documentation to be accessed via <filename
199 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
200 consistent with the location of documentation for other packages:
201 </para>
[841a93f]202
[5f4e73e]203<!-- When updating, be sure to change the vim-majmin entity for the
204 proper 'vimxx' unpacked directory -->
[841a93f]205
[e042e4ce]206<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
[95799899]207
[f716ef4]208 <para>
209 If you wish to update the runtime files, issue the
210 following command (requires <xref linkend="rsync"/>):
211 </para>
[fd7e0ed6]212
[dc69310d]213<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
[32d0e29]214 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
[6e11352]215
[f716ef4]216 <para>
217 To install the runtime files and regenerate the
218 <filename>tags</filename> file, as the
219 <systemitem class="username">root</systemitem> user issue:
220 </para>
[6e11352]221
[2202183]222<screen role="root"><userinput>make -C src installruntime &amp;&amp;
223vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
[6e11352]224
[0ec75653]225 </sect2>
226
227 <sect2 role="commands">
228 <title>Command Explanations</title>
229
[f716ef4]230 <para>
231 <parameter>--with-features=huge</parameter>: This switch enables all
232 the additional features available in <application>Vim</application>,
233 including support for multibyte characters.
234 </para>
[0ec75653]235
[1eb874ce]236 <para>
237 <parameter>--with-tlib=ncursesw</parameter>: This switch forces Vim to
238 link against the <filename class="libraryfile">libncursesw</filename>
239 library.
240 </para>
241
[f716ef4]242 <para>
243 <option>--enable-gui=no</option>: This will prevent compilation of the
244 GUI. <application>Vim</application> will still link against
245 <application>X</application>, so that some features such as the
246 client-server model or the x11-selection (clipboard) are still available.
247 </para>
[9f12e36]248
[f716ef4]249 <para>
250 <option>--without-x</option>: If you prefer not to link
251 <application>Vim</application> against <application>X</application>, use
252 this switch.
253 </para>
[0ec75653]254
[f716ef4]255 <para>
[eb7de89]256 <option>--enable-luainterp</option>,
[f716ef4]257 <option>--enable-perlinterp</option>,
258 <option>--enable-pythoninterp</option>,
259 <option>--enable-tclinterp</option>,
260 <option>--enable-rubyinterp</option>:
[eb7de89]261 These options include the Lua, Perl, Python, Tcl, or Ruby interpreters that
[f716ef4]262 allow using other application code in <application>vim</application>
263 scripts.
264 </para>
[864b24de]265
[95799899]266 </sect2>
267
268 <sect2 role="configuration">
269 <title>Configuring Vim</title>
270
271 <sect3 id='vim-config'>
272 <title>Config Files</title>
273
[f716ef4]274 <para>
275 <filename>/etc/vimrc</filename> and
276 <filename>~/.vimrc</filename>
277 </para>
[95799899]278
279 <indexterm zone="vim vim-config">
280 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
281 </indexterm>
282
283 <indexterm zone="vim vim-config">
284 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
285 </indexterm>
286
287 </sect3>
[ae44cab]288<!-- there are now desktop files shipped with the package
[7a2aeb5]289 <sect3 id='vim-desktop'>
290 <title>Desktop File</title>
291
292 <para>
293 If desired, create a menu entry for graphical vim,
294 <filename>gvim.desktop</filename>, as the <systemitem
295 class="username">root</systemitem> user
296 </para>
297
298<screen role="root"><userinput>cat &gt; /usr/share/applications/gvim.desktop &lt;&lt; "EOF"
299<literal>[Desktop Entry]
300Name=GVim Text Editor
301Comment=Edit text files
302Comment[pt_BR]=Edite arquivos de texto
303TryExec=gvim
304Exec=gvim -f %F
305Terminal=false
306Type=Application
307Icon=gvim.png
308Categories=Utility;TextEditor;
309StartupNotify=true
310MimeType=text/plain;</literal>
311EOF</userinput></screen>
312
313 </sect3>
[ae44cab]314-->
[95799899]315 <sect3 id='vim-init'>
316 <title>Configuration Information</title>
317
[f716ef4]318 <para>
319 <application>Vim</application> has an integrated spell checker
[ae44cab]320 which you can enable by issuing the following in a vim window:
[6e11352]321 </para>
[864b24de]322
[6e11352]323<screen><literal>:setlocal spell spelllang=ru</literal></screen>
[fd7e0ed6]324
[f716ef4]325 <para>
326 This setting will enable spell checking for the Russian
327 language for the current session.
328 </para>
[864b24de]329
[f716ef4]330 <para>
331 By default, <application>Vim</application> only installs spell
332 files for the English language. If a spell file is not available for
333 a language, then <application>Vim</application> will call the
334 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will
335 try to obtain the *.spl and optionally *.sug from the vim ftp server,
336 by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
337 plugin.
338 </para>
[864b24de]339
[f716ef4]340<!-- When updating, be sure to change the line below for the proper 'vimxx'
341 unpacked directory -->
342 <para>
343 Alternatively you can manually download the *.spl and *.sug files
344 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
345 them to <filename class="directory"> ~/.vim/spell </filename> or in
346 <filename
347 class="directory">/usr/share/vim/vim&vim-majmin;/spell/</filename>.
348 </para>
[864b24de]349
[f716ef4]350 <para>
351 To find out what's new in <application>Vim-&vim-version;</application>
352 issue the following command:
353 </para>
[95799899]354
[6e11352]355<screen><literal>:help version-&vim-version;</literal></screen>
[95799899]356
[f716ef4]357 <para>
358 For additional information on setting up
359 <application>Vim</application> configuration files, see <xref
360 linkend="postlfs-config-vimrc"/> and <ulink
361 url='http://vim.wikia.com/wiki/Example_vimrc'/>.
362 </para>
[95799899]363
364 </sect3>
365
[0ec75653]366 </sect2>
367
368 <sect2 role="content">
369 <title>Contents</title>
370
[f716ef4]371 <para>
372 A list of the reinstalled files, along with their short
[4c24eb0a]373 descriptions can be found in the
374 <ulink url="&lfs-root;/chapter08/vim.html#contents-vim">LFS Vim
375 Installation Instructions</ulink>.
[f716ef4]376 </para>
[0ec75653]377
378 <segmentedlist>
379 <segtitle>Installed Programs</segtitle>
380 <segtitle>Installed Libraries</segtitle>
381 <segtitle>Installed Directory</segtitle>
382
383 <seglistitem>
[0c25796]384 <seg>gview, gvim, gvimdiff, gvimtutor, rgview, and rgvim</seg>
[0ec75653]385 <seg>None</seg>
386 <seg>/usr/share/vim</seg>
387 </seglistitem>
388 </segmentedlist>
389
390 <variablelist>
391 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
392 <?dbfo list-presentation="list"?>
393 <?dbhtml list-presentation="table"?>
394
395 <varlistentry id="gview">
396 <term><command>gview</command></term>
397 <listitem>
[f716ef4]398 <para>
[4c24eb0a]399 starts <command>gvim</command> in read-only mode
[f716ef4]400 </para>
[0ec75653]401 <indexterm zone="vim gview">
402 <primary sortas="b-gview">gview</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="gvim">
408 <term><command>gvim</command></term>
409 <listitem>
[f716ef4]410 <para>
411 is the editor that runs under <application>X</application>
[4c24eb0a]412 and includes a GUI
[f716ef4]413 </para>
[0ec75653]414 <indexterm zone="vim gvim">
415 <primary sortas="b-gvim">gvim</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="gvimdiff">
421 <term><command>gvimdiff</command></term>
422 <listitem>
[f716ef4]423 <para>
424 edits two or three versions of a file with
[4c24eb0a]425 <command>gvim</command> and shows the differences
[f716ef4]426 </para>
[0ec75653]427 <indexterm zone="vim gvimdiff">
428 <primary sortas="b-gvimdiff">gvimdiff</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
[0c25796]433 <varlistentry id="gvimtutor">
434 <term><command>gvimtutor</command></term>
435 <listitem>
[f716ef4]436 <para>
437 teaches the basic keys and commands of
[4c24eb0a]438 <command>gvim</command>
[f716ef4]439 </para>
[0c25796]440 <indexterm zone="vim gvimtutor">
441 <primary sortas="b-gvimtutor">gvimtutor</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
[0ec75653]446 <varlistentry id="rgview">
447 <term><command>rgview</command></term>
448 <listitem>
[f716ef4]449 <para>
[4c24eb0a]450 is a restricted version of <command>gview</command>
[f716ef4]451 </para>
[0ec75653]452 <indexterm zone="vim rgview">
453 <primary sortas="b-rgview">rgview</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="rgvim">
459 <term><command>rgvim</command></term>
460 <listitem>
[f716ef4]461 <para>
[4c24eb0a]462 is a restricted version of <command>gvim</command>
[f716ef4]463 </para>
[0ec75653]464 <indexterm zone="vim gvim">
465 <primary sortas="b-gvim">gvim</primary>
466 </indexterm>
467 </listitem>
468 </varlistentry>
469
470 </variablelist>
471
472 </sect2>
[f45b1953]473
474</sect1>
Note: See TracBrowser for help on using the repository browser.