blob: 3454a4d694eb4b1c99458b90850dce57b2fa04ff [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 Moolenaar84f72352012-03-11 15:57:40 +01004" Last Change: 2012 Mar 07
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
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010014let s:cpo_save = &cpo
15set cpo&vim
16
Bram Moolenaar071d4272004-06-13 20:20:40 +000017" Set 'formatoptions' to break comment lines but not other lines, and insert
18" the comment leader when hitting <CR> or using "o".
19setlocal fo-=t fo+=croql
20
21setlocal com=:--
Bram Moolenaar446cb832008-06-24 21:56:24 +000022setlocal cms=--%s
Bram Moolenaar071d4272004-06-13 20:20:40 +000023setlocal suffixesadd=.lua
24
25
26" The following lines enable the macros/matchit.vim plugin for
27" extended matching with the % key.
Bram Moolenaar071d4272004-06-13 20:20:40 +000028if exists("loaded_matchit")
29
30 let b:match_ignorecase = 0
31 let b:match_words =
32 \ '\<\%(do\|function\|if\)\>:' .
33 \ '\<\%(return\|else\|elseif\)\>:' .
34 \ '\<end\>,' .
35 \ '\<repeat\>:\<until\>'
36
37endif " exists("loaded_matchit")
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010038
39let &cpo = s:cpo_save
40unlet s:cpo_save
Bram Moolenaar84f72352012-03-11 15:57:40 +010041
42let b:undo_ftplugin = "setlocal fo< com< cms< suffixesadd<"