-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
206 lines (154 loc) · 4.78 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
"
" Licensed under MIT
" copyright © 2020 Injamul Mohammad Mollah <[email protected]>
"
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source ~/.vimrc
endif
call plug#begin('~/.vim/plugged')
" Window chooser
" Ref-https://github.com/t9md/vim-choosewin
Plug 't9md/vim-choosewin'
" file browser
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'scrooloose/nerdcommenter'
" Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" FZF plugin for file browsing inside coding
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
" Insert or delete brackets, parens, quotes in pair.
Plug 'jiangmiao/auto-pairs'
"JS Plugin
Plug 'othree/yajs.vim'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
" HTML Plugin
Plug 'mattn/emmet-vim'
" Syntax Checker
Plug 'scrooloose/syntastic'
" code snippets
Plug 'honza/vim-snippets'
Plug 'garbas/vim-snipmate'
Plug 'marcweber/vim-addon-mw-utils'
" Git tool
Plug 'tpope/vim-fugitive'
" fuzzy file finder
" Plug 'ctrlpvim/ctrlp.vim'
" vim-rainbow brackets highlighter
Plug 'frazrepo/vim-rainbow'
" find in a file
Plug 'mileszs/ack.vim'
" Icons in vim
Plug 'ryanoasis/vim-devicons'
" Git diff modified added and removed
if has('nvim') || has('patch-8.0.902')
Plug 'mhinz/vim-signify'
else
Plug 'mhinz/vim-signify', { 'branch': 'legacy' }
endif
" Tag Lists
" Plug 'vim-scripts/taglist.vim'
" Plug 'prettier/vim-prettier', {
" \ 'do': 'yarn install --frozen-lockfile',
" \ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }
"Ruby On Rails
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
" Java Autocomplete
" Plug 'artur-shaik/vim-javacomplete2'
"neocomplete plugin
Plug 'Shougo/neocomplete.vim'
" For GoLang
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
" UTF-8 Lang
set encoding=UTF-8
" Key Mapper
nmap - <Plug>(choosewin)
let g:choosewin_overlay_enable = 1
" NERDTree Show Hidden files (shift + i for toggle)
" let NERDTreeShowHidden=1
let g:NERDTreeGitStatusIndicatorMapCustom = {
\ "Modified" : "✹",
\ "Staged" : "✚",
\ "Untracked" : "✭",
\ "Renamed" : "➜",
\ "Unmerged" : "═",
\ "Deleted" : "✖",
\ "Dirty" : "✗",
\ "Clean" : "✔︎",
\ "Unknown" : "?"
\ }
" Airline Start ------------------------------
let g:airline_powerline_fonts = 0
let g:airline_theme = 'bubblegum'
let g:airline#extensions#whitespace#enabled = 0
let g:coc_disable_startup_warning = 1
" Fancy Symbols!!
let fancy_symbols_enabled = 1
if fancy_symbols_enabled
let g:webdevicons_enable = 1
else
let g:webdevicons_enable = 0
endif
" Airline end----------------------------------
" tabs and spaces handling
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
" show line numbers
set nu
" when scrolling, keep cursor 3 lines away from screen border
set scrolloff=3
set wildmode=list:longest
" clear search results
nnoremap <silent> // :noh<CR>
" remap envoke key FZF
nnoremap <silent> <C-x> :FZF<CR>
" Java
autocmd FileType java setlocal omnifunc=javacomplete#Complete
" Configuration for GoLang
" if hidden is not set, TextEdit might fail.
set hidden
" Better display for messages
set cmdheight=2
" Smaller updatetime for CursorHold & CursorHoldI
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
set signcolumn=yes
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
" Active Rainbow
let g:rainbow_active = 1
let g:rainbow_load_separately = [
\ [ '*' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
\ [ '*.tex' , [['(', ')'], ['\[', '\]']] ],
\ [ '*.cpp' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
\ [ '*.{html,htm}' , [['(', ')'], ['\[', '\]'], ['{', '}'], ['<\a[^>]*>', '</[^>]*>']] ],
\ ]
let g:rainbow_guifgs = ['RoyalBlue3', 'DarkOrange3', 'DarkOrchid3', 'FireBrick']
let g:rainbow_ctermfgs = ['lightblue', 'lightgreen', 'yellow', 'red', 'magenta']
" Coc Prettier
command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile')
" coc.nvim extensions
" let g:coc_global_extensions = ['coc-html', 'coc-css', 'coc-json', 'coc-prettier', 'coc-tsserver']