mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-09 14:14:46 +08:00
fix: always use unlet! to ignore not exist error
This commit is contained in:
@@ -8,21 +8,20 @@
|
|||||||
se sw=2 ts=2
|
se sw=2 ts=2
|
||||||
|
|
||||||
let s:name = 'vim-vue-plugin'
|
let s:name = 'vim-vue-plugin'
|
||||||
let b:did_indent = 'init'
|
|
||||||
|
|
||||||
" Save the current JavaScript indentexpr.
|
" Save the current JavaScript indentexpr.
|
||||||
let b:vue_js_indentexpr = &indentexpr
|
let b:vue_js_indentexpr = &indentexpr
|
||||||
|
|
||||||
" load xml indent method
|
" load xml indent method
|
||||||
unlet b:did_indent
|
unlet! b:did_indent
|
||||||
runtime! indent/xml.vim
|
runtime! indent/xml.vim
|
||||||
|
|
||||||
" load pug indent method
|
" load pug indent method
|
||||||
unlet b:did_indent
|
unlet! b:did_indent
|
||||||
runtime! indent/pug.vim
|
runtime! indent/pug.vim
|
||||||
|
|
||||||
" load css indent method
|
" load css indent method
|
||||||
unlet b:did_indent
|
unlet! b:did_indent
|
||||||
runtime! indent/css.vim
|
runtime! indent/css.vim
|
||||||
|
|
||||||
let b:did_indent = 1
|
let b:did_indent = 1
|
||||||
|
|||||||
@@ -8,18 +8,16 @@
|
|||||||
" CREDITS: Inspired by mxw/vim-jsx.
|
" CREDITS: Inspired by mxw/vim-jsx.
|
||||||
"
|
"
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
let b:current_syntax = 'init'
|
|
||||||
|
|
||||||
" Load syntax/*.vim to syntax group
|
" Load syntax/*.vim to syntax group
|
||||||
if exists("g:vim_vue_plugin_load_full_syntax")
|
if exists("g:vim_vue_plugin_load_full_syntax")
|
||||||
\ && g:vim_vue_plugin_load_full_syntax == 1
|
\ && g:vim_vue_plugin_load_full_syntax == 1
|
||||||
unlet b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn include @HTMLSyntax syntax/html.vim
|
syn include @HTMLSyntax syntax/html.vim
|
||||||
|
|
||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn include @CSSSyntax syntax/css.vim
|
syn include @CSSSyntax syntax/css.vim
|
||||||
else
|
else
|
||||||
unlet b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn include @HTMLSyntax $VIMRUNTIME/syntax/html.vim
|
syn include @HTMLSyntax $VIMRUNTIME/syntax/html.vim
|
||||||
silent! syn include @HTMLSyntax $VIMRUNTIME/../vimfiles/syntax/html.vim
|
silent! syn include @HTMLSyntax $VIMRUNTIME/../vimfiles/syntax/html.vim
|
||||||
|
|
||||||
@@ -30,7 +28,7 @@ endif
|
|||||||
|
|
||||||
if exists("g:vim_vue_plugin_use_pug")
|
if exists("g:vim_vue_plugin_use_pug")
|
||||||
\ && g:vim_vue_plugin_use_pug == 1
|
\ && g:vim_vue_plugin_use_pug == 1
|
||||||
unlet b:current_syntax
|
unlet! b:current_syntax
|
||||||
syn include @PugSyntax syntax/pug.vim
|
syn include @PugSyntax syntax/pug.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user