diff options
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vimrc | 58 |
1 files changed, 41 insertions, 17 deletions
@@ -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 <leader>q :q<CR> nnoremap <leader>! :q!<CR> nnoremap <leader>x :wq<CR> nnoremap <leader>b :e#<CR> +nnoremap <leader>e :e<CR> +nnoremap <leader>u :tabp<CR> +nnoremap <leader>o :tabn<CR> nnoremap <leader>h :wincmd h<CR> nnoremap <leader>j :wincmd j<CR> nnoremap <leader>k :wincmd k<CR> @@ -71,7 +75,7 @@ nnoremap <leader>l :wincmd l<CR> nnoremap <leader>n :NERDTreeFocus<CR> nnoremap <leader>t :NERDTreeToggle<CR> nnoremap <leader>p :wincmd p<CR> -nnoremap <leader>v :set paste! number!<CR> +nnoremap <leader>v :set paste! number! relativenumber!<CR> nnoremap <leader>i :CocCommand clangd.switchSourceHeader<CR> " 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 |