diff --git a/vim/functions.vim b/vim/functions.vim index 999004b..a0fd1f0 100644 --- a/vim/functions.vim +++ b/vim/functions.vim @@ -149,3 +149,11 @@ function! Cmd(cmd) endfunction command! -nargs=1 -complete=shellcmd Cmd silent call Cmd() + +" Call actionlint (github actions linter) on current file +function ActionLint() + call setqflist([]) + cexpr system('actionlint --oneline ' . expand('%')) + copen +endfunction +command! ActionLint call ActionLint() diff --git a/vim/shortcuts.vim b/vim/shortcuts.vim index 1b22389..7e7f704 100644 --- a/vim/shortcuts.vim +++ b/vim/shortcuts.vim @@ -159,3 +159,6 @@ autocmd FileType python nnoremap T :Pytest function --pdb " Ultisnips map ue :UltiSnipsEdit + +" Github actions linter +map H :ActionLint