فهرست منبع

Multiple minor improvements

Fred Damstra 2 سال پیش
والد
کامیت
f90dbf597b
2فایلهای تغییر یافته به همراه45 افزوده شده و 15 حذف شده
  1. 11 0
      .bashrc
  2. 34 15
      .vimrc

+ 11 - 0
.bashrc

@@ -161,10 +161,19 @@ if [ -d ~/Library/Python/3.8/bin ]; then
   export PATH=$PATH:~/Library/Python/3.8/bin
 fi
 
+if [ -d ~/.chefdk/gem/ruby/2.6.0/bin ]; then
+  export PATH=$PATH:~/.chefdk/gem/ruby/2.6.0/bin
+fi
+
+
 if [ -d ~/.local/bin ]; then
   export PATH=$PATH:~/.local/bin
 fi
 
+if [ -d ~/.gem/ruby/2.6.0/bin ]; then
+  export PATH=$PATH:~/.gem/ruby/2.6.0/bin
+fi
+
 if [ -d ~/xdr-terraform-live/bin ]; then
   export PATH=$PATH:~/xdr-terraform-live/bin
 fi
@@ -298,6 +307,8 @@ export EDITOR=vim
 # Import crowdstrike-specific settings
 [[ -f ~/.bashrc.crowdstrike ]] && source ~/.bashrc.crowdstrike
 
+alias activate='source env/bin/activate'
+
 echo ""
 echo "Reminder: Use command-shift-s to save your window arrangement, command-shift-r to restore."
 echo ""

+ 34 - 15
.vimrc

@@ -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\)',
+      \ }