Skip to content

hotfix to disable bib folding by default#2089

Merged
lervag merged 1 commit intolervag:masterfrom
yongrenjie:master
Jul 6, 2021
Merged

hotfix to disable bib folding by default#2089
lervag merged 1 commit intolervag:masterfrom
yongrenjie:master

Conversation

@yongrenjie
Copy link
Copy Markdown
Contributor

This seems like the easiest way to let the user control tex and bib folding separately (as opposed to making it conditional on g:vimtex_fold_enabled, for example).

@clason
Copy link
Copy Markdown
Contributor

clason commented Jul 6, 2021

But I want it conditional on g:vimtex_fold_enabled (which I have off)! (Well, for me it makes no difference since I never touch these options, so if they both default to 0 I don't notice, but as a general point.)

@yongrenjie
Copy link
Copy Markdown
Contributor Author

OK, but what happens if someone wants folding in bib files but not tex? Then they would have to let g:vimtex_fold_enabled=1 and then manually turn off all the tex folding; unless I'm missing something, of course.

@clason
Copy link
Copy Markdown
Contributor

clason commented Jul 6, 2021

Yes, if that is to be expected, this indeed is the only option that makes sense.

@clason
Copy link
Copy Markdown
Contributor

clason commented Jul 6, 2021

(I'm not using folds at all, so I have a hard time imagining all the ways that people might wish to ;))

@lervag
Copy link
Copy Markdown
Owner

lervag commented Jul 6, 2021

I believe the following makes sense:

call s:init_option('vimtex_fold_enabled', 0)
call s:init_option('vimtex_fold_bib_enabled', g:vimtex_fold_enabled)

The main reason is that I expect most people who want folds will want them in both tex and bib. For the few who only wants tex folds or bib folds, it is still easy to adjust the settings accordingly.

I'll merge and make this change immediately.

lervag added a commit that referenced this pull request Jul 6, 2021
lervag added a commit that referenced this pull request Jul 6, 2021
@lervag lervag merged commit 6586a2c into lervag:master Jul 6, 2021
@lervag
Copy link
Copy Markdown
Owner

lervag commented Jul 6, 2021

Merged now. Thanks for the PR, @yongrenjie, and for the comments, @clason!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants