Compare commits

..

No commits in common. "9f566efa8e50595dc31885e9510c1ac6ad513035" and "26e313e21e01ea10b119003664d47ee60d7a683a" have entirely different histories.

5 changed files with 22 additions and 28 deletions

View File

@ -263,6 +263,16 @@ make_backup() {
echo "done"
}
function find_by_mtime() {
find $@ -printf "%T+ %p\n" | sort
mkvenv(){
# any arguments are passed on to the `venv` module as flags/arguments
if [[ -e .venv ]]; then
echo "$(color $RED Error:) $(color $BOLD .venv) already exists." >&2
return 1
fi
echo -n "Creating venv..." && python -m venv $@ .venv && echo -n " done. Enable? [Y/n]"
read source_venv
if [[ $source_venv != "n" ]]; then
source .venv/bin/activate && echo -e "$(color $BOLD Enabled!) 🐍 $(color $BOLD$PURPLE $(python --version | cut -d " " -f2 )) ($(color $BOLD$GREEN $(pip --version | cut -d " " -f -2)))"
fi
}

View File

@ -1,24 +0,0 @@
mkvenv(){
local source_venv
if [[ $1 == "-s" ]]; then
source_venv=y
shift
fi
# any arguments are passed on to the `venv` module as flags/arguments
if [[ -e .venv ]]; then
echo "$(color $RED Error:) $(color $BOLD .venv) already exists." >&2
return 1
fi
echo -n "Creating venv..." && python -m venv $@ .venv
if [[ -z ${source_venv} ]]; then
echo -n " done. Enable? [Y/n]"
read source_venv
else
echo ""
fi
if [[ $source_venv != "n" ]]; then
source .venv/bin/activate && echo -e "$(color $BOLD Enabled!) 🐍 $(color $BOLD$PURPLE $(python --version | cut -d " " -f2 )) ($(color $BOLD$GREEN $(pip --version | cut -d " " -f -2)))"
fi
}

View File

@ -150,3 +150,10 @@ endfunction
command! -nargs=1 -complete=shellcmd Cmd silent call Cmd(<q-args>)
" Call actionlint (github actions linter) on current file
function ActionLint()
call setqflist([])
cexpr system('actionlint --oneline ' . expand('%'))
copen
endfunction
command! ActionLint call ActionLint()

View File

@ -159,3 +159,6 @@ autocmd FileType python nnoremap T :Pytest function --pdb<CR>
" Ultisnips
map <Leader>ue :UltiSnipsEdit<cr>
" Github actions linter
map <Leader>H :ActionLint<CR>

View File

@ -75,8 +75,6 @@ au BufRead *.dvc let b:ale_fix_on_save=0
au BufRead *.dvc set filetype=yaml
au BufRead,BufNewFile */playbooks/*.yml set filetype=yaml.ansible
au BufRead,BufNewFile */.github/*/*.y{,a}ml
\ let b:ale_linters = {'yaml': ['actionlint'] }
au BufRead,BufNewFile rules.v[46] *.rules setlocal filetype=iptables
if has('persistent_undo')