Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the solarized colorscheme for gvim. I'm using 'light' for normal editing. I want to switch to 'dark' when I invoke vim's internal shell (:sh). Is there a way to do this?

share|improve this question

You can only have one colorscheme at a time. Additionaly the pseudo-shell you get with :sh is very limited and, among other limitations, is unable to display colors.

Use a real terminal session instead, or CLI Vim.

share|improve this answer
Yes - you can have only one color scheme. I was wondering if there's some kind of hook that gets called when the user switches to :sh - or if I could make a macro that does this. – Utkarsh Sinha Jun 14 '12 at 4:38
The pseudo-shell doesn't support colors: you won't get colorized $ ls results or a fancy prompt. I'm not aware of an autocmd event that can be used for that purpose. – romainl Jun 14 '12 at 4:45

Vim doesn't have an internal shell. It spawns a new shell as the foreground task, inside a "dumb" terminal emulation if using gvim.

The best way to get the same effect when using gvim is to spawn a xterm (or similar), by using :!xterm or similar. You can map that to a keyboard shortcut to make it quicker.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.