Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow opting out of folding with global variable #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gfixler
Copy link

@gfixler gfixler commented Feb 17, 2015

vim2hs folds code by default. This change preserves that default, but allows adding g:haskell_fold = 0 to your .vimrc (or similar) to opt out of folding by default on .hs file load.

vim2hs folds code by default. This change preserves that default, but
allows adding `g:haskell_fold = 0` to your .vimrc (or similar) to opt
out of folding by default on .hs file load.
@wolftune
Copy link

Please merge this, I really want this function. I've been doing set nofoldenable instead which means no folding ever, even though I don't mind some folding, I just don't want all the agressive folding that vim2hs does.

@giodamelio
Copy link

👍

@simonyangme
Copy link

I would love for this to be merged as well. I ended up forking and making a similar change myself before finding this issue.

@frnsys
Copy link

frnsys commented Mar 23, 2016

This would be great to merge, since folding as is conflicts with neocomplete.

@dag
Copy link
Owner

dag commented Nov 22, 2017

Is this necessary, given all the standard Vim ways to do this outlined in #102? If you really think it is necessary, you should probably do

call vim2hs#letdefault('g:haskell_fold', 1)

in the source file first and then just use g:haskell_fold without get(), to be consistent with the rest of vim2hs. Example

@wolftune
Copy link

I set au FileType haskell set nofoldenable in vimrc and haven't thought about this in a long time. I don't actually want no folds nor do I want to put stuff in the source files. I just now adjusted to use the final line in #102 and I'll see how that goes. The other #102 options look good to. So, maybe these options are better. This isn't my PR, but I'm not so concerned about this now as I was when I replied above. Thanks

@dag
Copy link
Owner

dag commented Nov 22, 2017

When I said source file, I meant the vim2hs source file this PR affects. Not your every Haskell file. Don't miss the caveat with the final line in #102; that one in particular might not work.

@wolftune
Copy link

gotcha, thanks. Well, I can experiment with the options in #102

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.

6 participants