-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
110 lines (91 loc) · 1.97 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
"Auto indent
set ai
"Auto read
set ar
"Auto write
set awa
"Deleting
set bs=indent,eol,start
"Display
set dy=lastline,uhex
"Windows are equal
set ea
"Ignore case in patterns
set ic
"Line number
set nu
"Columns for line number
set nuw=4
"Scroll offset
set so=5
"Horizontal scroll offset
set siso=16
"New window below
set sb
"Break line char
set sbr=>\
"New window right
set spr
"Wrap
"set ww=b,s
set nowrap
"Size of indent
set tabstop=4
"Shift width
set sw=4
"Spaces instead of tabs
set expandtab
set smartindent
"Show whitespaces
set list
set nocompatible
filetype off
call plug#begin()
Plug 'preservim/nerdtree'
Plug 'fatih/vim-go'
Plug 'vim-airline/vim-airline'
Plug 'preservim/nerdcommenter'
Plug 'ekalinin/Dockerfile.vim'
Plug 'neoclide/coc.nvim'
Plug 'ryanoasis/vim-devicons'
Plug 'rust-lang/rust.vim'
Plug 'tpope/vim-fugitive'
Plug 'sheerun/vim-polyglot'
Plug 'Yggdroot/indentLine'
Plug 'junegunn/fzf'
Plug 'ayu-theme/ayu-vim'
call plug#end()
if exists('+termguicolors')
set termguicolors
endif
let ayucolor="dark"
colorscheme ayu
hi CocMenuSel ctermbg=237 guibg=#13151A
hi Comment guifg=#7B8896
"disable gopls in vim-go to avoid duplication
"let g:go_gopls_enabled = 0
"airline separators
let g:airline_left_sep = ''
let g:airline_right_sep = ''
"rust.vim autofmt
let g:rustfmt_autosave = 1
"NERDTree and NERDCommenter
map <C-g> :NERDTreeToggle<CR>
map // <plug>NERDCommenterToggle
"Quick window moving
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <C-h> <C-w>h
"Coc
inoremap <expr> <CR> coc#pum#visible() ? coc#_select_confirm() : "\<CR>"
"inoremap <expr> <Space> coc#pum#visible() ? coc#_select_confirm() : "\<Space>"
inoremap <silent><expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
inoremap <silent><expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<Tab>"
nmap <silent> gd <Plug>(coc-definition)
nmap <leader>rn <Plug>(coc-rename)
"Terminal
noremap <F12> :bo :tabnew<CR>:terminal<CR>i
tnoremap <ESC> <C-\><C-n>
"IndentLine
let g:indentLine_char = '|'