-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
44 lines (34 loc) · 1.06 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
" Install vim-plug if not found
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
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot'
Plug 'altercation/vim-colors-solarized'
Plug 'hashivim/vim-terraform'
Plug 'fatih/vim-go'
Plug 'sago35/tinygo.vim'
Plug '~/.dotfiles/fzf'
call plug#end()
" Vim settings
set modeline
set modelines=5
set autoindent
set smartindent
" Plugin settings
let g:terraform_align=1
let g:terraform_fold_sections=1
let g:terraform_fmt_on_save=1
" Custom commands
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
" Filetype specific settings
autocmd FileType fish setlocal shiftwidth=4 tabstop=4 expandtab
autocmd FileType reg setlocal fileformat=dos
" Enable Manpage support
runtime ftplugin/man.vim
set keywordprg=:Man