|
@@ -4,14 +4,14 @@ syntax on
|
|
|
set encoding=utf-8
|
|
|
set ruler " Show us our row and column
|
|
|
|
|
|
-"let g:python3_host_prog = '/opt/homebrew/bin/python3'
|
|
|
+let g:python3_host_prog = '/usr/bin/python3'
|
|
|
|
|
|
" Accomodate a dark background
|
|
|
set background=dark
|
|
|
|
|
|
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
|
|
|
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
|
endif
|
|
|
|
|
@@ -52,6 +52,10 @@ let g:terraform_completion_keys = 1
|
|
|
let g:terraform_registry_module_completion = 0
|
|
|
|
|
|
let g:pymode_python = 'python3'
|
|
|
+let g:pymode_options_max_line_length = 110
|
|
|
+let g:pymode_lint_options_pep8 = {'max_line_length': g:pymode_options_max_line_length}
|
|
|
+let g:pymode_options_colorcolumn = 1
|
|
|
+
|
|
|
|
|
|
" set the runtime path to include Vundle and initialize
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
@@ -85,6 +89,10 @@ Plugin 'vim-syntastic/syntastic'
|
|
|
"Plugin 'juliosueiras/vim-terraform-completion'
|
|
|
Plugin 'saltstack/salt-vim'
|
|
|
Plugin 'psf/black'
|
|
|
+Plugin 'vim-autoformat/vim-autoformat'
|
|
|
+
|
|
|
+au BufWrite * :Autoformat
|
|
|
+
|
|
|
|
|
|
" All of your Plugins must be added before the following line
|
|
|
call vundle#end() " required
|
|
@@ -107,26 +115,26 @@ set expandtab
|
|
|
|
|
|
" Python PEP-8
|
|
|
au BufNewFile,BufRead *.py
|
|
|
- \ set tabstop=4 |
|
|
|
- \ set softtabstop=4 |
|
|
|
- \ set shiftwidth=4 |
|
|
|
- \ set expandtab |
|
|
|
- \ set autoindent |
|
|
|
- \ set foldmethod=syntax |
|
|
|
- \ set fileformat=unix
|
|
|
+ \ set tabstop=4 |
|
|
|
+ \ set softtabstop=4 |
|
|
|
+ \ set shiftwidth=4 |
|
|
|
+ \ set expandtab |
|
|
|
+ \ set autoindent |
|
|
|
+ \ set foldmethod=syntax |
|
|
|
+ \ set fileformat=unix
|
|
|
|
|
|
au BufNewFile,BufRead *.json
|
|
|
- \ set filetype=json |
|
|
|
- \ set foldmethod=syntax
|
|
|
+ \ set filetype=json |
|
|
|
+ \ set foldmethod=syntax
|
|
|
|
|
|
" But not for most files
|
|
|
au BufNewFile,BufRead *.js, *.html, *.css
|
|
|
- \ set tabstop=2 |
|
|
|
- \ set softtabstop=2 |
|
|
|
- \ set shiftwidth=2
|
|
|
+ \ set tabstop=2 |
|
|
|
+ \ set softtabstop=2 |
|
|
|
+ \ set shiftwidth=2
|
|
|
|
|
|
au BufNewFile,BufRead *.sls
|
|
|
- \ set filetype=sls
|
|
|
+ \ set filetype=sls
|
|
|
|
|
|
au FileType gitcommit setlocal nowrap
|
|
|
au FileType go set expandtab!
|
|
@@ -156,3 +164,14 @@ augroup black_on_save
|
|
|
augroup end
|
|
|
|
|
|
au BufRead * normal zR
|
|
|
+
|
|
|
+
|
|
|
+" Ignore some markdown checks
|
|
|
+" MD012 - Multiple consecutive blank lines
|
|
|
+" MD013 - Line length in markdown
|
|
|
+" MD026 - Trailing punctuation in header
|
|
|
+" MD029 - Ordered lists. It wants everything with 1., 1., 1.,
|
|
|
+" MD034 - Bare URL in markdown
|
|
|
+let g:syntastic_quiet_messages = {
|
|
|
+ \ "regex": '\(MD012\|MD013\|MD026\|MD029\|MD034\)',
|
|
|
+ \ }
|