Browse Source

Minor quality of life updates

Fred Damstra 2 years ago
parent
commit
0bf6aa57e9
3 changed files with 18 additions and 1 deletions
  1. 3 0
      .bash_aliases
  2. 5 1
      .bashrc
  3. 10 0
      .vimrc

+ 3 - 0
.bash_aliases

@@ -105,3 +105,6 @@ alias killfp='while [[ 1 ]]; do sudo killall -9 fpdcd; done'
 alias assume="source assume"
 alias dassume="source dassume"
 alias clearaws='unset AWS_PROFILE AWS_ACCESS_KEY_ID AWS_REGION AWS_SECRET_ACCESS_KEY AWS_SESSION_EXPIRATION AWS_SESSION_TOKEN'
+
+# For a list of profiles
+alias profs='cat ~/.aws/config | grep -E "^\[" | sed "s/[][]//g" | sed "s/profile //"'

+ 5 - 1
.bashrc

@@ -34,7 +34,11 @@ shopt -s checkwinsize
 
 # If set, the pattern "**" used in a pathname expansion context will
 # match all files and zero or more directories and subdirectories.
-#shopt -s globstar
+shopt -s globstar
+
+# If set, will fail if you use a '*' and there are no matches, rather than
+# passing through the wildcard.
+shopt -s failglob
 
 # make less more friendly for non-text input files, see lesspipe(1)
 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

+ 10 - 0
.vimrc

@@ -4,6 +4,8 @@ syntax on
 set encoding=utf-8
 set ruler                     " Show us our row and column
 
+"let g:python3_host_prog = '/opt/homebrew/bin/python3'
+
 " Accomodate a dark background
 set background=dark
 
@@ -82,6 +84,7 @@ Plugin 'hashivim/vim-terraform'
 Plugin 'vim-syntastic/syntastic'
 "Plugin 'juliosueiras/vim-terraform-completion'
 Plugin 'saltstack/salt-vim'
+Plugin 'psf/black'
 
 " All of your Plugins must be added before the following line
 call vundle#end()            " required
@@ -145,4 +148,11 @@ let g:terraform_fmt_on_save=1
 let g:syntastic_python_python_exec = 'python3'
 let g:syntastic_python_checkers = ['python']
 
+let g:syntastic_sh_checkers = ['shellcheck']
+
+augroup black_on_save
+  autocmd!
+  autocmd BufWritePre *.py Black
+augroup end
+
 au BufRead * normal zR