vim2hs icon indicating copy to clipboard operation
vim2hs copied to clipboard

Allow opting out of folding with global variable

Open gfixler opened this issue 10 years ago • 8 comments

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.

gfixler avatar Feb 17 '15 21:02 gfixler

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.

wolftune avatar Oct 11 '15 04:10 wolftune

:+1:

giodamelio avatar Jan 08 '16 00:01 giodamelio

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

simonyangme avatar Jan 24 '16 09:01 simonyangme

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

frnsys avatar Mar 23 '16 15:03 frnsys

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

dag avatar Nov 22 '17 15:11 dag

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

wolftune avatar Nov 22 '17 16:11 wolftune

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.

dag avatar Nov 22 '17 17:11 dag

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

wolftune avatar Nov 22 '17 17:11 wolftune