summaryrefslogtreecommitdiffstats
path: root/ftplugin/mako.vim
blob: 48cc40a1d2ce76540305a75941078cf3ce162a0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let s:base = expand("<sfile>:h:h")
let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
let files = filter(globpath(&rtp, 'ftplugin/mako.vim', 1, 1), Filter)
if len(files) > 0
  exec 'source ' . files[0]
  finish
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1

" Vim filetype plugin file
" Language:     Mako
" Maintainer:   Randy Stauner <randy@magnificent-tears.com>
" Last Change:  2019-09-06
" Version:      0.2

if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1

setlocal comments=:##
setlocal commentstring=##%s

if exists("loaded_matchit")
  let b:match_ignorecase = 1
  let b:match_words = "<:>," .
  \ "<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>," .
  \ "<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>," .
  \ "<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>"
endif

endif