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

Airline text color changes when sourcing the .vimrc #424

Open
esantanaya opened this issue May 13, 2022 · 0 comments
Open

Airline text color changes when sourcing the .vimrc #424

esantanaya opened this issue May 13, 2022 · 0 comments

Comments

@esantanaya
Copy link

esantanaya commented May 13, 2022

According to gruvbox's readme the airline text color should be black, for some reason I've got it white, although when I source the .vimrc without changing anything the text color changes to black, which seems to be the correct.

image
image
image

If I close and open vim it turns white again.

My .vimrc

#! vim:ff=unix:fileencoding=utf-8:foldmethod=marker
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

set noerrorbells
set nocompatible
set ttyfast
set foldmethod=manual
set number relativenumber
set ru
set encoding=utf-8
set fileencoding=utf-8
set clipboard=unnamedplus
set background=dark
set showcmd
set ttymouse=sgr
set scrolloff=0
set t_Co=256
set nowrap
set nobackup
set noswapfile
set undodir=~/.vim/undodir
set undofile
set splitright
set splitbelow
"set ff=unix

": Lenguajes{{{
let g:xml_syntax_folding=1

autocmd FileType html setlocal shiftwidth=2 tabstop=2
autocmd FileType htmldjango setlocal shiftwidth=2 tabstop=2
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 softtabstop=0 expandtab smarttab
autocmd FileType typescript setlocal shiftwidth=4 tabstop=4 softtabstop=0 expandtab smarttab
autocmd FileType vue setlocal shiftwidth=4 tabstop=4 softtabstop=0 expandtab smarttab
autocmd Filetype xml setlocal foldmethod=syntax

autocmd BufNewFile,BufRead *.py
    \ set wrap
    \ textwidth=79
    \ colorcolumn=+1
    \ linebreak
    \ display+=lastline
    \ foldmethod=indent
    \ foldlevel=99

" }}}

" Plugins{{{
call plug#begin('~/.vim/plugged')

Plug 'morhetz/gruvbox'
Plug 'adelarsq/vim-matchit'
Plug 'tpope/vim-surround'
Plug 'mattn/emmet-vim'
Plug 'vim-airline/vim-airline'
Plug 'preservim/tagbar'
Plug 'godlygeek/tabular'
Plug 'tpope/vim-fugitive'
Plug 'mbbill/undotree'
Plug 'ctrlpvim/ctrlp.vim'

Plug 'vim/killersheep'
Plug 'tpope/vim-capslock'

call plug#end()
"}}}

colorscheme gruvbox
hi Normal guibg=NONE ctermbg=NONE

let g:netrw_liststyle=3
let g:netrw_banner=0
let g:netrw_browse_split=2
let g:netrw_winsize=25

let g:airline#extensions#tagbar#enabled=1
let g:airline#extensions#tagbar#flags='f'
let g:airline_theme='gruvbox'

let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
let mapleader = " "

": Remaps{{{
imap jk <Esc>
imap JK <Esc>
nmap ñ ^
nmap <silent> <F7> :TagbarToggle<CR>
nmap <silent> <F8> :call ToggleNetrw()<CR>
nnoremap ZZ <nop>

nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>u :UndotreeToggle<CR>

"}}}

augroup numbertoggle
  autocmd!
  autocmd BufEnter,WinEnter,FocusGained,InsertLeave * set relativenumber
  autocmd BufLeave,WinLeave,FocusLost,InsertEnter * set norelativenumber
augroup END

let g:NetrwIsOpen=0

function! ToggleNetrw()
    if g:NetrwIsOpen
        let i = bufnr("$")
        while (i >= 1)
            if (getbufvar(i, "&filetype") == "netrw")
                silent exe "bwipeout " . i
            endif
            let i-=1
        endwhile
        let g:NetrwIsOpen=0
    else
        let g:NetrwIsOpen=1
        silent Lexplore
    endif
endfunction
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

1 participant