Using
" Customize jshint highlights
hi clear SpellBad
hi SpellBad cterm=underline,bold ctermfg=white ctermbg=black
I was able to customize my jshint SpellBad highlights to the colors I desire when I first open a buffer containing jshint errors. As can be seen here, my background is black and the line with the error is in bold white and underlined. Exactly as I specified using those definitions in .vimrc above.
The problem is, when I switch around between buffers or open a that buffer later again, my custom jshint SpellBad colors no longer apply and I get the "default" colors which I do not want.
Why is this so? And how do I make my custom jshint SpellBad colors stick?
Because your custom highlight settings will be cleared after every :colorscheme commands.
try:
autocmd ColorScheme * hi clear SpellBad
\| hi SpellBad cterm=underline,bold ctermfg=white ctermbg=black
Related
Who can help me with this problem?
I have this set in my .vimrc:
highlight CursorLine cterm=NONE ctermbg=white
But the cursor line is underlined instead of getting the white background.
If I write as command the setup:
:highlight CursorLine cterm=NONE ctermbg=white
Vim applies the background color and removes the underline as expected.
Why if the command works, the setup in .vimrc not? the other highlights are working.
I upgraded vim (macOS) using brew:
$ brew info vim
vim: stable 8.1.2100 (bottled), HEAD
After the upgrade, the line numbers at the right are underlined, for example, from the attached picture line number 1 appears like 1_____, any idea how to remove the underline?
Happens only when having :set relativenumber
Latest versions defaults to underline: https://github.com/vim/vim/blob/017ba07fa2cdc578245618717229444fd50c470d/src/highlight.c#L256
CursorLineNr term=bold cterm=underline ctermfg=Yellow gui=bold guifg=Yellow
My templates was using only:
hi CursorLineNr term=bold ctermfg=012 gui=bold
The fix was to define cterm:
hi CursorLineNr term=bold cterm=bold ctermfg=012 gui=bold
I found the fix for this in the .minttyrc as this was driving me crazy as well.
There is a setting in there for Term=vt100
Edit the .minttyrc in your home dir and comment out or remove the line
Term=vt100.
Save the file and close the CLI and reopen a new one. The underline should now be gone from vi from then on. I hope this helps.
Im using VIM in the OSX terminal. I load the "DarkBlue" colorscheme but with a few configurations. My problem is getting the "writing color" white, but keeping the purple color of the functions.
Here is my color configurations in my .vimrc file:
" ================ Colors ========================
colo DarkBlue
syntax on
hi Comment ctermfg=White
hi Directory ctermfg=White
hi Identifier ctermfg=White
hi PreProc ctermfg=White
hi Title ctermfg=White
hi LineNr ctermfg=White
If I add this to my .vimrc file, the writing color turns white, but purple gets white as well.
"hi Constant ctermfg=White"
Can someone help me with this?
I tried this with a javascript file (i.e. extension .js):
hi Function ctermfg=Magenta
It colors the function keyword and delimiters.
I have
colorscheme slate
followed by
highlight Search term=reverse cterm=reverse
highlight IncSearch term=reverse cterm=reverse
in ~/.vimrc file. But when I say :verbose hi Search in vim, it gives me
:verbose hi Search
Search xxx term=reverse ctermfg=248 ctermbg=12
Last set from /usr/share/vim/vim72/colors/slate.vim
I don't understand why my own highlight overriding of Search does not kick in here. When I say :scriptnames, I get
~/.vimrc
at position 8 and
/usr/share/vim/vim72/colors/slate.vim
at position 9. I don't understand why Search highlight definition in .vimrc is not working. Any ideas?
I'm an author of a VIM colorscheme (danger.vim) and I'd like to change some colors that I can barely see.
This is how it looks in Solarized:
This is how it looks in my theme:
As you can see, it's hard to see the underlines at import sys. I'd make them probably lighter blue, and bold.
I use the Syntastic plugin to integrate with Pyflakes and JSLint mainly.
I also use Flux, probably a reason why it's even harder to see.
In your colorscheme file at:
hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FF6C60 " undercurl color
Change the part after guisp to the color you want.
i.e.
hi Error guifg=NONE guibg=NONE gui=undercurl ctermfg=white ctermbg=red cterm=NONE guisp=#FFFFFF " undercurl color
will make the underlines white
edit:
You can make errors bold by change gui=undercurl to gui=bold,undercurl
Seems like Syntastic shows warnings as spell errors, so all I had to do was to define:
SpellBad word not recognized |hl-SpellBad|
SpellCap word not capitalised |hl-SpellCap|
SpellRare rare word |hl-SpellRare|
SpellLocal wrong spelling for selected region |hl-SpellLocal|
In my colorscheme file.