Last active
May 7, 2022 15:06
-
-
Save bitcrazed/26429ead29d1729f8251e3cff16c2308 to your computer and use it in GitHub Desktop.
Vim settings for Bash on Windows & Windows Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set mouse=a | |
syntax enable | |
if &term =~ '256color' | |
" The following two lines solve the BCE issue described here: https://sunaku.github.io/vim-256color-bce.html | |
set term=screen-256color | |
set t_ut= | |
set background=dark | |
" Be sure to store your `<theme>.vim` files in ~/.vim/colors/ | |
colorscheme gruvbox | |
"colorscheme monokai | |
"colorscheme solarized | |
endif |
Hi @sorenrichenberg - I'd recommend following popular vim docs on how to use 256 colors: https://vim.fandom.com/wiki/256_colors_in_vim, rather than a gist from 2017 for the legacy Console 😜
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to get the solarized colorscheme working in neovim for wsl 2 in Windows terminal. I found this gist from microsoft/WSL#1706 which has been locked due to incivility.
I'm getting an error
E518: Unknown option: term=screen-256color
from line 15 of your gist when I source my vimrc. I have seenset term=screen-256color
on other sites and so far its the only suggestion I've been able to find.I have tried uncommenting line 27 in my vimrc pictured below. When I do, the colorscheme starts working as expected but it's nearly impossible to see my cursor over the cream colored background since the cursor remains grey.