From 21a15e0c5a85e70b47af4310cd732a42f6f2a1d7 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Wed, 18 Nov 2020 10:41:05 +0800 Subject: [PATCH] Update doc --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5870362..65fd14b 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ As there are more than one language in `.vue` file, the different behaviors like This plugin provides functions to get the tag/subtype where the cursor is in. -- `GetVueTag() => String` Return value is `'template'`, `'script'` or `'style'`. +- `GetVueTag() => String` Return value is one of `'template', 'script', 'style'`. ```vim " Example @@ -102,14 +102,14 @@ This plugin provides functions to get the tag/subtype where the cursor is in. endfunction ``` -- `GetVueSubtype() => String` Return value is one of `'html', 'javascript', 'css', 'scss', ...` +- `GetVueSubtype() => String` Return value is one of `'html', 'javascript', 'css', 'scss', ...`. 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. ```vim -" Set local options based on subtype +" Example: set local options based on subtype function! OnChangeVueSubtype(subtype) - " echom 'Subtype is '.a:subtype + echom 'Subtype is '.a:subtype if a:subtype == 'html' setlocal commentstring= setlocal comments=s: