-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
141 lines (116 loc) · 3.35 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
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)
Plugin 'tmhedberg/SimpylFold'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'jnurmine/Zenburn'
Plugin 'altercation/vim-colors-solarized'
Plugin 'kien/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'pangloss/vim-javascript'
Plugin 'nsf/gocode', {'rtp': 'nvim/'}
Plugin 'Shougo/vimproc'
Plugin 'Shougo/unite.vim'
Plugin 'fatih/vim-go'
Plugin 'tpope/vim-sensible'
Plugin 'gabrielelana/vim-markdown'
Plugin 'vim-scripts/dbext.vim'
Plugin 'posva/vim-vue'
call vundle#end() " required
filetype plugin indent on " required
set splitbelow
set splitright
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
set foldmethod=indent
" See docstrings
" in folded code
let g:SimpylFold_docstring_preview=1
" Pep8
au BufNewFile,BufRead *.py setlocal
\ tabstop=4
\ softtabstop=4
\ shiftwidth=4
\ textwidth=79
\ expandtab
\ autoindent
\ fileformat=unix
" JS. CSS. HTML
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
au BufNewFile,BufRead *.js,*css,*.html setlocal
\ tabstop=2
\ softtabstop=2
\ shiftwidth=2
\ expandtab
autocmd BufRead,BufNewFile *.vue setlocal
\ tabstop=2
\ softtabstop=2
\ shiftwidth=2
\ expandtab
au BufNewFile,BufRead *go setlocal
\ tabstop=4
\ softtabstop=0
\ shiftwidth=4
\ expandtab
" Remove extra whitespaces for all files
au BufWritePre * :%s/\s\+$//e
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8
" You Complete me Space+G Go-To definition
" let g:ycm_autoclose_preview_window_after_completion=1
" Disable auto complete by default. Trigger it on Ctrl+Space
" let g:ycm_auto_trigger = 1
map <leader>g :GoDef <CR>
" Golang settings
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:syntastic_go_checkers = ['go', 'golint']
let g:go_fmt_command = "goimports"
let g:syntastic_enable_signs = 1
let g:syntastic_enable_balloons = 1
let g:syntastic_enable_highlighting = 1
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
let g:deoplete#enable_at_startup = 1
" Python settings
let python_highlight_all=1
syntax on
" Fix backspace
set background=dark
set backspace=2
colorscheme solarized
" Switch between Solarized themes
call togglebg#map("<F5>")
set nu
set clipboard=unnamed
set splitbelow
set splitright
let g:solarized_termcolors=256
let g:python_host_prog = '/usr/bin/python'
" Speed up python
let g:python_host_skip_check = 1
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': [],'passive_filetypes': [] }
nnoremap <C-w>E :SyntasticCheck<CR> :SyntasticToggleMode<CR>