mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-07 21:24:50 +08:00
Update doc
This commit is contained in:
@@ -116,13 +116,14 @@ Now we use `g:vim_vue_plugin_config` as the only configuration variable.
|
|||||||
> Please check `:h dict`, `:h list` for details about the complex data types.
|
> Please check `:h dict`, `:h list` for details about the complex data types.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
One possible usage
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
let g:vim_vue_plugin_config = {
|
let g:vim_vue_plugin_config = {
|
||||||
\'syntax': {
|
\'syntax': {
|
||||||
\ 'template': ['html', 'pug'],
|
\ 'template': ['html', 'pug'],
|
||||||
\ 'script': ['javascript', 'typescript', 'coffee'],
|
\ 'script': ['javascript', 'typescript', 'coffee'],
|
||||||
\ 'style': ['css', 'scss'],
|
\ 'style': ['scss'],
|
||||||
\ 'i18n': ['json', 'yaml'],
|
\ 'i18n': ['json', 'yaml'],
|
||||||
\ 'route': 'json',
|
\ 'route': 'json',
|
||||||
\ 'docs': 'markdown',
|
\ 'docs': 'markdown',
|
||||||
@@ -225,7 +226,7 @@ This plugin provides functions to get the tag/subtype where the cursor is in.
|
|||||||
|
|
||||||
- `OnChangeVueSubtype(subtype)` An event listener that is called when subtype changes.
|
- `OnChangeVueSubtype(subtype)` An event listener that is called when subtype changes.
|
||||||
|
|
||||||
You can also define an event listener function `OnChangeVueSubtype(subtype)` in your `vimrc` to get the subtype and set its local options whenever it changes.
|
You can define it in your `vimrc` to set local options once the subtype changes.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" Example: set local options based on subtype
|
" Example: set local options based on subtype
|
||||||
|
|||||||
Reference in New Issue
Block a user