mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-02-01 11:52:31 +00:00
90e3cb3f0e
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3203 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
30 lines
978 B
XML
30 lines
978 B
XML
<sect2><title> </title><para> </para></sect2>
|
|
|
|
<sect2><title>Configuring Vim</title>
|
|
|
|
<para>By default, <command>vim</command> runs in vi-compatible mode. Some
|
|
people might like this, but we prefer to run <command>vim</command> in its
|
|
own mode (else we wouldn't have included it in this book, but the original
|
|
<command>vi</command>). 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 <emphasis>set nocompatible</emphasis> will make
|
|
<command>vim</command> behave in a more useful way than the default
|
|
vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows
|
|
backspacing over line breaks, autoindent and the start of insert. And the
|
|
<emphasis>syntax on</emphasis> switches on <command>vim</command>'s
|
|
semantic colouring.</para>
|
|
|
|
</sect2>
|
|
|