Files
vim-vue-plugin/README.md
2018-10-10 11:00:21 +08:00

49 lines
1.3 KiB
Markdown

# vim-vue-plugin
Vim syntax and indent plugin for `.vue` and `.wpy` files. Mainly inspired by [mxw/vim-jsx][1].
## Install
- Use [VundleVim][2]
Plugin 'leafOfTree/vim-vue-plugin'
- Or manual: download `vim-vue-plugin` and drop it in `Vim/vimfiles`.
Plugin works if filetype is set to `javascript.vue`. Please stay up to date. Any issue or pull request is welcome.
## How it works
Since `.vue` is a combination of CSS, HTML and JavaScript, so is `vim-vue-plugin`. (Like XML and JavaScript for `.jsx`).
- Support Pug(`<template lang="pug">`) with [vim-pug][4].
- Support `.wpy` files from [WePY](https://tencent.github.io/wepy)
## Configuration
Set global variable to `1` to enable or `0` to disable.
`g:vim_vue_plugin_has_init_indent`: initially indent one tab inside `style/script` tags. (default: 0 for `.vue` and 1 for `.wpy`)
let g:vim_vue_plugin_has_init_indent = 1
`g:vim_vue_plugin_debug`: echo debug message in `messages` list. Useful to debug if indent errors occur. (default: 0)
let g:vim_vue_plugin_debug = 1
## Screenshot
![screenshot](static/screenshot.png)
## Acknowledgments & Refs
[mxw/vim-jsx][1]
[Single File Components][3]
[1]: https://github.com/mxw/vim-jsx "mxw: vim-jsx"
[2]: https://github.com/VundleVim/Vundle.vim
[3]: https://vuejs.org/v2/guide/single-file-components.html
[4]: https://github.com/digitaltoad/vim-pug