]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - vim/ftplugin/haml.vim
Update vim plugins
[rbdr/dotfiles] / vim / ftplugin / haml.vim
... / ...
CommitLineData
1" Vim filetype plugin
2" Language: Haml
3" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
4" Last Change: 2010 May 21
5
6" Only do this when not done yet for this buffer
7if exists("b:did_ftplugin")
8 finish
9endif
10
11let s:save_cpo = &cpo
12set cpo-=C
13
14" Define some defaults in case the included ftplugins don't set them.
15let s:undo_ftplugin = ""
16let s:browsefilter = "All Files (*.*)\t*.*\n"
17let s:match_words = ""
18
19runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
20unlet! b:did_ftplugin
21
22" Override our defaults if these were set by an included ftplugin.
23if exists("b:undo_ftplugin")
24 let s:undo_ftplugin = b:undo_ftplugin
25 unlet b:undo_ftplugin
26endif
27if exists("b:browsefilter")
28 let s:browsefilter = b:browsefilter
29 unlet b:browsefilter
30endif
31if exists("b:match_words")
32 let s:match_words = b:match_words
33 unlet b:match_words
34endif
35
36runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
37let b:did_ftplugin = 1
38
39" Combine the new set of values with those previously included.
40if exists("b:undo_ftplugin")
41 let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
42endif
43if exists ("b:browsefilter")
44 let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter
45endif
46if exists("b:match_words")
47 let s:match_words = b:match_words . ',' . s:match_words
48endif
49
50" Change the browse dialog on Win32 to show mainly Haml-related files
51if has("gui_win32")
52 let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter
53endif
54
55" Load the combined list of match_words for matchit.vim
56if exists("loaded_matchit")
57 let b:match_words = s:match_words
58endif
59
60setlocal comments= commentstring=-#\ %s
61
62let b:undo_ftplugin = "setl cms< com< "
63 \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
64
65let &cpo = s:save_cpo
66
67" vim:set sw=2: