config-vim.xml 1004 B

1234567891011121314151617181920212223242526272829
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2><title>Configuring Vim</title>
  3. <para>By default, <userinput>vim</userinput> runs in vi-compatible mode. Some
  4. people might like this, but we prefer to run <userinput>vim</userinput> in its
  5. own mode (else we wouldn't have included it in this book, but the original
  6. <userinput>vi</userinput>). 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 <userinput>set nocompatible</userinput> will make
  16. <userinput>vim</userinput> behave in a more useful way than the default
  17. vi-compatible manner. The <userinput>set backspace=2</userinput> allows
  18. backspacing over line breaks, autoindent and the start of insert. And the
  19. <userinput>syntax on</userinput> switches on <userinput>vim</userinput>'s
  20. semantic colouring.</para>
  21. </sect2>