blueyed / vim-diminactive

Vim plugin to dim inactive windows
339 stars 10 forks source link

[doc] `diminactive_use_syntax` turns of syntax highlighting in all buffers. #10

Closed matthiasbeyer closed 8 years ago

matthiasbeyer commented 9 years ago

What the title says.

Tell me what information you need to test this.

blueyed commented 9 years ago

The idea of the method is to do so.

I've just added some first tests for it (8d0931c).

There is a problem when using :sp, or when a buffer is displayed in multiple windows: because it's inactive in one of the windows, syntax is turned off (also for the current window). Is that the issue you are seeing?

Otherwise, a test case to reproduce what you mean would be helpful.

matthiasbeyer commented 9 years ago

Whop. Works like a charm. I'm sorry. Maybe you should state this behaviour more clearly!

blueyed commented 9 years ago

Ok, the documentation could be improved probably and then there's also the issue with multiple windows using the same buffer.

What do you think how :sp should behave? Should syntax be kept enabled for the buffer (which is displayed in two windows then)? (the problem is that syntax is a buffer-local (and not window-local) setting)

matthiasbeyer commented 9 years ago

I guess it would be best to keep syntax highlighting enabled for the current file. So if it is opened in 2 or more buffers, that's the users fault. But that's just IMHO.

blueyed commented 9 years ago

Agreed.

kelvinst commented 8 years ago

@blueyed any advance in this? :grin:

blueyed commented 8 years ago

@kelvinst Check out https://github.com/blueyed/vim-diminactive/pull/21 for the fix.

It is missing documentation and a test, but seems to work in my quick test (I am not using this method myself).

kelvinst commented 8 years ago

@blueyed perfect! works exactly as mentioned above :)