comparison runtime/ftplugin/eruby.vim @ 529:0d6092bb72e6

updated for version 7.0148
author vimboss
date Fri, 16 Sep 2005 21:47:57 +0000
parents
children f43150a669dc
comparison
equal deleted inserted replaced
528:66475621f0bf 529:0d6092bb72e6
1 " Vim filetype plugin
2 " Language: eRuby
3 " Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
4 " Info: $Id$
5 " URL: http://vim-ruby.sourceforge.net
6 " Anon CVS: See above site
7 " Licence: GPL (http://www.gnu.org)
8 " Disclaimer:
9 " This program is distributed in the hope that it will be useful,
10 " but WITHOUT ANY WARRANTY; without even the implied warranty of
11 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 " GNU General Public License for more details.
13 " ----------------------------------------------------------------------------
14
15 " Only do this when not done yet for this buffer
16 if (exists("b:did_ftplugin"))
17 finish
18 endif
19
20 let s:save_cpo = &cpo
21 set cpo-=C
22
23 " Define some defaults in case the included ftplugins don't set them.
24 let s:undo_ftplugin = ""
25 let s:browsefilter = "Ruby Files (*.rb)\t*.rb\n" .
26 \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
27 \ "All Files (*.*)\t*.*\n"
28 let s:match_words = ""
29
30 runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
31 unlet b:did_ftplugin
32
33 " Override our defaults if these were set by an included ftplugin.
34 if exists("b:undo_ftplugin")
35 let s:undo_ftplugin = b:undo_ftplugin
36 unlet b:undo_ftplugin
37 endif
38 if exists("b:browsefilter")
39 let s:browsefilter = b:browsefilter
40 unlet b:browsefilter
41 endif
42 if exists("b:match_words")
43 let s:match_words = b:match_words
44 unlet b:match_words
45 endif
46
47 runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
48 let b:did_ftplugin = 1
49
50 " Combine the new set of values with those previously included.
51 if exists("b:undo_ftplugin")
52 let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
53 endif
54 if exists ("b:browsefilter")
55 let s:browsefilter = b:browsefilter . s:browsefilter
56 endif
57 if exists("b:match_words")
58 let s:match_words = b:match_words . ',' . s:match_words
59 endif
60
61 " Change the browse dialog on Win32 to show mainly eRuby-related files
62 if has("gui_win32")
63 let b:browsefilter="eRuby Files (*.rhtml)\t*.rhtml\n" . s:browsefilter
64 endif
65
66 " Load the combined list of match_words for matchit.vim
67 if exists("loaded_matchit")
68 let b:match_words = s:match_words
69 endif
70
71 " TODO: comments=
72 setlocal commentstring=<%#%s%>
73
74 let b:undo_ftplugin = "setl cms< "
75 \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
76
77 let &cpo = s:save_cpo
78
79 " vim: nowrap sw=2 sts=2 ts=8 ff=unix: