From a73066d65996bd41443988f1dbc807ed1028eea9 Mon Sep 17 00:00:00 2001 From: arnaucube Date: Sat, 6 Jun 2020 15:58:28 +0200 Subject: [PATCH] refactor vim & nvim configs --- .vimrc | 39 +++++++++------------------- init.vim | 77 ++++++++++++++++---------------------------------------- 2 files changed, 34 insertions(+), 82 deletions(-) diff --git a/.vimrc b/.vimrc index 564b339..6ff2c23 100644 --- a/.vimrc +++ b/.vimrc @@ -1,34 +1,20 @@ -call plug#begin(expand('~/.vim/plugged')) - -Plug 'scrooloose/nerdtree' -map :NERDTreeToggle -let NERDTreeShowHidden=1 - -"" Color -Plug 'tomasr/molokai' -Plug 'morhetz/gruvbox' -Plug 'srcery-colors/srcery-vim' - -call plug#end() +" call plug#begin(expand('~/.vim/plugged')) +" +" +" +" +" call plug#end() " visual syntax on set ruler set number set title -set titlestring=vim-%F +set titlestring=nvim-%F set t_Co=256 set cursorline set background=dark " for the dark version -if $COLORTERM == 'gnome-terminal' - set term=gnome-256color -else - if $TERM == 'xterm' - set term=xterm-256color - endif -endif - " abbreviations cnoreabbrev W! w! cnoreabbrev Q! q! @@ -40,6 +26,7 @@ cnoreabbrev WQ wq cnoreabbrev W w cnoreabbrev Q q cnoreabbrev Qall qall +cnoreabbrev Qa qa "" Switching windows noremap j @@ -55,10 +42,8 @@ tnoremap jk set scrolloff=5 " keep at least 5 lines above/below set sidescrolloff=5 " keep at least 5 lines left/right - -colorscheme gruvbox - -let &t_SI.="\e[6 q" "SI = INSERT mode -let &t_SR.="\e[4 q" "SR = REPLACE mode -let &t_EI.="\e[2 q" "EI = NORMAL mode (ELSE) +colorscheme torte +set background=dark +hi statusline ctermfg=234 ctermbg=250 +hi LineNr ctermfg=246 diff --git a/init.vim b/init.vim index 6fd0a46..718ab0b 100644 --- a/init.vim +++ b/init.vim @@ -1,3 +1,5 @@ +source ~/.vimrc + call plug#begin(expand('~/.config/nvim/plugged')) nnoremap @@ -5,8 +7,7 @@ let mapleader = "\" let g:mapleader = "\" let maplocalleader = "\" - -" NERDTree +" nerdtree Plug 'scrooloose/nerdtree' Plug 'jistr/vim-nerdtree-tabs' Plug 'scrooloose/nerdcommenter' @@ -65,13 +66,6 @@ smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) -" colors -Plug 'tomasr/molokai' -Plug 'srcery-colors/srcery-vim' -Plug 'rakr/vim-one' -Plug 'morhetz/gruvbox' -let g:srcery_italic = 1 - " errors Plug 'Valloric/ListToggle' Plug 'autozimu/LanguageClient-neovim', { @@ -82,17 +76,16 @@ Plug 'autozimu/LanguageClient-neovim', { " focus mode Plug 'junegunn/goyo.vim' +" colors +Plug 'tomasr/molokai' +Plug 'srcery-colors/srcery-vim' +Plug 'rakr/vim-one' +Plug 'morhetz/gruvbox' +Plug 'NLKNguyen/papercolor-theme' +let g:srcery_italic = 1 + call plug#end() -" visual -syntax on -set ruler -set number -set title -set titlestring=nvim-%F -set t_Co=256 -set cursorline -set background=dark " for the dark version "Credit joshdick "Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. @@ -122,6 +115,16 @@ endif set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ +" NERDTree +let NERDTreeShowHidden=1 +autocmd vimenter * NERDTree +map :NERDTreeToggle +" NERDCommenter +let g:NERDSpaceDelims = 1 " Add spaces after comment delimiters by default +let g:NERDDefaultAlign = 'left' " Align line-wise comment delimiters flush left instead of following code indentation +let g:NERDCommentEmptyLines = 1 " Allow commenting and inverting empty lines (useful when commenting a region) + + " go let g:go_auto_sameids = 1 @@ -150,15 +153,6 @@ let g:go_highlight_array_whitespace_error = 0 let g:go_highlight_trailing_whitespace_error = 0 let g:go_highlight_extra_types = 1 -" NERDTree -let NERDTreeShowHidden=1 -autocmd vimenter * NERDTree -map :NERDTreeToggle -" NERDCommenter -let g:NERDSpaceDelims = 1 " Add spaces after comment delimiters by default -let g:NERDDefaultAlign = 'left' " Align line-wise comment delimiters flush left instead of following code indentation -let g:NERDCommentEmptyLines = 1 " Allow commenting and inverting empty lines (useful when commenting a region) - " vim-airline "" let g:airline_theme = 'powerlineish' @@ -186,33 +180,6 @@ let g:LanguageClient_diagnosticsEnable = 1 " rainbowparentheses let g:rainbow_active = 1 -" abbreviations -cnoreabbrev W! w! -cnoreabbrev Q! q! -cnoreabbrev Qall! qall! -cnoreabbrev Wq wq -cnoreabbrev Wa wa -cnoreabbrev wQ wq -cnoreabbrev WQ wq -cnoreabbrev W w -cnoreabbrev Q q -cnoreabbrev Qall qall -cnoreabbrev Qa qa - -"" Switching windows -noremap j -noremap k -noremap l -noremap h - -"" esc mapping -inoremap jk -tnoremap jk - -" scroll -set scrolloff=5 " keep at least 5 lines above/below -set sidescrolloff=5 " keep at least 5 lines left/right - "" circom syntax au BufRead,BufNewFile *.circom set filetype=circom au BufRead,BufNewFile *.circuit set filetype=go-snark-circuit @@ -222,6 +189,6 @@ set backupcopy=yes " shortcut for theme change nnoremap :colorscheme molokai \| set background=dark -nnoremap :colorscheme one \| set background=light +nnoremap :colorscheme PaperColor \| set background=light colorscheme molokai