mirror of
https://github.com/wuelnerdotexe/vim-astro.git
synced 2025-12-06 09:14:26 +08:00
fix(ftdetect): filetype is detected in vim and neovim
This commit is contained in:
@@ -3,14 +3,8 @@
|
||||
" Author: Wuelner Martínez <wuelner.martinez@outlook.com>
|
||||
" Maintainer: Wuelner Martínez <wuelner.martinez@outlook.com>
|
||||
" URL: https://github.com/wuelnerdotexe/vim-astro
|
||||
" Last Change: 2022 Aug 22
|
||||
" Last Change: 2022 Aug 24
|
||||
|
||||
" Whether to set the Astro filetype on *.astro files.
|
||||
function! s:DetectFiletypeAstro()
|
||||
if (&filetype ==# '') || (&filetype !=# 'astro')
|
||||
setfiletype astro
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd BufNewFile,BufRead *.astro call <SID>DetectFiletypeAstro()
|
||||
autocmd BufNewFile,BufRead *.astro setfiletype astro
|
||||
" vim: ts=8
|
||||
|
||||
Reference in New Issue
Block a user