aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2022-12-11 01:03:47 -0700
committerBryson Steck <brysonsteck@protonmail.com>2022-12-11 01:03:47 -0700
commitc32ed90899dd1047bc8bab171a60d7de6f4af34f (patch)
tree5cfeb8677f468814eae9ca29fad2fe39a46098f5 /vim
parent173a51d4ae7ebca7e9b7d175ba314ff35a60d5ab (diff)
downloaddotfiles-c32ed90899dd1047bc8bab171a60d7de6f4af34f.tar
dotfiles-c32ed90899dd1047bc8bab171a60d7de6f4af34f.tar.gz
dotfiles-c32ed90899dd1047bc8bab171a60d7de6f4af34f.tar.bz2
update stuff, add relevant x scripts
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc58
1 files changed, 41 insertions, 17 deletions
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 <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