source: postlfs/editors/vim.xml@ 865bebd

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 865bebd was 865bebd, checked in by Pierre Labastie <pieere@…>, 4 years ago

Vim-8.2.0190 + tag

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

  • Property mode set to 100644
File size: 13.2 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">-->
9 <!ENTITY vim-download-http "http://github.com/vim/vim/archive/v&vim-version;/vim-&vim-version;.tar.gz">
[83ec6939]10 <!ENTITY vim-download-ftp " ">
[865bebd]11 <!ENTITY vim-md5sum "f5337b1170df90e644a636539a0313a3">
[0c25796]12 <!ENTITY vim-size "14 MB">
[865bebd]13 <!ENTITY vim-buildsize "146 MB (add 71 MB for tests)">
14 <!ENTITY vim-time "1 SBU (add 2.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
34 <para>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>.</para>
38
39 <para>The default LFS instructions install <application>vim</application>
[3aa07d1]40 as a part of the base system. If you would prefer to link
41 <application>vim</application> against <application>X</application>,
42 you should recompile <application>vim</application> to enable GUI mode.
43 There is no need for special instructions since
[0ec75653]44 <application>X</application> support is automatically detected.</para>
45
[865bebd]46 &lfs91_checked;
[1db225b]47
[0ec75653]48 <bridgehead renderas="sect3">Package Information</bridgehead>
49 <itemizedlist spacing="compact">
50 <listitem>
51 <para>Download (HTTP): <ulink url="&vim-download-http;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download (FTP): <ulink url="&vim-download-ftp;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download MD5 sum: &vim-md5sum;</para>
58 </listitem>
59 <listitem>
60 <para>Download size: &vim-size;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated disk space required: &vim-buildsize;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated build time: &vim-time;</para>
67 </listitem>
68 </itemizedlist>
69
[3493b1f]70 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
[0ec75653]71
72 <bridgehead renderas="sect4">Recommended</bridgehead>
[668844b]73 <para role="recommended">
74 <xref linkend="x-window-system"/> and
[0c25796]75 <xref linkend="gtk3"/>
[668844b]76 </para>
[0ec75653]77
78 <bridgehead renderas="sect4">Optional</bridgehead>
[3b10fa8]79 <para role="optional">
[646a42e]80 <xref linkend="gpm"/>,
81 <xref linkend="lua"/>,
[4716d52]82 <xref linkend="python2"/>,
[0c25796]83 <xref linkend="rsync"/>,
[abafd44]84 <xref linkend="ruby"/>, and
85 <xref linkend="tcl"/>
[3b10fa8]86 </para>
[0ec75653]87
[3597eb6]88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/vim"/></para>
90
[0ec75653]91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of Vim</title>
95
96 <note>
[3aa07d1]97 <para>If you recompile <application>Vim</application> to link against
[32d0e29]98 <application>X</application> and your <application>X</application>
[646a42e]99 libraries are not on the root partition, you will no longer have an
100 editor for use in emergencies. You may choose to install an additional
101 editor, not link <application>Vim</application> against
[d612b9f]102 <application>X</application>, or move the current <command>vim</command>
[3aa07d1]103 executable to the <filename class="directory">/bin</filename> directory
[0ec75653]104 under a different name such as <filename>vi</filename>.</para>
105 </note>
106
107 <para>Install <application>Vim</application> by running the following
108 commands:</para>
[b5951ec]109
[d659cbe]110<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
[b5951ec]111echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
[646a42e]112
[0c25796]113./configure --prefix=/usr \
[1eb874ce]114 --with-features=huge \
[0c25796]115 --enable-gui=gtk3 \
[1eb874ce]116 --with-tlib=ncursesw &amp;&amp;
[0ec75653]117make</userinput></screen>
118
[83d6546]119 <para>To test the results, issue: <command>make test</command>.
120 The <application>vim</application> test suite outputs a lot of binary
121 data to the screen, which can cause issues with the settings of the
122 current terminal. This can be resolved by redirecting the output to a
123 log file. Even if one of the tests fails to produce the file
124 <filename>test.out</filename> in <filename
125 class="directory">src/testdir</filename>, the remaining tests will still
[6c3fd4d]126 be executed. If all goes well,the log will report <literal>ALL DONE</literal>.
127 <emphasis>Note</emphasis>: Some color tests
[83d6546]128 expect to be executed under the <command>xterm</command> terminal
[c497e49]129 emulator. Three tests are known to fail occasionally and can be ignored.</para>
[83d6546]130
[0ec75653]131 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
132
133<screen role="root"><userinput>make install</userinput></screen>
134
[95799899]135 <para>By default, Vim's documentation is installed in <filename
136 class="directory">/usr/share/vim</filename>. The following symlink allows
137 the documentation to be accessed via <filename
[6e11352]138 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
139 consistent with the location of documentation for other packages:</para>
[841a93f]140
[5f4e73e]141<!-- When updating, be sure to change the vim-majmin entity for the
142 proper 'vimxx' unpacked directory -->
[841a93f]143
[e042e4ce]144<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
[95799899]145
[6ae4193]146 <para>If you wish to update the runtime files, issue the
147 following command (requires <xref linkend="rsync"/>):</para>
[fd7e0ed6]148
[dc69310d]149<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
[32d0e29]150 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
[6e11352]151
[32d0e29]152 <para>To install the runtime files and regenerate the
153 <filename>tags</filename> file, as the
154 <systemitem class="username">root</systemitem> user issue:</para>
[6e11352]155
[2202183]156<screen role="root"><userinput>make -C src installruntime &amp;&amp;
157vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
[6e11352]158
[0ec75653]159 </sect2>
160
161 <sect2 role="commands">
162 <title>Command Explanations</title>
163
[3aa07d1]164 <para><parameter>--with-features=huge</parameter>: This switch enables all
[6e76796]165 the additional features available in <application>Vim</application>,
166 including support for multibyte characters.</para>
[0ec75653]167
[1eb874ce]168 <para>
169 <parameter>--with-tlib=ncursesw</parameter>: This switch forces Vim to
170 link against the <filename class="libraryfile">libncursesw</filename>
171 library.
172 </para>
173
[88a2276]174 <para><option>--enable-gui=no</option>: This will prevent compilation of the
175 GUI. <application>Vim</application> will still link against
[6e11352]176 <application>X</application>, so that some features such as the client-server
177 model or the x11-selection (clipboard) are still available.</para>
[9f12e36]178
[4967eaf6]179 <para><option>--without-x</option>: If you prefer not to link
180 <application>Vim</application> against <application>X</application>, use
181 this switch.</para>
[0ec75653]182
[95799899]183 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
[864b24de]184 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
[f8c734f]185 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
[864b24de]186 using other application code in <application>vim</application> scripts.</para>
187
[95799899]188 </sect2>
189
190 <sect2 role="configuration">
191 <title>Configuring Vim</title>
192
193 <sect3 id='vim-config'>
194 <title>Config Files</title>
195
196 <para><filename>/etc/vimrc</filename> and
197 <filename>~/.vimrc</filename></para>
198
199 <indexterm zone="vim vim-config">
200 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
201 </indexterm>
202
203 <indexterm zone="vim vim-config">
204 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
205 </indexterm>
206
207 </sect3>
208
[7a2aeb5]209 <sect3 id='vim-desktop'>
210 <title>Desktop File</title>
211
212 <para>
213 If desired, create a menu entry for graphical vim,
214 <filename>gvim.desktop</filename>, as the <systemitem
215 class="username">root</systemitem> user
216 </para>
217
218<screen role="root"><userinput>cat &gt; /usr/share/applications/gvim.desktop &lt;&lt; "EOF"
219<literal>[Desktop Entry]
220Name=GVim Text Editor
221Comment=Edit text files
222Comment[pt_BR]=Edite arquivos de texto
223TryExec=gvim
224Exec=gvim -f %F
225Terminal=false
226Type=Application
227Icon=gvim.png
228Categories=Utility;TextEditor;
229StartupNotify=true
230MimeType=text/plain;</literal>
231EOF</userinput></screen>
232
233 </sect3>
234
[95799899]235 <sect3 id='vim-init'>
236 <title>Configuration Information</title>
237
[6e11352]238 <para><application>Vim</application> has an integrated spell checker
239 which you can enable it if you issue the following in a vim window:
240 </para>
[864b24de]241
[6e11352]242<screen><literal>:setlocal spell spelllang=ru</literal></screen>
[fd7e0ed6]243
[6e11352]244 <para>This setting will enable spell checking for the Russian
245 language for the current session.</para>
[864b24de]246
[95799899]247 <para>By default, <application>Vim</application> only installs spell
[6e11352]248 files for the English language. If a spell file is not available for
249 a language, then <application>Vim</application> will call the
250 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will try
251 to obtain the *.spl and optionally *.sug from the vim ftp server,
252 by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
253 plugin.</para>
[864b24de]254
[fcb77dd]255<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
256 directory -->
[95799899]257 <para>Alternatively you can manually download the *.spl and *.sug files
258 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
259 them to <filename class="directory"> ~/.vim/spell </filename> or in
[e042e4ce]260 <filename class="directory">/usr/share/vim/vim&vim-majmin;/spell/</filename>.</para>
[864b24de]261
[6e11352]262 <para>To find out what's new in <application>Vim-&vim-version;</application>
263 issue the following command:</para>
[95799899]264
[6e11352]265<screen><literal>:help version-&vim-version;</literal></screen>
[95799899]266
267 <para>For additional information on setting up
268 <application>Vim</application> configuration files, see <xref
269 linkend="postlfs-config-vimrc"/> and <ulink
[f22f1ef3]270 url='http://vim.wikia.com/wiki/Example_vimrc'/>.</para>
[95799899]271
272 </sect3>
273
[0ec75653]274 </sect2>
275
276 <sect2 role="content">
277 <title>Contents</title>
278
[3aa07d1]279 <para>A list of the reinstalled files, along with their short
[95799899]280 descriptions can be found in the <ulink
[864b24de]281 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
[98078a6]282 Instructions</ulink></para>
[0ec75653]283
284 <segmentedlist>
285 <segtitle>Installed Programs</segtitle>
286 <segtitle>Installed Libraries</segtitle>
287 <segtitle>Installed Directory</segtitle>
288
289 <seglistitem>
[0c25796]290 <seg>gview, gvim, gvimdiff, gvimtutor, rgview, and rgvim</seg>
[0ec75653]291 <seg>None</seg>
292 <seg>/usr/share/vim</seg>
293 </seglistitem>
294 </segmentedlist>
295
296 <variablelist>
297 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
298 <?dbfo list-presentation="list"?>
299 <?dbhtml list-presentation="table"?>
300
301 <varlistentry id="gview">
302 <term><command>gview</command></term>
303 <listitem>
304 <para>starts <command>gvim</command> in read-only mode.</para>
305 <indexterm zone="vim gview">
306 <primary sortas="b-gview">gview</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="gvim">
312 <term><command>gvim</command></term>
313 <listitem>
[d612b9f]314 <para>is the editor that runs under <application>X</application>
[13679edb]315 and includes a GUI.</para>
[0ec75653]316 <indexterm zone="vim gvim">
317 <primary sortas="b-gvim">gvim</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="gvimdiff">
323 <term><command>gvimdiff</command></term>
324 <listitem>
325 <para>edits two or three versions of a file with
[13679edb]326 <command>gvim</command> and shows the differences.</para>
[0ec75653]327 <indexterm zone="vim gvimdiff">
328 <primary sortas="b-gvimdiff">gvimdiff</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
[0c25796]333 <varlistentry id="gvimtutor">
334 <term><command>gvimtutor</command></term>
335 <listitem>
336 <para>teaches the basic keys and commands of
337 <command>gvim</command>.</para>
338 <indexterm zone="vim gvimtutor">
339 <primary sortas="b-gvimtutor">gvimtutor</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
[0ec75653]344 <varlistentry id="rgview">
345 <term><command>rgview</command></term>
346 <listitem>
347 <para>is a restricted version of <command>gview</command>.</para>
348 <indexterm zone="vim rgview">
349 <primary sortas="b-rgview">rgview</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry id="rgvim">
355 <term><command>rgvim</command></term>
356 <listitem>
357 <para>is a restricted version of <command>gvim</command>. </para>
358 <indexterm zone="vim gvim">
359 <primary sortas="b-gvim">gvim</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 </variablelist>
365
366 </sect2>
[f45b1953]367
368</sect1>
Note: See TracBrowser for help on using the repository browser.