config-vim.xml 978 B

1234567891011121314151617181920212223242526272829
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2><title>Configuring Vim</title>
  3. <para>By default, <command>vim</command> runs in vi-compatible mode. Some
  4. people might like this, but we prefer to run <command>vim</command> in its
  5. own mode (else we wouldn't have included it in this book, but the original
  6. <command>vi</command>). Create a default vim configuration file by running
  7. the following:</para>
  8. <screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"</userinput>
  9. " Begin /etc/vimrc
  10. set nocompatible
  11. set backspace=2
  12. syntax on
  13. " End /etc/vimrc
  14. <userinput>EOF</userinput></screen>
  15. <para>The <emphasis>set nocompatible</emphasis> will make
  16. <command>vim</command> behave in a more useful way than the default
  17. vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows
  18. backspacing over line breaks, autoindent and the start of insert. And the
  19. <emphasis>syntax on</emphasis> switches on <command>vim</command>'s
  20. semantic colouring.</para>
  21. </sect2>