MuntasirSZN | 5daaf23 | 2025-03-06 21:06:38 +0100 | [diff] [blame] | 1 | " Vim filetype plugin file |
| 2 | " Language: Tera |
| 3 | " Maintainer: Muntasir Mahmud <muntasir.joypurhat@gmail.com> |
MuntasirSZN | 14da0fb | 2025-03-09 08:49:14 +0100 | [diff] [blame] | 4 | " Last Change: 2025 Mar 08 |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 5 | " 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121) |
MuntasirSZN | 5daaf23 | 2025-03-06 21:06:38 +0100 | [diff] [blame] | 6 | |
| 7 | if exists("b:did_ftplugin") |
| 8 | finish |
| 9 | endif |
| 10 | let b:did_ftplugin = 1 |
| 11 | |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 12 | let s:cpo_save = &cpo |
| 13 | set cpo&vim |
| 14 | |
MuntasirSZN | 14da0fb | 2025-03-09 08:49:14 +0100 | [diff] [blame] | 15 | setlocal autoindent |
MuntasirSZN | 5daaf23 | 2025-03-06 21:06:38 +0100 | [diff] [blame] | 16 | |
MuntasirSZN | 14da0fb | 2025-03-09 08:49:14 +0100 | [diff] [blame] | 17 | setlocal commentstring={#\ %s\ #} |
| 18 | setlocal comments=s:{#,e:#} |
| 19 | |
| 20 | if 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 %}' |
| 23 | endif |
| 24 | |
| 25 | setlocal includeexpr=substitute(v:fname,'\\([^.]*\\)$','\\1','g') |
| 26 | setlocal suffixesadd=.tera |
| 27 | |
| 28 | setlocal expandtab |
| 29 | setlocal shiftwidth=2 |
| 30 | setlocal softtabstop=2 |
| 31 | |
| 32 | let b:undo_ftplugin = "setlocal autoindent< commentstring< comments< " .. |
| 33 | \ "includeexpr< suffixesadd< expandtab< shiftwidth< softtabstop<" |
| 34 | let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 35 | |
| 36 | let &cpo = s:cpo_save |
| 37 | unlet s:cpo_save |