Robert Connolly wrote:
Strange that it works for me. I changed the book to use isdirectory.
Maybe a bit different setup.
I guess, that we don't need the has() as we compiled syntax support in
few lines above. And maybe explain why have we done that.
Index: chapter06/vim.xml
===================================================================
--- chapter06/vim.xml (revision 1038)
+++ chapter06/vim.xml (working copy)
@@ -175,9 +175,7 @@
set nocompatible
set backspace=2
if (isdirectory("/usr/share/vim"))
- if has('syntax')
syntax on
- endif
endif
if (&term == "iterm") || (&term == "putty")
set background=dark
@@ -191,8 +189,10 @@
the vi-compatible manner. Remove the <quote>no</quote> to keep the
old <command>vi</command> behavior. The <parameter>set
backspace=2</parameter> setting allows backspacing over line breaks,
- autoindents, and the start of insert. The <parameter>syntax
- on</parameter> parameter enables vim's syntax highlighting. Finally,
+ autoindents, and the start of insert. The <emphasis>if</emphasis>
+ statement</emphasis> with <parameter>syntax on</parameter> parameter
+ enables vim's syntax highlighting only when <emphasis>/usr</emphasis>
+ is mounted to prevent warnings about missing syntax files. Finally,
the <emphasis>if</emphasis> statement with the <parameter>set
background=dark</parameter> setting corrects <command>vim</command>'s
guess about the background color of some terminal emulators. This
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page