How can I change the background color of Vim?

How can I change the background color of Vim?

In a terminal emulator like konsole or gnome-terminal, you should to set a 256 color setting for vim. After that you can to change your background. You might find color schemes useful. You probably want to set that in your Terminal instead: export TERM=’xterm-256color’.

How to convert Vim color scheme to terminal?

If you look at color schemes on vim.org, there is often a mention of GUI or 256. So you have to chose which to use depending on the context. To convert a GUI scheme to terminal you can use the following plugin : CSApprox.

Can you set BG = dark with a white background?

Using set bg=dark with a white background can produce nearly unreadable text in some syntax highlighting schemes. Instead, you can change the overall colorscheme to something that looks good in your terminal. The colorscheme file should set the background attribute for you appropriately.

What to do when termguicolors is enabled in Vim?

Now Vim supports 24-bit colors and, when termguicolors is enabled, it uses pixel values specified by guifg and guibg to paint colors. Note that, in this case, both ctermfg and ctermbg are not used.

How to get transparent background with termguicolors enabled?

Normal ctermbg=NONE guibg=NONE is in reality doing nothing and the background just sticks with the last opaque setting that got applied. The exact same configuration works on NeoVim 0.1.5. I use the same colorscheme as you. I found I could get a transparent background outside tmux. when I open vim inside tmux, I got the problem like you. hi!

Can you get a transparent background in Neovim?

For what’s worth, on NeoVim, the exact same configuration works to get the transparent background, even inside tmux, as @sfwn has mentioned. I can reproduce the exact problem described by the OP with Vim 7.4p2235 in iTerm2 (OS X), both inside and outside tmux (other than that, I see correct true colors both inside and outside tmux).

How do I exit Vim and go back to shell?

You can use :sh to exit to your default shell then typing $ exit at the shell prompt will return you to Vim.

What happens if I suspend and resume Vim?

Suspend and resume – You don’t actually quit Vim with this; you simply hide your session in the background until you need it. If you reset your computer or issue a kill command to Vim, you will lose your session.

Is there a way to save Vim sessions?

Sessions – This is the true way of saving your session between instances of Vim. Even if you truly quit Vim, your session will be there for you when you return. This is probably what you are looking for. To extend user Zen ‘s answer, you could add the following line in your ~/.vimrc file to allow quick toggling between Bash and Vim: