-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
background color break after update #65
Comments
visual mod breaks too |
This is happening to me too, but with the terminal app. Background is dark grey instead of the default Dracula background. |
Fixes for @Saul-Mirone: Your terminal does not support italics. Or, if it does, your terminfo is not correct (which is why the italics are appearing inverted). Try disabling the italics with Fixes for @braddielman: Add |
@Saul-Mirone -- Re: Background image. To get that back you'll need to add a reset to the so, for example:
Edit: I may revert to a system that falls back to transparent based on |
@braddielman: Terminal App might not suffice for the fix that I suggested above as I'm not sure that that terminal supports truecolor. If that's the case, you're seeing the gray because that's the closest 256 color fallback. See #60 |
@dsifford - Yeah, using |
I'm on iTerm2 and my background color has also changed to match the airline gray. It was working until I did a vim-plug PlugUpdate a few minutes ago... |
|
@rivyx Haha, yeah I'm a tmux'er myself and there's a few things that you need to do to make it play nicely... Can you confirm that you have the truecolor overrides in your tmux.conf and the correct terminfo file is being read by tmux? |
@dsifford the terminfo is the same for both my iTerm2 and my tmux (xterm-256color) and in an effort to keep my dotfiles portable I'd rather not implement truecolor overrides...just from a quick google it looks like a bit more overhead than I'm comfortable with Actaully, it doesn't look too bad. I will try this out after work and report back later. Until then, is there a solution which does not require truecolor overrides? Thanks again |
Adding truecolor support with iterm should be no more than just adding a single line to your Adding a terminfo fix is only relevant if you want to make italics work correctly. |
For example, here's the line from my tmux.conf. The relevant portion of that line with respect to truecolor is the |
@dsifford Thanks for response. I tried disabling the italics, but the highlight and visual mod still not works correctly
|
I forked and checkout to the commit 1f44625
|
I'm having @Saul-Mirone's issue too. Some keywords have cyan highlighting. And when I source my .vimrc from within vim, I get this output: |
I'm using Vim8 in iTerm2 3.1.5 (also with dracula theme), using the following settings in this exact order fixed both issues for me:
|
@larshisken Bingo! Thanks for centralizing everything for people who are reading this thread. Again, I'll likely add in a flag to disable the @Saul-Mirone You're more than welcome to maintain a fork, but again the entirety of your issue boils down to having ctermbg set. So you're sort of creating more work for yourself. If you can hold off for now, just add in the fix that @larshisken has above and I'll add in that flag soon. |
@dsifford So I got it working fine on my local instance of tmux inside of iTerm2 now that truecolors has been enabled and I've changed my terminfo to support italics and truecolors. However, I am now getting a seemingly related issue on Konsole (Kubuntu 16.04) inside of tmux (with terminfo and truecolors properly set). Also, I like using this theme on remote servers and I definitely don't always have the option of setting up truecolor overrides on there. Honestly, this update has really made working with this package a lot more difficult. I don't know what was wrong with the previous background color configuration, but until this issue is fixed/truecolors are optional, I am going to fork the project from a previous version... |
What's the unrelated issue you're getting? Also, re: remote servers -- I adopted the same fallback mechanism for that that gruvbox uses: https://github.com/dracula/vim/blob/master/colors/dracula.vim#L28 If in the case that the remote server passes the fallback, setting the flag to disable ctermbg should make the theme work fine on remote servers. Side note: I'm receiving a lot of flack here because of the update. I'll say this again: Nobody is stopping you from forking this and maintaining your own implementation that satisfies whatever look you're going for. The update was done for two reasons:
I can't make everybody happy, so as a second best, I'm forced to make changes based on what a majority of users would agree upon. Thanks for understanding. |
Now getting the same issue inside of tmux on local Konsole (Kubuntu 16.04) and while inside of tmux on a remote server. This screenshot is from vim running in tmux on a remote server inside of iTerm2. It is the same problem from my previous comment (that screenshot was from my Kubuntu machine). It looks like the background color is being set correctly everywhere except the text characters (they have a gray highlight). For Konsole, this problem persists even with truecolors set. For the remote server, I have ctermbg disabled and am getting the same problem. EDIT: |
@rivyx The issue you're describing above is likely related to the ostensible fact that you have To get it to play well for all situations, you need to add a check in your vimrc that checks the environment you're in and then enables Hope that makes sense. |
@dsifford Yes, it looks like I realized that just as you were commenting. Also, sorry if I sound ungrateful, I do appreciate the work you've been putting in as well as all the help you've been providing for everyone. It was just very frustrating for a little while which I'm sure you get. That being said, if it is possible to somehow tell dracula to set these settings automatically based on the current environment, that would be great! Thanks again...I luckily did not have to fork haha. EDIT: |
@dsifford I tried @larshisken 's solution but it didn't work for me. |
Sorry for the delayed response. @rivyx Re: "if it is possible to somehow tell dracula to set these settings automatically based on the current environment" --- I agree that would be ideal, but there's just too many variables in play to be able to do that effectively (terminal, os, kernel version, unpredictable terminfo across similar machines, etc). No way that I'm aware of to be able to reliably catch all of that. Re: "Updating the instructions at https://draculatheme.com/vim/" -- @benknoble did a pretty amazing job with the help docs which are now available with Glad to hear you were able to get everything sorted without having to fork! @Saul-Mirone Refresh me again on what issues you have that are still unresolved? The same as your original comment or just a portion of that? Can you link me to your vimrc? Also, can you provide some info related to your environment that you're on (terminal, os, vim/neovim/gvim, etc).. I understand you're using tmux. Have you tried terminal-override fixes? |
Hi all, sorry for leaping into the thread really late, just want to add a couple of things I saw.
P.S. @dsifford , I haven't gone through the Terminal theme yet to see if it needs to be updated re: the spec. When the new |
I have same issue as above ^ @Saul-Mirone |
Reference: dracula/vim#65 :(
@dsifford the colorscheme does not apply fully when not running tmux |
@hacker1db Right, but specifically, where is it not applying? From your screenshot, it appears that the only issue is with the |
Correct, I can't tell for sure if its affecting anything else but thats the most obvious issue. @dsifford you are correct its not fully applying to ~ which intern looks like it doesn't fully apply to comments. |
Would you mind reporting back with the output of |
Also, can you run |
@dsifford here is the info you asked for let me know how else I can help is anyone else besides me having this issue? I wonder if its something I did in my config that is causing this issue... |
@hacker1db Thanks for that. On my machine, the output is
So yeah, it looks like 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 Thanks for your patience 🙏 |
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 |
@benknoble found it.. That's the issue for sure. Remove all those 👍 👏 |
Setting "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. |
@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. |
@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. I'm sorry if words hurt you. Except this one, I appreciate your works. |
@dsifford and @benknoble sorry for delayed response, that commented out those lines and it fixed the issue! 👍 |
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. |
What helped me is setting these variables in .vimrc: let &t_ZH="\e[3m"
let &t_ZR="\e[23m" |
this incuded some significant changes to terminal colors, which required more configuration to fix in .vimrc. I remember not being able to solve this problem with tmux becuause additional configuration is necessary - see dracula/vim#65 for help
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 ; )) |
You really should to try this, it's nice for me! |
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: BEFORE calling Here's my working config snippets in relevant order: 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 |
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
AFTER I UPDATE
The text was updated successfully, but these errors were encountered: