source: postlfs/editors/vim.xml@ 5f4e73e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt perl-modules 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 5f4e73e was 5f4e73e, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Update to vala-0.36.2.
Update to iso-codes-3.75.
Update to Business-ISBN-3.004 (Perl Module).
Update to vim-8.0.586.
Update discussion of where to get older xorg drivers.

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

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