I'd like to have a colorscheme but keeping my terminal color as a background color. This code achieved that
colorscheme MyFavoriteOne
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
I'd also like to have a different colorscheme for different filetype. By itself, this also works :
autocmd Filetype txt colorscheme NiceTheme
The problem is that now for .txt
files my background is not my terminal background no more (even if permute the code lines above). Is there a solution?
:h autocmd-nested
NiceTheme
and not go back to the other default theme. It's not really possible to have actual colorschemes per file, since you can be editing two different file types in split windows and you can't have a different colorscheme for each of them...autocmd BufEnter *.txt ++nested colorscheme NiceTheme