I prefer having different colorscheme
for python and different for rest of the files.
So, what I did is added the below two lines in my vimrc
:
"for python file
autocmd! BufEnter,BufNewFile *.py colo badwolf
autocmd! BufLeave *.py colo badwolf
"for rest of the files
colo molokai
Everything works fine when I open a new/pre-exixting
file in vim using vim test.py
but problem occur when I split my vim window into two using :split .scripts/test.sh
.
What happens is after splitting the window when my cursor moves to the new-split window(.sh) I get molokai
colorscheme for my python file and when I shift my cursor to my old window(.py) I get badwolf
colorscheme in my .sh window
. So, as you can see eventually I have the same colorscheme in my windows depending upon which file-type is in focus.
In case of Vim-Tab
as soon as I open a file which has it's pre-defined colorscheme(via autocmd) all the tabs apply that colorscheme.
So, is there any way I can have different colorschemes
in vim split windows and tabs.