source: postlfs/editors/vim.xml@ 8e39d51b

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 8e39d51b was 0c25796, checked in by Pierre Labastie <pieere@…>, 4 years ago

Vim-8.2.0024
Python3-3.8.1

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

  • Property mode set to 100644
File size: 13.2 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 <!-- 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">
10 <!ENTITY vim-download-ftp " ">
11 <!ENTITY vim-md5sum "a1b5e7ae3ce2847dbd8672e6dd882750">
12 <!ENTITY vim-size "14 MB">
13 <!ENTITY vim-buildsize "143 MB (add 69 MB for tests)">
14 <!ENTITY vim-time " SBU (add 2.3 SBU for tests)">
15]>
16
17<sect1 id="vim" xreflabel="Vim-&vim-version;">
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>
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
44 <application>X</application> support is automatically detected.</para>
45
46 &lfs90_checked;
47
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
70 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Recommended</bridgehead>
73 <para role="recommended">
74 <xref linkend="x-window-system"/> and
75 <xref linkend="gtk3"/>
76 </para>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="gpm"/>,
81 <xref linkend="lua"/>,
82 <xref linkend="python2"/>,
83 <xref linkend="rsync"/>,
84 <xref linkend="ruby"/>, and
85 <xref linkend="tcl"/>
86 </para>
87
88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/vim"/></para>
90
91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of Vim</title>
95
96 <note>
97 <para>If you recompile <application>Vim</application> to link against
98 <application>X</application> and your <application>X</application>
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
102 <application>X</application>, or move the current <command>vim</command>
103 executable to the <filename class="directory">/bin</filename> directory
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>
109
110<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
111echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
112
113./configure --prefix=/usr \
114 --with-features=huge \
115 --enable-gui=gtk3 \
116 --with-tlib=ncursesw &amp;&amp;
117make</userinput></screen>
118
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
126 be executed. If all goes well,the log will report <literal>ALL DONE</literal>.
127 <emphasis>Note</emphasis>: Some color tests
128 expect to be executed under the <command>xterm</command> terminal
129 emulator. Three tests are known to fail occasionally and can be ignored.</para>
130
131 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
132
133<screen role="root"><userinput>make install</userinput></screen>
134
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
138 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
139 consistent with the location of documentation for other packages:</para>
140
141<!-- When updating, be sure to change the vim-majmin entity for the
142 proper 'vimxx' unpacked directory -->
143
144<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
145
146 <para>If you wish to update the runtime files, issue the
147 following command (requires <xref linkend="rsync"/>):</para>
148
149<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
150 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
151
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>
155
156<screen role="root"><userinput>make -C src installruntime &amp;&amp;
157vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
158
159 </sect2>
160
161 <sect2 role="commands">
162 <title>Command Explanations</title>
163
164 <para><parameter>--with-features=huge</parameter>: This switch enables all
165 the additional features available in <application>Vim</application>,
166 including support for multibyte characters.</para>
167
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
174 <para><option>--enable-gui=no</option>: This will prevent compilation of the
175 GUI. <application>Vim</application> will still link against
176 <application>X</application>, so that some features such as the client-server
177 model or the x11-selection (clipboard) are still available.</para>
178
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>
182
183 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
184 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
185 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
186 using other application code in <application>vim</application> scripts.</para>
187
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
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
235 <sect3 id='vim-init'>
236 <title>Configuration Information</title>
237
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>
241
242<screen><literal>:setlocal spell spelllang=ru</literal></screen>
243
244 <para>This setting will enable spell checking for the Russian
245 language for the current session.</para>
246
247 <para>By default, <application>Vim</application> only installs spell
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>
254
255<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
256 directory -->
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
260 <filename class="directory">/usr/share/vim/vim&vim-majmin;/spell/</filename>.</para>
261
262 <para>To find out what's new in <application>Vim-&vim-version;</application>
263 issue the following command:</para>
264
265<screen><literal>:help version-&vim-version;</literal></screen>
266
267 <para>For additional information on setting up
268 <application>Vim</application> configuration files, see <xref
269 linkend="postlfs-config-vimrc"/> and <ulink
270 url='http://vim.wikia.com/wiki/Example_vimrc'/>.</para>
271
272 </sect3>
273
274 </sect2>
275
276 <sect2 role="content">
277 <title>Contents</title>
278
279 <para>A list of the reinstalled files, along with their short
280 descriptions can be found in the <ulink
281 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
282 Instructions</ulink></para>
283
284 <segmentedlist>
285 <segtitle>Installed Programs</segtitle>
286 <segtitle>Installed Libraries</segtitle>
287 <segtitle>Installed Directory</segtitle>
288
289 <seglistitem>
290 <seg>gview, gvim, gvimdiff, gvimtutor, rgview, and rgvim</seg>
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>
314 <para>is the editor that runs under <application>X</application>
315 and includes a GUI.</para>
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
326 <command>gvim</command> and shows the differences.</para>
327 <indexterm zone="vim gvimdiff">
328 <primary sortas="b-gvimdiff">gvimdiff</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
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
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>
367
368</sect1>
Note: See TracBrowser for help on using the repository browser.