
Linux From Scratch - Version 7.0
191
6.61. Vim-7.3
The Vim package contains a powerful text editor.
Approximate build time: 1.0 SBU
Required disk space: 87 MB
Alternatives to Vim
If you prefer another editor—such as Emacs, Joe, or Nano—please refer to http://www.linuxfromscratch.
org/blfs/view/svn/postlfs/editors.html for suggested installation instructions.
6.61.1. Installation of Vim
First, change the default location of the vimrc configuration file to /etc:
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
Now prepare Vim for compilation:
./configure --prefix=/usr --enable-multibyte
The meaning of the configure options:
--enable-multibyte
This switch enables support for editing files in multibyte character encodings. This is needed if using a locale
with a multibyte character set. This switch is also helpful to be able to edit text files initially created in Linux
distributions like Fedora that use UTF-8 as a default character set.
Compile the package:
make
To test the results, issue:
make test
However, this test suite outputs a lot of binary data to the screen, which can cause issues with the settings of the
current terminal. This can be resolved by redirecting the output to a log file. A successful test will result in the words
"ALL DONE" at completion.
Install the package:
make install
Many users are used to using vi instead of vim. To allow execution of vim when users habitually enter vi, create a
symlink for both the binary and the man page in the provided languages:
ln -sv vim /usr/bin/vi
for L in /usr/share/man/{,*/}man1/vim.1; do
ln -sv vim.1 $(dirname $L)/vi.1
done
Comentarios a estos manuales