-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
198 lines (154 loc) · 4.3 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
set nocompatible " be iMproved, required
filetype off " required
"Vim-plug automatic installation"
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 $MYVIMRC
endif
" Vim-Plug
call plug#begin('~/.vim/bundle')
"Plugs
"Git Integration"
Plug 'tpope/vim-fugitive'
"Code Folding"
Plug 'tmhedberg/SimpylFold'
"Vim Python Autoindent"
Plug 'vim-scripts/indentpython.vim'
"Syntax checking/Higlighting"
Plug 'scrooloose/syntastic'
Plug 'nvie/vim-flake8'
"Status Bar"
Plug 'vim-airline/vim-airline'
"File Browsing"
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
"Colour Schemes"
Plug 'jnurmine/Zenburn'
Plug 'altercation/vim-colors-solarized'
Plug 'flazz/vim-colorschemes'
Plug 'dracula/vim'
"Super Searching"
Plug 'kien/ctrlp.vim'
"Tagbar"
Plug 'majutsushi/tagbar'
"Surround"
Plug 'tpope/vim-surround'
"YouCompleteMe (autocomplete)"
"Plug 'valloric/youcompleteme'
"GOLANG"
Plug 'fatih/vim-go'
"Commenting"
Plug 'scrooloose/nerdcommenter'
"Hashicorp plugins"
Plug 'hashivim/vim-terraform'
call plug#end()
"All of your Plugs 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
" :PlugList - lists configured plugins
" :PlugInstall - installs plugins; append `!` to update or just :PlugUpdate
" :PlugSearch foo - searches for foo; append `!` to refresh local cache
" :PlugClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plug stuff after this line)
syntax on
:set autoindent
" Setting paste mode toggle
set pastetoggle=<F3>
" Vim tab indentation settings
set expandtab
set shiftwidth=4
set smarttab
set autoindent
set smartindent
"UTF8 Support"
set encoding=utf-8
"Line numbering"
set nu
set ruler
"Backspace"
set bs=2
"Options from realython.com"
"1 Split Layouts"
set splitbelow
set splitright
"Move between split layouts without mouse"
"Ctrl j to move to split below"
"Ctrl k to move to split above"
"Ctrl l to move to split right"
"Ctrl h to move to split left"
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
"Python Indentation"
"PEP8"
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
"Flagging Unnecessary Whitespace"
"au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
"Make code look pretty"
let python_highlight_all=1
syntax on
"Colour Scheme"
"if has('gui_running')
" set background=dark
" colorscheme solarized
" else
" colorscheme default "zenburn
" endif
call togglebg#map("<F5>")
" Solarized Dark
"syntax enable
"set t_Co=256
set background=dark
"let g:solarized_termcolors=256
"let g:solarized_visibility = "high"
"let g:solarized_contrast = "high"
"let g:solarized_termtrans = 1
"colorscheme solarized
"colorscheme PaperColor
colorscheme dracula
"System Clipboard (able to use macOS clipboard for copy/paste)"
set clipboard=unnamed
"end of options from realpython.com"
"inoremap { {<CR><BS>}<Esc>:let leavechar="}"<CR>ko"
"inoremap ( ()<Esc>:let leavechar=")"<CR>i"
"inoremap [ []<Esc>:let leavechar="]"<CR>i"
"imap <C-j> <Esc>:exec "normal f" . leavechar<CR>a"
"NERDtree"
map <C-n> :NERDTreeToggle<CR>
"Syntastic Default Settings
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_python_checkers = ['flake8']
"Youcompleteme fix
"let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
"vim-terraform settings
let g:terraform_align=1
let g:terraform_fold_sections=1
let g:terraform_fmt_on_save=1
let g:terraform_commentstring='//%s'
"let g:terraform_remap_spacebar=1