Reputation: 2007
Ok, I've been searching for a while and just can't seem to find the answer, so I'm hoping someone can point me straight here...
I have (g)Vim 7.3 for windows installed and am trying to run it from the powershell prompt (v2.0/Win 7-amd64). Vim starts fine, but the colors are all jacked. Normally I use the desert theme for gVim. For POSIX shells I usually use CSApprox.vim plugin to get the gVim colors in vim and it works great (all i have set in the .vimrc is the set t_Co=256 for it). Anyway, I've tried vim with and with out the 256 and CSApprox plugin, but still get the wrong colors when launched from powershell (and cmd, but lets stick with powershell for simplicity here). How can I get powershell vim to look like gVim desert without permanately changing the powershell colors outside of Vim?
Upvotes: 12
Views: 9567
Reputation: 338
PowerShell, like all terminals, defines a limited set of colours to be used by applications that run within it. See this answer for how to find out which ones. Therefore, if you want to recreate the desert theme exactly you will need to modify your PowerShell colours.
Upvotes: 0
Reputation: 1623
Have you added the line colorscheme desert
to your _vimrc? It sets the gvim color when called from powershell or cmd for me. The only issue I had when adding it was finding the "right" _vimrc but running the :set runtimepath? in vim took care of that.
Upvotes: 0
Reputation: 79243
You could try: $Host.UI.RawUI.BackgroundColor = 'black'
before launching vim…
Upvotes: -1