revise neovim thing

This commit is contained in:
randomuser 2022-03-30 20:55:31 -05:00
parent a6f87394db
commit e44cdd5779
2 changed files with 68 additions and 90 deletions

43
nvim/colors/earth.vim Normal file
View File

@ -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

View File

@ -1,99 +1,34 @@
" randomuser's vimrc " randomuser's vimrc
" sacred nnoremaps {{{
nnoremap ; : nnoremap ; :
nnoremap : ; nnoremap : ;
" }}}
" misc settings {{{
let mapleader = " " let mapleader = " "
set nocompatible wildmenu path+=**
syntax enable " defined settings
filetype plugin on
if has('nvim')
nmap <Leader>s ;source ~/.config/nvim/init.vim<CR>
else
nmap <Leader>s ;source ~/.vimrc<CR>
endif
" }}}
" displays {{{
set number set number
set numberwidth=3 set encoding=utf8
set statusline=%#PmenuSel#%y%m\ %.20f%<%=b%02n:l%03l:c%03c set lcs=tab:->,trail:_,eol:^
" }}} set clipboard=unnamedplus
" netrw {{{ colorscheme earth
let g:netrw_banner=0
let g:netrw_liststyle=3
let g:netrw_winsize=15
let g:netrw_browse_split=1
nmap <Leader>oe :Vexplore<CR>
" }}}
" file opening {{{
nmap <Leader>ob ;edit ~/.bashrc<CR>
if has('nvim')
nmap <Leader>ov ;edit ~/.config/nvim/init.vim<CR>
else
nmap <Leader>ov ;edit ~/.vimrc<CR>
endif
nmap <Leader>ow ;edit ~/.config/vimb/config<CR>
nmap <Leader>os ;edit ~/.config/vimb/style.css<CR>
nmap <Leader>oz ;edit ~/.config/zathura/zathurarc<CR>
nmap <Leader>ot ;edit ~/.config/bspwm/bspwmrc<CR>
nmap <Leader>ok ;edit ~/.config/sxhkd/sxhkdrc<CR>
" helpfiles " shortcuts
nmap <Leader>he ;help nnoremap <Leader>ym :set number!<CR>:set list!<CR>
" }}}
" file execution {{{
" makefiles {{{
nmap <Leader>mm ;!make<CR>
nmap <Leader>mc ;!make clean<CR>
nmap <Leader>mf ;!make "%"<CR>
nmap <Leader>mi ;!make install<CR>
" }}}
" shell script {{{
nmap <Leader>ss ;!sh "%"<CR>
nmap <Leader>sb ;!bash "%"<CR>
nmap <Leader>sz ;!zsh "%"<CR>
" }}}
" }}}
" tab & fold settings {{{
" hacky exemption thing nnoremap <Leader>w :!curl -s wttr.in/?0T<CR>
" make sure to not populate this too much nnoremap <Leader>rr :source ~/.config/nvim/init.vim<CR>
let exemptions = ["gophermap", "Makefile"] nnoremap <Leader>re :edit ~/.config/nvim/init.vim<CR>
let tmp = 0 nnoremap <Leader>m :make<CR>
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 <Leader>bn ;bn<CR>
nmap <Leader>bp ;bp<CR>
nmap <Leader>bc ;clo<CR>
nmap <Leader>tn ;tabnext<CR> inoremap jk <esc>
nmap <Leader>tp ;tabprev<CR> inoremap <esc> <esc>:echo "use jk instead!"<CR>2gsi
nmap <Leader>t1 ;tabfirst<CR>
nmap <Leader>tc ;tabc<CR>
nmap <Leader>tt ;tabnew<CR>
" }}}
" information {{{
nmap <Leader>iw ;!curl -s http://wttr.in/?0qT<CR>
nmap <Leader>id ;!date<CR>
nmap <Leader>se ;setlocal spell spelllang=en_us<CR> " autocmds
nmap <Leader>sd ;setlocal nospell<CR> 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