From e44cdd577901499e1fb845127c8ecca2f91fe6c6 Mon Sep 17 00:00:00 2001 From: randomuser Date: Wed, 30 Mar 2022 20:55:31 -0500 Subject: [PATCH] revise neovim thing --- nvim/colors/earth.vim | 43 ++++++++++++++++ nvim/init.vim | 115 +++++++++--------------------------------- 2 files changed, 68 insertions(+), 90 deletions(-) create mode 100644 nvim/colors/earth.vim diff --git a/nvim/colors/earth.vim b/nvim/colors/earth.vim new file mode 100644 index 0000000..dec85e8 --- /dev/null +++ b/nvim/colors/earth.vim @@ -0,0 +1,43 @@ +set background=dark +highlight clear +if exists("syntax_on") + syntax reset +endif + +let g:colors_name = "earth" + +hi Normal ctermbg=black ctermfg=NONE cterm=NONE +hi Comment ctermbg=NONE ctermfg=darkblue cterm=NONE +hi Operator ctermbg=NONE ctermfg=green cterm=NONE +hi Statement ctermbg=NONE ctermfg=green cterm=NONE +hi link Keyword Operator +hi Label ctermbg=NONE ctermfg=darkyellow cterm=NONE +hi link Function Label +hi link Repeat Label +hi link Conditional Label +hi link Exception Label +hi Identifier ctermbg=NONE ctermfg=blue cterm=NONE +hi link Constant Identifier + +hi PreProc ctermbg=NONE ctermfg=darkblue cterm=NONE +hi link Include PreProc +hi link Define PreProc +hi link Macro PreProc +hi link PreCondit PreProc + +hi Type ctermbg=NONE ctermfg=blue cterm=NONE + +hi Constant ctermbg=NONE ctermfg=blue cterm=NONE + +hi Error ctermbg=darkred ctermfg=white cterm=NONE +hi Todo ctermbg=darkyellow ctermfg=black cterm=NONE + +hi Search ctermbg=NONE ctermfg=red cterm=NONE +hi LineNr ctermbg=black ctermfg=gray +hi Pmenu ctermbg=blue ctermfg=black +hi PmenuSel ctermbg=green ctermfg=black + +hi VertSplit ctermbg=NONE ctermfg=white cterm=NONE + +hi StatusLine ctermbg=black ctermfg=white cterm=NONE gui=NONE +hi StatusLineNC ctermbg=white ctermfg=black cterm=NONE gui=NONE diff --git a/nvim/init.vim b/nvim/init.vim index 38092be..d91ebf4 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,99 +1,34 @@ " randomuser's vimrc -" sacred nnoremaps {{{ nnoremap ; : nnoremap : ; -" }}} -" misc settings {{{ -let mapleader=" " -set nocompatible wildmenu path+=** -syntax enable -filetype plugin on -if has('nvim') - nmap s ;source ~/.config/nvim/init.vim -else - nmap s ;source ~/.vimrc -endif -" }}} -" displays {{{ +let mapleader = " " + +" defined settings set number -set numberwidth=3 -set statusline=%#PmenuSel#%y%m\ %.20f%<%=b%02n:l%03l:c%03c -" }}} -" netrw {{{ -let g:netrw_banner=0 -let g:netrw_liststyle=3 -let g:netrw_winsize=15 -let g:netrw_browse_split=1 -nmap oe :Vexplore -" }}} -" file opening {{{ -nmap ob ;edit ~/.bashrc -if has('nvim') - nmap ov ;edit ~/.config/nvim/init.vim -else - nmap ov ;edit ~/.vimrc -endif -nmap ow ;edit ~/.config/vimb/config -nmap os ;edit ~/.config/vimb/style.css -nmap oz ;edit ~/.config/zathura/zathurarc -nmap ot ;edit ~/.config/bspwm/bspwmrc -nmap ok ;edit ~/.config/sxhkd/sxhkdrc +set encoding=utf8 +set lcs=tab:->,trail:_,eol:^ +set clipboard=unnamedplus +colorscheme earth -" helpfiles -nmap he ;help -" }}} -" file execution {{{ -" makefiles {{{ -nmap mm ;!make -nmap mc ;!make clean -nmap mf ;!make "%" -nmap mi ;!make install -" }}} -" shell script {{{ -nmap ss ;!sh "%" -nmap sb ;!bash "%" -nmap sz ;!zsh "%" -" }}} -" }}} -" tab & fold settings {{{ +" shortcuts +nnoremap ym :set number!:set list! -" hacky exemption thing -" make sure to not populate this too much -let exemptions = ["gophermap", "Makefile"] -let tmp = 0 -for exemption in exemptions - " does this match the current file name - if expand("%:t") != exemption - let tmp = tmp + 1 - endif -endfor -" does the file match? -if tmp != 0 - set expandtab - set tabstop=2 - set shiftwidth=2 - retab -endif -set list -set listchars=eol:`,tab:>-,trail:~,extends:<,precedes:> -set foldmethod=marker -" }}} -" buffers & tabs {{{ -nmap bn ;bn -nmap bp ;bp -nmap bc ;clo +nnoremap w :!curl -s wttr.in/?0T +nnoremap rr :source ~/.config/nvim/init.vim +nnoremap re :edit ~/.config/nvim/init.vim +nnoremap m :make -nmap tn ;tabnext -nmap tp ;tabprev -nmap t1 ;tabfirst -nmap tc ;tabc -nmap tt ;tabnew -" }}} -" information {{{ -nmap iw ;!curl -s http://wttr.in/?0qT -nmap id ;!date +inoremap jk +inoremap :echo "use jk instead!"2gsi -nmap se ;setlocal spell spelllang=en_us -nmap sd ;setlocal nospell -" }}} +" autocmds +au Filetype python setl et ts=4 sw=4 + +" statusline + +set statusline=%f +set statusline+=\ +set statusline+=%r%m%q +set statusline+=%= +set statusline+=%y\ %B\ %l:%c:%p