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 |
MuntasirSZN | 5daaf23 | 2025-03-06 21:06:38 +0100 | [diff] [blame] | 5 | |
| 6 | if exists("b:did_ftplugin") |
| 7 | finish |
| 8 | endif |
| 9 | let b:did_ftplugin = 1 |
| 10 | |
MuntasirSZN | 14da0fb | 2025-03-09 08:49:14 +0100 | [diff] [blame] | 11 | setlocal autoindent |
MuntasirSZN | 5daaf23 | 2025-03-06 21:06:38 +0100 | [diff] [blame] | 12 | |
MuntasirSZN | 14da0fb | 2025-03-09 08:49:14 +0100 | [diff] [blame] | 13 | setlocal commentstring={#\ %s\ #} |
| 14 | setlocal comments=s:{#,e:#} |
| 15 | |
| 16 | if exists("loaded_matchit") |
| 17 | let b:match_ignorecase = 0 |
| 18 | let b:match_words = '{#:##\|#},{% *if:{% *else\>:{% *elif\>:{% *endif %},{% *for\>:{% *endfor %},{% *macro\>:{% *endmacro %},{% *block\>:{% *endblock %},{% *filter\>:{% *endfilter %},{% *set\>:{% *endset %},{% *raw\>:{% *endraw %},{% *with\>:{% *endwith %}' |
| 19 | endif |
| 20 | |
| 21 | setlocal includeexpr=substitute(v:fname,'\\([^.]*\\)$','\\1','g') |
| 22 | setlocal suffixesadd=.tera |
| 23 | |
| 24 | setlocal expandtab |
| 25 | setlocal shiftwidth=2 |
| 26 | setlocal softtabstop=2 |
| 27 | |
| 28 | let b:undo_ftplugin = "setlocal autoindent< commentstring< comments< " .. |
| 29 | \ "includeexpr< suffixesadd< expandtab< shiftwidth< softtabstop<" |
| 30 | let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" |