7
|
1 " Vim filetype plugin file.
|
30202
|
2 " Language: Lua
|
26148
|
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
|
|
4 " Previous Maintainer: Max Ischenko <mfi@ukr.net>
|
30202
|
5 " Contributor: Dorai Sitaram <ds26@gte.com>
|
|
6 " Last Change: 2022 Sep 05
|
7
|
7
|
|
8 if exists("b:did_ftplugin")
|
|
9 finish
|
|
10 endif
|
|
11 let b:did_ftplugin = 1
|
|
12
|
3224
|
13 let s:cpo_save = &cpo
|
|
14 set cpo&vim
|
|
15
|
30202
|
16 setlocal comments=:--
|
|
17 setlocal commentstring=--\ %s
|
26148
|
18 setlocal formatoptions-=t formatoptions+=croql
|
7
|
19
|
30202
|
20 let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
|
21
|
7
|
22 setlocal suffixesadd=.lua
|
|
23
|
30202
|
24 let b:undo_ftplugin = "setlocal cms< com< def< fo< sua<"
|
7
|
25
|
26148
|
26 if exists("loaded_matchit") && !exists("b:match_words")
|
7
|
27 let b:match_ignorecase = 0
|
|
28 let b:match_words =
|
30202
|
29 \ '\<\%(do\|function\|if\)\>:' ..
|
|
30 \ '\<\%(return\|else\|elseif\)\>:' ..
|
|
31 \ '\<end\>,' ..
|
|
32 \ '\<repeat\>:\<until\>,' ..
|
|
33 \ '\%(--\)\=\[\(=*\)\[:]\1]'
|
|
34 let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase"
|
26148
|
35 endif
|
7
|
36
|
26148
|
37 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
30202
|
38 let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" ..
|
|
39 \ "All Files (*.*)\t*.*\n"
|
|
40 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
26148
|
41 endif
|
3224
|
42
|
|
43 let &cpo = s:cpo_save
|
|
44 unlet s:cpo_save
|
30202
|
45
|
|
46 " vim: nowrap sw=2 sts=2 ts=8 noet:
|