dracula / vim

🧛🏻‍♂️ Dark theme for Vim
https://draculatheme.com/vim
MIT License
1.34k stars 455 forks source link

background color break after update #65

Closed Saul-Mirone closed 6 years ago

Saul-Mirone commented 6 years ago

Hi, I'm using vim in iTerm on macOS. My iterm theme is dracula as well. It works well for years. I update dracula today and my iterm color is so werid,and the background image disappear, what happend?

BEFORE I UPDATE

that

AFTER I UPDATE

this

dsifford commented 6 years ago

@hacker1db Thanks for that.

On my machine, the output is

:verbose hi NonText
NonText        xxx ctermfg=12 gui=bold guifg=Blue
                   links to DraculaSubtle
        Last set from ~/.dotfiles/vim/_plugins/dracula/colors/dracula.vim

So yeah, it looks like NonText is either getting unset or the pre-check condition in the theme is being satisfied, so nothing gets set.

I snagged that little escape hatch from the gruvbox theme because it is extremely popular and has been actively maintained for 10+ years. Figured because they've been around so long, there was a reason why that check was there so I opted to keep it.

(I'm fairly certain we can just scrap that escape hatch though if that's what it turns out being -- I really don't understand the point of it to be completely honest)

To confirm my suspicion, can you just enter :hi and scroll the list to see if you can locate one or more groups with the name Dracula* in existence. If you can't, it's the escape hatch. If you can, it's something else.

Thanks for your patience :pray:

hacker1db commented 6 years ago

screen shot 2018-04-09 at 9 25 46 am Sadly, I think its something else.. Thanks for all the help.

benknoble commented 6 years ago

What about these lines ? (I think it's 73-ish)

" make the highlighting of tabs and other non-text less annoying
highlight SpecialKey ctermbg=none ctermfg=8
highlight NonText ctermbg=none ctermfg=8
" make comments and HTML attributes italic
highlight Comment cterm=italic
highlight htmlArg cterm=italic
dsifford commented 6 years ago

@benknoble found it.. That's the issue for sure. Remove all those 👍 👏

nineKnight commented 6 years ago

Setting let g:dracula_colorterm=0 before calling colorscheme dracula solves the issue for me.

"And I really don't want to see these garbage patches just mindlessly sent around." ---- Linus Torvalds

I think this feature is one of them.

dsifford commented 6 years ago

@nineKnight Here's a reminder if you forgot how git works:

git clone https://github.com/dracula/vim.git
cd vim
git checkout 3eaed4ff9fe8441bee02a00fbe80ac12cffd9b1c

Feel free to stay detached in the past if the updates don't suit your needs. We're using "garbage" patches because the terminal combination of every conceivable user is not something we can control. So the argument doesn't really apply here, but thanks.

nineKnight commented 6 years ago

@dsifford I don't even know the feature exists before I find this issue and your commit 52d955a. You maintainers never change vim bg these years, but these days. Do you know how we feel when our vim suddenly changed by unknown who, what or where? Do you want everyone who suffers this feature get into the source code, even its history? Come on, ridiculous.

Agressive changes should be tested completely. New features should be declared. New unnecessary features should be disabled by default.

I'm sorry if words hurt you. Except this one, I appreciate your works.

hacker1db commented 6 years ago

@dsifford and @benknoble sorry for delayed response, that commented out those lines and it fixed the issue! 👍 Thank you for all of your help!

dsifford commented 6 years ago

Glad to hear @hacker1db

Marking this as resolved as it seems like everybody who had issues is now back and operational as they were before.

dmitriyK1 commented 6 years ago

What helped me is setting these variables in .vimrc:

let &t_ZH="\e[3m"
let &t_ZR="\e[23m"
bangarangler commented 5 years ago

larshisken answer totally fixed my vim in tmux/iterm 2. I had almost given up and was just getting used to the gray. This gave me that beautiful black background in vim instantly! doubt anyone is still checking this old thread but fuck yes! much appreciated ; ))

zkity commented 3 years ago

Setting let g:dracula_colorterm=0 before calling colorscheme dracula solves the issue for me.

"And I really don't want to see these garbage patches just mindlessly sent around." ---- Linus Torvalds

I think this feature is one of them.

You really should to try this, it's nice for me!

mr-pmillz commented 5 months ago

Yep! This was driving me bonkers for a minute!

After much time wasted going down too many rabbit holes trying to get the dracula theme to work as intended, (Amazing theme by the way, Much thanks and respect!) What also fixed it for me was declaring: let dracula_colorterm = 0 and let dracula_italic = 0

BEFORE calling colorscheme dracula

Here's my working config snippets in relevant order: This is in ~/.vim_runtime/my_configs.vim using the https://github.com/amix/vimrc project for awesome customized vim.

try
    " vim-devicons set encoding utf-8
    set encoding=UTF-8
    syntax enable
    filetype plugin indent on

    " Set Dracula to the default Theme
    let g:dracula_colorterm = 0
    let g:dracula_italic = 0
    highlight Normal ctermbg=None
    colorscheme dracula
    " Show Line Numbers
    set nu
    " Set Background to dark mode
    " For Light mode, switch color to peaksea and set background=light
    " set background=light
    set background=dark
    " <Snippet>

    " vim-airline settings
    " DO NOT USE badwolf airline_theme!!! This seemed to break stuff
    " let g:airline_theme = 'badwolf'
    let g:airline_theme = 'dracula'
    " ....more airline customizations but not relevant to this post... </Snippet>

catch
endtry