3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
4 " Last Change: 2013 Jun 01
6 " Only do this when not done yet for this buffer
7 if exists("b:did_ftplugin")
14 " Define some defaults in case the included ftplugins don't set them.
15 let s:undo_ftplugin = ""
16 let s:browsefilter = "All Files (*.*)\t*.*\n"
17 let s:match_words = ""
19 runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
23 " Override our defaults if these were set by an included ftplugin.
24 if exists("b:undo_ftplugin")
25 let s:undo_ftplugin = b:undo_ftplugin
28 if exists("b:browsefilter")
29 let s:browsefilter = b:browsefilter
32 if exists("b:match_words")
33 let s:match_words = b:match_words
37 runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
38 let b:did_ftplugin = 1
40 " Combine the new set of values with those previously included.
41 if exists("b:undo_ftplugin")
42 let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
44 if exists ("b:browsefilter")
45 let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
47 if exists("b:match_words")
48 let s:match_words = b:match_words . ',' . s:match_words
51 " Change the browse dialog on Win32 to show mainly Haml-related files
53 let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter
56 " Load the combined list of match_words for matchit.vim
57 if exists("loaded_matchit")
58 let b:match_words = s:match_words
61 setlocal comments= commentstring=-#\ %s
63 let b:undo_ftplugin = "setl cms< com< "
64 \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin