From 4099c91566dd23d421947267ec50e34747bf4a1a Mon Sep 17 00:00:00 2001 From: Adriaan Zonnenberg Date: Sun, 26 Mar 2017 21:47:06 +0200 Subject: [PATCH] Update readme Move typescript section to FAQ and add an entry about `:syn sync fromstart` --- readme.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 1cc01d7..d5d8e0e 100644 --- a/readme.md +++ b/readme.md @@ -38,7 +38,21 @@ Currently only `eslint` is available. Please make sure `eslint` and 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 your component's script tag: @@ -51,16 +65,17 @@ your component's script tag: 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 only need to add some lines to the `syntax/vue.vim` file. +You can also setup an autocmd for this: -## FAQ +```vim +autocmd FileType vue syntax sync fromstart +``` -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). +See `:h :syn-sync-first` and [this article](http://vim.wikia.com/wiki/Fix_syntax_highlighting) +for more details.