I wanted something that folds vue files properly. The folds are improper.
aasutossh opened this issue · 5 comments
I am using the config https://github.com/leafOfTree/vim-vue-plugin#example.
Currently the <template>
don't get folded.
It folds the script
and style
tag but it's weird.
Hi, thanks for your feedback. I'm sorry that I couldn't respond earlier.
I tried a file with the example config and then toggled folding with zM
and zR
. It looks like below, which looks proper to me.
Can you try it and see if it works for you, too? Or can you share a minimal example file that folds improperly?
<template>
<p>{{ greeting }}</p>
</template>
<script>
export default {
data: function () {
return {
greeting: 'Hello'
};
},
};
</script>
<style scoped>
p {
font-size: 2em;
text-align: center;
background: rgb(0, 0, 0, 0.7);
}
</style>
Please note that you can verify it with a minimal confg like
let g:vim_vue_plugin_config = {
\'syntax': {
\ 'template': ['html'],
\ 'script': ['javascript'],
\ 'style': ['css'],
\},
\'foldexpr': 1,
\}
I'm closing this issue. Feel free to reopen It if you still have an issue with the latest version.
hi, could you look at this?
https://youtu.be/o7VmFe0UbFA
I tried folding and unfolding at multiple places, it doesn't fold just one tag, but rather folds the whole template section.
I was supposed to be able to fold and unfold a single tag, wasn't I?
I was supposed to be able to fold and unfold a single tag, wasn't I?
Nevermind, it's working as expected now.