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

systemd-13485
Last change on this file since 8ee0429 was 8ee0429, checked in by Douglas R. Reno <renodr@…>, 8 years ago

(systemd) LFS79 Tags
(systemd) Tons of GCC6 Tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@17471 af4574ff-66df-0310-9fd7-8a98e5e911e0

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