source: postlfs/editors/vim.xml@ 0498e8f0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 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 nosym 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 0498e8f0 was 0498e8f0, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Finish tagging postlfs and multimedia sections.

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

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