preservim / vim-thematic

Alter Vim's appearance to suit your task & environ
Other
224 stars 6 forks source link

Feature Request: change theme based on syntax #19

Closed joeybaker closed 7 years ago

joeybaker commented 7 years ago

It would be great to change the theme based on the file type. E.g. load the pencil theme for markdown, but use something else (e.g. solarized) as the default.

reedes commented 7 years ago

Sorry, but I can't support that at the plugin level because Thematic is intended to provide theming across all buffers.

Each buffer can have its own file type. Changing themes as you change buffers makes for a poor user experience.

However, you can emulate this behavior with autocmd on file type...

autocmd FileType markdown call Thematic solarized_light
autocmd FileType json call Thematic solarized_dark

(I think I have the syntax right there.)