What is this feature?
felipe-heredia opened this issue · 7 comments
I put this config in my init.vim:
let g:vim_vue_plugin_config = {
\'syntax': {
\ 'template': ['html', 'pug'],
\ 'script': ['javascript', 'typescript', 'coffee'],
\ 'style': ['scss', 'sass', 'less', 'stylus'],
\ 'i18n': ['json', 'yaml'],
\ 'route': 'json',
\ 'docs': 'markdown',
\ 'page-query': 'graphql',
\},
\'full_syntax': ['scss', 'html'],
\'initial_indent': ['script.javascript', 'style', 'yaml'],
\'attribute': 1,
\'keyword': 1,
\'foldexpr': 1,
\}
And the result is this: template, script, data(), methods, etc. are shrunk, what variable did that do? What are the keyboard shortcuts to show and hide again?
PS.: Sorry for the bad information, I really don't know what it is.
Hi, thanks for your information. Do you mean that the template, script, etc are folded by are shrunk
?
If so, that's because foldexpr
sets foldenable
. I removed this in the latest commit b8cbd66. Also see :h foldenable
, :h za
So you could
- toggle by
za
- Or set
foldexpr
to0
- Or update this plugin, then add
set nofoldenable
to yourinit.vim
I like this feature, did you remove it?
If you haven't removed it, I would like to know what the shortcuts are to shrink and show again.
No, the feature is still there. You can shrink and show it by za
in normal mode.
Only the setting about foldenable
was removed.
ZA is a standard feature of Vim and not the plugin, is that it?
ZA solved my problem, but I'm a new vim user.
Exactly. You could check it out by :help za
. :help
is very helpful at all times.
Alright, exists an global variable to enable folderxpr? Similar to 'let g:vim_vue_plugin_use_scss'
As you see, all config variables have been moved to g:vim_vue_plugin_config
, but you can still toggle it as if it's a global variable let g:vim_vue_plugin_config.foldexpr = 1
let g:vim_vue_plugin_config = {
\'syntax': {
\ 'template': ['html'],
\ 'script': ['javascript'],
\ 'style': ['css'],
\},
\'full_syntax': [],
\'initial_indent': [],
\'attribute': 0,
\'keyword': 0,
\'foldexpr': 0,
\}
let g:vim_vue_plugin_config.foldexpr = 1