vim is not obeying command aliases

Posted by Nadal on Stack Overflow See other posts from Stack Overflow or by Nadal
Published on 2011-01-10T00:38:49Z Indexed on 2011/01/10 0:54 UTC
Read the original article Hit count: 210

Filed under:

I use bash on mac and one of the aliases is like this

alias gitlog='git --no-pager  log -n 20 --pretty=format:%h%x09%an%x09%ad%x09%s --date=short --no-merges'

However when I do

 :! gitlog

I get

/bin/bash: gitlog: command not found 

I know I can add aliases like this in my .gitconfig

[alias]
    co = checkout
    st = status
    ci = commit
    br = branch
    df = diff

However I don't want to add all my bash aliases to .gitconfig. That is not DRY.

Is there a better solution?

© Stack Overflow or respective owner

Related posts about vim