Files
vim-vue-plugin/filetype.vim
2019-04-25 18:50:32 +08:00

17 lines
371 B
VimL

au BufNewFile,BufRead *.vue,*.wpy call s:setFiletype()
function! s:setFiletype()
" enable javascript autocmds first
let &filetype = 'javascript'
" then set filetype
let &filetype = 'javascript.vue'
endfunction
if !exists("g:vim_vue_plugin_has_init_indent")
let ext = expand("%:e")
if ext == 'wpy'
let g:vim_vue_plugin_has_init_indent = 1
endif
endif