robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Barrett Ruthfix(ftplugin): source inherited Lua ftplugins0bb2f5cc08

master
2.1 KiB76 linesraw
1" Vim filetype plugin
2" Language:	Haml
3" Maintainer:	Tim Pope <vimNOSPAM@tpope.org>
4" Last Change:	2019 Dec 05
5"		2024 Jan 14 by Vim Project (browsefilter)
6
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9  finish
10endif
11
12let s:save_cpo = &cpo
13set cpo-=C
14
15" Define some defaults in case the included ftplugins don't set them.
16let s:undo_ftplugin = ""
17if has("win32")
18  let s:browsefilter = "All Files (*.*)\t*\n"
19else
20  let s:browsefilter = "All Files (*)\t*\n"
21endif
22let s:match_words = ""
23
24runtime! ftplugin/html[.]{vim,lua} ftplugin/html_*.{vim,lua} ftplugin/html/*.{vim,lua}
25unlet! b:did_ftplugin
26set matchpairs-=<:>
27
28" Override our defaults if these were set by an included ftplugin.
29if exists("b:undo_ftplugin")
30  let s:undo_ftplugin = b:undo_ftplugin
31  unlet b:undo_ftplugin
32endif
33if exists("b:browsefilter")
34  let s:browsefilter = b:browsefilter
35  unlet b:browsefilter
36endif
37if exists("b:match_words")
38  let s:match_words = b:match_words
39  unlet b:match_words
40endif
41
42runtime! ftplugin/ruby[.]{vim,lua} ftplugin/ruby_*.{vim,lua} ftplugin/ruby/*.{vim,lua}
43let b:did_ftplugin = 1
44
45let &l:define .= empty(&l:define ? '' : '\|') . '^\s*\%(%\w*\)\=\%(\.[[:alnum:]_-]\+\)*#'
46
47" Combine the new set of values with those previously included.
48if exists("b:undo_ftplugin")
49  let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
50endif
51if exists ("b:browsefilter")
52  let s:browsefilter = substitute(b:browsefilter,'\cAll Files (.*)\t\*\n','','') . s:browsefilter
53endif
54if exists("b:match_words")
55  let s:match_words = b:match_words . ',' . s:match_words
56endif
57
58" Change the browse dialog on Win32 and GTK to show mainly Haml-related files
59if has("gui_win32") || has("gui_gtk")
60  let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter
61endif
62
63" Load the combined list of match_words for matchit.vim
64if exists("loaded_matchit")
65  let b:match_words = s:match_words
66endif
67
68setlocal comments= commentstring=-#\ %s
69
70let b:undo_ftplugin = "setl def< cms< com< " .
71      \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
72
73let &cpo = s:save_cpo
74unlet s:save_cpo
75
76" vim:set sw=2: