blueyed / vim-diminactive

Vim plugin to dim inactive windows
336 stars 12 forks source link

foldmethod reset to global default if g:diminactive_use_syntax = 1 #35

Closed Jeansen closed 7 years ago

Jeansen commented 7 years ago

If I have two windows showing two buffers (or I just create a new empty split) and :set foldmethod=manual then this will be reset to foldmethod=syntax if g:diminactive_use_syntax = 1, whenever I change windows.

blueyed commented 7 years ago

What filetype is this? Sounds like (re)setting the syntax triggers this.

Jeansen commented 7 years ago

I assume something like this. Filetype is Perl. Looks like this does not happen with other filetypes .... at least for those, for which there is no syntax file.

blueyed commented 7 years ago

Do you have set perl_fold = 1 manually?

Jeansen commented 7 years ago

Ah..yes. I am sorry, I did not provide a minimalistic vimrc, yet. On the other hand. I removed per_fold =1. Now it works (and vim opens the file A LOT faster) :smile:

blueyed commented 7 years ago

Cool. Closing this now for then.

Regarding folding speed, see https://github.com/Konfekt/FastFold.

blueyed commented 7 years ago

For reference (in case other settings are affected etc(, you could have also used something like the following to override with your setting(s):

augroup my_perl
  au!
  autocmd Syntax perl set foldmethod=syntax
augroup END
Jeansen commented 7 years ago

Thank you very much. Well, for me it works so far. Though on the other hand not setting perl_fold removes the ability to use syntax folding for perl.