source: postlfs/editors/vim.xml@ 40fe030

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 40fe030 was 40fe030, checked in by Bruce Dubbs <bdubbs@…>, 17 years ago

Update to vim 7.1

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

  • Property mode set to 100644
File size: 11.7 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
7 <!ENTITY vim-download-http "http://ftp.at.vim.org/pub/vim/unix/vim-&vim-version;.tar.bz2">
8 <!ENTITY vim-download-ftp "ftp://ftp.vim.org/pub/vim/unix/vim-&vim-version;.tar.bz2">
[40fe030]9 <!ENTITY vim-md5sum "44c6b4914f38d6f9aa959640b89da329">
10 <!ENTITY vim-size "6.6 MB">
11 <!ENTITY vim-buildsize "75 MB">
[e26dfbf7]12 <!ENTITY vim-time "0.8 SBU">
[b5951ec]13]>
14
[28badf4]15<sect1 id="vim" xreflabel="Vim-&vim-version;">
[0ec75653]16 <?dbhtml filename="vim.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Vim-&vim-version;</title>
24
25 <indexterm zone="vim">
26 <primary sortas="a-Vim">Vim</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Vim</title>
31
32 <para>The <application>Vim</application> package, which is an
33 abbreviation for VI IMproved, contains a <command>vi</command>
34 clone with extra features as compared to the original
35 <command>vi</command>.</para>
36
37 <para>The default LFS instructions install <application>vim</application>
[3aa07d1]38 as a part of the base system. If you would prefer to link
39 <application>vim</application> against <application>X</application>,
40 you should recompile <application>vim</application> to enable GUI mode.
41 There is no need for special instructions since
[0ec75653]42 <application>X</application> support is automatically detected.</para>
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&vim-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&vim-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &vim-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &vim-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &vim-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &vim-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
67 <itemizedlist spacing='compact'>
[e26dfbf7]68 <listitem>
69 <para>Recommended Patch: <ulink
70 url="&patch-root;/vim-&vim-version;-mandir-1.patch"/></para>
71 </listitem>
[0ec75653]72 <listitem>
[3aa07d1]73 <para>Translated Vim messages: <ulink
[0ec75653]74 url="http://ftp.at.vim.org/pub/vim/extra/vim-&vim-version;-lang.tar.gz"/>
75 </para>
76 </listitem>
77 </itemizedlist>
78
[3493b1f]79 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
[0ec75653]80
81 <bridgehead renderas="sect4">Recommended</bridgehead>
[e77976f]82 <para role="recommended"><xref linkend="x-window-system"/></para>
[0ec75653]83
84 <bridgehead renderas="sect4">Optional</bridgehead>
[d9dc1e9d]85 <para role="optional"><xref linkend="gtk2"/> OR
[bbaa1db]86 <xref linkend="lesstif"/> OR
87 <xref linkend="GTK"/>,
[3aa07d1]88 <xref linkend="python"/>,
89 <xref linkend="tcl"/>,
[e77976f]90 <xref linkend="ruby"/>, and
91 <xref linkend="gpm"/></para>
[0ec75653]92
[3597eb6]93 <para condition="html" role="usernotes">User Notes:
94 <ulink url="&blfs-wiki;/vim"/></para>
95
[0ec75653]96 </sect2>
97
98 <sect2 role="installation">
99 <title>Installation of Vim</title>
100
101 <note>
[3aa07d1]102 <para>If you recompile <application>Vim</application> to link against
[d612b9f]103 <application>X</application>, and your <application>X</application>
[823b1a3]104 libraries are not on the root partition, you will no longer have an editor
[3aa07d1]105 for use in emergencies. You may choose to install an additional editor,
106 not link <application>Vim</application> against
[d612b9f]107 <application>X</application>, or move the current <command>vim</command>
[3aa07d1]108 executable to the <filename class="directory">/bin</filename> directory
[0ec75653]109 under a different name such as <filename>vi</filename>.</para>
110 </note>
111
112 <para>If desired, unpack the translated messages archive:</para>
113
[8ba8ab5]114<screen><userinput>tar -xf ../vim-&vim-version;-lang.tar.gz --strip-components=1</userinput></screen>
[d612b9f]115
[0ec75653]116 <para>Install <application>Vim</application> by running the following
117 commands:</para>
[b5951ec]118
[40fe030]119<screen><userinput>patch -Np1 -i ../vim-&vim-version;-mandir-1.patch &amp;&amp;
[e26dfbf7]120echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
[b5951ec]121echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
[8e8356d]122./configure --prefix=/usr --with-features=huge &amp;&amp;
[0ec75653]123make</userinput></screen>
124
[83d6546]125 <para>To test the results, issue: <command>make test</command>.
126 The <application>vim</application> test suite outputs a lot of binary
127 data to the screen, which can cause issues with the settings of the
128 current terminal. This can be resolved by redirecting the output to a
129 log file. Even if one of the tests fails to produce the file
130 <filename>test.out</filename> in <filename
131 class="directory">src/testdir</filename>, the remaining tests will still
132 be executed. If all goes well,the final message in the log file will be
133 <literal>ALL DONE</literal>. <emphasis>Note</emphasis>: Some color tests
134 expect to be executed under the <command>xterm</command> terminal
135 emulator.</para>
136
[0ec75653]137 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
138
139<screen role="root"><userinput>make install</userinput></screen>
140
[95799899]141 <para>By default, Vim's documentation is installed in <filename
142 class="directory">/usr/share/vim</filename>. The following symlink allows
143 the documentation to be accessed via <filename
144 class="directory">/usr/share/doc/vim-7.0</filename>, making it consistent
[864b24de]145 with the location of documentation for other packages:</para>
146
147<screen role="root"><userinput>ln -snfv ../vim/vim70/doc /usr/share/doc/vim-7.0</userinput></screen>
[95799899]148
[0ec75653]149 </sect2>
150
151 <sect2 role="commands">
152 <title>Command Explanations</title>
153
[e26dfbf7]154 <para><command>patch &hellip;</command>: These patches are the same as LFS
155 and update the package with upstream patches and ensure the man pages
156 are placed in the proper locations.</para>
157
[3aa07d1]158 <para><parameter>--with-features=huge</parameter>: This switch enables all
[0ec75653]159 the additional features available in <application>Vim</application>.</para>
160
[88a2276]161 <para><option>--enable-gui=no</option>: This will prevent compilation of the
162 GUI. <application>Vim</application> will still link against
163 <application>X</application> so that some nice eye-candy such as updating the
164 title bar of an <application>Xterm</application> window are available.</para>
[9f12e36]165
[4967eaf6]166 <para><option>--without-x</option>: If you prefer not to link
167 <application>Vim</application> against <application>X</application>, use
168 this switch.</para>
[0ec75653]169
[95799899]170 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
[864b24de]171 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
[f8c734f]172 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
[864b24de]173 using other application code in <application>vim</application> scripts.</para>
174
[95799899]175 </sect2>
176
177 <sect2 role="configuration">
178 <title>Configuring Vim</title>
179
180 <sect3 id='vim-config'>
181 <title>Config Files</title>
182
183 <para><filename>/etc/vimrc</filename> and
184 <filename>~/.vimrc</filename></para>
185
186 <indexterm zone="vim vim-config">
187 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
188 </indexterm>
189
190 <indexterm zone="vim vim-config">
191 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
192 </indexterm>
193
194 </sect3>
195
196 <sect3 id='vim-init'>
197 <title>Configuration Information</title>
198
199 <para><application>Vim-7.0</application> introduced an
200 integrated spell checker that doesn't requires additional libraries to be
201 installed. To enable the spell checker you can set the following in
202 one of the configuration files: </para>
[864b24de]203
[95799899]204<screen><literal>set spell
205spelllang=en,ru</literal></screen>
[864b24de]206
[95799899]207 <para>By default, <application>Vim</application> only installs spell
208 files for the English language. If a spell file is not available for
[864b24de]209 your language, then <application>Vim</application> will call
[95799899]210 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> and will try to
211 obtain the *.spl and optionally *.sug from the vim ftp server, using the
[864b24de]212 <filename>$VIMRUNTIME/plugin/netrw</filename> plugin.</para>
213
[95799899]214 <para>Alternatively you can manually download the *.spl and *.sug files
215 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
216 them to <filename class="directory"> ~/.vim/spell </filename> or in
217 <filename class="directory">
[864b24de]218 /usr/share/vim/vim70/spell/</filename>.</para>
219
220 <para>For more information about the spell checker and some other
[95799899]221 features in <application>Vim-&vim-version;</application> (such us
222 vimgrep, tab-pages, and omni-completion), issue the following command inside
[864b24de]223 <application>Vim</application>:</para>
[95799899]224
[864b24de]225<screen><literal>:help version7</literal></screen>
[95799899]226
227 <para>For additional information on setting up
228 <application>Vim</application> configuration files, see <xref
229 linkend="postlfs-config-vimrc"/> and <ulink
230 url='http://www.vi-improved.org/vimrc.php'/>. </para>
231
232 </sect3>
233
[0ec75653]234 </sect2>
235
236 <sect2 role="content">
237 <title>Contents</title>
238
[3aa07d1]239 <para>A list of the reinstalled files, along with their short
[95799899]240 descriptions can be found in the <ulink
[864b24de]241 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
[95799899]242 Instrutions</ulink></para>
[0ec75653]243
244 <segmentedlist>
245 <segtitle>Installed Programs</segtitle>
246 <segtitle>Installed Libraries</segtitle>
247 <segtitle>Installed Directory</segtitle>
248
249 <seglistitem>
250 <seg>gview, gvim, gvimdiff, rgview, and rgvim</seg>
251 <seg>None</seg>
252 <seg>/usr/share/vim</seg>
253 </seglistitem>
254 </segmentedlist>
255
256 <variablelist>
257 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
258 <?dbfo list-presentation="list"?>
259 <?dbhtml list-presentation="table"?>
260
261 <varlistentry id="gview">
262 <term><command>gview</command></term>
263 <listitem>
264 <para>starts <command>gvim</command> in read-only mode.</para>
265 <indexterm zone="vim gview">
266 <primary sortas="b-gview">gview</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="gvim">
272 <term><command>gvim</command></term>
273 <listitem>
[d612b9f]274 <para>is the editor that runs under <application>X</application>
[13679edb]275 and includes a GUI.</para>
[0ec75653]276 <indexterm zone="vim gvim">
277 <primary sortas="b-gvim">gvim</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="gvimdiff">
283 <term><command>gvimdiff</command></term>
284 <listitem>
285 <para>edits two or three versions of a file with
[13679edb]286 <command>gvim</command> and shows the differences.</para>
[0ec75653]287 <indexterm zone="vim gvimdiff">
288 <primary sortas="b-gvimdiff">gvimdiff</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="rgview">
294 <term><command>rgview</command></term>
295 <listitem>
296 <para>is a restricted version of <command>gview</command>.</para>
297 <indexterm zone="vim rgview">
298 <primary sortas="b-rgview">rgview</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="rgvim">
304 <term><command>rgvim</command></term>
305 <listitem>
306 <para>is a restricted version of <command>gvim</command>. </para>
307 <indexterm zone="vim gvim">
308 <primary sortas="b-gvim">gvim</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 </variablelist>
314
315 </sect2>
[f45b1953]316
317</sect1>
Note: See TracBrowser for help on using the repository browser.