Ignore:
Timestamp:
03/26/2020 01:13:18 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, 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
Children:
3defb8db
Parents:
29244b7
Message:

Format "editors"

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postlfs/editors/vim.xml

    r29244b7 rf716ef4  
    3232    <title>Introduction to Vim</title>
    3333
    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     <note><para>The version of vim changes daily.  The get the latest
    47     version, go to <ulink url="https://github.com/vim/vim/releases">
    48     https://github.com/vim/vim/releases</ulink>.</para></note>
     34    <para>
     35      The <application>Vim</application> package, which is an
     36      abbreviation for VI IMproved, contains a <command>vi</command>
     37      clone with extra features as compared to the original
     38      <command>vi</command>.
     39    </para>
     40
     41    <para>
     42      The default LFS instructions install <application>vim</application>
     43      as a part of the base system. If you would prefer to link
     44      <application>vim</application> against <application>X</application>,
     45      you should recompile <application>vim</application> to enable GUI mode.
     46      There is no need for special instructions since
     47      <application>X</application> support is automatically detected.
     48    </para>
     49
     50    <note>
     51      <para>
     52        The version of vim changes daily.  The get the latest
     53        version, go to <ulink url="https://github.com/vim/vim/releases">
     54        https://github.com/vim/vim/releases</ulink>.
     55      </para>
     56    </note>
    4957
    5058    &lfs91_checked;
     
    5361    <itemizedlist spacing="compact">
    5462      <listitem>
    55         <para>Download (HTTP): <ulink url="&vim-download-http;"/></para>
    56       </listitem>
    57       <listitem>
    58         <para>Download (FTP): <ulink url="&vim-download-ftp;"/></para>
    59       </listitem>
    60       <listitem>
    61         <para>Download MD5 sum: &vim-md5sum;</para>
    62       </listitem>
    63       <listitem>
    64         <para>Download size: &vim-size;</para>
    65       </listitem>
    66       <listitem>
    67         <para>Estimated disk space required: &vim-buildsize;</para>
    68       </listitem>
    69       <listitem>
    70         <para>Estimated build time: &vim-time;</para>
     63        <para>
     64          Download (HTTP): <ulink url="&vim-download-http;"/>
     65        </para>
     66      </listitem>
     67      <listitem>
     68        <para>
     69          Download (FTP): <ulink url="&vim-download-ftp;"/>
     70        </para>
     71      </listitem>
     72      <listitem>
     73        <para>
     74          Download MD5 sum: &vim-md5sum;
     75        </para>
     76      </listitem>
     77      <listitem>
     78        <para>
     79          Download size: &vim-size;
     80        </para>
     81      </listitem>
     82      <listitem>
     83        <para>
     84          Estimated disk space required: &vim-buildsize;
     85        </para>
     86      </listitem>
     87      <listitem>
     88        <para>
     89          Estimated build time: &vim-time;
     90        </para>
    7191      </listitem>
    7292    </itemizedlist>
     
    99119
    100120    <note>
    101       <para>If you recompile <application>Vim</application> to link against
    102       <application>X</application> and your <application>X</application>
    103       libraries are not on the root partition, you will no longer have an
    104       editor for use in emergencies. You may choose to install an additional
    105       editor, not link <application>Vim</application> against
    106       <application>X</application>, or move the current <command>vim</command>
    107       executable to the <filename class="directory">/bin</filename> directory
    108       under a different name such as <filename>vi</filename>.</para>
     121      <para>
     122        If you recompile <application>Vim</application> to link against
     123        <application>X</application> and your <application>X</application>
     124        libraries are not on the root partition, you will no longer have an
     125        editor for use in emergencies. You may choose to install an additional
     126        editor, not link <application>Vim</application> against
     127        <application>X</application>, or move the current <command>vim</command>
     128        executable to the <filename class="directory">/bin</filename> directory
     129        under a different name such as <filename>vi</filename>.
     130      </para>
    109131    </note>
    110132
    111     <para>Install <application>Vim</application> by running the following
    112     commands:</para>
     133    <para>
     134      Install <application>Vim</application> by running the following
     135      commands:
     136    </para>
    113137
    114138<screen><userinput>echo '#define SYS_VIMRC_FILE  "/etc/vimrc"' &gt;&gt;  src/feature.h &amp;&amp;
     
    121145make</userinput></screen>
    122146
    123     <para>To test the results, issue: <command>make test</command>.
    124     The <application>vim</application> test suite outputs a lot of binary
    125     data to the screen, which can cause issues with the settings of the
    126     current terminal. This can be resolved by redirecting the output to a
    127     log file. Even if one of the tests fails to produce the file
    128     <filename>test.out</filename> in <filename
    129     class="directory">src/testdir</filename>, the remaining tests will still
    130     be executed. If all goes well,the log will report <literal>ALL DONE</literal>.
    131     <emphasis>Note</emphasis>: Some color tests
    132     expect to be executed under the <command>xterm</command> terminal
    133     emulator. Three tests are known to fail occasionally and can be ignored.</para>
    134 
    135     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
     147    <para>
     148      To test the results, issue: <command>make test</command>.  The
     149      <application>vim</application> test suite outputs a lot of binary data
     150      to the screen, which can cause issues with the settings of the current
     151      terminal. This can be resolved by redirecting the output to a log file.
     152      Even if one of the tests fails to produce the file
     153      <filename>test.out</filename> in <filename
     154      class="directory">src/testdir</filename>, the remaining tests will
     155      still be executed. If all goes well,the log will report
     156      <literal>ALL DONE</literal>.  <emphasis>Note</emphasis>: Some color
     157      tests expect to be executed under the <command>xterm</command> terminal
     158      emulator. Three tests are known to fail occasionally and can be ignored.
     159    </para>
     160
     161    <para>
     162      Now, as the <systemitem class="username">root</systemitem> user:
     163    </para>
    136164
    137165<screen role="root"><userinput>make install</userinput></screen>
    138166
    139     <para>By default, Vim's documentation is installed in <filename
    140     class="directory">/usr/share/vim</filename>.  The following symlink allows
    141     the documentation to be accessed via <filename
    142     class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
    143     consistent with the location of documentation for other packages:</para>
     167    <para>
     168      By default, Vim's documentation is installed in <filename
     169      class="directory">/usr/share/vim</filename>. The following symlink allows
     170      the documentation to be accessed via <filename
     171      class="directory">/usr/share/doc/vim-&vim-version;</filename>, making it
     172      consistent with the location of documentation for other packages:
     173    </para>
    144174
    145175<!-- When updating, be sure to change the vim-majmin entity for the
     
    148178<screen role="root"><userinput>ln -snfv ../vim/vim&vim-majmin;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
    149179
    150     <para>If you wish to update the runtime files, issue the
    151     following command (requires <xref linkend="rsync"/>):</para>
     180    <para>
     181      If you wish to update the runtime files, issue the
     182      following command (requires <xref linkend="rsync"/>):
     183    </para>
    152184
    153185<screen><userinput>rsync -avzcP --exclude="/dos/" --exclude="/spell/" \
    154186    ftp.nluug.nl::Vim/runtime/ ./runtime/</userinput></screen>
    155187
    156     <para>To install the runtime files and regenerate the
    157     <filename>tags</filename> file, as the
    158     <systemitem class="username">root</systemitem> user issue:</para>
     188    <para>
     189      To install the runtime files and regenerate the
     190      <filename>tags</filename> file, as the
     191      <systemitem class="username">root</systemitem> user issue:
     192    </para>
    159193
    160194<screen role="root"><userinput>make -C src installruntime &amp;&amp;
     
    166200    <title>Command Explanations</title>
    167201
    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>
     202    <para>
     203      <parameter>--with-features=huge</parameter>: This switch enables all
     204      the additional features available in <application>Vim</application>,
     205      including support for multibyte characters.
     206    </para>
    171207
    172208    <para>
     
    176212    </para>
    177213
    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>
     214    <para>
     215      <option>--enable-gui=no</option>: This will prevent compilation of the
     216      GUI. <application>Vim</application> will still link against
     217      <application>X</application>, so that some features such as the
     218      client-server model or the x11-selection (clipboard) are still available.
     219    </para>
     220
     221    <para>
     222      <option>--without-x</option>: If you prefer not to link
     223      <application>Vim</application> against <application>X</application>, use
     224      this switch.
     225    </para>
     226
     227    <para>
     228      <option>--enable-perlinterp</option>,
     229      <option>--enable-pythoninterp</option>,
     230      <option>--enable-tclinterp</option>,
     231      <option>--enable-rubyinterp</option>:
     232      These options include the Perl, Python, Tcl, or Ruby interpreters that
     233      allow using other application code in <application>vim</application>
     234      scripts.
     235    </para>
    191236
    192237  </sect2>
     
    198243      <title>Config Files</title>
    199244
    200       <para><filename>/etc/vimrc</filename> and
    201       <filename>~/.vimrc</filename></para>
     245      <para>
     246        <filename>/etc/vimrc</filename> and
     247        <filename>~/.vimrc</filename>
     248      </para>
    202249
    203250      <indexterm zone="vim vim-config">
     
    240287      <title>Configuration Information</title>
    241288
    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:
     289      <para>
     290        <application>Vim</application> has an integrated spell checker
     291        which you can enable it if you issue the following in a vim window:
    244292      </para>
    245293
    246294<screen><literal>:setlocal spell spelllang=ru</literal></screen>
    247295
    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/vim&vim-majmin;/spell/</filename>.</para>
    265 
    266       <para>To find out what's new in <application>Vim-&vim-version;</application>
    267       issue the following command:</para>
     296      <para>
     297        This setting will enable spell checking for the Russian
     298        language for the current session.
     299      </para>
     300
     301      <para>
     302        By default, <application>Vim</application> only installs spell
     303        files for the English language. If a spell file is not available for
     304        a language, then <application>Vim</application> will call the
     305        <filename>$VIMRUNTIME/plugin/spellfile.vim</filename> plugin and will
     306        try to obtain the *.spl and optionally *.sug from the vim ftp server,
     307        by using the <filename>$VIMRUNTIME/plugin/netrwPlugin.vim</filename>
     308        plugin.
     309      </para>
     310
     311<!-- When updating, be sure to change the line below for the proper 'vimxx'
     312     unpacked directory -->
     313      <para>
     314        Alternatively you can manually download the *.spl and *.sug files
     315        from: <ulink url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save
     316        them to <filename class="directory"> ~/.vim/spell </filename> or in
     317        <filename
     318          class="directory">/usr/share/vim/vim&vim-majmin;/spell/</filename>.
     319      </para>
     320
     321      <para>
     322        To find out what's new in <application>Vim-&vim-version;</application>
     323        issue the following command:
     324      </para>
    268325
    269326<screen><literal>:help version-&vim-version;</literal></screen>
    270327
    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>
     328      <para>
     329        For additional information on setting up
     330        <application>Vim</application> configuration files, see <xref
     331        linkend="postlfs-config-vimrc"/> and <ulink
     332        url='http://vim.wikia.com/wiki/Example_vimrc'/>.
     333      </para>
    275334
    276335    </sect3>
     
    281340    <title>Contents</title>
    282341
    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>
     342    <para>
     343      A list of the reinstalled files, along with their short
     344      descriptions can be found in the <ulink
     345      url="&lfs-root;/chapter06/vim.html#contents-vim">LFS Vim Installation
     346      Instructions</ulink>
     347    </para>
    287348
    288349    <segmentedlist>
     
    306367        <term><command>gview</command></term>
    307368        <listitem>
    308           <para>starts <command>gvim</command> in read-only mode.</para>
     369          <para>
     370            starts <command>gvim</command> in read-only mode.
     371          </para>
    309372          <indexterm zone="vim gview">
    310373            <primary sortas="b-gview">gview</primary>
     
    316379        <term><command>gvim</command></term>
    317380        <listitem>
    318           <para>is the editor that runs under <application>X</application>
    319           and includes a GUI.</para>
     381          <para>
     382            is the editor that runs under <application>X</application>
     383            and includes a GUI.
     384          </para>
    320385          <indexterm zone="vim gvim">
    321386            <primary sortas="b-gvim">gvim</primary>
     
    327392        <term><command>gvimdiff</command></term>
    328393        <listitem>
    329           <para>edits two or three versions of a file with
    330           <command>gvim</command> and shows the differences.</para>
     394          <para>
     395            edits two or three versions of a file with
     396            <command>gvim</command> and shows the differences.
     397          </para>
    331398          <indexterm zone="vim gvimdiff">
    332399            <primary sortas="b-gvimdiff">gvimdiff</primary>
     
    338405        <term><command>gvimtutor</command></term>
    339406        <listitem>
    340           <para>teaches the basic keys and commands of
    341           <command>gvim</command>.</para>
     407          <para>
     408            teaches the basic keys and commands of
     409            <command>gvim</command>.
     410          </para>
    342411          <indexterm zone="vim gvimtutor">
    343412            <primary sortas="b-gvimtutor">gvimtutor</primary>
     
    349418        <term><command>rgview</command></term>
    350419        <listitem>
    351           <para>is a restricted version of <command>gview</command>.</para>
     420          <para>
     421            is a restricted version of <command>gview</command>.
     422          </para>
    352423          <indexterm zone="vim rgview">
    353424            <primary sortas="b-rgview">rgview</primary>
     
    359430        <term><command>rgvim</command></term>
    360431        <listitem>
    361           <para>is a restricted version of <command>gvim</command>. </para>
     432          <para>
     433            is a restricted version of <command>gvim</command>.
     434          </para>
    362435          <indexterm zone="vim gvim">
    363436            <primary sortas="b-gvim">gvim</primary>
Note: See TracChangeset for help on using the changeset viewer.