jonstoler / werewolf.vim

transform your vim colorscheme when the sun goes down
69 stars 7 forks source link

Disable werewolf for specific buffers #4

Open techhazard opened 9 years ago

techhazard commented 9 years ago

I am happily using werewolf for neovim (PaperColor by day, wells-colorscheme by night);
But if I use the :terminal command in nvim, my terminal does not look good because it expects a dark background.
Is there any way I could disable day(=light) themes for this type of buffer?

jonstoler commented 9 years ago

(Note: I don't have neovim installed, and I'm not much of a vim expert)

Here's my initial thinking. In vim, colorschemes are applied to the entire screen, not per-buffer. This might be different in neovim. If neovim treats colorschemes the same way as vim, it is not possible to have a file buffer open with one colorscheme and a terminal buffer open with a different colorscheme, regardless of whether you use Werewolf or not.

If neovim treats colorschemes differently (per-buffer), you might be able to do something like this (in your rc file):

Autocmd FileType terminal execute "WerewolfOff"

You might need to do something like this:

Autocmd FileType terminal execute "WerewolfOff"<Bar>execute "colorscheme wells-colorscheme"

I'm not sure if FileType terminal is the right way to do this, but any way you can identify a Terminal buffer should work. I don't have Neovim, so I can't test this, but let me know how it goes.