diff --git a/home/.bashrc b/home/.bashrc index 1be246f..ef5c4ac 100644 --- a/home/.bashrc +++ b/home/.bashrc @@ -18,9 +18,8 @@ HISTFILESIZE=2000 #resize window each command shopt -s checkwinsize -#set pretty colors for LS +#some useful aliases alias ls='ls --color=auto' -alias grep='grep --color=auto' alias jprint='python3 -m json.tool' alias sl='ls --color=auto' alias vim='vim -p' @@ -38,3 +37,6 @@ then cwd=$(pwd) export PS1="\[\033[48;5;27m\]${cwd##*/}\[$(tput sgr0)\] 🖋️📜 " fi + +# Exclude some folders from grep by default. +alias grep='grep --color=auto --exclude-dir=".mypy_cache" --exclude-dir=".git" --exclude-dir=".tox" --exclude-dir="__pycache__"' diff --git a/home/.vimrc.d/dev-environ.vim b/home/.vimrc.d/dev-environ.vim index 23ef2c5..a474470 100644 --- a/home/.vimrc.d/dev-environ.vim +++ b/home/.vimrc.d/dev-environ.vim @@ -10,6 +10,7 @@ let g:ale_linters = { \ 'flake8', \ 'mypy', \ 'bandit', + \ 'unimport', \ ], \ 'php': ['phpcs'], \ 'spec': ['rpmlint'], diff --git a/home/.vimrc.d/filetypes.vim b/home/.vimrc.d/filetypes.vim index 520ed67..fc77fa2 100644 --- a/home/.vimrc.d/filetypes.vim +++ b/home/.vimrc.d/filetypes.vim @@ -9,18 +9,30 @@ filetype plugin on "Apache au BufNewFile,BufRead /*/httpd/conf.d/* setf apache +"ssh +au BufNewFile,BufRead */.ssh/config.d/* setf sshconfig + "Django autocmd BufNewFile,BufRead *.djt set syntax=django autocmd BufNewFile,BufRead *.html.djt set syntax=htmldjango "Python - au BufNewFile,BufRead *.py - \ setlocal tabstop=4 - \ | setlocal softtabstop=4 - \ | setlocal shiftwidth=4 - \ | setlocal expandtab - \ | setlocal autoindent - \ | setlocal fileformat=unix +au FileType python + \ setlocal tabstop=4 + \ | setlocal softtabstop=4 + \ | setlocal shiftwidth=4 + \ | setlocal expandtab + \ | setlocal autoindent + \ | setlocal fileformat=unix + +"yaml +au FileType yaml + \ setlocal tabstop=2 + \ | setlocal softtabstop=2 + \ | setlocal shiftwidth=2 + \ | setlocal expandtab + \ | setlocal autoindent + \ | setlocal fileformat=unix "FORTRAN let fortran_fixed_source = 1 @@ -48,6 +60,6 @@ let g:tex_flavor='latex' au BufNewFile,BufRead */.vimrc.d/* set filetype=vim "Helm -autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl,*.gotmpl,helmfile.yaml set ft=helm +autocmd BufRead,BufNewFile */templates/*.yaml,*/templates/*.tpl,*.gotmpl set ft=helm " Use {{/* */}} as comments autocmd FileType helm setlocal commentstring={{/*\ %s\ */}}