Browse Source

refactor vim & nvim configs

master
arnaucube 4 years ago
parent
commit
a73066d659
2 changed files with 34 additions and 82 deletions
  1. +12
    -27
      .vimrc
  2. +22
    -55
      init.vim

+ 12
- 27
.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 " visual
syntax on syntax on
set ruler set ruler
set number set number
set title set title
set titlestring=vim-%F
set titlestring=nvim-%F
set t_Co=256 set t_Co=256
set cursorline set cursorline
set background=dark " for the dark version 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 " abbreviations
cnoreabbrev W! w! cnoreabbrev W! w!
cnoreabbrev Q! q! cnoreabbrev Q! q!
@ -40,6 +26,7 @@ cnoreabbrev WQ wq
cnoreabbrev W w cnoreabbrev W w
cnoreabbrev Q q cnoreabbrev Q q
cnoreabbrev Qall qall cnoreabbrev Qall qall
cnoreabbrev Qa qa
"" Switching windows "" Switching windows
noremap <C-j> <C-w>j noremap <C-j> <C-w>j
@ -55,10 +42,8 @@ tnoremap jk
set scrolloff=5 " keep at least 5 lines above/below set scrolloff=5 " keep at least 5 lines above/below
set sidescrolloff=5 " keep at least 5 lines left/right 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

+ 22
- 55
init.vim

@ -1,3 +1,5 @@
source ~/.vimrc
call plug#begin(expand('~/.config/nvim/plugged')) call plug#begin(expand('~/.config/nvim/plugged'))
nnoremap <Space> <nop> nnoremap <Space> <nop>
@ -5,8 +7,7 @@ let mapleader = "\"
let g:mapleader = "\<Space>" let g:mapleader = "\<Space>"
let maplocalleader = "\<Space>" let maplocalleader = "\<Space>"
" NERDTree
" nerdtree
Plug 'scrooloose/nerdtree' Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs' Plug 'jistr/vim-nerdtree-tabs'
Plug 'scrooloose/nerdcommenter' Plug 'scrooloose/nerdcommenter'
@ -65,13 +66,6 @@ smap (neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target) 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 " errors
Plug 'Valloric/ListToggle' Plug 'Valloric/ListToggle'
Plug 'autozimu/LanguageClient-neovim', { Plug 'autozimu/LanguageClient-neovim', {
@ -82,17 +76,16 @@ Plug 'autozimu/LanguageClient-neovim', {
" focus mode " focus mode
Plug 'junegunn/goyo.vim' 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() 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 "Credit joshdick
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux. "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)\ 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 " go
let g:go_auto_sameids = 1 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_trailing_whitespace_error = 0
let g:go_highlight_extra_types = 1 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 " vim-airline
"" let g:airline_theme = 'powerlineish' "" let g:airline_theme = 'powerlineish'
@ -186,33 +180,6 @@ let g:LanguageClient_diagnosticsEnable = 1
" rainbowparentheses " rainbowparentheses
let g:rainbow_active = 1 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 "" circom syntax
au BufRead,BufNewFile *.circom set filetype=circom au BufRead,BufNewFile *.circom set filetype=circom
au BufRead,BufNewFile *.circuit set filetype=go-snark-circuit au BufRead,BufNewFile *.circuit set filetype=go-snark-circuit
@ -222,6 +189,6 @@ set backupcopy=yes
" shortcut for theme change " shortcut for theme change
nnoremap <F9> :colorscheme molokai \| set background=dark<CR> 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 colorscheme molokai

Loading…
Cancel
Save