Installing Vim-6.1

Estimated build time:           0.81 SBU
Estimated required disk space:  24 MB

Contents of Vim

Last checked against version 6.1.

The Vim package contains a configurable text editor built to enable efficient text editing.

Vim installs the following:

Program Files

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

Alternatives to Vim

 

Vim Installation Dependencies

Last checked against version 6.0.

Bash: sh
Binutils: as, ld, strip
Diffutils: cmp, diff
Fileutils: chmod, cp, ln, mkdir, mv, rm, touch
Find: find
Gcc: cc1, collect2, cpp0, gcc
Grep: egrep, grep
Make: make
Net-tools: hostname
Sed: sed
Sh-utils: echo, expr, uname, whoami
Textutils: cat, tr, wc

 

Installation of Vim

This package requires its patch to be applied before you can install it. This patch fixes a compile problem with GCC-3.2:

patch -Np1 -i ../vim-6.1.patch

Prepare Vim to be compiled:

./configure --prefix=/usr

Continue with compiling the package:

make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\"

The meaning of the make option is:

Finish installing the package:

make install

Vim can run in old-fashioned vi mode by creating a symlink, which may be created with the following command:

ln -s vim /usr/bin/vi

If you plan to install the X Window system on your LFS system, you might want to re-compile Vim after you have installed X. Vim comes with a nice GUI version of the editor which requires X and a few other libraries to be installed. For more information read the Vim documentation.

 

Configuring Vim

By default, vim runs in vi compatible mode. Some people might like this, but we have a high preference to run vim in vim mode (else we wouldn't have included vim in this book, but the original vi). Create the /root/.vimrc by running the following:

cat > /root/.vimrc << "EOF"
" Begin /root/.vimrc

set nocompatible
set bs=2

" End /root/.vimrc
EOF