Hey fellow listmates,

I was hoping someone could help me with this. I'd like to put the
current hg revision of the project i'm working on in the Vim
statusline to make it really easy to see without having to use hg log
or something. I have an idea of the commands necessary to do this, but
i'm not nearly good enough with Vim scripting so I was hoping someone
here would be able to help me out.

The shell commands that would give me the information I want/need from
mercurial are:
'hg id -n' or 'hg tip --template "{rev}"' which print a 2, 3 or 4
digit number to stdout. Also, it'd need to run one of those hg
commands in the dir of the file i'm opening, not ~ or something.

Finally (and i could probably do this myself if necessary), it'd need
to check the dir of the file and keep going up a directory till it
finds a .hg directory to run one of those commands and if it doesn't
find one, don't do anything to the statusbar or run the hg commands.

I know i may be asking a lot, but i really know very little about Vim
scripting so i'm hoping some of the people more experienced on this
mailing list could help.

Thanks
JD

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to