vim2hs
vim2hs copied to clipboard
Allow opting out of folding with global variable
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.
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.
:+1:
I would love for this to be merged as well. I ended up forking and making a similar change myself before finding this issue.
This would be great to merge, since folding as is conflicts with neocomplete.
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
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
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.
gotcha, thanks. Well, I can experiment with the options in #102