source: postlfs/editors/vim.xml@ f933cc3

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 f933cc3 was f933cc3, checked in by Ag Hatzimanikas <ag@…>, 16 years ago

Syncing with Lfs

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

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