From d8607bc48b1313b9acdf03d0c80e47fdbf1ba6c6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 27 Oct 2019 00:57:22 +0200 Subject: Add 'git-shortcuts' plugin An ftplugin that provides `[[` and `]]` mappings to move between commits in `git log` output. --- bundle/git-shortcuts/autoload/git_shortcuts.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bundle/git-shortcuts/autoload/git_shortcuts.vim (limited to 'bundle/git-shortcuts/autoload') diff --git a/bundle/git-shortcuts/autoload/git_shortcuts.vim b/bundle/git-shortcuts/autoload/git_shortcuts.vim new file mode 100644 index 0000000..bcd32d9 --- /dev/null +++ b/bundle/git-shortcuts/autoload/git_shortcuts.vim @@ -0,0 +1,10 @@ +let s:COMMIT_START_PATTERN = '^commit' + + +function! git_shortcuts#CommitBackward() + call search(s:COMMIT_START_PATTERN, 'b') +endfunction + +function! git_shortcuts#CommitForward() + call search(s:COMMIT_START_PATTERN) +endfunction -- cgit v1.2.3