From 0c732266c09ea04b2229eeb1e2801f795b4999df Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Oct 2020 03:10:49 +0200 Subject: `GitTodo` command to run `git todo` and load matches to quickfix list Allow a ref to be specified in an argument, falling back to `g:git_todo_default_ref`, or the `git todo` default. --- autoload/git_todo.vim | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 autoload/git_todo.vim (limited to 'autoload') diff --git a/autoload/git_todo.vim b/autoload/git_todo.vim new file mode 100644 index 0000000..ca57921 --- /dev/null +++ b/autoload/git_todo.vim @@ -0,0 +1,9 @@ +function! git_todo#QuickfixTodos(ref) + let ref = a:ref + + if empty(ref) + let ref = get(g:, 'git_todo_default_ref', '') + endif + + cexpr system('git todo ' . ref) +endfunction -- cgit v1.2.3