diff --git a/roles/dotfiles/files/vimrc b/roles/dotfiles/files/vimrc index 7a77dd8..c7e6015 100644 --- a/roles/dotfiles/files/vimrc +++ b/roles/dotfiles/files/vimrc @@ -2,16 +2,25 @@ set number set colorcolumn=88 set background=dark set cursorline +set shell=/bin/sh syntax on " python -au BufNewFile,BufRead *.py,*.go set tabstop=4 softtabstop=4 shiftwidth=4 +au BufNewFile,BufRead *.go set tabstop=4 softtabstop=4 shiftwidth=4 \ expandtab autoindent fileformat=unix -au BufNewFile,BufRead *.yaml,*.tf set tabstop=2 softtabstop=2 shiftwidth=2 +au BufNewFile,BufRead *.yaml set tabstop=2 softtabstop=2 shiftwidth=2 \ expandtab autoindent fileformat=unix au BufNewFile,BufRead *.html,*.css set tabstop=2 softtabstop=2 shiftwidth=2 \ expandtab autoindent colorcolumn=0 au BufNewFile,BufRead *.launch set filetype=xml +augroup py + autocmd FileType python :set tabstop=4 softtabstop=4 shiftwidth=4 expandtab autoindent fileformat=unix + autocmd FileType python nnoremap :Black :Isort +augroup end +augroup terraform +autocmd FileType terraform :set tabstop=2 softtabstop=2 shiftwidth=2 expandtab autoindent fileformat=unix +autocmd FileType terraform nnoremap :! terraform fmt +augroup end " vim-plug " :PlugInstall to install new one @@ -70,7 +79,6 @@ autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif " toggle nerdtree keyboard shortcut map :NERDTreeToggle -nnoremap :Black :Isort " RAINBOW_PARENTHESES au FileType c,cpp,py call rainbow#load()