| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  <!ENTITY % patches-entities SYSTEM "../patches.ent">  %general-entities;  %patches-entities;]><sect1 id="ch-system-vim" role="wrap"><title>Vim-&vim-version;</title><?dbhtml filename="vim.html"?><indexterm zone="ch-system-vim"><primary sortas="a-Vim">Vim</primary></indexterm><sect2 role="package"><title/><para>The Vim package contains a powerful text editor.</para><segmentedlist><segtitle>&buildtime;</segtitle><segtitle>&diskspace;</segtitle><seglistitem><seg>0.4 SBU</seg><seg>34 MB</seg></seglistitem></segmentedlist><segmentedlist><segtitle>&dependencies;</segtitle><seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem></segmentedlist><tip><title>Alternatives to Vim</title><para>If you prefer another editor—such as Emacs, Joe, orNano—please refer to <ulink url="&blfs-root;view/svn/postlfs/editors.html"/>for suggested installation instructions.</para></tip></sect2><sect2 role="installation"><title>Installation of Vim</title><para>First, unpack both<filename>vim-&vim-version;.tar.bz2</filename> and (optionally)<filename>vim-&vim-version;-lang.tar.gz</filename> archives into thesame directory. Then, change the default locations of the<filename>vimrc</filename> and <filename>gvimrc</filename>configuration files to <filenameclass="directory">/etc</filename>:</para><screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.hecho '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h</userinput></screen><para>Vim has a security vulnerability already addressed upstream.  Thefollowing patch fixes the problem:</para><screen><userinput>patch -Np1 -i ../&vim-security_fix-patch;</userinput></screen><para>Now prepare Vim for compilation:</para><screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen><para>The optional but highly recommended<parameter>--enable-multibyte</parameter> switch includes support forediting files in multibyte character encodings into<command>vim</command>.  This is needed if using a locale witha multibyte character set. This switch is also helpful to be able toedit text files initially created in Linux distributions like FedoraCore that use UTF-8 as a default character set.</para><para>Compile the package:</para><screen><userinput>make</userinput></screen><para>To test the results, issue:<userinput>make test</userinput>. However, this test suite outputs alot of chaotic characters to the screen, which can cause issues withthe settings of the current terminal. Therefore, running the testsuite here is optional.</para><para>Install the package:</para><screen><userinput>make install</userinput></screen><para>Many users are used to using <command>vi</command> instead of<command>vim</command>. To allow execution of <command>vim</command>when users habitually enter <command>vi</command>, create asymlink:</para><screen><userinput>ln -s vim /usr/bin/vi</userinput></screen><para>If the X Window System is going to be installed on the LFSsystem, it may be necessary to recompile Vim after installing X. Vimcomes with a GUI version of the editor that requires X and someadditional libraries to be installed. For more information on thisprocess, refer to the Vim documentation and the Vim installation pagein the BLFS book at <ulinkurl="&blfs-root;view/svn/postlfs/editors.html#postlfs-editors-vim"/>.</para></sect2><sect2 id="conf-vim" role="configuration"><title>Configuring Vim</title><indexterm zone="conf-vim"><primary sortas="e-/etc/vim">/etc/vim</primary></indexterm><para>By default, <command>vim</command> runs in vi-incompatible mode.This may be new to users who have used other editors in the past. The<quote>nocompatible</quote> setting is included below to highlight thefact that a new behavior is being used. It also reminds those whowould change to <quote>compatible</quote> mode that it should appearfirst.  This is necessary because it changes other settings, andoverrides must come after this setting.  Create a default <command>vim</command>configuration file by running the following:</para><screen><userinput>cat > /etc/vimrc << "EOF"<literal>" Begin /etc/vimrcset nocompatibleset backspace=2syntax onif (&term == "iterm") || (&term == "putty")  set background=darkendif" End /etc/vimrc</literal>EOF</userinput></screen><para>The <parameter>set nocompatible</parameter> makes<command>vim</command> behave in a more useful way (the default) thanthe vi-compatible manner. Remove the <quote>no</quote> to keep the old <command>vi</command> behavior. The <parameter>setbackspace=2</parameter> allows backspacing over line breaks,autoindents, and the start of insert. The <parameter>syntaxon</parameter> enables vim's syntax highlighting. Finally, the<emphasis>if</emphasis> statement with the <parameter>setbackground=dark</parameter> corrects <command>vim</command>'s guessabout the background color of some terminal emulators. This gives thehighlighting a better color scheme for use on the black background ofthese programs.</para><para>Documentation for other available options can be obtained byrunning the following command:</para><screen><userinput>vim -c ':options'</userinput></screen></sect2><sect2 id="contents-vim" role="content"><title>Contents of Vim</title><segmentedlist><segtitle>Installed programs</segtitle><seglistitem><seg>efm_filter.pl, efm_perl.pl, ex (link to vim), less.sh, mve.awk, pltags.pl, ref, rview (link to vim), rvim (link to vim), shtags.pl, tcltags, vi (link to vim), view (link to vim), vim, vim132, vim2html.pl, vimdiff (link to vim), vimm, vimspell.sh, vimtutor, and xxd</seg></seglistitem></segmentedlist><variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead><?dbfo list-presentation="list"?><?dbhtml list-presentation="table"?><varlistentry id="efm_filter.pl"><term><command>efm_filter.pl</command></term><listitem><para>A filter for creating an error file that can be read by <command>vim</command></para><indexterm zone="ch-system-vim efm_filter.pl"><primary sortas="b-efm_filter.pl">efm_filter.pl</primary></indexterm></listitem></varlistentry><varlistentry id="efm_perl.pl"><term><command>efm_perl.pl</command></term><listitem><para>Reformats the error messages of thePerl interpreter for use with the <quote>quickfix</quote> mode of <command>vim</command></para><indexterm zone="ch-system-vim efm_perl.pl"><primary sortas="b-efm_perl.pl">efm_perl.pl</primary></indexterm></listitem></varlistentry><varlistentry id="ex"><term><command>ex</command></term><listitem><para>Starts <command>vim</command> in ex mode</para><indexterm zone="ch-system-vim ex"><primary sortas="b-ex">ex</primary></indexterm></listitem></varlistentry><varlistentry id="less.sh"><term><command>less.sh</command></term><listitem><para>A script that starts <command>vim</command> with less.vim</para><indexterm zone="ch-system-vim less.sh"><primary sortas="b-less.sh">less.sh</primary></indexterm></listitem></varlistentry><varlistentry id="mve.awk"><term><command>mve.awk</command></term><listitem><para>Processes <command>vim</command> errors</para><indexterm zone="ch-system-vim mve.awk"><primary sortas="b-mve.awk">mve.awk</primary></indexterm></listitem></varlistentry><varlistentry id="pltags.pl"><term><command>pltags.pl</command></term><listitem><para>Creates a tags file for Perl code for use by <command>vim</command></para><indexterm zone="ch-system-vim pltags.pl"><primary sortas="b-pltags.pl">pltags.pl</primary></indexterm></listitem></varlistentry><varlistentry id="ref"><term><command>ref</command></term><listitem><para>Checks the spelling of arguments</para><indexterm zone="ch-system-vim ref"><primary sortas="b-ref">ref</primary></indexterm></listitem></varlistentry><varlistentry id="rview"><term><command>rview</command></term><listitem><para>Is a restricted version of <command>view</command>; no shellcommands can be started and <command>view</command> cannot be suspended</para><indexterm zone="ch-system-vim rview"><primary sortas="b-rview">rview</primary></indexterm></listitem></varlistentry><varlistentry id="rvim"><term><command>rvim</command></term><listitem><para>Is a restricted version of <command>vim</command>; no shellcommands can be started and <command>vim</command> cannot be suspended</para><indexterm zone="ch-system-vim rvim"><primary sortas="b-rvim">rvim</primary></indexterm></listitem></varlistentry><varlistentry id="shtags.pl"><term><command>shtags.pl</command></term><listitem><para>Generates a tag file for Perl scripts</para><indexterm zone="ch-system-vim shtags.pl"><primary sortas="b-shtags.pl">shtags.pl</primary></indexterm></listitem></varlistentry><varlistentry id="tcltags"><term><command>tcltags</command></term><listitem><para>Generates a tag file for TCL code</para><indexterm zone="ch-system-vim tcltags"><primary sortas="b-tcltags">tcltags</primary></indexterm></listitem></varlistentry><varlistentry id="view"><term><command>view</command></term><listitem><para>Starts <command>vim</command> in read-only mode</para><indexterm zone="ch-system-vim view"><primary sortas="b-view">view</primary></indexterm></listitem></varlistentry><varlistentry id="vi"><term><command>vi</command></term><listitem><para>Is the editor</para><indexterm zone="ch-system-vim vi"><primary sortas="b-vi">vi</primary></indexterm></listitem></varlistentry><varlistentry id="vim"><term><command>vim</command></term><listitem><para>Is the editor</para><indexterm zone="ch-system-vim vim"><primary sortas="b-vim">vim</primary></indexterm></listitem></varlistentry><varlistentry id="vim132"><term><command>vim132</command></term><listitem><para>Starts <command>vim</command> with the terminal in 132-column mode</para><indexterm zone="ch-system-vim vim132"><primary sortas="b-vim132">vim132</primary></indexterm></listitem></varlistentry><varlistentry id="vim2html.pl"><term><command>vim2html.pl</command></term><listitem><para>Converts Vim documentation to HypterText Markup Language (HTML)</para><indexterm zone="ch-system-vim vim2html.pl"><primary sortas="b-vim2html.pl">vim2html.pl</primary></indexterm></listitem></varlistentry><varlistentry id="vimdiff"><term><command>vimdiff</command></term><listitem><para>Edits two or three versions of a file with <command>vim</command> and show differences</para><indexterm zone="ch-system-vim vimdiff"><primary sortas="b-vimdiff">vimdiff</primary></indexterm></listitem></varlistentry><varlistentry id="vimm"><term><command>vimm</command></term><listitem><para>Enables the DEC locator input model on a remote terminal</para><indexterm zone="ch-system-vim vimm"><primary sortas="b-vimm">vimm</primary></indexterm></listitem></varlistentry><varlistentry id="vimspell.sh"><term><command>vimspell.sh</command></term><listitem><para>Spells a file and generates the syntax statements necessary to highlight in <command>vim</command>. This script requires the old Unix <command>spell</command>command, which is provided neither in LFS nor in BLFS</para><indexterm zone="ch-system-vim vimspell.sh"><primary sortas="b-vimspell.sh">vimspell.sh</primary></indexterm></listitem></varlistentry><varlistentry id="vimtutor"><term><command>vimtutor</command></term><listitem><para>Teaches the basic keys and commands of <command>vim</command></para><indexterm zone="ch-system-vim vimtutor"><primary sortas="b-vimtutor">vimtutor</primary></indexterm></listitem></varlistentry><varlistentry id="xxd"><term><command>xxd</command></term><listitem><para>Creates a hex dump of the given file; it canalso do the reverse, so it can be used for binary patching</para><indexterm zone="ch-system-vim xxd"><primary sortas="b-xxd">xxd</primary></indexterm></listitem></varlistentry></variablelist></sect2></sect1>
 |