blob: 297833f4fb71e49eff993a2d95503ee4646a5f64 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file.
2" Language: Lua 4.0+
3" Maintainer: Max Ischenko <mfi@ukr.net>
Bram Moolenaar446cb832008-06-24 21:56:24 +00004" Last Change: 2008 Mar 25
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6" Only do this when not done yet for this buffer
7if exists("b:did_ftplugin")
8 finish
9endif
10
11" Don't load another plugin for this buffer
12let b:did_ftplugin = 1
13
14" Set 'formatoptions' to break comment lines but not other lines, and insert
15" the comment leader when hitting <CR> or using "o".
16setlocal fo-=t fo+=croql
17
18setlocal com=:--
Bram Moolenaar446cb832008-06-24 21:56:24 +000019setlocal cms=--%s
Bram Moolenaar071d4272004-06-13 20:20:40 +000020setlocal suffixesadd=.lua
21
22
23" The following lines enable the macros/matchit.vim plugin for
24" extended matching with the % key.
25
26set cpo-=C
27if exists("loaded_matchit")
28
29 let b:match_ignorecase = 0
30 let b:match_words =
31 \ '\<\%(do\|function\|if\)\>:' .
32 \ '\<\%(return\|else\|elseif\)\>:' .
33 \ '\<end\>,' .
34 \ '\<repeat\>:\<until\>'
35
36endif " exists("loaded_matchit")