1
0
Fork 0
mirror of synced 2024-07-01 04:51:10 -04:00
ultimate-vim/.vim_runtime/sources_non_forked/vim-bundle-mako/ftdetect/mako.vim
2022-04-13 17:21:09 +08:00

12 lines
613 B
VimL

if !exists("g:mako_detect_lang_from_ext")
let g:mako_detect_lang_from_ext = 1
endif
if g:mako_detect_lang_from_ext
au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
" it's important to get this before any of the normal BufRead autocmds execute
" for this file, otherwise a mako tag at the start of the file can cause the
" filetype to be set to mason
au BufReadPre *.*.mako execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype
endif
au BufRead,BufNewFile *.mako set filetype=mako