Giter Site home page Giter Site logo

Colors problem about vim HOT 11 CLOSED

dracula avatar dracula commented on August 17, 2024
Colors problem

from vim.

Comments (11)

enosair avatar enosair commented on August 17, 2024 18

I had the same issue as @filipesf.
Finally I found that I forgot to enable truecolor support in vim.

Add set termguicolors into my vimrc did the trick.

from vim.

nemanjan00 avatar nemanjan00 commented on August 17, 2024 6

Shit. 4 years of using Vim and I did not figure it out until now. :D

from vim.

BourgeoisBear avatar BourgeoisBear commented on August 17, 2024 4

I'm not sure if I had the same problem, but for most terminals I've tried this with under Linux (xfce4-terminal, urxvt), the dracula theme did not work.

This fixed it for me:

Add set t_Co=256 before let g:colors_name = 'dracula' on line 21.

from vim.

spoike avatar spoike commented on August 17, 2024 1

Updated the colorscheme today via Plug and got the same problem as @nemanjan00. I'm guessing fairly recent breaking change?

I'm using macvim without GUI.

from vim.

spoike avatar spoike commented on August 17, 2024 1

Seems like this commit breaks it for me: 38d5c9b

ctermbg is set which causes weird background color artifacts (screenshot provided with cowsay from Startify):

image

Current hacky workaround for me is to set it to NONE after the colorscheme line:

colorscheme dracula
highlight Normal ctermbg=NONE

Problem with this workaround for me is that I have to reload my .vimrc file everytime I restart vim (since the highlight line seems to be ignored on startup for some reason). So I have to do this autocmd as well 😭:

autocmd BufEnter * :highlight Normal ctermbg=NONE ctermfg=NONE

from vim.

nemanjan00 avatar nemanjan00 commented on August 17, 2024

Seams like it is not drawing parts of background. (at least to me)

from vim.

filipesf avatar filipesf commented on August 17, 2024

Mine looks slightly different as well. Though not that bad.

screen shot 2017-04-21 at 17 49 24

My guess is that I'm not using any GUI:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 19 2017 09:57:52)
MacOS X (unix) version
Included patches: 1-567
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     -gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
-clientserver    +insert_expand   +packages        -toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl            +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       +python          +vreplace
+cscope          +lispindent      -python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      -lua             +rightleft       +writebackup
+diff            +menu            +ruby            -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      -mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
+farsi           +mouse_netterm   +tag_binary

Could it be the reason? I'm running Vim straight from iTerm2.

There's any way to enable vim to use GUI colours instead cterm?

In case someone need, here's my vimrc:
https://github.com/filipesf/dotfiles/blob/master/vim/vimrc

from vim.

dsifford avatar dsifford commented on August 17, 2024

System: Arch Linux
Terminal: urxvt

@spoike's solution of setting highlight Normal ctermbg=NONE after colorscheme worked for me.

@BourgeoisBear's solution did not.

from vim.

5t111111 avatar 5t111111 commented on August 17, 2024

I had the same problem and it was solved after setting either @spoike's solution or reverting 38d5c9b .

from vim.

 avatar commented on August 17, 2024

@enosair Thank you!

from vim.

ferre1 avatar ferre1 commented on August 17, 2024

I had the same issue as @filipesf.
Finally I found that I forgot to enable truecolor support in vim.

Add set termguicolors into my vimrc did the trick.

Спасибо тебе добрый человек, я 2 дня убил на это

from vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.