Update README
test / vim stable (push) Canceled after 0s
test / vim v8.2.0000 (push) Canceled after 0s
test / nvim stable (push) Canceled after 0s
test / nvim v0.9.5 (push) Canceled after 0s
test / shared cases with vim-svelte-plugin (push) Canceled after 0s

- Add tested Vim and Neovim versions and the lnum argument of GetVueTag()
- Remove the tip to edit $VIMRUNTIME/syntax/vue.vim, which isn't loaded
  as this plugin is added to the start of runtimepath
- Add ./test/shared.sh to test commands
This commit is contained in:
leafOfTree committed 2026-10-21 14:12:47 +00:00
1 parent b8bcfbdd69
commit 18c1d17f59
1 file changed
+4 -11
+4 -11
View File
@@ -14,7 +14,7 @@ Vim syntax and indent plugin for `.vue` files. Mainly inspired by [mxw/vim-jsx][
## Installation ## Installation
You could install it just like other plugins. The filetype will be set to `vue`. Feel free to open an issue or a pull request if any questions You could install it just like other plugins. The filetype will be set to `vue`. It's tested with Vim 8.2+ and Neovim 0.9+. Feel free to open an issue or a pull request if any questions
See `:help vim-vue-plugin` for the documentation in Vim. See `:help vim-vue-plugin` for the documentation in Vim.
@@ -150,7 +150,7 @@ There are more than one language in `.vue` file. Different mappings, completions
This plugin provides functions to get the tag/syntax where the cursor is in This plugin provides functions to get the tag/syntax where the cursor is in
- `GetVueTag() => String` Return value is one of `'template', 'script', 'style'` - `GetVueTag([lnum]) => String` Return value is the block tag like `'template', 'script', 'style'`, or `''`, at line `lnum` or the cursor line
```vim ```vim
" Example " Example
@@ -196,7 +196,7 @@ For `sass` using emmet-vim, please check out [this issue][17]
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 a loading condition if you'd like to manually find and modify the syntax files causing 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 a loading condition if you'd like to manually find and modify the syntax files causing overload
For example, the built-in syntax `sass.vim` and `less.vim` in vim8.1 runtime and `pug.vim` in vim-pug/syntax always load `css.vim` which this plugin already loads. It can be optimized like For example, the built-in syntax `sass.vim` and `less.vim` in Vim runtime and `pug.vim` in vim-pug/syntax always load `css.vim` which this plugin already loads. It can be optimized like
`$VIMRUNTIME/syntax/sass.vim` `$VIMRUNTIME/syntax/sass.vim`
```diff ```diff
@@ -206,14 +206,6 @@ For example, the built-in syntax `sass.vim` and `less.vim` in vim8.1 runtime and
+ endif + endif
``` ```
`$VIMRUNTIME/syntax/vue.vim`
```diff
- runtime! syntax/html.vim
+ if !exists("b:current_loading_main_syntax")
+ runtime! syntax/html.vim
+ endif
```
## Tests ## Tests
Run tests with Vim and Neovim, whichever is installed Run tests with Vim and Neovim, whichever is installed
@@ -222,6 +214,7 @@ Run tests with Vim and Neovim, whichever is installed
./test/run.sh ./test/run.sh
./test/run.sh basic template # Only these cases ./test/run.sh basic template # Only these cases
VUE_TEST_EDITORS=nvim ./test/run.sh # Only Neovim VUE_TEST_EDITORS=nvim ./test/run.sh # Only Neovim
./test/shared.sh # Compare shared-* cases with vim-svelte-plugin
``` ```
Each case is a `.vue` or `.wpy` file in [test/cases](test/cases), with an optional `.vim` file for the config and checks. A case fails if Each case is a `.vue` or `.wpy` file in [test/cases](test/cases), with an optional `.vim` file for the config and checks. A case fails if