From 0ba2766b69ef1911d436eaf6cd6be684be50fc74 Mon Sep 17 00:00:00 2001 From: Alex Gronenwoud Date: Thu, 13 Nov 2003 22:30:39 +0000 Subject: Creating a system-wide vimrc file, as suggested by Greg. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3079 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/config-vim.xml | 25 +++++++++++++++++-------- chapter06/vim.xml | 17 +++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) (limited to 'chapter06') diff --git a/chapter06/config-vim.xml b/chapter06/config-vim.xml index 48a5a05ff..ab9aea8bf 100644 --- a/chapter06/config-vim.xml +++ b/chapter06/config-vim.xml @@ -2,19 +2,28 @@ 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: +By default, vim runs in vi-compatible mode. Some +people might like this, but we prefer to run vim in its +own mode (else we wouldn't have included it in this book, but the original +vi). Create a default vim configuration file by running +the following: -cat > /root/.vimrc << "EOF" -" Begin /root/.vimrc +cat > /etc/vimrc << "EOF" +" Begin /etc/vimrc set nocompatible -set bs=2 +set backspace=2 +syntax on -" End /root/.vimrc +" End /etc/vimrc EOF +The set nocompatible will make +vim behave in a more useful way than the default +vi-compatible manner. The set backspace=2 allows +backspacing over line breaks, autoindent and the start of insert. And the +syntax on switches on vim's +semantic colouring. + diff --git a/chapter06/vim.xml b/chapter06/vim.xml index e0efd0ebd..8eb1bb7d2 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -22,7 +22,7 @@ suggested installation instructions. Installation of Vim -Change the default locations of the vimrc and +First change the default locations of the vimrc and gvimrc files to /etc. @@ -41,18 +41,19 @@ echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h< make install -Vim can run in old-fashioned vi mode by -creating a symlink, which may be created with the following command: +When called as vi, vim +will run in old-fashioned vi-mode. To allow this, create a symlink: 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. +If you are going to install the X Window system on your LFS system, you +may want to re-compile Vim after having installed X. Vim comes with a nice GUI +version of the editor that requires X and a few other libraries to be +installed. For more information read the Vim documentation. + &c6-cf-vim; + -- cgit v1.2.3-54-g00ecf