source: postlfs/editors/vim.xml@ 14430302

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

Make the version of vim in th ebook always available

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

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