You are not logged in.

#1 2021-04-04 18:59:09

brianstamper
Member
Registered: 2021-02-27
Posts: 15

KDE with SDDM, Vim Warning: Color name "BACKGROUND" is not defined

Just completed a new build with KDE Plasma, and this time instead of using an .xinitrc with export DESKTOP_SESSION=plasma and exec startplasma-x11 to automatically start I instead installed SDDM. I don't think I did much else very different, but maybe? I mention this because I suspect it is behind why whenever I run vim in konsole when I exit I get

Warning: Color name "BACKGROUND" is not defined

which never happened in my previous build.

I saw something about editing .Xresources but I don't have that file and did not have one in my old build, so it seems like the issue would be elsewhere.

Also I tried vim on a non-GUI tty and did not get the same warning.

Last edited by brianstamper (2021-04-04 19:01:08)

Offline

#2 2021-04-04 19:02:51

brianstamper
Member
Registered: 2021-02-27
Posts: 15

Re: KDE with SDDM, Vim Warning: Color name "BACKGROUND" is not defined

My ~/.vimrc:

" .vimrc
" Parts of this were copied from:
" /usr/share/vim/vimrc
" http://unlogic.co.uk/posts/vim-python-ide.html
"
set nocompatible
filetype off

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" File browser
Plugin 'scrooloose/nerdtree'

" Status line (needs some work)
"Plugin 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'}

" Git integration
Plugin 'tpope/vim-fugitive'

" Python mode
"Plugin 'klen/python-mode'


" All of your Plugins must be added before the following line
call vundle#end()            " required


" Required:
filetype plugin indent on



" Try to use 256 colors
set t_Co=256
colorscheme brian

" Enable syntax highlighting
syntax on

" Highlight row/column
set cursorline cursorcolumn

" Have Vim jump to the last position when reopening a file
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe
"normal! g'\"" | endif

" Map Ctrl-n to open the NERDTree panel
map <C-n> :NERDTreeToggle<CR>

" Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %

" Map buffer next, previous and close
map <F7> :bn<CR>
map <F6> :bp<CR>
map <C-F12> :bd<CR>


set autochdir       " Automatically change window's cwd to file's dir
set showcmd         " Show (partial) command in status line.
set showmatch       " Show matching brackets.
set ignorecase      " Do case insensitive matching
set smartcase       " Do smart case matching
set incsearch       " Incremental search
set autowrite       " Automatically save before commands like :next and :make
set hidden          " Hide buffers when they are abandoned
set mouse=a         " Enable mouse usage (all modes)

" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab

" Show tabs and trailing whitespace
set list!
set listchars=tab:»\ ,trail:·

" Set status line to show filename, type, hex value of character, position
set statusline=%F%M%r%h%w\ %=%{&ff}\ %Y\ $\%04.4B\ %03c\ %04l/%04L\ %3p%%
set laststatus=2

set number

Offline

#3 2021-04-04 19:04:37

brianstamper
Member
Registered: 2021-02-27
Posts: 15

Re: KDE with SDDM, Vim Warning: Color name "BACKGROUND" is not defined

My colorscheme:

" Vim color file
" Maintainer:    Brian Stamper
" Last Change:    Whatever it says on Github
" Copied from delek and modified to my liking

hi clear

let colors_name = "brian"

" Normal should come first
hi Normal   ctermfg=7   ctermbg=0
hi Cursor   ctermfg=0   ctermbg=0
"hi lCursor

" Note: we never set 'term' because the defaults for B&W terminals are OK
" I never set gui colors because I have zero interest in gvim.
hi CursorLine   cterm=NONE ctermbg=234
hi CursorColumn cterm=NONE ctermbg=233
hi DiffAdd    ctermbg=LightBlue
hi DiffChange ctermbg=LightMagenta
hi DiffDelete ctermfg=Blue       ctermbg=LightCyan
hi DiffText   ctermbg=Red       cterm=bold
hi Directory  ctermfg=DarkBlue
hi ErrorMsg   ctermfg=White       ctermbg=DarkRed
hi FoldColumn ctermfg=DarkBlue       ctermbg=Grey
hi Folded     ctermbg=Grey       ctermfg=DarkBlue
hi IncSearch  cterm=reverse
hi LineNr     ctermfg=146       ctermbg=236
hi ModeMsg    cterm=bold
hi MoreMsg    ctermfg=DarkGreen
hi NonText    ctermfg=Blue
hi PmenuSel   ctermfg=White       ctermbg=DarkBlue
hi Question   ctermfg=DarkGreen
hi Search     ctermfg=NONE       ctermbg=Yellow
hi SpecialKey ctermfg=DarkBlue
hi StatusLine  cterm=NONE ctermbg=17 ctermfg=15
hi StatusLineNC cterm=NONE ctermbg=234 ctermfg=7
hi Title      ctermfg=DarkMagenta
hi VertSplit  cterm=reverse
hi Visual     ctermbg=NONE       cterm=reverse
hi VisualNOS  cterm=underline,bold
hi WarningMsg ctermfg=DarkRed
hi WildMenu   ctermfg=Black       ctermbg=Yellow

" syntax highlighting
hi Comment    cterm=NONE ctermfg=72
hi Constant   cterm=NONE ctermfg=222
hi Identifier cterm=NONE ctermfg=114
hi PreProc    cterm=NONE ctermfg=209
hi Special    cterm=NONE ctermfg=130
hi Statement  cterm=NONE ctermfg=159
hi Type       cterm=NONE ctermfg=166

" custom .vim/syntax/c.vim highlighting
hi cCustomFunc cterm=NONE ctermfg=173
hi cCustomClass cterm=bold ctermfg=180


" vim: sw=2

Offline

Board footer

Powered by FluxBB