source: postlfs/editors/vim.xml@ b49da0a8

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 b49da0a8 was 2ec47f0, checked in by Douglas R. Reno <renodr@…>, 7 years ago

Tag the rest of GNOME
Tag Bluefish, GVIM, and Weston

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

  • Property mode set to 100644
File size: 12.5 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
[c674ac54]7 <!ENTITY vim-download-http "http://ftp.vim.org/vim/unix/vim-&vim-version;.tar.bz2">
[83ec6939]8 <!ENTITY vim-download-ftp " ">
[c506c3d]9 <!ENTITY vim-md5sum "457543a7754b0d3c1c0aa4d4c3bb4070">
[eb5ff6de]10 <!ENTITY vim-size "10.1 MB">
11 <!ENTITY vim-buildsize "119 MB">
[c506c3d]12 <!ENTITY vim-time "1.9 SBU">
[b5951ec]13]>
14
[28badf4]15<sect1 id="vim" xreflabel="Vim-&vim-version;">
[0ec75653]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>
[3aa07d1]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
[0ec75653]42 <application>X</application> support is automatically detected.</para>
43
[2ec47f0]44 &lfs80_checked;
[1db225b]45
[0ec75653]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
[3493b1f]68 <bridgehead renderas="sect3">Vim Dependencies</bridgehead>
[0ec75653]69
70 <bridgehead renderas="sect4">Recommended</bridgehead>
[668844b]71 <para role="recommended">
72 <xref linkend="x-window-system"/> and
73 <xref linkend="gtk2"/>
74 </para>
[0ec75653]75
76 <bridgehead renderas="sect4">Optional</bridgehead>
[3b10fa8]77 <para role="optional">
[646a42e]78 <xref linkend="gpm"/>,
79 <xref linkend="lua"/>,
[4716d52]80 <xref linkend="python2"/>,
[646a42e]81 <xref linkend="ruby"/>,
82 <xref linkend="tcl"/>, and
83 <ulink url="http://sourceforge.net/projects/lesstif/">LessTif</ulink>
[3b10fa8]84 </para>
[0ec75653]85
[3597eb6]86 <para condition="html" role="usernotes">User Notes:
87 <ulink url="&blfs-wiki;/vim"/></para>
88
[0ec75653]89 </sect2>
90
91 <sect2 role="installation">
92 <title>Installation of Vim</title>
93
94 <note>
[3aa07d1]95 <para>If you recompile <application>Vim</application> to link against
[32d0e29]96 <application>X</application> and your <application>X</application>
[646a42e]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
[d612b9f]100 <application>X</application>, or move the current <command>vim</command>
[3aa07d1]101 executable to the <filename class="directory">/bin</filename> directory
[0ec75653]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>
[b5951ec]107
[d659cbe]108<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h &amp;&amp;
[b5951ec]109echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h &amp;&amp;
[646a42e]110
[1eb874ce]111./configure --prefix=/usr \
112 --with-features=huge \
113 --with-tlib=ncursesw &amp;&amp;
[0ec75653]114make</userinput></screen>
115
[83d6546]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.</para>
127
[0ec75653]128 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
129
130<screen role="root"><userinput>make install</userinput></screen>
131
[95799899]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
[6e11352]135 class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
136 consistent with the location of documentation for other packages:</para>
[841a93f]137
[410e228b]138<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
[841a93f]139 directory -->
140
[eb5ff6de]141<screen role="root"><userinput>ln -snfv ../vim/vim80/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
[95799899]142
[6ae4193]143 <para>If you wish to update the runtime files, issue the
144 following command (requires <xref linkend="rsync"/>):</para>
[fd7e0ed6]145
[32d0e29]146<screen><userinput>rsync -avzcP --delete --exclude="/dos/" --exclude="/spell/" \
147 ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
[6e11352]148
[32d0e29]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>
[6e11352]152
[2202183]153<screen role="root"><userinput>make -C src installruntime &amp;&amp;
154vim -c ":helptags /usr/share/doc/vim-&vim-version;" -c ":q"</userinput></screen>
[6e11352]155
[0ec75653]156 </sect2>
157
158 <sect2 role="commands">
159 <title>Command Explanations</title>
160
[3aa07d1]161 <para><parameter>--with-features=huge</parameter>: This switch enables all
[6e76796]162 the additional features available in <application>Vim</application>,
163 including support for multibyte characters.</para>
[0ec75653]164
[1eb874ce]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
[88a2276]171 <para><option>--enable-gui=no</option>: This will prevent compilation of the
172 GUI. <application>Vim</application> will still link against
[6e11352]173 <application>X</application>, so that some features such as the client-server
174 model or the x11-selection (clipboard) are still available.</para>
[9f12e36]175
[4967eaf6]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>
[0ec75653]179
[95799899]180 <para><option>--enable-perlinterp</option>, <option>--enable-pythoninterp</option>,
[864b24de]181 <option>--enable-tclinterp</option>, <option>--enable-rubyinterp</option>:
[f8c734f]182 These options include the Perl, Python, Tcl, or Ruby interpreters that allow
[864b24de]183 using other application code in <application>vim</application> scripts.</para>
184
[95799899]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
[7a2aeb5]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
[95799899]232 <sect3 id='vim-init'>
233 <title>Configuration Information</title>
234
[6e11352]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>
[864b24de]238
[6e11352]239<screen><literal>:setlocal spell spelllang=ru</literal></screen>
[fd7e0ed6]240
[6e11352]241 <para>This setting will enable spell checking for the Russian
242 language for the current session.</para>
[864b24de]243
[95799899]244 <para>By default, <application>Vim</application> only installs spell
[6e11352]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>
[864b24de]251
[fcb77dd]252<!-- When updating, be sure to change the line below for the proper 'vimxx' unpacked
253 directory -->
[95799899]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
[eb5ff6de]257 <filename class="directory">/usr/share/vim/vim80/spell/</filename>.</para>
[864b24de]258
[6e11352]259 <para>To find out what's new in <application>Vim-&vim-version;</application>
260 issue the following command:</para>
[95799899]261
[6e11352]262<screen><literal>:help version-&vim-version;</literal></screen>
[95799899]263
264 <para>For additional information on setting up
265 <application>Vim</application> configuration files, see <xref
266 linkend="postlfs-config-vimrc"/> and <ulink
[f22f1ef3]267 url='http://vim.wikia.com/wiki/Example_vimrc'/>.</para>
[95799899]268
269 </sect3>
270
[0ec75653]271 </sect2>
272
273 <sect2 role="content">
274 <title>Contents</title>
275
[3aa07d1]276 <para>A list of the reinstalled files, along with their short
[95799899]277 descriptions can be found in the <ulink
[864b24de]278 url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
[98078a6]279 Instructions</ulink></para>
[0ec75653]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>
[d612b9f]311 <para>is the editor that runs under <application>X</application>
[13679edb]312 and includes a GUI.</para>
[0ec75653]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
[13679edb]323 <command>gvim</command> and shows the differences.</para>
[0ec75653]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>
[f45b1953]353
354</sect1>
Note: See TracBrowser for help on using the repository browser.