From 26e313e21e01ea10b119003664d47ee60d7a683a Mon Sep 17 00:00:00 2001 From: bretello Date: Fri, 8 Apr 2022 12:07:48 +0200 Subject: [PATCH] vim: map H to actionlint on current file --- vim/functions.vim | 8 ++++++++ vim/shortcuts.vim | 3 +++ 2 files changed, 11 insertions(+) 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