blob: ce4134ae03696df01e106ca4a6853b7e5a28ad90 [file] [log] [blame]
MuntasirSZN5daaf232025-03-06 21:06:38 +01001" Vim filetype plugin file
2" Language: Tera
3" Maintainer: Muntasir Mahmud <muntasir.joypurhat@gmail.com>
MuntasirSZN14da0fb2025-03-09 08:49:14 +01004" Last Change: 2025 Mar 08
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +02005" 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121)
MuntasirSZN5daaf232025-03-06 21:06:38 +01006
7if exists("b:did_ftplugin")
8 finish
9endif
10let b:did_ftplugin = 1
11
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +020012let s:cpo_save = &cpo
13set cpo&vim
14
MuntasirSZN14da0fb2025-03-09 08:49:14 +010015setlocal autoindent
MuntasirSZN5daaf232025-03-06 21:06:38 +010016
MuntasirSZN14da0fb2025-03-09 08:49:14 +010017setlocal commentstring={#\ %s\ #}
18setlocal comments=s:{#,e:#}
19
20if exists("loaded_matchit")
21 let b:match_ignorecase = 0
22 let b:match_words = '{#:##\|#},{% *if:{% *else\>:{% *elif\>:{% *endif %},{% *for\>:{% *endfor %},{% *macro\>:{% *endmacro %},{% *block\>:{% *endblock %},{% *filter\>:{% *endfilter %},{% *set\>:{% *endset %},{% *raw\>:{% *endraw %},{% *with\>:{% *endwith %}'
23endif
24
25setlocal includeexpr=substitute(v:fname,'\\([^.]*\\)$','\\1','g')
26setlocal suffixesadd=.tera
27
28setlocal expandtab
29setlocal shiftwidth=2
30setlocal softtabstop=2
31
32let b:undo_ftplugin = "setlocal autoindent< commentstring< comments< " ..
33 \ "includeexpr< suffixesadd< expandtab< shiftwidth< softtabstop<"
34let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words"
Eisuke Kawashimafbbaa6e2025-04-16 18:20:59 +020035
36let &cpo = s:cpo_save
37unlet s:cpo_save