-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
176 lines (149 loc) · 4.33 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
set nocompatible " 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 'gmarik/Vundle.vim'
" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)
"Code Folding
Plugin 'tmhedberg/SimpylFold'
"Auto Indent
Plugin 'vim-scripts/indentpython.vim'
"Auto-Complete
Bundle 'Valloric/YouCompleteMe'
"Syntax Checking/Highlighting
Plugin 'vim-syntastic/syntastic'
" add PEP 8 checking
Plugin 'nvie/vim-flake8'
" Color Schemes
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
"File Browsing
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
"git
Plugin 'tpope/vim-fugitive'
"status bar
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
"auto pairs
Plugin 'windwp/nvim-autopairs'
Plugin 'ludovicchabant/vim-gutentags'
Plugin 'skywind3000/gutentags_plus'
Plugin 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plugin 'junegunn/fzf.vim'
set rtp+=/usr/bin/fzf
" Track the engine.
"iPlugin 'SirVer/ultisnips'
" Snippets are separated from the engine. Add this if you want them:
"Plugin 'honza/vim-snippets'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
"add the proper PEP 8 indentation
au BufNewFile, BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
autocmd FileType python setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
"For full stack development,
au BufNewFile, BufRead *.js,*.html,*.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
"Flagging Unnecessary Whitespace
au BufRead, BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
"using UTF-8
set encoding=utf-8
"auto cmplete setup with YCM
"let g:ycm_python_interpreter_path = ''
"let g:ycm_python_sys_path = []
"let g:ycm_extra_conf_vim_data = [
" \ 'g:ycm_python_interpreter_path',
" \ 'g:ycm_python_sys_path'
" \]
"let g:ycm_global_ycm_extra_conf = '~/.global_extra_conf.py'
"
let g:ycm_autoclose_preview_window_after_completion=1
map <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let python_highlight_all=1
syntax on
if has('gui_running')
set background=dark
colorscheme solarized
else
colorscheme zenburn
endif
set clipboard=unnamedplus
" enable gtags module
let g:gutentags_modules = ['ctags', 'gtags_cscope']
let g:gutentags_add_default_project_roots = 0
" config project root markers.
let g:gutentags_project_root = ['package.json', '.git', '.root']
" generate datebases in my cache directory, prevent gtags files polluting my project
let g:gutentags_cache_dir = expand('~/.cache/vim/ctags/')
" change focus to quickfix window after search (optional).
let g:gutentags_plus_switch = 1
let g:gutentags_generate_on_new = 1
let g:gutentags_generate_on_missing = 1
let g:gutentags_generate_on_write = 1
let g:gutentags_generate_on_empty_buffer = 0
let g:gutentags_ctags_exclude = [
\ '*.git', '*.svg', '*.hg',
\ '*/tests/*',
\ 'build',
\ 'dist',
\ '*sites/*/files/*',
\ 'bin',
\ 'node_modules',
\ 'bower_components',
\ 'cache',
\ 'compiled',
\ 'docs',
\ 'example',
\ 'bundle',
\ 'vendor',
\ '*.md',
\ '*-lock.json',
\ '*.lock',
\ '*bundle*.js',
\ '*build*.js',
\ '.*rc*',
\ '*.json',
\ '*.min.*',
\ '*.map',
\ '*.bak',
\ '*.zip',
\ '*.pyc',
\ '*.class',
\ '*.sln',
\ '*.Master',
\ '*.csproj',
\ '*.tmp',
\ '*.csproj.user',
\ '*.cache',
\ '*.pdb',
\ 'tags*',
\ 'cscope.*',
\ '*.css',
\ '*.less',
\ '*.scss',
\ '*.exe', '*.dll',
\ '*.mp3', '*.ogg', '*.flac',
\ '*.swp', '*.swo',
\ '*.bmp', '*.gif', '*.ico', '*.jpg', '*.png',
\ '*.rar', '*.zip', '*.tar', '*.tar.gz', '*.tar.xz', '*.tar.bz2',
\ '*.pdf', '*.doc', '*.docx', '*.ppt', '*.pptx',
\ ]