]> git.donarmstrong.com Git - lilypond.git/commitdiff
Vim ftdetect: use `set ft' instead of `setf'.
authorPatrick McCarty <pnorcks@gmail.com>
Mon, 31 Aug 2009 05:32:03 +0000 (22:32 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Mon, 31 Aug 2009 05:44:53 +0000 (22:44 -0700)
Since filetype.vim is no longer distributed, the `setf' command will
only set the filetype if Vim's default filetype.vim does not detect a
matching filetype first.

Unfortunately, when certain lines begin with #(, the "generic" filetype
is matched, so the LilyPond-specific highlighting is never loaded.

A workaround is to use `set ft'; this sets the filetype to `lilypond'
unconditionally for all files ending in .ly or .ily, which is what we
want.

vim/lilypond-ftdetect.vim

index 9147fc81dd7fbf402601b874bd2a4835f0f6f5bc..756e65b80f9c86118de0b4e53a8e4776d74bfe48 100644 (file)
@@ -1,4 +1,4 @@
 "
 " Installed As:        vim/ftdetect/lilypond.vim
 "
-au! BufNewFile,BufRead *.ly,*.ily              setlilypond
+au! BufNewFile,BufRead *.ly,*.ily              set ft=lilypond