2003-01-28 01:17:02 +00:00
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
<sect2><title>Configuring Vim</title>
|
|
|
|
|
2003-11-13 22:30:39 +00:00
|
|
|
<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>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2003-11-13 22:30:39 +00:00
|
|
|
<screen><userinput>cat > /etc/vimrc << "EOF"</userinput>
|
|
|
|
" Begin /etc/vimrc
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
set nocompatible
|
2003-11-13 22:30:39 +00:00
|
|
|
set backspace=2
|
|
|
|
syntax on
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2003-11-13 22:30:39 +00:00
|
|
|
" End /etc/vimrc
|
2003-10-10 00:22:07 +01:00
|
|
|
<userinput>EOF</userinput></screen>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2003-11-13 22:30:39 +00:00
|
|
|
<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>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect2>
|
|
|
|
|