mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2026-02-20 08:38:34 +08:00
Add a variable which can be used to avoid overload
This commit is contained in:
13
README.md
13
README.md
@@ -98,6 +98,19 @@ endfunction
|
|||||||
|
|
||||||
Currently emmet-vim works regarding your HTML/CSS/JavaScript emmet settings, but it depends on how emmet-vim gets `filetype` and may change in the future. Feel free to report an issue if any problem appears.
|
Currently emmet-vim works regarding your HTML/CSS/JavaScript emmet settings, but it depends on how emmet-vim gets `filetype` and may change in the future. Feel free to report an issue if any problem appears.
|
||||||
|
|
||||||
|
## Avoid overload
|
||||||
|
|
||||||
|
Since there are many sub languages included, most delays come from syntax files overload. A variable named `b:current_loading_main_syntax` is set to `vue` which can be used as loading condition if you'd like to manually find and modify the syntax files causing overload.
|
||||||
|
|
||||||
|
For example, the builtin `sass.vim` and `less.vim` in vim8.1 will always load `css.vim` which this plugin already loads. It can be optimized like
|
||||||
|
|
||||||
|
```diff
|
||||||
|
- runtime! syntax/css.vim
|
||||||
|
+ if !exists("b:current_loading_main_syntax")
|
||||||
|
+ runtime! syntax/css.vim
|
||||||
|
+ endif
|
||||||
|
```
|
||||||
|
|
||||||
## Acknowledgments & Refs
|
## Acknowledgments & Refs
|
||||||
|
|
||||||
- [mxw/vim-jsx][1]
|
- [mxw/vim-jsx][1]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if exists("b:current_syntax") && b:current_syntax == 'vue'
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" For advanced users, this variable can be used to avoid overload
|
" For advanced users, this variable can be used to avoid overload
|
||||||
let b:current_main_syntax = 'vue'
|
let b:current_loading_main_syntax = 'vue'
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
"
|
"
|
||||||
" Config {{{
|
" Config {{{
|
||||||
|
|||||||
Reference in New Issue
Block a user