source: postlfs/editors/vim.xml@ 668844b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 668844b was 668844b, checked in by Pierre Labastie <pieere@…>, 10 years ago

Vim: remove vim-lang, add mutibyte support, and add GTK+2 as a recommanded dependency

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

  • Property mode set to 100644
File size: 11.8 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 " ">
8 <!ENTITY vim-download-ftp "ftp://ftp.vim.org/pub/vim/unix/vim-&vim-version;.tar.bz2">
9 <!ENTITY vim-md5sum "607e135c559be642f210094ad023dc65">
10 <!ENTITY vim-size "9.4 MB">
11 <!ENTITY vim-buildsize "90 MB">
12 <!ENTITY vim-time "1.7 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 &lfs75_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>Download (HTTP): <ulink url="&vim-download-http;"/></para>
50 </listitem>
51 <listitem>
52 <para>Download (FTP): <ulink url="&vim-download-ftp;"/></para>
53 </listitem>
54 <listitem>
55 <para>Download MD5 sum: &vim-md5sum;</para>
56 </listitem>
57 <listitem>
58 <para>Download size: &vim-size;</para>
59 </listitem>
60 <listitem>
61 <para>Estimated disk space required: &vim-buildsize;</para>
62 </listitem>
63 <listitem>
64 <para>Estimated build time: &vim-time;</para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
69
70 <bridgehead renderas="sect4">Recommended</bridgehead>
71 <para role="recommended">
72 <xref linkend="x-window-system"/> and
73 <xref linkend="gtk2"/>
74 </para>
75
76 <bridgehead renderas="sect4">Optional</bridgehead>
77 <para role="optional">
78 <ulink url="http://sourceforge.net/projects/lesstif/">LessTif</ulink>,
79 <xref linkend="python2"/>,
80 <xref linkend="tcl"/>,
81 <xref linkend="ruby"/>, and
82 <xref linkend="gpm"/>
83 </para>
84
85 <para condition="html" role="usernotes">User Notes:
86 <ulink url="&blfs-wiki;/vim"/></para>
87
88 </sect2>
89
90 <sect2 role="installation">
91 <title>Installation of Vim</title>
92
93 <note>
94 <para>If you recompile <application>Vim</application> to link against
95 <application>X</application> and your <application>X</application>
96 libraries are not on the root partition, you will no longer have an editor
97 for use in emergencies. You may choose to install an additional editor,
98 not link <application>Vim</application> against
99 <application>X</application>, or move the current <command>vim</command>
100 executable to the <filename class="directory">/bin</filename> directory
101 under a different name such as <filename>vi</filename>.</para>
102 </note>
103
104 <para>Install <application>Vim</application> by running the following
105 commands:</para>
106
107<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
108echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
109./configure --prefix=/usr \
110 --with-features=huge \
111 --enable-multibyte &amp;&amp;
112make</userinput></screen>
113
114 <para>To test the results, issue: <command>make test</command>.
115 The <application>vim</application> test suite outputs a lot of binary
116 data to the screen, which can cause issues with the settings of the
117 current terminal. This can be resolved by redirecting the output to a
118 log file. Even if one of the tests fails to produce the file
119 <filename>test.out</filename> in <filename
120 class="directory">src/testdir</filename>, the remaining tests will still
121 be executed. If all goes well,the final message in the log file will be
122 <literal>ALL DONE</literal>. <emphasis>Note</emphasis>: Some color tests
123 expect to be executed under the <command>xterm</command> terminal
124 emulator.</para>
125
126 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
127
128<screen role="root"><userinput>make install</userinput></screen>
129
130 <para>By default, Vim's documentation is installed in <filename
131 class="directory">/usr/share/vim</filename>. The following symlink allows
132 the documentation to be accessed via <filename
133 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
134 consistent with the location of documentation for other packages:</para>
135
136<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
137 directory -->
138
139<screen role="root"><userinput>ln -snfv ../vim/vim74/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
140
141 <para>If you wish to update the runtime files, issue the
142 following command (requires <xref linkend="rsync"/>):</para>
143
144<screen><userinput>rsync -avzcP --delete --exclude="/dos/" --exclude="/spell/" \
145 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
146
147 <para>To install the runtime files and regenerate the
148 <filename>tags</filename> file, as the
149 <systemitem class="username">root</systemitem> user issue:</para>
150
151<screen role="root"><userinput>make -C src installruntime &amp;&amp;
152vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
153
154 </sect2>
155
156 <sect2 role="commands">
157 <title>Command Explanations</title>
158
159 <para><parameter>--with-features=huge</parameter>: This switch enables all
160 the additional features available in <application>Vim</application>.</para>
161
162 <para><parameter>--enable-multibyte</parameter>: This switch enables support
163 for editing files in multibyte characters encoding, such as UTF-8.</para>
164 <para><option>--enable-gui=no</option>: This will prevent compilation of the
165 GUI. <application>Vim</application> will still link against
166 <application>X</application>, so that some features such as the client-server
167 model or the x11-selection (clipboard) are still available.</para>
168
169 <para><option>--without-x</option>: If you prefer not to link
170 <application>Vim</application> against <application>X</application>, use
171 this switch.</para>
172
173 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
174 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
175 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
176 using other application code in <application>vim</application> scripts.</para>
177
178 </sect2>
179
180 <sect2 role="configuration">
181 <title>Configuring Vim</title>
182
183 <sect3 id='vim-config'>
184 <title>Config Files</title>
185
186 <para><filename>/etc/vimrc</filename> and
187 <filename>~/.vimrc</filename></para>
188
189 <indexterm zone="vim vim-config">
190 <primary sortas="e-etc-vimrc">/etc/vimrc</primary>
191 </indexterm>
192
193 <indexterm zone="vim vim-config">
194 <primary sortas="e-AA.vimrc">~/.vimrc</primary>
195 </indexterm>
196
197 </sect3>
198
199 <sect3 id='vim-init'>
200 <title>Configuration Information</title>
201
202 <para><application>Vim</application> has an integrated spell checker
203 which you can enable it if you issue the following in a vim window:
204 </para>
205
206<screen><literal>:setlocal spell spelllang=ru</literal></screen>
207
208 <para>This setting will enable spell checking for the Russian
209 language for the current session.</para>
210
211 <para>By default, <application>Vim</application> only installs spell
212 files for the English language. If a spell file is not available for
213 a language, then <application>Vim</application> will call the
214 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will try
215 to obtain the *.spl and optionally *.sug from the vim ftp server,
216 by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
217 plugin.</para>
218
219<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
220 directory -->
221 <para>Alternatively you can manually download the *.spl and *.sug files
222 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
223 them to <filename class="directory"> ~/.vim/spell </filename> or in
224 <filename class="directory">/usr/share/vim/vim74/spell/</filename>.</para>
225
226 <para>To find out what's new in <application>Vim-&vim-version;</application>
227 issue the following command:</para>
228
229<screen><literal>:help version-&vim-version;</literal></screen>
230
231 <para>For additional information on setting up
232 <application>Vim</application> configuration files, see <xref
233 linkend="postlfs-config-vimrc"/> and <ulink
234 url='http://vim.wikia.com/wiki/Example_vimrc'/>.</para>
235
236 </sect3>
237
238 </sect2>
239
240 <sect2 role="content">
241 <title>Contents</title>
242
243 <para>A list of the reinstalled files, along with their short
244 descriptions can be found in the <ulink
245 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
246 Instructions</ulink></para>
247
248 <segmentedlist>
249 <segtitle>Installed Programs</segtitle>
250 <segtitle>Installed Libraries</segtitle>
251 <segtitle>Installed Directory</segtitle>
252
253 <seglistitem>
254 <seg>gview, gvim, gvimdiff, rgview, and rgvim</seg>
255 <seg>None</seg>
256 <seg>/usr/share/vim</seg>
257 </seglistitem>
258 </segmentedlist>
259
260 <variablelist>
261 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
262 <?dbfo list-presentation="list"?>
263 <?dbhtml list-presentation="table"?>
264
265 <varlistentry id="gview">
266 <term><command>gview</command></term>
267 <listitem>
268 <para>starts <command>gvim</command> in read-only mode.</para>
269 <indexterm zone="vim gview">
270 <primary sortas="b-gview">gview</primary>
271 </indexterm>
272 </listitem>
273 </varlistentry>
274
275 <varlistentry id="gvim">
276 <term><command>gvim</command></term>
277 <listitem>
278 <para>is the editor that runs under <application>X</application>
279 and includes a GUI.</para>
280 <indexterm zone="vim gvim">
281 <primary sortas="b-gvim">gvim</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="gvimdiff">
287 <term><command>gvimdiff</command></term>
288 <listitem>
289 <para>edits two or three versions of a file with
290 <command>gvim</command> and shows the differences.</para>
291 <indexterm zone="vim gvimdiff">
292 <primary sortas="b-gvimdiff">gvimdiff</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="rgview">
298 <term><command>rgview</command></term>
299 <listitem>
300 <para>is a restricted version of <command>gview</command>.</para>
301 <indexterm zone="vim rgview">
302 <primary sortas="b-rgview">rgview</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="rgvim">
308 <term><command>rgvim</command></term>
309 <listitem>
310 <para>is a restricted version of <command>gvim</command>. </para>
311 <indexterm zone="vim gvim">
312 <primary sortas="b-gvim">gvim</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 </variablelist>
318
319 </sect2>
320
321</sect1>
Note: See TracBrowser for help on using the repository browser.