From c32ed90899dd1047bc8bab171a60d7de6f4af34f Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 11 Dec 2022 01:03:47 -0700 Subject: update stuff, add relevant x scripts --- vim/.vimrc | 58 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 41 insertions(+), 17 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index 1a88791..4ecd421 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -22,6 +22,7 @@ call plug#end() set nocompatible set ttymouse=sgr set number +set relativenumber set bg:dark set mouse=a set tabstop=2 softtabstop=2 shiftwidth=2 expandtab @@ -64,6 +65,9 @@ nnoremap q :q nnoremap ! :q! nnoremap x :wq nnoremap b :e# +nnoremap e :e +nnoremap u :tabp +nnoremap o :tabn nnoremap h :wincmd h nnoremap j :wincmd j nnoremap k :wincmd k @@ -71,7 +75,7 @@ nnoremap l :wincmd l nnoremap n :NERDTreeFocus nnoremap t :NERDTreeToggle nnoremap p :wincmd p -nnoremap v :set paste! number! +nnoremap v :set paste! number! relativenumber! nnoremap i :CocCommand clangd.switchSourceHeader " nerdtree stuff @@ -109,20 +113,40 @@ function! s:check_back_space() abort endfunction " lightline config -let g:lightline = { - \ 'colorscheme': 'gruvbox', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'filename', 'readonly', 'modified' ], - \ [ 'gitbranch'] ], - \ 'right': [ [ 'lineinfo' ], - \ [ 'fileformat', 'filetype' ], - \ [ 'percent' ] ] - \ }, - \ 'component_function': { - \ 'gitbranch': 'gitbranch#name' - \ }, - \ } -let g:lightline.component = { - \ 'close': ' %n | X ', } +if expand('$UID') == 0 + let g:lightline = { + \ 'colorscheme': 'molokai', + \ 'active': { + \ 'left': [ [ 'root', 'mode', 'paste' ], + \ [ 'filename', 'readonly', 'modified' ], + \ [ 'gitbranch'] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'fileformat', 'filetype' ], + \ [ 'percent' ] ] + \ }, + \ 'component_function': { + \ 'gitbranch': 'gitbranch#name' + \ }, + \ } + let g:lightline.component = { + \ 'close': ' %n | X ', + \ 'root': '!!root!!', } +else + let g:lightline = { + \ 'colorscheme': 'gruvbox', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'filename', 'readonly', 'modified' ], + \ [ 'gitbranch'] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'fileformat', 'filetype' ], + \ [ 'percent' ] ] + \ }, + \ 'component_function': { + \ 'gitbranch': 'gitbranch#name' + \ }, + \ } + let g:lightline.component = { + \ 'close': ' %n | X ', } +endif -- cgit v1.2.3