mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-20 05:57:43 +00:00
0ba2766b69
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3079 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
30 lines
1004 B
XML
30 lines
1004 B
XML
<sect2><title> </title><para> </para></sect2>
|
|
|
|
<sect2><title>Configuring Vim</title>
|
|
|
|
<para>By default, <userinput>vim</userinput> runs in vi-compatible mode. Some
|
|
people might like this, but we prefer to run <userinput>vim</userinput> in its
|
|
own mode (else we wouldn't have included it in this book, but the original
|
|
<userinput>vi</userinput>). Create a default vim configuration file by running
|
|
the following:</para>
|
|
|
|
<screen><userinput>cat > /etc/vimrc << "EOF"</userinput>
|
|
" Begin /etc/vimrc
|
|
|
|
set nocompatible
|
|
set backspace=2
|
|
syntax on
|
|
|
|
" End /etc/vimrc
|
|
<userinput>EOF</userinput></screen>
|
|
|
|
<para>The <userinput>set nocompatible</userinput> will make
|
|
<userinput>vim</userinput> behave in a more useful way than the default
|
|
vi-compatible manner. The <userinput>set backspace=2</userinput> allows
|
|
backspacing over line breaks, autoindent and the start of insert. And the
|
|
<userinput>syntax on</userinput> switches on <userinput>vim</userinput>'s
|
|
semantic colouring.</para>
|
|
|
|
</sect2>
|
|
|