diff --git a/vim/vimrc b/vim/vimrc index 109990b..9b9948b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -106,6 +106,7 @@ let g:SuperTabDefaultCompletionType = "" " 前端 " xml html auto close +" js 补全 Plugin 'alvan/vim-closetag' let g:jedi#documentation_command = "" let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.launch,*.vue' @@ -113,6 +114,8 @@ Plugin 'marijnh/tern_for_vim' Plugin 'jiangmiao/auto-pairs' Plugin 'othree/javascript-libraries-syntax.vim' let g:used_javascript_libs = 'vue' +Plugin 'posva/vim-vue' + @@ -382,6 +385,8 @@ au BufNewFile,BufRead *.html,*.js,*.vue set shiftwidth=2 au BufNewFile,BufRead *.html,*.js,*.vue set expandtab au BufNewFile,BufRead *.html,*.js,*.vue set autoindent au BufNewFile,BufRead *.html,*.js,*.vue set fileformat=unix +" vue 补全js +autocmd BufEnter,BufRead *.vue set filetype=vue.javascript autocmd FileType vue syntax sync fromstart