Update readme

Move typescript section to FAQ and add an entry about
`:syn sync fromstart`
This commit is contained in:
Adriaan Zonnenberg
2017-03-26 21:47:06 +02:00
parent d4793f5963
commit 4099c91566

View File

@@ -38,7 +38,21 @@ Currently only `eslint` is available. Please make sure `eslint` and
npm i -g eslint eslint-plugin-vue npm i -g eslint eslint-plugin-vue
``` ```
## Typescript support ## Contributing
If your language is not getting highlighted open an issue or a PR with the fix.
You only need to add a line to the `syntax/vue.vim` file.
## FAQ
### Where is Jade?
[Jade has been renamed to pug](https://github.com/pugjs/jade/issues/2184).
Therefore you have to replace all your `jade` occurrences with `pug`. The new
plugin for `pug` can be found on [the same repository](https://github.com/digitaltoad/vim-pug)
(the name has already been updated).
### Typescript support
You can use typescript by adding one of the following attributes/values to You can use typescript by adding one of the following attributes/values to
your component's script tag: your component's script tag:
@@ -51,16 +65,17 @@ your component's script tag:
Choose one that works with your module bundler Choose one that works with your module bundler
### My syntax highlighting stops working randomly
## Contributing This is because Vim tries to highlight text in an efficient way. Especially in
files that include multiple languages, it can get confused. To work around
this, you can run `:syntax sync fromstart` when it happens.
If your language is not getting highlighted open an issue or a PR with the fix. You can also setup an autocmd for this:
You only need to add some lines to the `syntax/vue.vim` file.
## FAQ ```vim
autocmd FileType vue syntax sync fromstart
```
Where is Jade? See `:h :syn-sync-first` and [this article](http://vim.wikia.com/wiki/Fix_syntax_highlighting)
for more details.
[Jade has been renamed to pug](https://github.com/pugjs/jade/issues/2184).
Therefore you have to replace all your `jade` occurrences with `pug`. The new
plugin for `pug` can be found on [the same repository](https://github.com/digitaltoad/vim-pug) (the name has already been updated).