I wanted to know if it is possible to trigger a different theme when I enter on Vim.
Yes, you can change it using :colorscheme scheme_name
, But cobalt2 scheme does not seem to be shipped by default. You can iterate the list by :colo <TAB>
.
For setting it permenantly, we need to set it in ~/.vimrc
.
In this case I'm using Homebrew theme as my main iTerm theme, but when I enter Vim I want it to change the theme to Cobalt2 (only for the window with Vim).
Apparently, cobalt2
is not shipped by default on vim, Hence we need to install it first.
The usual procedure is to place the sheme file in ~/.vim/colors
. Create the colors
folder, if not existing in ~/.vim
.
Google search give few links like cobalt2-vim. If this does not help, then you might like to pick a colorscheme of your liking from here.
This might not exactly solves your query but hopes. it helps