source: postlfs/editors/vim.xml@ f716ef4

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 f716ef4 was f716ef4, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format "editors"

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

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