Skip to content
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

Some colors look off in vim #105

Closed
k2s09 opened this issue Jan 8, 2021 · 2 comments
Closed

Some colors look off in vim #105

k2s09 opened this issue Jan 8, 2021 · 2 comments

Comments

@k2s09
Copy link

k2s09 commented Jan 8, 2021

I am using Ubuntu 20.04 in Windows Subsystem for Linux. My terminal is WSLtty. I have the vim color scheme downloaded through vim-plug. I have set onehalfdark as the vim and terminal theme. The terminal type is xterm-256-color. image

image

It should look different. I tried a bunch of stuff. Here is the part from my ~/.vimrc

if exists('+termguicolors')
  let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  set termguicolors
endif

" Colorscheme
syntax on
set cursorline
colorscheme onehalfdark
let g:airline_theme='onehalfdark'

Then I used the snipped from Joshdick's onedark repo

"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http:https://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
if (empty($TMUX))
  if (has("nvim"))
    "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
    let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  endif
  "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  if (has("termguicolors"))
    set termguicolors
  endif
endif

" Colorscheme
syntax on
set t_Co=256
set cursorline
colorscheme onehalfdark
let g:airline_theme='onehalfdark'

Either it should look like this, or because of some problem, the part which is supposed to be Blue in color is purple. If there is a fix, pls tell me

@sonph
Copy link
Owner

sonph commented Jan 15, 2021

Hey @k2s09 did you mean that the set and let keywords should be blue as in the main screenshot?

In that I'm running Sublime Text, not vim. Text editors may use different syntax parsing engines that label the syntactic elements differently. However if you like the blue better, put this in your config:

hi Statement guifg=#61afef ctermfg=75

@k2s09
Copy link
Author

k2s09 commented Jan 18, 2021

Ahh that's exactly what I was looking for. Thanks a lot!

@k2s09 k2s09 closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants