New answers tagged

2

There's :h g:indentLine_defaultGroup specially for this case. So it becomes simply let g:indentLine_defaultGroup = 'Comment' In principle, when you need to read in the color from an existing highlight group it's done like that: let color = synIDattr(synIDtrans(hlID('Comment')), 'fg') hlID() returns numerical ID; synIDtrans() follows links if any; ...


1

I came up with execute('highlight Comment')->split('\n')->filter({i,v -> v =~# '^Comment'})[0]->split(' ')->filter({i,v -> v =~# 'guifg'})[0]->split('=') as a way to parse the output of :highlight, but it doesn't take links into account, so it will probably be wrong. (With dracula it gives Blue, but Comment is linked to DraculaComment ...


0

Normally Vim colorschemes set a variable g:colors_name nnoremap <expr><silent><leader>C printf(':colorscheme %s<CR>', \ g:colors_name !=# 'OceanicNext' ? 'OceanicNext' : 'Textmate')


0

You might want something like: map <Leader>bg :let &background = ( &background == "dark"? "light" : "dark" )<CR> This toggles between dark and light. Leader's default, if not set otherwise, is \. Btw you can also do so with colorschemes: map <Leader>cs :execute ( g:colors_name == "selenized_bw" ? "colorscheme selenized" : "...


0

I can't see you use any colorschemes so :highlight Comment ctermfg=Blue at the end of your vimrc should work. Note though, if you use colorscheme, then your highlight would be overridden. It is possible to do the following: augroup colorscheme_change | au! au ColorScheme * :hi Comment ctermfg=blue augroup end Which defines autocommand group and an ...


2

In modern vim/neovim there is :h g:terminal_ansi_colors (vim) or 16 of g:terminal_color_0 .. g:terminal_color_15 (neovim). If you open gruvbox colorscheme you use, you will find those definitions there (most probably). Basically: your whatever terminal can have palette of base 16 colors defined (there are defaults for each type of terminal, but you can ...


2

In GVim, you can control the 16 ANSI colors used by your terminal with the g:terminal_ansi_colors variable. See :help g:terminal_ansi_colors: In GUI mode or with 'termguicolors', the 16 ANSI colors used by default in new terminal windows may be configured using the variable g:terminal_ansi_colors, which should be a list of 16 color names or ...


3

Highlight in gui or true color terminal with :h termguicolors is not affect by :h cterm, cterm is used for 8, 16, 256 color terminal. This command should change gui LineNr: hi LineNr guifg=#ff0000 guibg=#000000 A quick look at the source, this colorscheme use only 16colors, it doesn't use ansi 16 colors, it works for gui, true color and 256color terminal. ...


1

Is there some way I can get vim's colorscheme rendering more like gvim's? Yes! As long as your terminal supports "true color," you can ask Vim to use the gvim color settings of the colorscheme by enabling the 'termguicolors' setting: When on, uses highlight-guifg and highlight-guibg attributes in the terminal (thus using 24-bit color). Requires a ...


1

The jellybean color scheme tries to provide fallbacks for when fewer colors are available from the terminal. When less than 256 colors are available (to be more exact, less than 88), it will try to use "White over Grey" for the Pmenu highlight group. And when there are only 8 colors available (NR-8), then both "White" and "Grey" map to the same color 7. So ...


2

Final result It should be the same as it's 256color brother (without bold, underline, italic,...) Warning It's not easy, don't do it unless you really want to spend a lot of time in vc(virtual console). Setup terminal Switch to vc, change TERM: TERM=linux-16color Some important desription for linux-16color from ncurse terminfo, pls read it: # 16-...


1

Extending Ingo Karkat's solution to terminal, hi DiffAdd ctermfg=NONE ctermbg=Green hi DiffChange ctermfg=NONE ctermbg=NONE hi DiffDelete ctermfg=LightBlue ctermbg=Red hi DiffText ctermfg=Yellow ctermbg=Red Below are the cterm-colors, if you want to add your preferred color instead of the ones I used. NR-16 ...


Top 50 recent answers are included