From 173aea3c22a648219286575b96fe11030df56bb5 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 30 Jan 2018 18:35:44 +0000 Subject: Update /etc/vimrc to set defaults properly git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11358 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/vim.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'chapter06') diff --git a/chapter06/vim.xml b/chapter06/vim.xml index 6b06c01f1..fa2bad722 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -128,9 +128,13 @@ done cat > /etc/vimrc << "EOF" " Begin /etc/vimrc +" Ensure defaults are set before customizing settings, not after +source $VIMRUNTIME/defaults.vim +let skip_defaults_vim=1 + set nocompatible set backspace=2 -set mouse=r +set mouse= syntax on if (&term == "xterm") || (&term == "putty") set background=dark @@ -138,9 +142,7 @@ endif " End /etc/vimrc -EOF - -touch ~/.vimrc +EOF The set nocompatible setting makes vim behave in a more useful way (the default) than the @@ -148,18 +150,18 @@ touch ~/.vimrc vi behavior. The set backspace=2 setting allows backspacing over line breaks, autoindents, and the start of insert. The syntax on parameter enables vim's syntax - highlighting. The set mouse=r setting enables + highlighting. The set mouse= setting enables proper pasting of text with the mouse when working in chroot or over a remote connection. Finally, the if statement with the set background=dark setting corrects vim's guess about the background color of some terminal emulators. This gives the highlighting a better color scheme for use on the black background of these programs. - + Documentation for other available options can be obtained by running the following command: -- cgit v1.2.3-54-g00ecf