source: postlfs/editors/vim.xml@ 54789f3

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

Import back into SVN from Github

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

  • Property mode set to 100644
File size: 12.4 KB
RevLine 
[b5951ec]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[b5951ec]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[ac38e9dc]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 " ">
[d659cbe]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">
[b5951ec]15]>
16
[28badf4]17<sect1 id="vim" xreflabel="Vim-&vim-version;">
[0ec75653]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>
[3aa07d1]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
[0ec75653]44 <application>X</application> support is automatically detected.</para>
45
[ac38e9dc]46 &lfs77_checked;
[1db225b]47
[0ec75653]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
[3493b1f]70 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
[0ec75653]71
72 <bridgehead renderas="sect4">Recommended</bridgehead>
[668844b]73 <para role="recommended">
74 <xref linkend="x-window-system"/> and
75 <xref linkend="gtk2"/>
76 </para>
[0ec75653]77
78 <bridgehead renderas="sect4">Optional</bridgehead>
[3b10fa8]79 <para role="optional">
[ac38e9dc]80 <xref linkend="gpm"/>,
81 <xref linkend="lua"/>,
[4716d52]82 <xref linkend="python2"/>,
[ac38e9dc]83 <xref linkend="ruby"/>,
84 <xref linkend="tcl"/>, and
85 <ulink url="http://sourceforge.net/projects/lesstif/">LessTif</ulink>
[3b10fa8]86 </para>
[0ec75653]87
[3597eb6]88 <para condition="html" role="usernotes">User Notes:
89 <ulink url="&blfs-wiki;/vim"/></para>
90
[0ec75653]91 </sect2>
92
93 <sect2 role="installation">
94 <title>Installation of Vim</title>
95
96 <note>
[3aa07d1]97 <para>If you recompile <application>Vim</application> to link against
[32d0e29]98 <application>X</application> and your <application>X</application>
[ac38e9dc]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
[d612b9f]102 <application>X</application>, or move the current <command>vim</command>
[3aa07d1]103 executable to the <filename class="directory">/bin</filename> directory
[0ec75653]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>
[b5951ec]109
[d659cbe]110<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
[b5951ec]111echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
[00f8f51]112./configure --prefix=/usr --with-features=huge &amp;&amp;
[0ec75653]113make</userinput></screen>
114
[83d6546]115 <para>To test the results, issue: <command>make test</command>.
116 The <application>vim</application> test suite outputs a lot of binary
117 data to the screen, which can cause issues with the settings of the
118 current terminal. This can be resolved by redirecting the output to a
119 log file. Even if one of the tests fails to produce the file
120 <filename>test.out</filename> in <filename
121 class="directory">src/testdir</filename>, the remaining tests will still
122 be executed. If all goes well,the final message in the log file will be
123 <literal>ALL DONE</literal>. <emphasis>Note</emphasis>: Some color tests
124 expect to be executed under the <command>xterm</command> terminal
125 emulator.</para>
126
[0ec75653]127 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
128
129<screen role="root"><userinput>make install</userinput></screen>
130
[95799899]131 <para>By default, Vim's documentation is installed in <filename
132 class="directory">/usr/share/vim</filename>. The following symlink allows
133 the documentation to be accessed via <filename
[6e11352]134 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
135 consistent with the location of documentation for other packages:</para>
[841a93f]136
[410e228b]137<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
[841a93f]138 directory -->
139
[d659cbe]140<screen role="root"><userinput>ln -snfv ../vim/vim74/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
[95799899]141
[6ae4193]142 <para>If you wish to update the runtime files, issue the
143 following command (requires <xref linkend="rsync"/>):</para>
[fd7e0ed6]144
[32d0e29]145<screen><userinput>rsync -avzcP --delete --exclude="/dos/" --exclude="/spell/" \
146 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
[6e11352]147
[32d0e29]148 <para>To install the runtime files and regenerate the
149 <filename>tags</filename> file, as the
150 <systemitem class="username">root</systemitem> user issue:</para>
[6e11352]151
[2202183]152<screen role="root"><userinput>make -C src installruntime &amp;&amp;
153vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
[6e11352]154
[0ec75653]155 </sect2>
156
157 <sect2 role="commands">
158 <title>Command Explanations</title>
159
[3aa07d1]160 <para><parameter>--with-features=huge</parameter>: This switch enables all
[6e76796]161 the additional features available in <application>Vim</application>,
162 including support for multibyte characters.</para>
[0ec75653]163
[88a2276]164 <para><option>--enable-gui=no</option>: This will prevent compilation of the
165 GUI. <application>Vim</application> will still link against
[6e11352]166 <application>X</application>, so that some features such as the client-server
167 model or the x11-selection (clipboard) are still available.</para>
[9f12e36]168
[4967eaf6]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>
[0ec75653]172
[95799899]173 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
[864b24de]174 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
[f8c734f]175 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
[864b24de]176 using other application code in <application>vim</application> scripts.</para>
177
[95799899]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
[ac38e9dc]199 <sect3 id='vim-desktop'>
200 <title>Desktop File</title>
201
202 <para>
203 If desired, create a menu entry for graphical vim,
204 <filename>gvim.desktop</filename>, as the <systemitem
205 class="username">root</systemitem> user
206 </para>
207
208<screen role="root"><userinput>cat &gt; /usr/share/applications/gvim.desktop &lt;&lt; "EOF"
209<literal>[Desktop Entry]
210Name=GVim Text Editor
211Comment=Edit text files
212Comment[pt_BR]=Edite arquivos de texto
213TryExec=gvim
214Exec=gvim -f %F
215Terminal=false
216Type=Application
217Icon=gvim.png
218Categories=Utility;TextEditor;
219StartupNotify=true
220MimeType=text/plain;</literal>
221EOF</userinput></screen>
222
223 </sect3>
224
[95799899]225 <sect3 id='vim-init'>
226 <title>Configuration Information</title>
227
[6e11352]228 <para><application>Vim</application> has an integrated spell checker
229 which you can enable it if you issue the following in a vim window:
230 </para>
[864b24de]231
[6e11352]232<screen><literal>:setlocal spell spelllang=ru</literal></screen>
[fd7e0ed6]233
[6e11352]234 <para>This setting will enable spell checking for the Russian
235 language for the current session.</para>
[864b24de]236
[95799899]237 <para>By default, <application>Vim</application> only installs spell
[6e11352]238 files for the English language. If a spell file is not available for
239 a language, then <application>Vim</application> will call the
240 <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will try
241 to obtain the *.spl and optionally *.sug from the vim ftp server,
242 by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
243 plugin.</para>
[864b24de]244
[fcb77dd]245<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
246 directory -->
[95799899]247 <para>Alternatively you can manually download the *.spl and *.sug files
248 from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
249 them to <filename class="directory"> ~/.vim/spell </filename> or in
[d659cbe]250 <filename class="directory">/usr/share/vim/vim74/spell/</filename>.</para>
[864b24de]251
[6e11352]252 <para>To find out what's new in <application>Vim-&vim-version;</application>
253 issue the following command:</para>
[95799899]254
[6e11352]255<screen><literal>:help version-&vim-version;</literal></screen>
[95799899]256
257 <para>For additional information on setting up
258 <application>Vim</application> configuration files, see <xref
259 linkend="postlfs-config-vimrc"/> and <ulink
[f22f1ef3]260 url='http://vim.wikia.com/wiki/Example_vimrc'/>.</para>
[95799899]261
262 </sect3>
263
[0ec75653]264 </sect2>
265
266 <sect2 role="content">
267 <title>Contents</title>
268
[3aa07d1]269 <para>A list of the reinstalled files, along with their short
[95799899]270 descriptions can be found in the <ulink
[864b24de]271 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
[98078a6]272 Instructions</ulink></para>
[0ec75653]273
274 <segmentedlist>
275 <segtitle>Installed Programs</segtitle>
276 <segtitle>Installed Libraries</segtitle>
277 <segtitle>Installed Directory</segtitle>
278
279 <seglistitem>
280 <seg>gview, gvim, gvimdiff, rgview, and rgvim</seg>
281 <seg>None</seg>
282 <seg>/usr/share/vim</seg>
283 </seglistitem>
284 </segmentedlist>
285
286 <variablelist>
287 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
288 <?dbfo list-presentation="list"?>
289 <?dbhtml list-presentation="table"?>
290
291 <varlistentry id="gview">
292 <term><command>gview</command></term>
293 <listitem>
294 <para>starts <command>gvim</command> in read-only mode.</para>
295 <indexterm zone="vim gview">
296 <primary sortas="b-gview">gview</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="gvim">
302 <term><command>gvim</command></term>
303 <listitem>
[d612b9f]304 <para>is the editor that runs under <application>X</application>
[13679edb]305 and includes a GUI.</para>
[0ec75653]306 <indexterm zone="vim gvim">
307 <primary sortas="b-gvim">gvim</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="gvimdiff">
313 <term><command>gvimdiff</command></term>
314 <listitem>
315 <para>edits two or three versions of a file with
[13679edb]316 <command>gvim</command> and shows the differences.</para>
[0ec75653]317 <indexterm zone="vim gvimdiff">
318 <primary sortas="b-gvimdiff">gvimdiff</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="rgview">
324 <term><command>rgview</command></term>
325 <listitem>
326 <para>is a restricted version of <command>gview</command>.</para>
327 <indexterm zone="vim rgview">
328 <primary sortas="b-rgview">rgview</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="rgvim">
334 <term><command>rgvim</command></term>
335 <listitem>
336 <para>is a restricted version of <command>gvim</command>. </para>
337 <indexterm zone="vim gvim">
338 <primary sortas="b-gvim">gvim</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 </variablelist>
344
345 </sect2>
[f45b1953]346
347</sect1>
Note: See TracBrowser for help on using the repository browser.