This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GitBranchIssue() | |
let current_branch = system("git rev-parse --abbrev-ref HEAD") | |
let prefix = substitute(current_branch, '\([A-Z]\+-[0-9]\+\).\+', '\1 ', '') | |
return prefix | |
endfunction | |
iab commit <C-R>=GitBranchIssue() |