-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
214 lines (170 loc) · 5.22 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
207
208
209
210
211
212
213
214
" ----------------------------------------------------------
" Install Vundle:
"
" On Linux / Git Bash on Windows:
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" ----------------------------------------------------------
" Install prettier globally:
"
" > npm install -g prettier
" or
" > yarn global add prettier
" ----------------------------------------------------------
"
" ----------------------------------------------------------
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'itchyny/lightline.vim'
Plugin 'jacoborus/tender.vim'
Plugin 'crusoexia/vim-monokai', { 'name': 'monokai' }
Plugin 'dracula/vim', { 'name': 'dracula' }
Plugin 'NLKNguyen/papercolor-theme'
Plugin 'joshdick/onedark.vim'
Plugin 'morhetz/gruvbox'
Plugin 'preservim/nerdtree'
Plugin 'prettier/vim-prettier'
Plugin 'voldikss/vim-floaterm'
" Plugin 'NLKNguyen/papercolor-theme'
Plugin 'mhinz/vim-startify'
Plugin 'neoclide/coc.nvim', {'branch': 'release'}
Plugin 'ctrlpvim/ctrlp.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" ============================================================================
set mouse=a
set noswapfile
set scrolloff=8
set sidescrolloff=8
let $LANG = 'en_US'
set encoding=utf-8
set fileencoding=utf-8
set guifont=Lucida_Console:h18
set guioptions-=m " removes menu bar
set guioptions-=T " removes toolbar
set guioptions-=r " removes scrollbar
set number
" set relativenumber
set expandtab
set shiftwidth=2
set signcolumn=auto
set tabstop=2
set hidden
set hlsearch
set incsearch
set ignorecase
set belloff=all
set guioptions-=e
set nowrap
set spell
set list
" set showbreak=↪\
" set listchars=tab:→\ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨
set listchars=tab:»·,nbsp:+,trail:·,extends:→,precedes:←
set confirm
set splitright
set splitbelow
set nobackup
set nowritebackup
set cmdheight=2
set updatetime=300
set shortmess+=c
set signcolumn=number
" set shell=\"C:\Program\ Files\Git\git-bash.exe\"
if has("win32")
au GUIEnter * simalt ~x
" set shell=C:\Windows\Sysnative\wsl.exe
set shell=\"C:\Program\ Files\Git\bin\bash.exe\"
set shellpipe=|
set shellredir=>
set shellcmdflag=
endif
" reselect visual selection after identing
vnoremap < <gv
vnoremap > >gv
" copy/paste etc
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <C-r><C-o>+
" set nojoinspaces
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
if (has("termguicolors"))
set termguicolors
endif
syntax enable
set background=dark
augroup colors
autocmd!
autocmd ColorScheme * call s:modifyOneDarkTheme()
augroup END
function s:modifyOneDarkTheme()
if g:colors_name == "onedark"
let s:background = { "gui": "#101010", "cterm": "235", "cterm16": "0", "cterm256": "0" }
call onedark#set_highlight("Normal", { "bg": s:background })
endif
endfunction
let g:gruvbox_contrast_dark = 'hard'
colorscheme tender
set laststatus=2
let g:lightline = { 'colorscheme': g:colors_name }
" Start NERDTree and leave the cursor in it.
" autocmd VimEnter * NERDTree
" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
set fillchars+=vert:\
" set fillchars=vert:\│
let g:prettier#config#tab_width = '2'
let g:prettier#config#use_tabs = 'false'
let g:prettier#config#semi = 'false'
let g:prettier#config#single_quote = 'true'
let g:prettier#config#bracket_spacing = 'true'
let g:prettier#config#jsx_bracket_same_line = 'false'
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue PrettierAsync
" configure netrw
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25
augroup ProjectDrawer
autocmd!
" autocmd VimEnter * :Vexplore
augroup END
" startify configuration
let g:startify_files_number = 8
let g:startify_custom_header = ''
let g:coc_global_extensions = [
\ 'coc-tsserver'
\ ]
if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
let g:coc_global_extensions += ['coc-prettier']
endif
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
let g:coc_global_extensions += ['coc-eslint']
endif
inoremap <silent><expr> <c-space> coc#refresh()
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git\|boxroom'