-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc-vim-plug
151 lines (114 loc) · 3.28 KB
/
vimrc-vim-plug
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
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'junegunn/seoul256.vim'
Plug 'morhetz/gruvbox'
" Colorscheme dracula
Plug 'zenorocha/dracula-theme', {'rtp': 'vim/'}
" On-demand loading
" nerdtree plugin
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" syntax checker for js
Plug 'scrooloose/syntastic'
" vim-javascript
Plug 'pangloss/vim-javascript'
" vim-jsdoc
Plug 'heavenshell/vim-jsdoc'
" Ctrl p fuzzy file searching
Plug 'ctrlpvim/ctrlp.vim'
" emmet coding
Plug 'mattn/emmet-vim'
" plugin git-gutter git add/remoe hightlighting
Plug 'airblade/vim-gitgutter'
" Babel plugin
Plug 'jbgutierrez/vim-babel'
Plug 'mattn/webapi-vim'
" plugin for quich movement in vim like 'f' key in vimium
Plug 'easymotion/vim-easymotion'
" Plugin for dev icons
Plug 'ryanoasis/vim-devicons'
call plug#end()
if !has('nvim')
" enable 24 bit color for nvim
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
else
" enable 256 colors in vim
set t_Co=256
endif
" set darkbackground
set background=dark
" other settings
" set color scheme
"colorscheme seoul256
colorscheme gruvbox
" managing searches
set ignorecase
set smartcase
set incsearch
set hlsearch
" handling tabspacing
" size of a hard tabstop
set tabstop=4
" size of an "indent"
set shiftwidth=4
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=4
" make "tab" insert indents instead of tabs at the beginning of a line
set smarttab
" always uses spaces instead of tab characters
set expandtab
" set line numbers to be visible
set number
" enable statusline
set laststatus=2
" setting overflow margin visible
"set colorcolumn=80
" Nerdtree settings
let g:NERDTreeWinPos = "right"
" jsdoc settings
let g:jsdoc_access_descriptions = 2
let g:jsdoc_underscore_private = 1
let g:jsdoc_enable_es6 = 1
" status line settings for syntastic
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_error_symbol = "✗"
let g:syntastic_warning_symbol = "⚠"
let g:syntastic_java_checkers=['javac']
let g:syntastic_javascript_checkers=['eslint']
let g:syntastic_python_checkers=['flake8', 'pylint']
" configuration for easymotion
" Turn on case insensitive feature
let g:EasyMotion_smartcase = 1
" `s{char}{char}{label}`
" Need one more keystroke, but on average, it may be more comfortable.
nmap s <Plug>(easymotion-overwin-f2)
" easymotion configuration ends
" WHITESPACE CONFIGURATION
" ----------------------------------
" highlight extra whitespaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
" auto-strip white spaces on save
function! TrimWhiteSpace()
%s/\s\+$//e
endfunction
autocmd BufWritePre * :call TrimWhiteSpace()
" ENDS
" highlight current line
set cursorline
hi CursorLine term=bold cterm=bold guibg=darkred
" ENDS
" folding settings
set foldmethod=indent " fold based on indent
set foldnestmax=10 " deepest fold is 10 levels
set nofoldenable " don't fold by default
set foldlevel=1 " trying this setting
" ENDS
" Handle modelines
set nocompatible
set modelines=1