refactor vim & nvim configs
arnaucube root@arnaucube.com
Sat, 06 Jun 2020 15:58:28 +0200
M
.vimrc
→
.vimrc
@@ -1,34 +1,20 @@
-call plug#begin(expand('~/.vim/plugged')) - -Plug 'scrooloose/nerdtree' -map <C-n> :NERDTreeToggle<CR> -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 <C-j> <C-w>j@@ -55,10 +42,8 @@ " scroll
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
M
init.vim
→
init.vim
@@ -1,3 +1,5 @@
+source ~/.vimrc + call plug#begin(expand('~/.config/nvim/plugged')) nnoremap <Space> <nop>@@ -5,8 +7,7 @@ let mapleader = "\<Space>"
let g:mapleader = "\<Space>" let maplocalleader = "\<Space>" - -" NERDTree +" nerdtree Plug 'scrooloose/nerdtree' Plug 'jistr/vim-nerdtree-tabs' Plug 'scrooloose/nerdcommenter'@@ -65,13 +66,6 @@ smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(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', {@@ -81,18 +75,17 @@ \ }
" 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.@@ -120,6 +113,16 @@ endif
endif set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ + + +" NERDTree +let NERDTreeShowHidden=1 +autocmd vimenter * NERDTree +map <C-n> :NERDTreeToggle<CR> +" 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@@ -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 <C-n> :NERDTreeToggle<CR> -" 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 @@
" 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 <C-j> <C-w>j -noremap <C-k> <C-w>k -noremap <C-l> <C-w>l -noremap <C-h> <C-w>h - -"" esc mapping -inoremap jk <ESC> -tnoremap jk <C-\><C-n> - -" 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 <F9> :colorscheme molokai \| set background=dark<CR> -nnoremap <F10> :colorscheme one \| set background=light<CR> +nnoremap <F10> :colorscheme PaperColor \| set background=light<CR> colorscheme molokai