revise neovim thing
This commit is contained in:
parent
a6f87394db
commit
e44cdd5779
|
@ -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
|
115
nvim/init.vim
115
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 <Leader>s ;source ~/.config/nvim/init.vim<CR>
|
||||
else
|
||||
nmap <Leader>s ;source ~/.vimrc<CR>
|
||||
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 <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>
|
||||
set encoding=utf8
|
||||
set lcs=tab:->,trail:_,eol:^
|
||||
set clipboard=unnamedplus
|
||||
colorscheme earth
|
||||
|
||||
" helpfiles
|
||||
nmap <Leader>he ;help
|
||||
" }}}
|
||||
" 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 {{{
|
||||
" shortcuts
|
||||
nnoremap <Leader>ym :set number!<CR>:set list!<CR>
|
||||
|
||||
" 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 <Leader>bn ;bn<CR>
|
||||
nmap <Leader>bp ;bp<CR>
|
||||
nmap <Leader>bc ;clo<CR>
|
||||
nnoremap <Leader>w :!curl -s wttr.in/?0T<CR>
|
||||
nnoremap <Leader>rr :source ~/.config/nvim/init.vim<CR>
|
||||
nnoremap <Leader>re :edit ~/.config/nvim/init.vim<CR>
|
||||
nnoremap <Leader>m :make<CR>
|
||||
|
||||
nmap <Leader>tn ;tabnext<CR>
|
||||
nmap <Leader>tp ;tabprev<CR>
|
||||
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>
|
||||
inoremap jk <esc>
|
||||
inoremap <esc> <esc>:echo "use jk instead!"<CR>2gsi
|
||||
|
||||
nmap <Leader>se ;setlocal spell spelllang=en_us<CR>
|
||||
nmap <Leader>sd ;setlocal nospell<CR>
|
||||
" }}}
|
||||
" 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
|
||||
|
|
Loading…
Reference in New Issue