Created
May 11, 2023 08:47
-
-
Save andlrc/45ca375ce09be654328c9360cd0b36e4 to your computer and use it in GitHub Desktop.
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
" gitsendmail.vim - gitsendmail after ftplugin | |
" Author: Andreas Louv <andreas@louv.dk> | |
" Last Change: Jan 04, 2013 | |
setlocal includeexpr=GitSendMailIncludeExpr(v:fname) | |
function! GitSendMailIncludeExpr(fname) abort | |
let m = matchlist(a:fname, '^\%(a\|b\)/\(\f\+\)$') | |
if !empty(m) | |
let file = m[1] | |
let git_root = systemlist('git rev-parse --show-toplevel 2> /dev/null') | |
return join([git_root[0], file], '/') | |
endif | |
return a:fname | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment