Contents
- 1 Where do I set the default color scheme in Vim?
- 2 What are the values for the highlight keys in Vim?
- 3 Why does background revert back to transparent in Vim?
- 4 How can I replace less in Vim 8?
- 5 Why are the colors unreadable in Vim?
- 6 What is the latest version of Vim tiny?
- 7 How many colors can I put in Vim terminal?
- 8 Why do Vim colors look different inside and outside of tmux?
Where do I set the default color scheme in Vim?
First, you need to open the Vim startup file, located in /etc or users home directory under the name .vimrc (or .exrc ). Here, you can set the default color scheme by modifying the colorscheme line and setting the theme you prefer. colorscheme [colorscheme_name]
What are the values for the highlight keys in Vim?
When specifying the values for ctermfg, ctermbg / guifg, guibg, you can use standard color names, their prescribed numbers or hex values (only in the GUI). However, cterm and gui are not used with color values. Instead, the values you use for these highlight keys include: bold, italic, underline, reverse, and none.
Can you use CTERM and Gui in Vim?
Users who prefer the GUI need to use the highlight keys: When specifying the values for ctermfg, ctermbg / guifg, guibg, you can use standard color names, their prescribed numbers or hex values (only in the GUI). However, cterm and gui are not used with color values.
Is there any way to set transparency for ctermbg in Vim?
In vim I have line numbers on the left hand side with a different background colour, as set in my vimrc: Is there any way to set a transparency for ctermbg in vim, such that the background of the line numbers is transparent?
Why does background revert back to transparent in Vim?
The answers above don’t solve all the problems, they change the bg to transparent when we enter vim (hence the “VimEnte” event) but when you source your init.vim file again, the background reverts back (this is because when the file is sourced the VimEnter auto command is not executed).
How can I replace less in Vim 8?
Now with vim 8 you can use terminal mode :terminal and then in that terminal do cat myfile and go back to normal mode with Ctrl-w N. This will display ANSI color codes correctly. By automating these steps and reading from standard input instead of a file, it should be possible to use vim to replace less.
How to avoid the background in a Vim?
Usually in GUI vims you have more colors support and you simply want to avoid the background. So I usually use this: Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.
How to make the line number transparent in Vim?
To make the line number column transparent (the same color as the main background) you can try setting this in your .vimrc: highlight clear LineNr. You can also clear the so-called sign column (used by gitgutter, etc) as well: highlight clear SignColumn. This way, no matter what color scheme you use, both columns’ background will be compatible.
Why are the colors unreadable in Vim?
Now when I use vi with the colors, some of the text is unreadable against the dark background. I would rather just turn the colors off. How do I do this? This will tell Vim that you’re not using a colour terminal.
What is the latest version of Vim tiny?
I was using vim-tiny on on Ubuntu 14.04. Installed vim-nox. Version is version 7.4.52. Once I installed that, I got all these syntax colors by default. I have my Terminal set to a black background with bright green text.
How to uncomment the line ” set background = dark ” in vimrc?
Uncommenting the line ” set background=dark ” in vimrc solves my readability problem also. It changes the syntax colors so that they are distinguishable against my black background! This is actually better than what I had hoped for in the original question!
Why is the background not changing in Vim?
Change ctermfg (color terminal foreground) and ctermbg (color terminal background) to be whatever you want (or whatever color you were expecting to see in the colorscheme but now aren’t seeing). (Remember, though, if the colorscheme already has a setting for hi Normal then this probably isn’t your problem.)
How many colors can I put in Vim terminal?
Terminals are usually limited to 256 colors while GUI are only limited by color depth of your desktop environment, typically 2^32. So even if there is lots of vim color scheme available around, implicitly they are often designed for the GUI and won’t work for the terminal version.
Why do Vim colors look different inside and outside of tmux?
The default color schemes are ‘ron’ for dark background, and ‘default’ otherwise. Checking https://github.com/vim/vim/blob/master/runtime/colors/default.vim, set bg& is causing the trouble. Only dark background is affected by this problem because the background is mistaken as light.