From: Patrick McCarty Date: Mon, 31 Aug 2009 05:32:03 +0000 (-0700) Subject: Vim ftdetect: use `set ft' instead of `setf'. X-Git-Tag: release/2.13.4-1~107 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4a4d60e6a8d01d94137e04c5c4f5c5048a3785e1;p=lilypond.git Vim ftdetect: use `set ft' instead of `setf'. 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. --- diff --git a/vim/lilypond-ftdetect.vim b/vim/lilypond-ftdetect.vim index 9147fc81dd..756e65b80f 100644 --- a/vim/lilypond-ftdetect.vim +++ b/vim/lilypond-ftdetect.vim @@ -1,4 +1,4 @@ " " Installed As: vim/ftdetect/lilypond.vim " -au! BufNewFile,BufRead *.ly,*.ily setf lilypond +au! BufNewFile,BufRead *.ly,*.ily set ft=lilypond